Class DiagramContextToolbarAction

java.lang.Object
javax.swing.AbstractAction
com.nomagic.actions.NMAction
com.nomagic.magicdraw.actions.MDAction
com.dassault_systemes.modeler.magic.ui.diagrams.actions.DefaultAbstractDiagramAction
com.nomagic.magicdraw.ui.actions.DefaultDiagramAction
com.nomagic.magicdraw.ui.actions.DiagramContextToolbarAction
All Implemented Interfaces:
com.dassault_systemes.modeler.magic.ui.diagrams.actions.AbstractDiagramAction, DiagramAction, com.nomagic.magicdraw.actions.ShortcutSchemaAction, ActionListener, Serializable, Cloneable, Comparable, EventListener, Action

@OpenApiAll public class DiagramContextToolbarAction extends DefaultDiagramAction
Diagram context toolbar action
See Also:
  • Constructor Details

    • DiagramContextToolbarAction

      public DiagramContextToolbarAction(String actionID, @CheckForNull Icon icon)
    • DiagramContextToolbarAction

      public DiagramContextToolbarAction(String actionID, @CheckForNull String name, @CheckForNull Icon icon)
    • DiagramContextToolbarAction

      public DiagramContextToolbarAction(String actionID, @CheckForNull Icon icon, boolean isExtendedAction)
  • Method Details

    • updateState

      public void updateState()
      Description copied from class: MDAction
      If action has assigned relative group, takes enable flag value from this group and sets to itself.
      Overrides:
      updateState in class MDAction
    • getSmallIcon

      public Icon getSmallIcon()
      Description copied from class: NMAction
      Returns the small icon of the action.
      Overrides:
      getSmallIcon in class NMAction
      Returns:
      the small icon of the action.
    • getLargeIcon

      public Icon getLargeIcon()
      Description copied from class: NMAction
      Returns the large icon of the action.
      Overrides:
      getLargeIcon in class NMAction
      Returns:
      the large icon of the action.
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Description copied from class: MDAction
      Executes action.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class MDAction
      Parameters:
      e - event caused execution.
    • showContextToolbarIfCanvasFocused

      protected void showContextToolbarIfCanvasFocused(com.nomagic.magicdraw.ui.DiagramWindowPanel panel)
    • closeContextToolbar

      protected void closeContextToolbar()
    • setExtendedAction

      public void setExtendedAction(boolean isExtended)
    • isExtendedAction

      public boolean isExtendedAction()
    • isFakeMouseEvents

      public boolean isFakeMouseEvents()
      Return fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.
      Returns:
      true if fake mouse event should be generated
    • setFakeMouseEvents

      public void setFakeMouseEvents(boolean fakeMouseEvents)
      Sets fake mouse event flag - does this action fakes mouse pressed and mouse released event on action event.
      Parameters:
      fakeMouseEvents - true if generate fake mouse events
    • setReuseIconFromInnerAction

      public void setReuseIconFromInnerAction(boolean reuseIconFromInnerAction)
      Sets reuse icon from inner action flag value.
      Parameters:
      reuseIconFromInnerAction - reuse icon from inner action flag value.
    • isReuseIconFromInnerAction

      public boolean isReuseIconFromInnerAction()
      Gets reuse icon from inner action flag value.
      Returns:
      reuse icon from inner action flag value.