public class DrawingColorChooserHandler extends AbstractDrawingViewAction implements javax.swing.event.ChangeListener
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JColorChooser |
colorChooser |
protected int |
isUpdating |
protected AttributeKey<java.awt.Color> |
key |
protected javax.swing.JPopupMenu |
popupMenu |
Constructor and Description |
---|
DrawingColorChooserHandler(DrawingEditor editor,
AttributeKey<java.awt.Color> key,
javax.swing.JColorChooser colorChooser,
javax.swing.JPopupMenu popupMenu)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
protected void |
applySelectedColorToFigures() |
void |
stateChanged(javax.swing.event.ChangeEvent e) |
protected void |
updateEnabledState()
Updates the enabled state of this action to reflect the enabled state
of the active
DrawingView . |
dispose, fireUndoableEditHappened, getDrawing, getEditor, getView, isUpdatEnabledState, setEditor, setUpdateEnabledState, updateViewState
protected AttributeKey<java.awt.Color> key
protected javax.swing.JColorChooser colorChooser
protected javax.swing.JPopupMenu popupMenu
protected int isUpdating
public DrawingColorChooserHandler(DrawingEditor editor, AttributeKey<java.awt.Color> key, javax.swing.JColorChooser colorChooser, javax.swing.JPopupMenu popupMenu)
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
protected void applySelectedColorToFigures()
protected void updateEnabledState()
AbstractDrawingViewAction
DrawingView
. If no drawing view is active, this
action is disabled.updateEnabledState
in class AbstractDrawingViewAction
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener