|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JLayeredPane | +--javax.swing.JDesktopPane | +--com.klg.jclass.swing.JCMDIPane
Replaces JDesktopPane
as an internal frame container with the
following features:
JScrollPane
, then the pane will resize
itself so that it is big enough to accommodate the internal frames as
positioned.
JCMDIFrame
,
then it also manages toolbar and menu bar switching as frames become
active and are opened and closed.
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int WIREFRAME
setFrameManipulation(int mode)
.
public static final int DEFAULT
setFrameManipulation(int mode)
.
public static final int TILE_HORIZONTAL
setInitialLayout(int layout)
.
public static final int TILE_VERTICAL
setInitialLayout(int layout)
.
public static final int CASCADE
setInitialLayout(int layout)
.
protected static com.klg.jclass.util.JCLocaleManager li
protected int initialLayout
protected JMenuBar menubar
protected JToolBar toolbar
protected com.klg.jclass.swing.JCMDIPane.Listener listener
protected JCMDIPane.FrameListener frameListener
protected ActionListener menuListener
protected boolean maximized
protected com.klg.jclass.swing.util.LayoutButtonBox layoutButtonBox
protected String savedTitle
protected boolean titleIsSaved
protected com.klg.jclass.util.swing.JCAction maxMinAction
protected JMenuItem maxMinItem
protected com.klg.jclass.util.swing.JCAction cascadeAction
protected com.klg.jclass.util.swing.JCAction tileHorizAction
protected com.klg.jclass.util.swing.JCAction tileVertAction
protected com.klg.jclass.util.swing.JCAction arrangeIconsAction
protected int frameManipulationStyle
protected JToolBar lastToolBarSetToRoot
protected Icon selectedIcon
protected Icon nonSelectedIcon
protected JInternalFrame activeFrame
protected JPanel maximizedPanel
protected JInternalFrame maximizedFrame
protected JInternalFrame maximizingFrame
protected boolean considerIconsWhenTiling
protected JMenuBar currentMenuBar
protected JInternalFrame activatingFrame
JInternalFrames
are made active; they are removed and then
added back at the top of the drawing order.
protected int cascadeX
protected int cascadeY
protected int cascadeXStart
protected int cascadeYStart
protected int cascadeXIncrement
protected int cascadeYIncrement
protected int cascadeStartIncrement
protected int cascadeTolerance
Constructor Detail |
public JCMDIPane()
Method Detail |
public void setAbout(String s)
s
- public String getAbout()
public int getFrameManipulationStyle()
setFrameManipulationStyle
.
setFrameManipulationStyle(int)
public void setFrameManipulationStyle(int style)
WIREFRAME
- drag and resize as a wireframe (DEFAULT)
DEFAULT
- default style specified by the PLAF you are
using
style
- The new frame manipulation stylepublic void setDragMode(int dragMode)
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
.
setDragMode
in class JDesktopPane
dragMode
- The new dragging stylesetFrameManipulationStyle(int)
public int getDragMode()
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
.
getDragMode
in class JDesktopPane
setFrameManipulationStyle(int)
public boolean isConsiderIconsWhenTiling()
public void setConsiderIconsWhenTiling(boolean considerIconsWhenTiling)
considerIconsWhenTiling
- The new value of the considerIconsWhenTiling
property.public JToolBar getMDIToolBar()
protected void checkIfMenuOrToolBarsNeeded()
addNotify
when the state of the menu
and toolbars may not be accurate due to the previously unrealized state
of the components.
public JToolBar getMDIToolBar(JInternalFrame frame)
JCMDIFrame
with a non-null MDIToolBar
. Otherwise,
the MDIToolBar
for the this pane is returned.
frame
- The frame from which to get the MDIToolBar
public void setMDIToolBar(JToolBar toolbar)
toolbar
- The new toolbarpublic JMenuBar getMDIMenuBar()
public JMenuBar getMDIMenuBar(JInternalFrame frame)
JCMDIFrame
with a non-null MDIMenuBar
. Otherwise,
the MDIMenuBar
for the this pane is returned.
frame
- The frame from which to get the MDIMenuBar
public void setMDIMenuBar(JMenuBar menubar)
menubar
- The new menubarpublic void setLayout()
public void addNotify()
addNotify
in class JComponent
public JInternalFrame getTopFrame()
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public Dimension getMaximumSize()
getMaximumSize
in class JComponent
protected void updateWindowsMenu()
protected JMenuBar getJMenuBar()
public JMenu getWindowsMenuFromMenuBar()
protected void buildWindowsMenu(JMenu windows_menu)
protected void moveChildren(Container source, Container target)
protected void maximizeFrame(JInternalFrame frame)
protected void unmaximizeFrame()
public void unmaximize()
protected void updateIconsInMenuBar(JInternalFrame frame)
public void doLayout()
doLayout
in class Container
public void paint(Graphics g)
paint
in class JLayeredPane
public void setMaximized(boolean m)
public boolean isMaximized()
public void maximize(JInternalFrame frame)
frame
- public void setInitialLayout(int layout)
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.
layout
- protected void setTitleBar()
protected com.klg.jclass.swing.util.LayoutButtonBox getLayoutButtonBox()
LayoutButtonBox
.
LayoutButtonBox
public JInternalFrame[] getAllNonIconifiedAndNonPaletteFrames()
JInternalFrames
currently displayed in the desktop.
JInternalFrames
currently displayed in the desktoppublic JInternalFrame.JDesktopIcon[] getAllIconifiedFrames()
JInternalFrames
currently displayed in the
desktop.
JInternalFrames
currently displayed in the
desktopprotected Dimension calcCascadeSize()
protected void cascadeReset()
protected void calcNewCascadePosition(Dimension frameSize)
protected void cascadeFrame(JInternalFrame frame)
protected void cascadeFrameByPreferredSize(JInternalFrame frame)
protected void resizingScrollPane()
protected void sizingToScrollPane()
public void cascadeWindows()
protected Dimension getVisibleSize()
protected void moveIconsToBack(JInternalFrame.JDesktopIcon[] icons)
icons
- The list of desktop iconsprotected int getIconsHeight(JInternalFrame.JDesktopIcon[] icons)
icons
- The list of desktop icons
public void tileWindowsHorizontally()
public void tileWindowsVertically()
public void arrangeIcons()
protected int getOpenInternalFrameCount()
protected int getIconifiedFrameCount()
protected void selectNextFrame()
protected void setMenuAndToolBarsToRootPane(JInternalFrame frame, JMenuBar menubar, JToolBar toolbar)
public void activateFrame(JInternalFrame iframe)
iframe
- The frame to activatepublic void deactivateFrame(JInternalFrame iframe)
iframe
- The frame to deactivatepublic void closeFrame(JInternalFrame frame)
frame
- The frame to be closedpublic void setSelectedIcon(Icon selectedIcon)
selectedIcon
- the icon to usepublic Icon getSelectedIcon()
public void setNonSelectedIcon(Icon nonSelectedIcon)
nonSelectedIcon
- the icon to usepublic Icon getNonSelectedIcon()
protected static Icon makeImage(String[] pixels)
pixels
- the String representation of the image
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |