Package com.nomagic.magicdraw.ui
Class MainFrame
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- com.jidesoft.docking.DefaultDockableHolder
-
- com.jidesoft.action.DefaultDockableBarDockableHolder
-
- com.nomagic.magicdraw.ui.MainFrame
-
- All Implemented Interfaces:
com.jidesoft.action.DockableBarDockableHolder,com.jidesoft.action.DockableBarHolder,com.jidesoft.docking.DockableHolder,ActionsGroups,EnvironmentOptions.EnvironmentChangeListener,com.nomagic.ui.CursorOwner,java.awt.image.ImageObserver,java.awt.MenuContainer,java.beans.PropertyChangeListener,java.io.Serializable,java.util.EventListener,javax.accessibility.Accessible,javax.swing.RootPaneContainer,javax.swing.WindowConstants
@OpenApi public final class MainFrame extends com.jidesoft.action.DefaultDockableBarDockableHolder implements java.beans.PropertyChangeListener, com.nomagic.ui.CursorOwner, ActionsGroups, EnvironmentOptions.EnvironmentChangeListener
TheMainFrameclass represents main window of the MagicDraw application. Also it has a set of inner classes- event listeners to handle all menu and toolbar events.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classcom.nomagic.magicdraw.ui.MainFrame.DefaultStatusLineprivate static classcom.nomagic.magicdraw.ui.MainFrame.MainFrameDockableBarChangeListenerprivate static classcom.nomagic.magicdraw.ui.MainFrame.MainMenuExpertModeCustomizerprivate static classcom.nomagic.magicdraw.ui.MainFrame.MainWindowAdapterThe MainWindowAdapter class represents window events handler for MainFrame window.-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.FrameactiveFrameprivate CookieSetcookieSetprivate com.nomagic.magicdraw.ui.DockableBarChangeListenerdockableBarChangeListenerprivate booleanignoreVisibilityChangestatic java.lang.StringMAIN_TOOLBAR_EXPERTstatic java.lang.StringMAIN_TOOLBAR_STANDARDprivate com.nomagic.magicdraw.core.Application.MainFrameControllermainFrameControllerprivate com.jidesoft.action.CommandBarmainMenuBarprivate ActionsManagermMainMenuActionsprivate java.lang.RunnablemStartupActivityRunnable for checking if MD is started first time if it is started first time notification will be showed about news and note worthy.private com.nomagic.magicdraw.ui.ProgressBarprogressBarstatic java.lang.StringRECENT_PROJECT_NAME_CHANGEstatic java.lang.StringRECENT_WINDOWSprivate java.util.List<DiagramWindow>recentWindowsprivate static booleansilentModeFlag, which shows if MF is working in silent mode.private com.nomagic.awt.StatusLinestatusLineprivate static com.nomagic.utils.ExtendedPropertyChangeSupportsupportSupport for listeners of changing recent files.private com.nomagic.magicdraw.ui.toolbar.ToolbarsManagertoolbarsManagerprivate com.nomagic.magicdraw.ui.UIInstalleruiInstallerprivate java.util.function.Consumer<java.awt.Window>windowFullScreenCustomizerprivate com.nomagic.magicdraw.ui.WindowsManagerImplwindowsManager-
Fields inherited from class com.jidesoft.docking.DefaultDockableHolder
_autoDispose, _contentContainer, _dockingManager
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
Fields inherited from interface com.nomagic.magicdraw.actions.ActionsGroups
ANY_REMOTE_PROJECT_EDIT_RELATED, ANY_REMOTE_PROJECT_OPENED_RELATED, ANY_SERVER_LOGIN_RELATED, APPLICATION_RELATED, DIAGRAM_EDIT_RELATED, DIAGRAM_OPENED_RELATED, DIAGRAM_RELATED_ELEMENTS, DIAGRAM_ZOOMIN_RELATED, DIAGRAM_ZOOMOUT_RELATED, DIAGRAM_ZOOMTO11_RELATED, ESI_PROJECT_OPENED_RELATED, ESI_SERVER_LOGIN_RELATED, LAYOUT_SHAPES_RELATED, LOCAL_PROJECT_OPENED_RELATED, NOT_EMPTY_CLASS_DIAGRAM_RELATED, NOT_EMPTY_DIAGRAM_RELATED, OPENED_MODULE_AS_PROJECT, PATH_STYLE_EDIT_RELATED, PE_SELECTION_AND_TEAMWORK_PROJECT_EDIT_RELATED, PRESENTATION_ELEMENT_ALIGN_RELATED, PRESENTATION_ELEMENT_SELECTION_RELATED, PROJECT_EDIT_RELATED, PROJECT_OPENED_RELATED, PROJECT_SAVING_RELATED, REDO_COMMAND_RELATED, UNDO_COMMAND_RELATED
-
-
Constructor Summary
Constructors Constructor Description MainFrame(com.nomagic.magicdraw.core.Application.MainFrameController controller)Constructs MainFrame window, adds menu and popup buttons toolbar to it.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private voidaddCloseProjectButton(com.jidesoft.action.CommandBar menuBar)voidaddRecentWindow(DiagramWindow window)Adds diagram window name to the recent window list.static voidaddStateListener(java.beans.PropertyChangeListener listener)Adds listener for listening changes of recent windows, projects or files.private static voidcheckAndShowWarningFor(java.lang.String id, PropertyManager propertyManager)private static voidcloseOpenedMenu()voidcreateCommandBar()Deprecated.private voidcreateMenu()Creates new instance of JMenu of the MainFrame.voidcreateMenuAndToolbars()Create (or recreate) all menu and toolbars.private voidcreateProgressBar()java.lang.RunnablecreateStartupActivity()Creates startup activity for setting APPLICATION_STARTED flag.private voidcreateToolbar()java.awt.FramegetActiveFrame()BrowsergetBrowser()Returns model browser.CookieSetgetCookieSet()java.awt.CursorgetCurrentCursor()private static java.lang.StringgetDefaultTitle()javax.swing.JMenuBargetMainMenuBar()Returns main menu bar.com.nomagic.magicdraw.ui.ProgressBargetProgressBar()java.lang.StringgetProjectTitle(Project project)Returns project title suitable for application title barProjectWindowsManagergetProjectWindowsManager()Returns ProjectWindowsManager.java.awt.CursorgetSpecificCursor()com.nomagic.awt.StatusLinegetStatusLine()com.nomagic.magicdraw.ui.toolbar.ToolbarsManagergetToolbarsManager()com.nomagic.magicdraw.ui.UIInstallergetUIInstaller()private static java.awt.RectanglegetVisibleBounds(java.awt.Rectangle preferredBounds)Returns visible bounds of the frame.java.util.function.Consumer<java.awt.Window>getWindowFullScreenCustomizer()com.nomagic.magicdraw.ui.WindowsManagerImplgetWindowsManager()voidinit()Creates GUI elements in MainFrame: menu and toolbar, browser and desktop.static booleanisLFUpdateRequired(java.lang.String lf, java.lang.String themeID, int jideStyle)static booleanisSilentMode()Returns, flag, which shows if MF is working in silent mode.private static booleanisVisibleBounds(java.awt.Rectangle r)Returns whether the specified rectangle is fully visible on screen or notvoidpropertyChange(java.beans.PropertyChangeEvent evt)Handles Property changing event, fired byPropertyChangeSupportprivate static booleanrememberBrowserStateForProjects(boolean done)private voidremoveRecentWindow(DiagramWindow window)Removes window from list.private voidrestoreBoundsHack()fix for: https://jira.nomagic.com/browse/MDUML-67827, https://jira.nomagic.com/browse/MDUML-87461voidsetActiveFrame(java.awt.Frame activeFrame)voidsetBounds(java.awt.Rectangle r)booleansetLF(java.lang.String lf, java.lang.String theme, int jideStyle, boolean explicitlyUpdateUI)voidsetRecentWindowsList(java.util.Collection<DiagramWindow> windows)Sets the list of the recent windows.static voidsetSilentMode(boolean silentMode)Set flag, which shows if MF is working in silent mode.voidsetSpecificCursor(java.awt.Cursor c)voidsetStatusLine(com.nomagic.awt.StatusLine statusLine)voidsetUIInstaller(com.nomagic.magicdraw.ui.UIInstaller installer)voidsetVisible(boolean visible)voidsetWindowFullScreenCustomizer(java.util.function.Consumer<java.awt.Window> windowFullScreenCustomizer)voidsSetLF(java.lang.String lf, java.lang.String themeID, int jideStyle, boolean explicitlyUpdateUI)Set look and feel without handling errorsprivate static voidupdateByEnvironmentOptions()Update environment by current environment options.voidupdateByEnvironmentProperties(java.util.List<Property> properties)Update environment by given properties.private static voidupdateExistingSearchResultsTree(Project project)private voidupdateFrameUI()Updates all elements uivoidupdateRecentProject(Project prj)Updates project label in projects choice.voidupdateTitle(Project project)-
Methods inherited from class com.jidesoft.action.DefaultDockableBarDockableHolder
createContentContainer, createDockableBarManager, dispose, getDockableBarManager, getJMenuBar, getLayoutPersistence, initFrame
-
Methods inherited from class com.jidesoft.docking.DefaultDockableHolder
createDockingManager, getDockingManager, isAutoDispose, isContentPaneCheckingEnabled, setAutoDispose, setContentPaneCheckingEnabled
-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
-
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
MAIN_TOOLBAR_EXPERT
public static final java.lang.String MAIN_TOOLBAR_EXPERT
- See Also:
- Constant Field Values
-
MAIN_TOOLBAR_STANDARD
public static final java.lang.String MAIN_TOOLBAR_STANDARD
- See Also:
- Constant Field Values
-
RECENT_PROJECT_NAME_CHANGE
public static final java.lang.String RECENT_PROJECT_NAME_CHANGE
- See Also:
- Constant Field Values
-
RECENT_WINDOWS
public static final java.lang.String RECENT_WINDOWS
- See Also:
- Constant Field Values
-
cookieSet
private final CookieSet cookieSet
-
progressBar
private com.nomagic.magicdraw.ui.ProgressBar progressBar
-
mainMenuBar
private com.jidesoft.action.CommandBar mainMenuBar
-
statusLine
private com.nomagic.awt.StatusLine statusLine
-
uiInstaller
private com.nomagic.magicdraw.ui.UIInstaller uiInstaller
-
recentWindows
private final java.util.List<DiagramWindow> recentWindows
-
support
private static final com.nomagic.utils.ExtendedPropertyChangeSupport support
Support for listeners of changing recent files.
-
silentMode
private static boolean silentMode
Flag, which shows if MF is working in silent mode.
-
windowsManager
private com.nomagic.magicdraw.ui.WindowsManagerImpl windowsManager
-
activeFrame
@CheckForNull private java.awt.Frame activeFrame
-
toolbarsManager
private com.nomagic.magicdraw.ui.toolbar.ToolbarsManager toolbarsManager
-
mainFrameController
private final com.nomagic.magicdraw.core.Application.MainFrameController mainFrameController
-
dockableBarChangeListener
private com.nomagic.magicdraw.ui.DockableBarChangeListener dockableBarChangeListener
-
ignoreVisibilityChange
private boolean ignoreVisibilityChange
-
windowFullScreenCustomizer
private java.util.function.Consumer<java.awt.Window> windowFullScreenCustomizer
-
mMainMenuActions
private ActionsManager mMainMenuActions
-
mStartupActivity
private final java.lang.Runnable mStartupActivity
Runnable for checking if MD is started first time if it is started first time notification will be showed about news and note worthy.
-
-
Constructor Detail
-
MainFrame
public MainFrame(com.nomagic.magicdraw.core.Application.MainFrameController controller)
Constructs MainFrame window, adds menu and popup buttons toolbar to it. Also this method sets event listeners for each menu item and toolbar button.- Parameters:
controller- controller
-
-
Method Detail
-
getDefaultTitle
private static java.lang.String getDefaultTitle()
-
setBounds
public void setBounds(java.awt.Rectangle r)
- Overrides:
setBoundsin classjava.awt.Window
-
getVisibleBounds
private static java.awt.Rectangle getVisibleBounds(java.awt.Rectangle preferredBounds)
Returns visible bounds of the frame. If the preferred bounds are visible then return the preferred bounds. If the preferred bounds are not fully visible then returns bounds of the default display.- Parameters:
preferredBounds- preferred bounds.- Returns:
- visible bounds.
-
isVisibleBounds
private static boolean isVisibleBounds(java.awt.Rectangle r)
Returns whether the specified rectangle is fully visible on screen or not- Parameters:
r- a rectangle.- Returns:
- true if the specified rectangle is fully visible.
-
createMenu
private void createMenu()
Creates new instance of JMenu of the MainFrame. The created menu is not set as menu of the frame.
-
addCloseProjectButton
private void addCloseProjectButton(com.jidesoft.action.CommandBar menuBar)
-
getMainMenuBar
@OpenApi public javax.swing.JMenuBar getMainMenuBar()
Returns main menu bar.- Returns:
- main menu bar.
-
setActiveFrame
public void setActiveFrame(@CheckForNull java.awt.Frame activeFrame)
-
getActiveFrame
public java.awt.Frame getActiveFrame()
-
init
public void init()
Creates GUI elements in MainFrame: menu and toolbar, browser and desktop. And adds action listeners to menu items and toolbar buttons
-
createCommandBar
@Deprecated public void createCommandBar()
Deprecated.usecreateMenuAndToolbars(). Some people use this api, because we had no way
-
createMenuAndToolbars
@OpenApi public void createMenuAndToolbars()
Create (or recreate) all menu and toolbars. It will invoke all registeredAMConfiguratorinActionsConfiguratorsManager
-
createToolbar
private void createToolbar()
-
createProgressBar
private void createProgressBar()
-
getBrowser
@CheckForNull @OpenApi public Browser getBrowser()
Returns model browser.- Returns:
- model browser.
-
checkAndShowWarningFor
private static void checkAndShowWarningFor(java.lang.String id, PropertyManager propertyManager)
-
updateByEnvironmentProperties
public void updateByEnvironmentProperties(java.util.List<Property> properties)
Update environment by given properties.- Specified by:
updateByEnvironmentPropertiesin interfaceEnvironmentOptions.EnvironmentChangeListener- Parameters:
properties- properties
-
updateExistingSearchResultsTree
private static void updateExistingSearchResultsTree(Project project)
-
rememberBrowserStateForProjects
private static boolean rememberBrowserStateForProjects(boolean done)
-
updateByEnvironmentOptions
private static void updateByEnvironmentOptions()
Update environment by current environment options.
-
isSilentMode
public static boolean isSilentMode()
Returns, flag, which shows if MF is working in silent mode.- Returns:
- flag, which shows if MF is working in silent mode.
-
setSilentMode
public static void setSilentMode(boolean silentMode)
Set flag, which shows if MF is working in silent mode. Used by Forte Integration.- Parameters:
silentMode- flag, which shows if MF is working in silent mode.
-
getSpecificCursor
public java.awt.Cursor getSpecificCursor()
- Specified by:
getSpecificCursorin interfacecom.nomagic.ui.CursorOwner
-
getCurrentCursor
public java.awt.Cursor getCurrentCursor()
- Specified by:
getCurrentCursorin interfacecom.nomagic.ui.CursorOwner
-
setSpecificCursor
public void setSpecificCursor(java.awt.Cursor c)
- Specified by:
setSpecificCursorin interfacecom.nomagic.ui.CursorOwner
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
Handles Property changing event, fired byPropertyChangeSupport- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener- Parameters:
evt- PropertyChangeEvent, which has to be handled.- See Also:
PropertyChangeListener,PropertyChangeEvent,PropertyChangeListener,PropertyChangeSupport
-
closeOpenedMenu
private static void closeOpenedMenu()
-
setLF
public boolean setLF(java.lang.String lf, java.lang.String theme, int jideStyle, boolean explicitlyUpdateUI)
-
sSetLF
public void sSetLF(java.lang.String lf, java.lang.String themeID, int jideStyle, boolean explicitlyUpdateUI) throws java.lang.ThrowableSet look and feel without handling errors- Parameters:
lf- lf namethemeID- theme idjideStyle- jide styleexplicitlyUpdateUI- update ui flag- Throws:
java.lang.Throwable- exception
-
isLFUpdateRequired
public static boolean isLFUpdateRequired(java.lang.String lf, java.lang.String themeID, int jideStyle)
-
updateFrameUI
private void updateFrameUI()
Updates all elements ui
-
addRecentWindow
public void addRecentWindow(DiagramWindow window)
Adds diagram window name to the recent window list.- Parameters:
window- the window to add.
-
removeRecentWindow
private void removeRecentWindow(DiagramWindow window)
Removes window from list.- Parameters:
window- window to remove.
-
setRecentWindowsList
public void setRecentWindowsList(java.util.Collection<DiagramWindow> windows)
Sets the list of the recent windows.- Parameters:
windows- the new list of the recent windows.
-
updateRecentProject
public void updateRecentProject(Project prj)
Updates project label in projects choice.- Parameters:
prj- - project to update
-
getProjectWindowsManager
@OpenApi public ProjectWindowsManager getProjectWindowsManager()
Returns ProjectWindowsManager.- Returns:
- project windows manager.
-
getWindowsManager
public com.nomagic.magicdraw.ui.WindowsManagerImpl getWindowsManager()
-
addStateListener
public static void addStateListener(java.beans.PropertyChangeListener listener)
Adds listener for listening changes of recent windows, projects or files.- Parameters:
listener- listener for listening changes of recent windows, projects or files.
-
updateTitle
public void updateTitle(@CheckForNull Project project)
-
getProjectTitle
public java.lang.String getProjectTitle(Project project)
Returns project title suitable for application title bar- Parameters:
project- project instance ofProject- Returns:
- project title suitable for application title bar
-
setStatusLine
public void setStatusLine(com.nomagic.awt.StatusLine statusLine)
-
getStatusLine
public com.nomagic.awt.StatusLine getStatusLine()
-
getCookieSet
public CookieSet getCookieSet()
-
getProgressBar
public com.nomagic.magicdraw.ui.ProgressBar getProgressBar()
- Returns:
- Returns the progressBar.
-
getUIInstaller
public com.nomagic.magicdraw.ui.UIInstaller getUIInstaller()
- Returns:
- Returns the uIInstaller.
-
setUIInstaller
public void setUIInstaller(com.nomagic.magicdraw.ui.UIInstaller installer)
- Parameters:
installer- The uIInstaller to set.
-
setVisible
public void setVisible(boolean visible)
- Overrides:
setVisiblein classjava.awt.Window
-
getToolbarsManager
public com.nomagic.magicdraw.ui.toolbar.ToolbarsManager getToolbarsManager()
-
createStartupActivity
public java.lang.Runnable createStartupActivity()
Creates startup activity for setting APPLICATION_STARTED flag.- Returns:
- runnable
-
getWindowFullScreenCustomizer
public java.util.function.Consumer<java.awt.Window> getWindowFullScreenCustomizer()
-
setWindowFullScreenCustomizer
public void setWindowFullScreenCustomizer(java.util.function.Consumer<java.awt.Window> windowFullScreenCustomizer)
-
restoreBoundsHack
private void restoreBoundsHack()
fix for: https://jira.nomagic.com/browse/MDUML-67827, https://jira.nomagic.com/browse/MDUML-87461
-
-