Package jpicedt.ui.internal
Class InternalFrameMDIManager
- java.lang.Object
-
- jpicedt.ui.MDIManager
-
- jpicedt.ui.internal.InternalFrameMDIManager
-
public class InternalFrameMDIManager extends MDIManager
An MDI Manager implementation for "childframe" mode (ie using JInternalFrame's).Layer management:
- PEDrawingBoard's are added to JLayeredPane.DEFAULT_LAYER (bottom most layer)
- DockablePanel's are added to JLayeredPane.PALETTE_LAYER
- Since:
- jPicEdt 1.2
- Version:
- $Id: InternalFrameMDIManager.java,v 1.20.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 Modifier and Type Field Description static java.awt.ColordesktopColorDEFAULTjavax.swing.JDesktopPanedesktopPanestatic java.lang.StringKEY_DESKTOP_COLORstatic java.lang.StringKEY_GEOMETRY_HEIGHTstatic java.lang.StringKEY_GEOMETRY_WIDTHstatic java.lang.StringKEY_GEOMETRY_Xstatic java.lang.StringKEY_GEOMETRY_Y-
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 InternalFrameMDIManager(PEProgressBar progressBar)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMDIComponent(MDIManager.MDIComponent c)Depending on the inner pane of the given container, adds it to the DEFAULT_LAYER or to the PALETTE_LAYER.voidcascadeDrawingBoards()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 internal frame in the desktopPane.
If there's at least one internal frame in the desktop, but it's deactivated (this should never happen however), then the policy is to arbitrarly activate one frame (namely the topmost frame on the desktop which is also the last one in the framearray)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 the 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
-
-
-
-
Field Detail
-
desktopPane
public javax.swing.JDesktopPane desktopPane
-
KEY_GEOMETRY_X
public static final java.lang.String KEY_GEOMETRY_X
- See Also:
- Constant Field Values
-
KEY_GEOMETRY_Y
public static final java.lang.String KEY_GEOMETRY_Y
- See Also:
- Constant Field Values
-
KEY_GEOMETRY_WIDTH
public static final java.lang.String KEY_GEOMETRY_WIDTH
- See Also:
- Constant Field Values
-
KEY_GEOMETRY_HEIGHT
public static final java.lang.String KEY_GEOMETRY_HEIGHT
- See Also:
- Constant Field Values
-
KEY_DESKTOP_COLOR
public static final java.lang.String KEY_DESKTOP_COLOR
- See Also:
- Constant Field Values
-
desktopColorDEFAULT
public static final java.awt.Color desktopColorDEFAULT
-
-
Constructor Detail
-
InternalFrameMDIManager
public InternalFrameMDIManager(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 JInternalFrame, with the given pane added to its content-pane.- Specified by:
createMDIComponentin classMDIManager
-
addMDIComponent
public void addMDIComponent(MDIManager.MDIComponent c)
Depending on the inner pane of the given container, adds it to the DEFAULT_LAYER or to the PALETTE_LAYER.- 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
-
saveGeometry
public void saveGeometry()
Saves UI geometry to JPicEdt's preferences.
-
update
public void update()
Updates local properties from the 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 internal frame in the desktopPane.
If there's at least one internal frame in the desktop, but it's deactivated (this should never happen however), then the policy is to arbitrarly activate one frame (namely the topmost frame on the desktop which is also the last one in the framearray)- 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
-
-