Class 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:
  • Constructor Details

  • Method Details

    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • 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

      public abstract void changeFontFace(String newFontFace)
      This method is called then inner action for font face name changes its value.
      Parameters:
      newFontFace - the name of new font face.
    • setSetFontFaceAction

      public void setSetFontFaceAction(SetFontFaceAction fontFaceAction)
      Sets new font face inner action. Old font face action will be removed.
      Parameters:
      fontFaceAction - the new font face action.
    • getSetFontFaceAction

      public SetFontFaceAction getSetFontFaceAction()
      Returns inner font face action.
      Returns:
      inner font face action.
    • setSetFontSizeAction

      public void setSetFontSizeAction(SetFontSizeAction fontSizeAction)
      Sets new font size inner action. Old font size action will be removed.
      Parameters:
      fontSizeAction - the new font size action.
    • getSetFontSizeAction

      public SetFontSizeAction 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 interface Action
      Overrides:
      setEnabled in class AbstractAction
      Parameters:
      val - the new enable flag.
    • setDiagram

      public void setDiagram(AbstractDiagramPresentationElement diagram)
      Description copied from interface: com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
      Sets diagram for action.
      Specified by:
      setDiagram in interface com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction
      Parameters:
      diagram - the given diagram.
    • getDiagram

      @CheckForNull public AbstractDiagramPresentationElement getDiagram()
    • clone

      public SetFontAction clone()
      Description copied from class: ActionsCategory
      Clones the category. During clone does not fire any property change events. Does deep clone.
      Overrides:
      clone in class ActionsCategory
      Returns:
      deep clone of category.