|
|||||||||
| Home >> All >> com >> flexstor >> common >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.flexstor.common.awt
Class FlexFrame

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
com.flexstor.common.awt.FlexFrame
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, WindowId
- public abstract class FlexFrame
- extends java.awt.Frame
- implements WindowId, java.awt.event.ActionListener
- extends java.awt.Frame
This class creates a top level window with a toolbar panel, a content panel,
and an optional status bar.
+------------------+ | toolbar | +------------------+ | | | content | | | | | +------------------+ | status bar | +------------------+
- Version:
- 3.0
| Nested Class Summary | |
(package private) class |
FlexFrame.FrameWindowEventHandler
Inner class to handle window events. |
| Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected static AboutHandlerI |
aboutHandler
|
protected java.util.Vector |
fChildren
|
protected FlexFrame |
fOwner
|
protected static HelpHandlerI |
helpHandler
|
private static java.awt.Image |
iconImage
|
protected java.awt.Panel |
pContent
|
protected com.flexstor.common.awt.toolbar.ToolBar |
pToolBar
|
protected StatusBar |
statusBar
|
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| 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 | |
FlexFrame()
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handles common actions (originating from toolbar/menubar) for all Frames, e.g. |
void |
addChild(FlexFrame aChild)
Adds a frame to the list of children |
void |
addNotify()
Creates the native peer for this window. |
protected boolean |
canClose()
Returns a boolean indicating wether the frame can be closed. |
void |
centerOn(java.awt.Frame f)
Centers the frame on the screen or in relation to another frame. |
boolean |
close()
Closes this frame and all children, calls canClose() to check for pending changes. |
java.util.Enumeration |
getChildren()
Gets all child frames in an enumeration. |
java.awt.Panel |
getContentPanel()
Accessor to the content panel |
FlexFrame |
getOwnerFrame()
Gets the owner of this frame |
abstract int |
getSubWindowID()
Returns the sub ID for this frame. |
java.awt.Panel |
getToolBar()
Accessor to the toolbar panel |
abstract int |
getWindowID()
Returns the ID for this frame. |
com.flexstor.common.settings.SettingKey |
getWindowName()
|
static void |
registerAboutHandler(AboutHandlerI handler)
|
static void |
registerHelpHandler(HelpHandlerI handler)
|
void |
removeChild(FlexFrame aChild)
Removes a frame from the list of children |
void |
saveSize()
Saves the location and size of the frame as a user setting. |
void |
setContentPanel(java.awt.Panel panel)
Sets/replaces the content panel. |
private void |
setIconImage()
|
void |
setMenuBar(java.awt.MenuBar mb)
Hooks up the frame as an action listener to the new menu bar. |
void |
setOwnerFrame(FlexFrame anOwner)
Sets the owner of this frame |
void |
setSize()
Resizes the frame to its previous size and location if it is found in user settings. |
void |
setStatusText(java.lang.String sStatus)
Sets the text in the status bar to the specified value. |
void |
setToolBar(java.awt.Panel newToolBar)
Mutator of the toolbar panel, replaces the existing toolbar with the passed in panel |
void |
setWaitCursor(boolean bWait)
|
void |
showStatusBar(boolean bShow)
Adds/removes a status bar to the bottom of this frame. |
| Methods inherited from class java.awt.Frame |
getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
iconImage
private static java.awt.Image iconImage
helpHandler
protected static HelpHandlerI helpHandler
aboutHandler
protected static AboutHandlerI aboutHandler
fOwner
protected FlexFrame fOwner
fChildren
protected java.util.Vector fChildren
pToolBar
protected com.flexstor.common.awt.toolbar.ToolBar pToolBar
pContent
protected java.awt.Panel pContent
statusBar
protected StatusBar statusBar
| Constructor Detail |
FlexFrame
public FlexFrame()
| Method Detail |
getWindowID
public abstract int getWindowID()
- Returns the ID for this frame.
getSubWindowID
public abstract int getSubWindowID()
- Returns the sub ID for this frame.
setIconImage
private void setIconImage()
getWindowName
public com.flexstor.common.settings.SettingKey getWindowName()
centerOn
public void centerOn(java.awt.Frame f)
- Centers the frame on the screen or in relation to another frame.
setWaitCursor
public void setWaitCursor(boolean bWait)
getContentPanel
public java.awt.Panel getContentPanel()
- Accessor to the content panel
setContentPanel
public void setContentPanel(java.awt.Panel panel)
- Sets/replaces the content panel.
getToolBar
public java.awt.Panel getToolBar()
- Accessor to the toolbar panel
setToolBar
public void setToolBar(java.awt.Panel newToolBar)
- Mutator of the toolbar panel, replaces the existing toolbar
with the passed in panel
setMenuBar
public void setMenuBar(java.awt.MenuBar mb)
- Hooks up the frame as an action listener to the new menu bar.
Also, removes the registration from the previous menu bar.
showStatusBar
public void showStatusBar(boolean bShow)
- Adds/removes a status bar to the bottom of this frame.
setStatusText
public void setStatusText(java.lang.String sStatus)
- Sets the text in the status bar to the specified value. The JCString
parameter allows you to set fonts, styles, and colors.
setOwnerFrame
public void setOwnerFrame(FlexFrame anOwner)
- Sets the owner of this frame
getOwnerFrame
public FlexFrame getOwnerFrame()
- Gets the owner of this frame
addChild
public void addChild(FlexFrame aChild)
- Adds a frame to the list of children
removeChild
public void removeChild(FlexFrame aChild)
- Removes a frame from the list of children
getChildren
public java.util.Enumeration getChildren()
- Gets all child frames in an enumeration.
close
public boolean close()
- Closes this frame and all children, calls canClose()
to check for pending changes.
canClose
protected boolean canClose()
- Returns a boolean indicating wether the frame can be closed.
The default behavior is to return true. This method needs to be
overwritten in subclasses which require a check before they can be closed.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Handles common actions (originating from toolbar/menubar)
for all Frames, e.g. About Box, close and Main Help.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
addNotify
public void addNotify()
- Description copied from class:
java.awt.Window - Creates the native peer for this window.
setSize
public void setSize()
- Resizes the frame to its previous size and location if it is
found in user settings. Otherwise, its preferred size is used.
Every subclass should override getPreferredSize() in order
to set the default.
Enforces these limitations:
1. Positions never off screen, i.e. x,y >= 0
2. Width and height always within screen size, i.e. w,h <= screen.w,h 3. A frame is always completely on screen, i.e. x+w < screen.w, y+h < screen.h setSize is called from addNotify, because a peer must exist.
saveSize
public void saveSize()
- Saves the location and size of the frame as a user setting.
saveSize() is called by close() and can also be called directly.
PLEASE NOTE THAT THIS METHOD WILL REMOVE ANY CURRENT MENUBAR FOR
ALL PLATFORMS, EXCEPT FOR MacOS, IN ORDER TO BE ABLE TO CALCULATE
THE CORRECT FRAME SIZE.
registerHelpHandler
public static void registerHelpHandler(HelpHandlerI handler)
registerAboutHandler
public static void registerAboutHandler(AboutHandlerI handler)
|
|||||||||
| Home >> All >> com >> flexstor >> common >> [ awt overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC