Package com.nomagic.actions
Class SetFontAction
java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.actions.ActionsCategory
com.nomagic.actions.SetFontAction
- All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
,com.nomagic.actions.ShortcutsNotCustomizable
,com.nomagic.actions.StandaloneAction
,ActionListener
,PropertyChangeListener
,Serializable
,Cloneable
,Comparable
,EventListener
,Action
@OpenApiAll
public abstract class SetFontAction
extends ActionsCategory
implements PropertyChangeListener, com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction, com.nomagic.actions.StandaloneAction, com.nomagic.actions.ShortcutsNotCustomizable
Action for choosing font(size and font face).
- See Also:
-
Field Summary
Fields inherited from class com.nomagic.actions.ActionsCategory
ACTIONS_PROPERTY, ADDED_ACTION_PROPERTY, CHANGE_ACTIONS_PROPERTY, DISABLE_IF_EMPTY, MAX_CATEGORY_ACTIONS, REMOVE_IF_EMPTY, REMOVED_ACTION_PROPERTY, USE_AS_SEPARATOR_IN_UI
Fields inherited from class com.nomagic.actions.NMAction
ACTION_SHORTCUTS, BELONGS_TO_SEPARATE_GROUP_IN_UI, DO_NO_SHOW_ACTION_NAME_IN_UI, DO_NOT_REGISTER_ACTION_TO_COMPONENTS, GENERATED_ID_PREFIX, GROUP, ID, LARGE_ICON, MENU_SHORTCUT_MASK, TINY_ICON
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Fields inherited from interface com.nomagic.actions.ShortcutsNotCustomizable
SHORTCUTS_NOT_CUSTOMIZABLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
changeFontFace
(String newFontFace) This method is called then inner action for font face name changes its value.abstract void
changeFontSize
(int newSize) This method is called then inner action for font size changes its value.clone()
Clones the category.Returns inner font face action.Returns inner font size action.void
void
Sets diagram for action.void
setEnabled
(boolean val) Enables or disables this action.void
setSetFontFaceAction
(SetFontFaceAction fontFaceAction) Sets new font face inner action.void
setSetFontSizeAction
(SetFontSizeAction fontSizeAction) Sets new font size inner action.Methods inherited from class com.nomagic.actions.ActionsCategory
accept, actionPerformed, addAction, addAction, addActionNearTheGiven, addActions, breakActions, breakActions, breakActions, breakeActions, createSeparatorCategory, forEach, forEachIncludingSelf, getAction, getActions, getActionsRecursively, getCategories, isDisplayHeader, isEmpty, isNested, isUseActionForDisable, removeAction, removeIf, setActions, setDisplayHeader, setNested, setUseActionForDisable, shallowClone, size, sort
Methods inherited from class com.nomagic.actions.NMAction
addPropertyChangeListener, addShortcut, addShotcut, addWeakPropertyChangeListener, compareTo, createMenuItem, equals, firePropertyChange, getCommandKey, getDescription, getGroup, getIcon, getID, getLargeIcon, getLargeOrSmallIcon, getMenuShortcutMaskAsString, getMnemonicKey, getName, getPropertyChangeListeners, getShortcuts, getSmallIcon, getSmallOrLargeIcon, getTinyIcon, hashCode, hasMenuShortcutMask, isIDGenerated, removePropertyChangeListener, removeShortcut, removeWeakPropertyChangeListener, setDescription, setGroup, setIcon, setLargeIcon, setMnemonicKey, setName, setShortcuts, setSmallIcon, setTinyIcon, toString, updateState
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue
-
Constructor Details
-
SetFontAction
-
-
Method Details
-
propertyChange
- Specified by:
propertyChange
in interfacePropertyChangeListener
-
changeFontSize
public abstract void changeFontSize(int newSize) This method is called then inner action for font size changes its value.- Parameters:
newSize
- the new font size.
-
changeFontFace
This method is called then inner action for font face name changes its value.- Parameters:
newFontFace
- the name of new font face.
-
setSetFontFaceAction
Sets new font face inner action. Old font face action will be removed.- Parameters:
fontFaceAction
- the new font face action.
-
getSetFontFaceAction
Returns inner font face action.- Returns:
- inner font face action.
-
setSetFontSizeAction
Sets new font size inner action. Old font size action will be removed.- Parameters:
fontSizeAction
- the new font size action.
-
getSetFontSizeAction
Returns inner font size action.- Returns:
- inner font size action.
-
setEnabled
public void setEnabled(boolean val) Enables or disables this action. Inner font size and font face actions also will be enabled or disabled.- Specified by:
setEnabled
in interfaceAction
- Overrides:
setEnabled
in classAbstractAction
- Parameters:
val
- the new enable flag.
-
setDiagram
Description copied from interface:com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
Sets diagram for action.- Specified by:
setDiagram
in interfacecom.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
- Parameters:
diagram
- the given diagram.
-
getDiagram
-
clone
Description copied from class:ActionsCategory
Clones the category. During clone does not fire any property change events. Does deep clone.- Overrides:
clone
in classActionsCategory
- Returns:
- deep clone of category.
-