public class SelectionColorChooserHandler extends AbstractSelectedAction 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 |
---|
SelectionColorChooserHandler(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
protected AttributeKey<java.awt.Color> key
protected javax.swing.JColorChooser colorChooser
protected javax.swing.JPopupMenu popupMenu
protected int isUpdating
public SelectionColorChooserHandler(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()
AbstractSelectedAction
DrawingView
. If no drawing view is active, this
action is disabled.updateEnabledState
in class AbstractSelectedAction
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener