Created
August 2, 2012 00:32
-
-
Save keiono/3231906 to your computer and use it in GitHub Desktop.
VisualStyleChangedEvent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class VisualStyleChangedEvent2 extends AbstractCyPayloadEvent<VisualStyle, VisualStyleChangeRecord<?>> { | |
public VisualStyleChangedEvent2(final VisualStyle source, | |
final Collection<VisualStyleChangeRecord<?>> visualStyleChanges) { | |
super(source, VisualStyleChangedListener.class, visualStyleChanges); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class VisualStyleChangeRecord<T> { | |
private final VisualProperty<T> vp; | |
private T defaultValue = null; | |
private VisualMappingFunction<?, T> mapping; | |
public VisualStyleChangeRecord(final VisualProperty<T> vp, final T defaultValue) { | |
this.defaultValue = defaultValue; | |
this.vp = vp; | |
} | |
public VisualStyleChangeRecord(final VisualProperty<T> vp, final VisualMappingFunction<?, T> mapping) { | |
this.mapping = mapping; | |
this.vp = vp; | |
} | |
public VisualProperty<T> getVisualProperty() { | |
return vp; | |
} | |
public T getDefaultValue() { | |
return defaultValue; | |
} | |
public VisualMappingFunction<?, T> getVisualMappingFunction() { | |
return mapping; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment