Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jpicedt.ui.internal
Class InternalFrameMDIManager  view InternalFrameMDIManager download InternalFrameMDIManager.java

java.lang.Object
  extended byjpicedt.ui.MDIManager
      extended byjpicedt.ui.internal.InternalFrameMDIManager

public class InternalFrameMDIManager
extends jpicedt.ui.MDIManager

An MDI Manager implementation for "childframe" mode (i.e. using JInternalFrame's)

Layer management :

Since:
jPicEdt 1.3.2

Nested Class Summary
private  class InternalFrameMDIManager.BoardInternalFrame
          InternalFrame wrapper for PEDrawingBoard's which allows to easily retrieve the internal frame content.
private  class InternalFrameMDIManager.DockablePanel
          A wrapper for dockable panels [pending] these are added to the main frame's layered pane, hence there's no way to set aka OUTLINE drag-mode.
private  class InternalFrameMDIManager.PEDesktopManager
          Handler for internal frame events
private  class InternalFrameMDIManager.SelectionHandler
          Handler for "Selection" events triggered e.g.
private  class InternalFrameMDIManager.UndoableEditHandler
          Handler for "UndoableEdit" events sourced by PECanvas.
 
Field Summary
static java.awt.Color desktopColorDEFAULT
           
private  InternalFrameMDIManager.PEDesktopManager desktopManager
           
private  javax.swing.JDesktopPane desktopPane
           
private  java.util.HashMap dockablePanelsMap
           
static java.lang.String KEY_DESKTOP_COLOR
           
static java.lang.String KEY_GEOMETRY_HEIGHT
           
static java.lang.String KEY_GEOMETRY_WIDTH
           
static java.lang.String KEY_GEOMETRY_X
           
static java.lang.String KEY_GEOMETRY_Y
           
private  javax.swing.JFrame mainFrame
           
private  PEToolBar mainToolbar
           
private  PEMenuBar menubar
           
private  PEPopupMenuFactory popupMenuFactory
           
private  InternalFrameMDIManager.SelectionHandler selectionHandler
           
private  InternalFrameMDIManager.UndoableEditHandler undoableEditHandler
           
 
Constructor Summary
InternalFrameMDIManager(jpicedt.ui.util.PEProgressBar progressBar)
           
 
Method Summary
 void addDockablePanel(java.lang.String key, javax.swing.JPanel pane)
          Add the given pane to the hashtable of dockable panels, with the given key.
 void addDrawingBoard(jpicedt.ui.PEDrawingBoard board)
          Add the given PEDrawingBoard component to the JDesktopPane associated with this MDIManager.
PEDrawingBoard's are added to DRAWING_BOARD_LAYER.
 void cascadeDrawingBoards()
          Cascade all open internal frames
 jpicedt.ui.PEDrawingBoard[] getAllDrawingBoards()
           
 javax.swing.JPanel getDockablePanelFromKey(java.lang.String key)
          Return the inner pane contained in the dockable panel associated with the given key, or null if none match.
 java.util.Set getDockablePanelKeys()
          Return a set containing all keys (of type "String") that map to a DockablePanel
 int getDrawingBoardCount()
           
private  InternalFrameMDIManager.BoardInternalFrame getHostingFrame(jpicedt.ui.PEDrawingBoard board)
           
 jpicedt.ui.PEDrawingBoard getSelectedDrawingBoard()
           
 void removeDrawingBoard(jpicedt.ui.PEDrawingBoard board)
          Remove the given drawing board from the list of open drawing boards, if it exists.
 void saveGeometry()
          Save UI geometry to JPicEdt's preferences.
 void selectDrawingBoard(jpicedt.ui.PEDrawingBoard board)
          select the given drawing board by bringing it to front.
 void setHostingFrameTitle(java.lang.String title, jpicedt.ui.PEDrawingBoard board)
          set the title of the internal frame hosting the given board to the given string.
 void showDockablePanel(java.lang.String key, boolean visible)
          Set the visible state of the dockable pane with the given key.
 void showModalDialogBox(java.lang.String title, javax.swing.JComponent innerPane)
          [pending] experimental ! 1.3.2-beta9 ; not used yet.
 void showStatus(java.lang.String str)
          Requests that the argument string be displayed in the status bar
 void tileDrawingBoardsHorizontally()
          Tiles all open internal frames horizontally
 void tileDrawingBoardsVertically()
          Tiles all open internal frames vertically.
 void toggleDockablePanel(java.lang.String key)
          Toggle the visible state of the dockable pane with the given key.
 void update()
          Update local properties from the JPicEdt's preferences (e.g.
 void updateRecentFilesSubmenu()
          update the menu (or menu-items) containing the list of the most recently saved boards, so that a click on one of these items re-opens the corresponding board.
 void updateScriptsMenu()
          update the menu containing the list of installed BSH scripts
 void updateUndoRedoMenus(java.lang.String undoName, java.lang.String redoName)
          Update the menus (or menu-items, buttons,...) related to undo/redo action according to the given undoName and redoName labels.
 void updateWindowMenu()
          update the menu (or menu-items) containing the list of currently open boards, so that a click on one of these items activate (i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mainFrame

private javax.swing.JFrame mainFrame

menubar

private PEMenuBar menubar

mainToolbar

private PEToolBar mainToolbar

desktopPane

private javax.swing.JDesktopPane desktopPane

desktopManager

private InternalFrameMDIManager.PEDesktopManager desktopManager

selectionHandler

private InternalFrameMDIManager.SelectionHandler selectionHandler

undoableEditHandler

private InternalFrameMDIManager.UndoableEditHandler undoableEditHandler

dockablePanelsMap

private java.util.HashMap dockablePanelsMap

popupMenuFactory

private PEPopupMenuFactory popupMenuFactory

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

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
Constructor Detail

InternalFrameMDIManager

public InternalFrameMDIManager(jpicedt.ui.util.PEProgressBar progressBar)
Method Detail

update

public void update()
Update local properties from the JPicEdt's preferences (e.g. GUI colours, rendering-hints,...)


saveGeometry

public void saveGeometry()
Save UI geometry to JPicEdt's preferences.


showStatus

public void showStatus(java.lang.String str)
Requests that the argument string be displayed in the status bar


updateWindowMenu

public void updateWindowMenu()
update the menu (or menu-items) containing the list of currently open boards, so that a click on one of these items activate (i.e. brings to front) the corresponding board.


updateRecentFilesSubmenu

public void updateRecentFilesSubmenu()
update the menu (or menu-items) containing the list of the most recently saved boards, so that a click on one of these items re-opens the corresponding board.


updateUndoRedoMenus

public void updateUndoRedoMenus(java.lang.String undoName,
                                java.lang.String redoName)
Update the menus (or menu-items, buttons,...) related to undo/redo action according to the given undoName and redoName labels.


updateScriptsMenu

public void updateScriptsMenu()
update the menu containing the list of installed BSH scripts


addDrawingBoard

public void addDrawingBoard(jpicedt.ui.PEDrawingBoard board)
Add the given PEDrawingBoard component to the JDesktopPane associated with this MDIManager.
PEDrawingBoard's are added to DRAWING_BOARD_LAYER.

Since:
jPicEdt 1.3.2

removeDrawingBoard

public void removeDrawingBoard(jpicedt.ui.PEDrawingBoard board)
Remove the given drawing board from the list of open drawing boards, if it exists.

Since:
jPicEdt 1.3.2

getSelectedDrawingBoard

public jpicedt.ui.PEDrawingBoard getSelectedDrawingBoard()
Since:
jPicEdt 1.3.2

selectDrawingBoard

public void selectDrawingBoard(jpicedt.ui.PEDrawingBoard board)
select the given drawing board by bringing it to front.

Since:
jPicEdt 1.3.2

getAllDrawingBoards

public jpicedt.ui.PEDrawingBoard[] getAllDrawingBoards()
Since:
jPicEdt 1.3.2

getHostingFrame

private InternalFrameMDIManager.BoardInternalFrame getHostingFrame(jpicedt.ui.PEDrawingBoard board)
Since:
jPicEdt 1.3.2

getDrawingBoardCount

public int getDrawingBoardCount()

addDockablePanel

public void addDockablePanel(java.lang.String key,
                             javax.swing.JPanel pane)
Add the given pane to the hashtable of dockable panels, with the given key. If pane is an instance of SelectionListener, it will be notified selection events from any currently opened drawing board.


toggleDockablePanel

public void toggleDockablePanel(java.lang.String key)
Toggle the visible state of the dockable pane with the given key.


showDockablePanel

public void showDockablePanel(java.lang.String key,
                              boolean visible)
Set the visible state of the dockable pane with the given key.


getDockablePanelKeys

public java.util.Set getDockablePanelKeys()
Return a set containing all keys (of type "String") that map to a DockablePanel


getDockablePanelFromKey

public javax.swing.JPanel getDockablePanelFromKey(java.lang.String key)
Return the inner pane contained in the dockable panel associated with the given key, or null if none match.


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

Since:
jPicEdt 1.3.2

tileDrawingBoardsHorizontally

public void tileDrawingBoardsHorizontally()
Tiles all open internal frames horizontally

Since:
jPicEdt 1.3.2

tileDrawingBoardsVertically

public void tileDrawingBoardsVertically()
Tiles all open internal frames vertically.

Since:
jPicEdt 1.3.2

setHostingFrameTitle

public void setHostingFrameTitle(java.lang.String title,
                                 jpicedt.ui.PEDrawingBoard board)
set the title of the internal frame hosting the given board to the given string.

Since:
PicEdt 1.2.1