51525354555657
return layers.get(0); } public void setForegroundColor(FlatColor foregroundColor) { this.foregroundColor = foregroundColor; EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.ColorChanged,this.foregroundColor,this)); }
64656667686970
return backgroundColor; } public void setBackgroundColor(FlatColor backgroundColor) { this.backgroundColor = backgroundColor; EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.ColorChanged,this.backgroundColor,this)); }
119120121122123124125126
public void setSelectedColor(FlatColor color) { this.selectedColor = color; if(delegate != null) { delegate.setSelectedColor(color); } EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.ColorChanged,selectedColor,this,true)); setDrawingDirty(); }
126127128129130131132
} //this fires an extra event where isAdjusting is false private void setFinalColor(FlatColor selectedColor) { setSelectedColor(selectedColor); EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.ColorChanged,selectedColor,this,false)); }
6263646566676869
g.setPureStrokes(false); } public void setAlpha(double alpha) { this.alpha = alpha; EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.DoubleChanged,alpha,this)); setDrawingDirty(); }
808182838485868788
return alpha; } public void setAlpha(double alpha) { this.alpha = alpha; EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.DoubleChanged,this.alpha,this,true)); alphaPicker.setAlpha(this.alpha); setDrawingDirty(); }
30313233343536
fireChange(old,this.enabled); } } private void fireChange(boolean old, boolean enabled) { EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.BooleanChanged,enabled,this)); }
185186187188189190191192
public void setSelectedColor(FlatColor selectedColor) { this.selectedColor = selectedColor; if(delegate != null) { delegate.setSelectedColor(selectedColor); } EventBus.getSystem().publish(new ChangedEvent(ChangedEvent.ColorChanged,selectedColor,this,true)); setDrawingDirty(); }