Skip to content

Instantly share code, notes, and snippets.

@keiono
Created August 2, 2012 00:32
Show Gist options
  • Save keiono/3231906 to your computer and use it in GitHub Desktop.
Save keiono/3231906 to your computer and use it in GitHub Desktop.
VisualStyleChangedEvent
public final class VisualStyleChangedEvent2 extends AbstractCyPayloadEvent<VisualStyle, VisualStyleChangeRecord<?>> {
public VisualStyleChangedEvent2(final VisualStyle source,
final Collection<VisualStyleChangeRecord<?>> visualStyleChanges) {
super(source, VisualStyleChangedListener.class, visualStyleChanges);
}
}
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