public class AttributeAction extends AbstractSelectedAction
AttributeAction
applies attribute values on the selected figures of
the current DrawingView
of a DrawingEditor
.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<AttributeKey,java.lang.Object> |
attributes |
Constructor and Description |
---|
AttributeAction(DrawingEditor editor,
AttributeKey key,
java.lang.Object value)
Creates a new instance.
|
AttributeAction(DrawingEditor editor,
AttributeKey key,
java.lang.Object value,
javax.swing.Icon icon)
Creates a new instance.
|
AttributeAction(DrawingEditor editor,
AttributeKey key,
java.lang.Object value,
java.lang.String name)
Creates a new instance.
|
AttributeAction(DrawingEditor editor,
AttributeKey key,
java.lang.Object value,
java.lang.String name,
javax.swing.Icon icon) |
AttributeAction(DrawingEditor editor,
AttributeKey key,
java.lang.Object value,
java.lang.String name,
javax.swing.Icon icon,
javax.swing.Action compatibleTextAction) |
AttributeAction(DrawingEditor editor,
java.util.Map<AttributeKey,java.lang.Object> attributes,
java.lang.String name,
javax.swing.Icon icon) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt) |
void |
applyAttributesTo(java.util.Map<AttributeKey,java.lang.Object> a,
java.util.Set<Figure> figures)
Applies the specified attributes to the currently selected figures
of the drawing.
|
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 java.util.Map<AttributeKey,java.lang.Object> attributes
public AttributeAction(DrawingEditor editor, AttributeKey key, java.lang.Object value)
public AttributeAction(DrawingEditor editor, AttributeKey key, java.lang.Object value, javax.swing.Icon icon)
public AttributeAction(DrawingEditor editor, AttributeKey key, java.lang.Object value, java.lang.String name)
public AttributeAction(DrawingEditor editor, AttributeKey key, java.lang.Object value, java.lang.String name, javax.swing.Icon icon)
public AttributeAction(DrawingEditor editor, AttributeKey key, java.lang.Object value, java.lang.String name, javax.swing.Icon icon, javax.swing.Action compatibleTextAction)
public AttributeAction(DrawingEditor editor, java.util.Map<AttributeKey,java.lang.Object> attributes, java.lang.String name, javax.swing.Icon icon)
public void actionPerformed(java.awt.event.ActionEvent evt)
public void applyAttributesTo(java.util.Map<AttributeKey,java.lang.Object> a, java.util.Set<Figure> figures)
a
- The attributes.figures
- The figures to which the attributes are applied.protected void updateEnabledState()
AbstractSelectedAction
DrawingView
. If no drawing view is active, this
action is disabled.updateEnabledState
in class AbstractSelectedAction