Class SelectElementDlg

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
com.nomagic.ui.Dialog
com.nomagic.magicdraw.ui.dialogs.BaseDialog
com.nomagic.magicdraw.ui.dialogs.SelectElementDlg
All Implemented Interfaces:
Cachable, com.nomagic.ui.CursorOwner, HiDPIScalableComponent, NotificationsContainer, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

@OpenApi public class SelectElementDlg extends com.nomagic.magicdraw.ui.dialogs.BaseDialog
Element selection dialog allows to select the element from the active project. The dialog displays the project model containment tree.
See Also:
  • Constructor Details

    • SelectElementDlg

      @OpenApi public SelectElementDlg(Window parent, @CheckForNull BaseElement selected, SelectElementTypes types, SelectElementInfo info)
      Constructor.
      Parameters:
      parent - parent frame.
      selected - initial selection.
      types - selectable types information.
      info - UI info.
  • Method Details

    • getSelected

      @OpenApi public BaseElement getSelected()
      Returns the selected element.
      Returns:
      the selected element or null if "none" is selected.
    • isOk

      @OpenApi public boolean isOk()
      Checks if the dialog is closed by selecting OK button - the selection performed.
      Returns:
      true - selection performed, false - selection canceled.
    • canSelectElement

      @OpenApi protected boolean canSelectElement(BaseElement element)
      Check if given element can be selected. Invoked on element selection.
      Parameters:
      element - element to check.
      Returns:
      true if the element can be selected, otherwise - false.