@Test public void testApply() { StyleResolver styleResolver = createNiceMock(StyleResolver.class); ElementType elementType = new PanelType(); styleType.applyTo(elementType, styleResolver); assertEquals("10%", elementType.getAttributes().get("height")); assertEquals(1, elementType.getEffects().getEventEffectTypes(EffectEventId.onStartScreen).size()); assertEquals("move", elementType.getEffects().getEventEffectTypes(EffectEventId.onStartScreen).iterator().next() .getAttributes().get("name")); assertEquals("onClickMethod()", elementType.interact.getAttributes().get("onClick")); }
public void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver) { applyToBaseStyleInternal(styleResolver, elementType); applyToInternal(elementType); }
StyleType extends XmlBaseType { public void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver) { applyToBaseStyleInternal(styleResolver, elementType); applyToInternal(elementType); } }
StyleType extends XmlBaseType { public void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver) { applyToBaseStyleInternal(styleResolver, elementType); applyToInternal(elementType); } StyleType();  StyleType(@Nonnull final Attributes attributes); }
StyleType extends XmlBaseType { public void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver) { applyToBaseStyleInternal(styleResolver, elementType); applyToInternal(elementType); } StyleType();  StyleType(@Nonnull final Attributes attributes); void setAttributes(@Nonnull final AttributesType styleAttributesTypeParam); void setEffect(@Nonnull final EffectsType effectTypeParam); void setInteract(@Nonnull final InteractType interactTypeParam); @Override @Nonnull String output(final int offset); @Nullable String getStyleId(); @Nullable String getBaseStyleId(); void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver); }
StyleType extends XmlBaseType { public void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver) { applyToBaseStyleInternal(styleResolver, elementType); applyToInternal(elementType); } StyleType();  StyleType(@Nonnull final Attributes attributes); void setAttributes(@Nonnull final AttributesType styleAttributesTypeParam); void setEffect(@Nonnull final EffectsType effectTypeParam); void setInteract(@Nonnull final InteractType interactTypeParam); @Override @Nonnull String output(final int offset); @Nullable String getStyleId(); @Nullable String getBaseStyleId(); void applyTo(@Nonnull final ElementType elementType, @Nonnull final StyleResolver styleResolver);  }