JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.swing
Class JCMDIPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JLayeredPane
                          |
                          +--javax.swing.JDesktopPane
                                |
                                +--com.klg.jclass.swing.JCMDIPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable

public class JCMDIPane
extends JDesktopPane

Replaces JDesktopPane as an internal frame container with the following features:

JCMDIPane works best with a JCMDIFrame, but it can be used with standard JInternal frames as long as there is only one child of the contentPane. The child can be a container as well, so that this is not a functional restriction.

See Also:
Serialized Form

Nested Class Summary
protected  class JCMDIPane.ArrangeAction
           
protected  class JCMDIPane.CascadeAction
           
protected  class JCMDIPane.FrameListener
           
protected  class JCMDIPane.LayoutListener
          LayoutListener listens for requests to manage the internal frames.
protected  class JCMDIPane.MaxMinAction
           
 class JCMDIPane.MDIDesktopManager
          This inner class wraps a PLAF-specific desktop manager and overrides its basic window dragging and resizing behavior to optionally force the use of wireframes (for speed).
protected  class JCMDIPane.TileHAction
           
protected  class JCMDIPane.TileVAction
           
protected  class JCMDIPane.WindowsMenuListener
          WindowsMenuListener listens for selections in the window list menu, then brings the selected window to the front.
 
Nested classes inherited from class javax.swing.JDesktopPane
JDesktopPane.AccessibleJDesktopPane
 
Nested classes inherited from class javax.swing.JLayeredPane
JLayeredPane.AccessibleJLayeredPane
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  JInternalFrame activatingFrame
          This is the frame that is being activated.
protected  JInternalFrame activeFrame
           
protected  com.klg.jclass.util.swing.JCAction arrangeIconsAction
           
static int CASCADE
          Constant for use with setInitialLayout(int layout).
protected  com.klg.jclass.util.swing.JCAction cascadeAction
           
protected  int cascadeStartIncrement
           
protected  int cascadeTolerance
           
protected  int cascadeX
           
protected  int cascadeXIncrement
           
protected  int cascadeXStart
           
protected  int cascadeY
           
protected  int cascadeYIncrement
           
protected  int cascadeYStart
           
protected  boolean considerIconsWhenTiling
           
protected  JMenuBar currentMenuBar
          We track the current menu bar because we cannot rely on Swing to actually change it when requested; therefore, we cache the menu bar that we believe we are working with.
static int DEFAULT
          Constant for use with setFrameManipulation(int mode).
protected  JCMDIPane.FrameListener frameListener
           
protected  int frameManipulationStyle
           
protected  int initialLayout
           
protected  JToolBar lastToolBarSetToRoot
           
protected  com.klg.jclass.swing.util.LayoutButtonBox layoutButtonBox
           
protected static com.klg.jclass.util.JCLocaleManager li
           
protected  com.klg.jclass.swing.JCMDIPane.Listener listener
           
protected  boolean maximized
           
protected  JInternalFrame maximizedFrame
           
protected  JPanel maximizedPanel
           
protected  JInternalFrame maximizingFrame
           
protected  com.klg.jclass.util.swing.JCAction maxMinAction
           
protected  JMenuItem maxMinItem
           
protected  JMenuBar menubar
           
protected  ActionListener menuListener
           
protected  Icon nonSelectedIcon
           
protected  String savedTitle
           
protected  Icon selectedIcon
           
static int TILE_HORIZONTAL
          Constant for use with setInitialLayout(int layout).
static int TILE_VERTICAL
          Constant for use with setInitialLayout(int layout).
protected  com.klg.jclass.util.swing.JCAction tileHorizAction
           
protected  com.klg.jclass.util.swing.JCAction tileVertAction
           
protected  boolean titleIsSaved
           
protected  JToolBar toolbar
           
static int WIREFRAME
          Constant for use with setFrameManipulation(int mode).
 
Fields inherited from class javax.swing.JDesktopPane
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE
 
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JCMDIPane()
           
 
Method Summary
 void activateFrame(JInternalFrame iframe)
          Makes this frame the active frame.
 void addNotify()
           
 void arrangeIcons()
          Arranges "iconified" panes along the bottom.
protected  void buildWindowsMenu(JMenu windows_menu)
           
protected  Dimension calcCascadeSize()
           
protected  void calcNewCascadePosition(Dimension frameSize)
           
protected  void cascadeFrame(JInternalFrame frame)
           
protected  void cascadeFrameByPreferredSize(JInternalFrame frame)
           
protected  void cascadeReset()
           
 void cascadeWindows()
          Arranges non-iconified panes in cascade form.
protected  void checkIfMenuOrToolBarsNeeded()
          Method used to rationalize the Menu and Toolbar settings.
 void closeFrame(JInternalFrame frame)
          Copies any children back.
 void deactivateFrame(JInternalFrame iframe)
          Deactivates a frame.
 void doLayout()
          Causes this container to lay out its components.
 String getAbout()
          Returns vendor information.
 JInternalFrame.JDesktopIcon[] getAllIconifiedFrames()
          Returns all iconified JInternalFrames currently displayed in the desktop.
 JInternalFrame[] getAllNonIconifiedAndNonPaletteFrames()
          Returns all non-iconified, and non Palette layer JInternalFrames currently displayed in the desktop.
 int getDragMode()
          Gets the drag style of the JCMDIPane.
 int getFrameManipulationStyle()
          See setFrameManipulationStyle.
protected  int getIconifiedFrameCount()
          Returns the count of the iconified frames.
protected  int getIconsHeight(JInternalFrame.JDesktopIcon[] icons)
          Get the current height used by all the icons.
protected  JMenuBar getJMenuBar()
           
protected  com.klg.jclass.swing.util.LayoutButtonBox getLayoutButtonBox()
          Returns the LayoutButtonBox.
 Dimension getMaximumSize()
           
 JMenuBar getMDIMenuBar()
          Returns the menubar used if there are no internal frames.
 JMenuBar getMDIMenuBar(JInternalFrame frame)
          Returns the menubar used for the specified frame, if the frame is a JCMDIFrame with a non-null MDIMenuBar.
 JToolBar getMDIToolBar()
          Returns the toolbar used if there are no internal frames.
 JToolBar getMDIToolBar(JInternalFrame frame)
          Returns the toolbar used for the specified frame, if the frame is a JCMDIFrame with a non-null MDIToolBar.
 Icon getNonSelectedIcon()
          Gets the icon which is to appear beside the non-selected window item in the Windows menu.
protected  int getOpenInternalFrameCount()
          Returns the count of internal frames that are not closed.
 Dimension getPreferredSize()
          If this pane has an ancestor that is a scrollpane or it has no children, then it returns the default preferred size.
 Icon getSelectedIcon()
          Gets the icon which is to appear beside the selected window item in the Windows menu.
 JInternalFrame getTopFrame()
          Returns the topmost frame.
protected  Dimension getVisibleSize()
          Gets the size of the visible area, which is the size of this pane.
 JMenu getWindowsMenuFromMenuBar()
           
 boolean isConsiderIconsWhenTiling()
          Set whether icons should be considered when tiling.
 boolean isMaximized()
           
protected static Icon makeImage(String[] pixels)
          Creates an icon from a String array.
 void maximize(JInternalFrame frame)
          Method to maximize a particular frame in MDI style.
protected  void maximizeFrame(JInternalFrame frame)
           
protected  void moveChildren(Container source, Container target)
           
protected  void moveIconsToBack(JInternalFrame.JDesktopIcon[] icons)
          Move icons to back so they don't appear in front of cascaded or tiled windows
 void paint(Graphics g)
           
protected  void resizingScrollPane()
           
protected  void selectNextFrame()
          No frame is selected, or the selected frame is being or has been removed; therefore, we need to select a frame.
 void setAbout(String s)
          Provided for Beans property editors - has no effect.
 void setConsiderIconsWhenTiling(boolean considerIconsWhenTiling)
          Get whether icons should be considered when tiling.
 void setDragMode(int dragMode)
          Sets the drag style of the JCMDIPane.
 void setFrameManipulationStyle(int style)
          Sets the frame manipulation style.
 void setInitialLayout(int layout)
          Allows the layout of the MDIFrame windows to be set before the MDIPane window has been displayed.
 void setLayout()
          Override that ensures the layout cannot be modified.
 void setMaximized(boolean m)
           
 void setMDIMenuBar(JMenuBar menubar)
          Sets the menubar to use if there are no internal frames.
 void setMDIToolBar(JToolBar toolbar)
          Sets the toolbar to use if there are no internal frames.
protected  void setMenuAndToolBarsToRootPane(JInternalFrame frame, JMenuBar menubar, JToolBar toolbar)
           
 void setNonSelectedIcon(Icon nonSelectedIcon)
          Sets the icon which is to appear beside the non-selected window items in the Windows menu.
 void setSelectedIcon(Icon selectedIcon)
          Sets the icon which is to appear beside the selected window item in the Windows menu.
protected  void setTitleBar()
           
protected  void sizingToScrollPane()
           
 void tileWindowsHorizontally()
          Tiles the frames horizontally.
 void tileWindowsVertically()
          Tiles the frames vertically.
 void unmaximize()
          Method to unmaximize an MDI frame.
protected  void unmaximizeFrame()
           
protected  void updateIconsInMenuBar(JInternalFrame frame)
           
protected  void updateWindowsMenu()
           
 
Methods inherited from class javax.swing.JDesktopPane
getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getSelectedFrame, getUI, getUIClassID, isOpaque, paramString, setDesktopManager, setSelectedFrame, setUI, updateUI
 
Methods inherited from class javax.swing.JLayeredPane
addImpl, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, putLayer, remove, setLayer, setLayer, setPosition
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WIREFRAME

public static final int WIREFRAME
Constant for use with setFrameManipulation(int mode).

See Also:
Constant Field Values

DEFAULT

public static final int DEFAULT
Constant for use with setFrameManipulation(int mode).

See Also:
Constant Field Values

TILE_HORIZONTAL

public static final int TILE_HORIZONTAL
Constant for use with setInitialLayout(int layout).

See Also:
Constant Field Values

TILE_VERTICAL

public static final int TILE_VERTICAL
Constant for use with setInitialLayout(int layout).

See Also:
Constant Field Values

CASCADE

public static final int CASCADE
Constant for use with setInitialLayout(int layout).

See Also:
Constant Field Values

li

protected static com.klg.jclass.util.JCLocaleManager li

initialLayout

protected int initialLayout

menubar

protected JMenuBar menubar

toolbar

protected JToolBar toolbar

listener

protected com.klg.jclass.swing.JCMDIPane.Listener listener

frameListener

protected JCMDIPane.FrameListener frameListener

menuListener

protected ActionListener menuListener

maximized

protected boolean maximized

layoutButtonBox

protected com.klg.jclass.swing.util.LayoutButtonBox layoutButtonBox

savedTitle

protected String savedTitle

titleIsSaved

protected boolean titleIsSaved

maxMinAction

protected com.klg.jclass.util.swing.JCAction maxMinAction

maxMinItem

protected JMenuItem maxMinItem

cascadeAction

protected com.klg.jclass.util.swing.JCAction cascadeAction

tileHorizAction

protected com.klg.jclass.util.swing.JCAction tileHorizAction

tileVertAction

protected com.klg.jclass.util.swing.JCAction tileVertAction

arrangeIconsAction

protected com.klg.jclass.util.swing.JCAction arrangeIconsAction

frameManipulationStyle

protected int frameManipulationStyle

lastToolBarSetToRoot

protected JToolBar lastToolBarSetToRoot

selectedIcon

protected Icon selectedIcon

nonSelectedIcon

protected Icon nonSelectedIcon

activeFrame

protected JInternalFrame activeFrame

maximizedPanel

protected JPanel maximizedPanel

maximizedFrame

protected JInternalFrame maximizedFrame

maximizingFrame

protected JInternalFrame maximizingFrame

considerIconsWhenTiling

protected boolean considerIconsWhenTiling

currentMenuBar

protected JMenuBar currentMenuBar
We track the current menu bar because we cannot rely on Swing to actually change it when requested; therefore, we cache the menu bar that we believe we are working with.


activatingFrame

protected JInternalFrame activatingFrame
This is the frame that is being activated. We keep track of it so that we know it is not really being deleted. This is done because of the way JInternalFrames are made active; they are removed and then added back at the top of the drawing order.


cascadeX

protected int cascadeX

cascadeY

protected int cascadeY

cascadeXStart

protected int cascadeXStart

cascadeYStart

protected int cascadeYStart

cascadeXIncrement

protected int cascadeXIncrement

cascadeYIncrement

protected int cascadeYIncrement

cascadeStartIncrement

protected int cascadeStartIncrement

cascadeTolerance

protected int cascadeTolerance
Constructor Detail

JCMDIPane

public JCMDIPane()
Method Detail

setAbout

public void setAbout(String s)
Provided for Beans property editors - has no effect.

Parameters:
s -

getAbout

public String getAbout()
Returns vendor information.

Returns:
vendor information

getFrameManipulationStyle

public int getFrameManipulationStyle()
See setFrameManipulationStyle.

Returns:
The current frame manipulation style
See Also:
setFrameManipulationStyle(int)

setFrameManipulationStyle

public void setFrameManipulationStyle(int style)
Sets the frame manipulation style. Valid styles are:

Parameters:
style - The new frame manipulation style

setDragMode

public void setDragMode(int dragMode)
Sets the drag style of the JCMDIPane. Note the dragging style is overridden by JCMDIPane's frame manipulation style mechanism. Setting the dragging style to LIVE_DRAG_MODE is equivalent to setting the frameManipulation style to DEFAULT. Setting the dragging style to OUTLINE_DRAG_MODE is equivalent to setting the frameManipulation style to WIREFRAME.

Overrides:
setDragMode in class JDesktopPane
Parameters:
dragMode - The new dragging style
See Also:
setFrameManipulationStyle(int)

getDragMode

public int getDragMode()
Gets the drag style of the JCMDIPane. Note the dragging style is overridden by JCMDIPane's frame manipulation style mechanism. Setting the dragging style to LIVE_DRAG_MODE is equivalent to setting the frameManipulation style to DEFAULT. Setting the dragging style to OUTLINE_DRAG_MODE is equivalent to setting the frameManipulation style to WIREFRAME.

Overrides:
getDragMode in class JDesktopPane
Returns:
The current dragging style
See Also:
setFrameManipulationStyle(int)

isConsiderIconsWhenTiling

public boolean isConsiderIconsWhenTiling()
Set whether icons should be considered when tiling. If true, tiling happens above (and not over) the icon display. If false, the frames will be tiled over the icons. The default is false.

Returns:
Whether icons should be considered when tiling

setConsiderIconsWhenTiling

public void setConsiderIconsWhenTiling(boolean considerIconsWhenTiling)
Get whether icons should be considered when tiling. If true, tiling happens above (and not over) the icon display. If false, the frames will be tiled over the icons. The default is false.

Parameters:
considerIconsWhenTiling - The new value of the considerIconsWhenTiling property.

getMDIToolBar

public JToolBar getMDIToolBar()
Returns the toolbar used if there are no internal frames.

Returns:
toolbar used if there are no internal frames

checkIfMenuOrToolBarsNeeded

protected void checkIfMenuOrToolBarsNeeded()
Method used to rationalize the Menu and Toolbar settings. Chiefly called from places such as addNotify when the state of the menu and toolbars may not be accurate due to the previously unrealized state of the components.


getMDIToolBar

public JToolBar getMDIToolBar(JInternalFrame frame)
Returns the toolbar used for the specified frame, if the frame is a JCMDIFrame with a non-null MDIToolBar. Otherwise, the MDIToolBar for the this pane is returned.

Parameters:
frame - The frame from which to get the MDIToolBar
Returns:
toolbar used for the specified frame

setMDIToolBar

public void setMDIToolBar(JToolBar toolbar)
Sets the toolbar to use if there are no internal frames.

Parameters:
toolbar - The new toolbar

getMDIMenuBar

public JMenuBar getMDIMenuBar()
Returns the menubar used if there are no internal frames.

Returns:
menubar used

getMDIMenuBar

public JMenuBar getMDIMenuBar(JInternalFrame frame)
Returns the menubar used for the specified frame, if the frame is a JCMDIFrame with a non-null MDIMenuBar. Otherwise, the MDIMenuBar for the this pane is returned.

Parameters:
frame - The frame from which to get the MDIMenuBar
Returns:
menubar used for the specified frame

setMDIMenuBar

public void setMDIMenuBar(JMenuBar menubar)
Sets the menubar to use if there are no internal frames.

Parameters:
menubar - The new menubar

setLayout

public void setLayout()
Override that ensures the layout cannot be modified.


addNotify

public void addNotify()
Overrides:
addNotify in class JComponent

getTopFrame

public JInternalFrame getTopFrame()
Returns the topmost frame.

Returns:
The topmost frame

getPreferredSize

public Dimension getPreferredSize()
If this pane has an ancestor that is a scrollpane or it has no children, then it returns the default preferred size. If it has children and no scrollpane for an ancestor, then it returns a size big enough to show all its children in their current locations.

Overrides:
getPreferredSize in class JComponent
Returns:

getMaximumSize

public Dimension getMaximumSize()
Overrides:
getMaximumSize in class JComponent

updateWindowsMenu

protected void updateWindowsMenu()

getJMenuBar

protected JMenuBar getJMenuBar()

getWindowsMenuFromMenuBar

public JMenu getWindowsMenuFromMenuBar()

buildWindowsMenu

protected void buildWindowsMenu(JMenu windows_menu)

moveChildren

protected void moveChildren(Container source,
                            Container target)

maximizeFrame

protected void maximizeFrame(JInternalFrame frame)

unmaximizeFrame

protected void unmaximizeFrame()

unmaximize

public void unmaximize()
Method to unmaximize an MDI frame.


updateIconsInMenuBar

protected void updateIconsInMenuBar(JInternalFrame frame)

doLayout

public void doLayout()
Causes this container to lay out its components.

Overrides:
doLayout in class Container

paint

public void paint(Graphics g)
Overrides:
paint in class JLayeredPane

setMaximized

public void setMaximized(boolean m)

isMaximized

public boolean isMaximized()

maximize

public void maximize(JInternalFrame frame)
Method to maximize a particular frame in MDI style.

Parameters:
frame -

setInitialLayout

public void setInitialLayout(int layout)
Allows the layout of the MDIFrame windows to be set before the MDIPane window has been displayed. This has no effect after the MDIPane has been displayed for the first time.

Parameters:
layout -

setTitleBar

protected void setTitleBar()

getLayoutButtonBox

protected com.klg.jclass.swing.util.LayoutButtonBox getLayoutButtonBox()
Returns the LayoutButtonBox.

Returns:
the LayoutButtonBox

getAllNonIconifiedAndNonPaletteFrames

public JInternalFrame[] getAllNonIconifiedAndNonPaletteFrames()
Returns all non-iconified, and non Palette layer JInternalFrames currently displayed in the desktop.

Returns:
all non-iconified, and non Palette layer JInternalFrames currently displayed in the desktop

getAllIconifiedFrames

public JInternalFrame.JDesktopIcon[] getAllIconifiedFrames()
Returns all iconified JInternalFrames currently displayed in the desktop.

Returns:
all iconified JInternalFrames currently displayed in the desktop

calcCascadeSize

protected Dimension calcCascadeSize()

cascadeReset

protected void cascadeReset()

calcNewCascadePosition

protected void calcNewCascadePosition(Dimension frameSize)

cascadeFrame

protected void cascadeFrame(JInternalFrame frame)

cascadeFrameByPreferredSize

protected void cascadeFrameByPreferredSize(JInternalFrame frame)

resizingScrollPane

protected void resizingScrollPane()

sizingToScrollPane

protected void sizingToScrollPane()

cascadeWindows

public void cascadeWindows()
Arranges non-iconified panes in cascade form.


getVisibleSize

protected Dimension getVisibleSize()
Gets the size of the visible area, which is the size of this pane.

Returns:
The size of the visible area

moveIconsToBack

protected void moveIconsToBack(JInternalFrame.JDesktopIcon[] icons)
Move icons to back so they don't appear in front of cascaded or tiled windows

Parameters:
icons - The list of desktop icons

getIconsHeight

protected int getIconsHeight(JInternalFrame.JDesktopIcon[] icons)
Get the current height used by all the icons.

Parameters:
icons - The list of desktop icons
Returns:
The height of the icon "display"

tileWindowsHorizontally

public void tileWindowsHorizontally()
Tiles the frames horizontally.


tileWindowsVertically

public void tileWindowsVertically()
Tiles the frames vertically.


arrangeIcons

public void arrangeIcons()
Arranges "iconified" panes along the bottom.


getOpenInternalFrameCount

protected int getOpenInternalFrameCount()
Returns the count of internal frames that are not closed.

Returns:
internal frames that are not closed

getIconifiedFrameCount

protected int getIconifiedFrameCount()
Returns the count of the iconified frames.

Returns:
count of the iconified frames

selectNextFrame

protected void selectNextFrame()
No frame is selected, or the selected frame is being or has been removed; therefore, we need to select a frame.


setMenuAndToolBarsToRootPane

protected void setMenuAndToolBarsToRootPane(JInternalFrame frame,
                                            JMenuBar menubar,
                                            JToolBar toolbar)

activateFrame

public void activateFrame(JInternalFrame iframe)
Makes this frame the active frame.

Parameters:
iframe - The frame to activate

deactivateFrame

public void deactivateFrame(JInternalFrame iframe)
Deactivates a frame.

Parameters:
iframe - The frame to deactivate

closeFrame

public void closeFrame(JInternalFrame frame)
Copies any children back.

Parameters:
frame - The frame to be closed

setSelectedIcon

public void setSelectedIcon(Icon selectedIcon)
Sets the icon which is to appear beside the selected window item in the Windows menu. Set to null if you do not want an icon to appear.

Parameters:
selectedIcon - the icon to use

getSelectedIcon

public Icon getSelectedIcon()
Gets the icon which is to appear beside the selected window item in the Windows menu. The default icon is a checkmark.

Returns:
the icon to use

setNonSelectedIcon

public void setNonSelectedIcon(Icon nonSelectedIcon)
Sets the icon which is to appear beside the non-selected window items in the Windows menu. Set to null if you do not want an icon to appear.

Parameters:
nonSelectedIcon - the icon to use

getNonSelectedIcon

public Icon getNonSelectedIcon()
Gets the icon which is to appear beside the non-selected window item in the Windows menu. The default is an empty icon as a place holder in the menu.

Returns:
the icon to use

makeImage

protected static Icon makeImage(String[] pixels)
Creates an icon from a String array.

Parameters:
pixels - the String representation of the image
Returns:
image the Icon icon

Copyright © 2004 Quest Software Inc..
All rights reserved.