Class ElementSelectionDlg

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.nomagic.ui.Dialog
com.nomagic.ui.SimpleBaseDialog
com.dassault_systemes.modeler.magic.ui.dialogs.selection.ElementSelectionDlg<P>
com.dassault_systemes.modeler.magic.ui.dialogs.selection.ConfigurableElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionDlg
All Implemented Interfaces:
Cachable, com.nomagic.ui.CursorOwner, HiDPIScalableComponent, NotificationsContainer, ActionListener, KeyListener, MouseListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

@OpenApi public class ElementSelectionDlg extends com.dassault_systemes.modeler.magic.ui.dialogs.selection.ConfigurableElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
Element selection dialog. Use ElementSelectionDlgFactory to create the dialog.
See Also:
  • Constructor Details

    • ElementSelectionDlg

      public ElementSelectionDlg(@CheckForNull Window parent, String title, @CheckForNull String helpPath)
      Constructor. ElementSelectionDlgFactory should be used for creating an instances of this dialog
      Parameters:
      parent - dialog parent.
      title - dialog title.
      helpPath - dialog help path.
  • Method Details

    • createElementSelectionPanel

      protected com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel createElementSelectionPanel()
      Creates ElementSelectionPanel.
      Overrides:
      createElementSelectionPanel in class com.dassault_systemes.modeler.magic.ui.dialogs.selection.ElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
      Returns:
      ElementSelectionPanel.
    • setSelectionMode

      @OpenApi public void setSelectionMode(SelectionMode selectionMode)
      Set element(s) selection mode.
      Overrides:
      setSelectionMode in class com.dassault_systemes.modeler.magic.ui.dialogs.selection.ElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
      Parameters:
      selectionMode - selection mode.
    • getSelectedElement

      @OpenApi @CheckForNull public BaseElement getSelectedElement()
      Get selected element. Available only if OK of dialog is clicked (isOkClicked()).
      Overrides:
      getSelectedElement in class com.dassault_systemes.modeler.magic.ui.dialogs.selection.ElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
      Returns:
      selected element. Can be null.
    • getSelectedElements

      @OpenApi public List<BaseElement> getSelectedElements()
      Get selected elements. Available only if OK of dialog is clicked (isOkClicked()).
      Overrides:
      getSelectedElements in class com.dassault_systemes.modeler.magic.ui.dialogs.selection.ElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
      Returns:
      selected elements.
    • isOkClicked

      @OpenApi public boolean isOkClicked()
      Check if OK button is clicked.
      Overrides:
      isOkClicked in class com.dassault_systemes.modeler.magic.ui.dialogs.selection.ElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>
      Returns:
      true - OK is clicked, otherwise false.
    • setContext

      public void setContext(@CheckForNull com.dassault_systemes.modeler.magic.ui.selection.ElementSelectionContext context)
      Overrides:
      setContext in class com.dassault_systemes.modeler.magic.ui.dialogs.selection.ConfigurableElementSelectionDlg<com.nomagic.magicdraw.ui.dialogs.selection.ElementSelectionPanel>