Package jpicedt.ui.internal
Class JFrameMDIManager
- java.lang.Object
-
- jpicedt.ui.MDIManager
-
- jpicedt.ui.internal.JFrameMDIManager
-
public class JFrameMDIManager extends MDIManager
An MDI Manager implementation for JFrame's- Since:
- jPicEdt 1.4
- Version:
- $Id: JFrameMDIManager.java,v 1.3.2.1 2007/09/02 11:56:30 reynal Exp $
- Author:
- Sylvain Reynal
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jpicedt.ui.MDIManager
MDIManager.BoardEventHandler, MDIManager.DockablePanel, MDIManager.MDIComponent
-
-
Field Summary
-
Fields inherited from class jpicedt.ui.MDIManager
ACTIVE_BOARD_CHANGE, activeBoard, boardEventHandler, boardMap, dockablePanelsMap, KEY_MDIMANAGER, MDI_CHILDFRAMES, MDI_STANDALONEFRAMES
-
-
Constructor Summary
Constructors Constructor Description JFrameMDIManager(PEProgressBar progressBar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMDIComponent(MDIManager.MDIComponent c)Add the given component to the desktopvoidcascadeDrawingBoards()Cascade all open internal framesvoidcloseBoard(PEDrawingBoard board)Ask the given board to close itselfMDIManager.MDIComponentcreateMDIComponent(javax.swing.JPanel pane)Factory method that creates an MDIComponent which acts as a UI delegate to the given pane.PEDrawingBoardgetActiveDrawingBoard()Returns the currently active drawing board ; null if there's no frame hosting a PEDrawingBoard in the desktop.java.awt.DimensiongetDesktopSize()Returns the dimension of the desktop that hosts the components of this MDIManager.javax.swing.JMenuItem[]getMenuItems()Return an array containing all the menu-items components attached to menubarsjava.lang.StringgetName()voidsaveGeometry()Saves UI geometry to JPicEdt's preferences.voidselectDrawingBoard(PEDrawingBoard board)selects the given drawing board by bringing it to front.voidshowModalDialogBox(java.lang.String title, javax.swing.JComponent innerPane)[pending] experimental ! 1.3.2-beta9 ; not used yet.voidtileDrawingBoardsHorizontally()Tiles all open internal frames horizontallyvoidtileDrawingBoardsVertically()Tiles all open internal frames vertically.voidupdate()Updates local properties from JPicEdt's preferences (e.g.voidupdateAccelerators()Update JMenuItem's accelerators from the key/value pairs stored in JPicEdt's preferencesvoidupdateFragmentsMenu()Updates the "fragments" menu itemsvoidupdateMenuBar()Update the content (i.e.voidupdateRecentFilesSubmenu()Updates the "recent files" sub-menu items after a frame was saved or opened.voidupdateScriptsMenu()Updates the "script" menu itemsvoidupdateToolkitMenu(java.beans.PropertyChangeEvent e)update currently "selected" menuitem in Toolkit menuvoidupdateUndoRedoMenus(java.lang.String undoName, java.lang.String redoName)update "undo" and "redo" textvoidupdateWindowMenu()Updates the Window menu as soon as an internal frame is opened or closed (this menu keeps tracks of every open internal frames so that the user can activate them quickly by use of a shortcut)-
Methods inherited from class jpicedt.ui.MDIManager
addDockablePanel, addDrawingBoard, createMDIManager, createPopupMenuFactory, getAllDrawingBoards, getDefaultManagerName, getDockablePanelFromKey, getDockablePanelKeys, getDrawingBoardCount, getHostingContainer, getInstalledMDIManagers, removeDrawingBoard, setHostingContainerTitle, showDockablePanel, showStatus, toggleDockablePanel
-
-
-
-
Constructor Detail
-
JFrameMDIManager
public JFrameMDIManager(PEProgressBar progressBar)
- Parameters:
progressBar- The progress bar to inform of progress in the initialization ; can be null.
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein classMDIManager
-
createMDIComponent
public MDIManager.MDIComponent createMDIComponent(javax.swing.JPanel pane)
Factory method that creates an MDIComponent which acts as a UI delegate to the given pane. This implementation returns a properly init'd JFrame, with the given pane added to its content-pane.- Specified by:
createMDIComponentin classMDIManager
-
addMDIComponent
public void addMDIComponent(MDIManager.MDIComponent c)
Add the given component to the desktop- Specified by:
addMDIComponentin classMDIManager
-
closeBoard
public void closeBoard(PEDrawingBoard board)
Description copied from class:MDIManagerAsk the given board to close itself- Specified by:
closeBoardin classMDIManager
-
getDesktopSize
public java.awt.Dimension getDesktopSize()
Returns the dimension of the desktop that hosts the components of this MDIManager.- Specified by:
getDesktopSizein classMDIManager- Returns:
- the screen size
-
saveGeometry
public void saveGeometry()
Saves UI geometry to JPicEdt's preferences.- Overrides:
saveGeometryin classMDIManager- See Also:
#InternalFrameMDIManager,MDIManager.addDockablePanel(java.lang.String, javax.swing.JPanel),MDIManager.DockablePanel.setVisible(boolean)
-
update
public void update()
Updates local properties from JPicEdt's preferences (e.g. GUI colours, rendering-hints,...) This implementation calls the superclass's method, then update the desktop-pane colour.- Overrides:
updatein classMDIManager
-
updateAccelerators
public void updateAccelerators()
Update JMenuItem's accelerators from the key/value pairs stored in JPicEdt's preferences- Specified by:
updateAcceleratorsin classMDIManager
-
updateMenuBar
public void updateMenuBar()
Update the content (i.e. PEMenu's) of the menu-bar depending on the current state of the MDIManager.- Specified by:
updateMenuBarin classMDIManager
-
updateRecentFilesSubmenu
public void updateRecentFilesSubmenu()
Updates the "recent files" sub-menu items after a frame was saved or opened.- Specified by:
updateRecentFilesSubmenuin classMDIManager- Since:
- PicEdt 1.1
-
updateScriptsMenu
public void updateScriptsMenu()
Updates the "script" menu items- Specified by:
updateScriptsMenuin classMDIManager- Since:
- jpicedt 1.3.2
-
updateFragmentsMenu
public void updateFragmentsMenu()
Updates the "fragments" menu items- Specified by:
updateFragmentsMenuin classMDIManager- Since:
- jpicedt 1.3.2
-
updateUndoRedoMenus
public void updateUndoRedoMenus(java.lang.String undoName, java.lang.String redoName)update "undo" and "redo" text- Specified by:
updateUndoRedoMenusin classMDIManager- Since:
- jpicedt 1.3.2
-
updateWindowMenu
public void updateWindowMenu() throws java.util.MissingResourceExceptionUpdates the Window menu as soon as an internal frame is opened or closed (this menu keeps tracks of every open internal frames so that the user can activate them quickly by use of a shortcut)- Specified by:
updateWindowMenuin classMDIManager- Throws:
java.util.MissingResourceException- Since:
- PicEdt 1.1
-
updateToolkitMenu
public void updateToolkitMenu(java.beans.PropertyChangeEvent e)
update currently "selected" menuitem in Toolkit menu- Specified by:
updateToolkitMenuin classMDIManager
-
getMenuItems
public javax.swing.JMenuItem[] getMenuItems()
Return an array containing all the menu-items components attached to menubars- Specified by:
getMenuItemsin classMDIManager
-
getActiveDrawingBoard
public PEDrawingBoard getActiveDrawingBoard()
Returns the currently active drawing board ; null if there's no frame hosting a PEDrawingBoard in the desktop.- Specified by:
getActiveDrawingBoardin classMDIManager
-
selectDrawingBoard
public void selectDrawingBoard(PEDrawingBoard board)
selects the given drawing board by bringing it to front.- Specified by:
selectDrawingBoardin classMDIManager
-
showModalDialogBox
public void showModalDialogBox(java.lang.String title, javax.swing.JComponent innerPane)[pending] experimental ! 1.3.2-beta9 ; not used yet.
-
cascadeDrawingBoards
public void cascadeDrawingBoards()
Cascade all open internal frames- Specified by:
cascadeDrawingBoardsin classMDIManager
-
tileDrawingBoardsHorizontally
public void tileDrawingBoardsHorizontally()
Tiles all open internal frames horizontally- Specified by:
tileDrawingBoardsHorizontallyin classMDIManager
-
tileDrawingBoardsVertically
public void tileDrawingBoardsVertically()
Tiles all open internal frames vertically.- Specified by:
tileDrawingBoardsVerticallyin classMDIManager
-
-