Package com.nomagic.actions
Class SetFontSizeAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.nomagic.actions.NMAction
-
- com.nomagic.actions.ActionsCategory
-
- com.nomagic.actions.SelectItemAction
-
- com.nomagic.actions.SetFontSizeAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.beans.PropertyChangeListener,java.io.Serializable,java.lang.Cloneable,java.lang.Comparable,java.util.EventListener,javax.swing.Action
@OpenApiAll public class SetFontSizeAction extends SelectItemAction
Action for choosing font size.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringFONT_SIZEThe value of font size property key.-
Fields inherited from class com.nomagic.actions.SelectItemAction
ADDITIONAL_PROPERTY_MAX_WIDTH
-
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
-
-
Constructor Summary
Constructors Constructor Description SetFontSizeAction()Creates action and fills it predefined font size selection list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.IntegergetFontSize()Returns selected font size value.voidsetFontSize(java.lang.Integer newFontSize)Sets new font size value.voidsetValue(java.lang.Object val)Sets new font size value.-
Methods inherited from class com.nomagic.actions.SelectItemAction
accept, clone, createAction, getItems, getValue, getValueName, isChangeable, isDisplayAsComboBox, isShowActionName, propertyChange, setChangeable, setDisplayAsComboBox, setItems, setList, setShowActionName, updateState
-
Methods inherited from class com.nomagic.actions.ActionsCategory
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
-
Methods inherited from class javax.swing.AbstractAction
getKeys, getValue, isEnabled, putValue, setEnabled
-
-
-
-
Field Detail
-
FONT_SIZE
public static final java.lang.String FONT_SIZE
The value of font size property key.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFontSize
public java.lang.Integer getFontSize()
Returns selected font size value.- Returns:
- selected font size.
-
setFontSize
public void setFontSize(java.lang.Integer newFontSize)
Sets new font size value.- Parameters:
newFontSize- new font size.
-
setValue
public void setValue(java.lang.Object val)
Sets new font size value.- Overrides:
setValuein classSelectItemAction- Parameters:
val- new font size. Can be passed as Integer or String(convertible to int). If value is not correct, old font size will be left.
-
-