|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
uk.ac.essex.common.gui.frame.ApplicationFrameImpl
public abstract class ApplicationFrameImpl
Created Date: 20-Dec-2003
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected javax.swing.JComponent |
content
|
protected java.awt.Container |
contentPane
|
static int |
DEFAULT_HEIGHT
The frames default height |
static java.lang.String |
DEFAULT_TOOLBAR_KEY
|
static int |
DEFAULT_WIDTH
The frames default width |
static int |
DEFAULT_X
|
static int |
DEFAULT_Y
|
protected javax.swing.JToolBar |
defaultToolBar
|
protected javax.swing.JMenuBar |
localMenuBar
|
static int |
MIN_HEIGHT
The frames default height |
static int |
MIN_WIDTH
The frames default width |
protected javax.swing.JLabel |
statusBarLabel
|
protected javax.swing.JPanel |
statusPanel
|
protected javax.swing.JPanel |
toolBarPanel
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
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.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface uk.ac.essex.common.gui.ApplicationFrame |
---|
BOTTOM, LEFT, RIGHT, TOP |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
|
ApplicationFrameImpl(Application application,
ApplicationFrameParameters parameters)
|
protected |
ApplicationFrameImpl(java.lang.String title,
boolean persistent)
TODO: remove this const |
Method Summary | |
---|---|
void |
addFrameListener(ApplicationFrameListener frameListener)
|
void |
addToolBar(java.lang.String name,
javax.swing.JToolBar toolBar)
|
void |
addToToolBar(javax.swing.Action actionToAdd)
Adds a action to the tool bar |
void |
addToToolBar(java.lang.String name,
javax.swing.Action actionToAdd)
Adds an action to the named tool bar |
void |
addViewChangeListener(ViewChangeListener viewChangeListener)
Add a view change listener to this frame each time the view changes an event is fired calling the method fireViewChanged . |
void |
center()
Centers the frame on screen |
void |
destroy()
|
void |
dispose()
|
protected void |
finalize()
|
protected void |
fireFrameClosing()
|
protected void |
fireFrameOpening()
|
protected void |
fireViewChange(javax.swing.JPanel oldView,
javax.swing.JPanel newView)
Informs view change listeners that the current selected view has changed |
protected void |
fireViewClosed(javax.swing.JPanel view)
Informs view change listeners that a wants to close |
Application |
getApplication()
|
javax.swing.JComponent |
getContent()
|
javax.swing.JToolBar |
getDefaultToolBar()
|
javax.swing.JFrame |
getFrame()
|
javax.swing.JMenuBar |
getJMenuBar()
Returns the menubar set on this frame. |
javax.swing.JMenuBar |
getLocalMenuBar()
|
javax.swing.JLabel |
getStatusBarLabel()
|
boolean |
hasJMenuBar()
|
void |
init()
Component initialization |
boolean |
isPersistent()
|
void |
removeFrameListener(ApplicationFrameListener frameListener)
|
void |
removeToolBar(java.lang.String name)
|
void |
restoreLocation(java.awt.Rectangle defaults)
|
void |
saveLocation()
Save the current location of the window to the preferences |
void |
setContent(javax.swing.JComponent content)
|
void |
setJMenuBar(javax.swing.JMenuBar menubar)
Sets the menubar for this frame. |
void |
setLocalMenuBar(javax.swing.JMenuBar localMenuBar)
|
void |
setPersistent(boolean persistent)
|
void |
setProgress(java.lang.String label,
float percentage)
TODO: Should this be here or could we combine with ApplicationFrame.setStatus(String, boolean) }?? |
void |
setStatus(java.lang.String status,
boolean isSticky)
Sets the status message at the bottom of the GUI if the first argument is null it sets the staus message to "Ready" and ignores the second arg. |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface uk.ac.essex.common.gui.ApplicationFrame |
---|
addJMenu, addView, removeView, setTitle |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static final int DEFAULT_HEIGHT
public static final int DEFAULT_WIDTH
public static final int MIN_HEIGHT
public static final int MIN_WIDTH
public static final int DEFAULT_X
public static final int DEFAULT_Y
public static final java.lang.String DEFAULT_TOOLBAR_KEY
protected javax.swing.JToolBar defaultToolBar
protected javax.swing.JMenuBar localMenuBar
protected javax.swing.JLabel statusBarLabel
protected javax.swing.JComponent content
protected java.awt.Container contentPane
protected javax.swing.JPanel toolBarPanel
protected javax.swing.JPanel statusPanel
Constructor Detail |
---|
public ApplicationFrameImpl(Application application, ApplicationFrameParameters parameters) throws InitialisationException
parameters
-
InitialisationException
protected ApplicationFrameImpl(java.lang.String title, boolean persistent) throws java.awt.HeadlessException, InitialisationException
title
- persistent
-
java.awt.HeadlessException
InitialisationException
Method Detail |
---|
public javax.swing.JComponent getContent()
public void saveLocation()
preferences
public void restoreLocation(java.awt.Rectangle defaults)
public void setContent(javax.swing.JComponent content)
public void dispose()
dispose
in class java.awt.Window
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public Application getApplication()
getApplication
in interface ApplicationFrame
public javax.swing.JMenuBar getLocalMenuBar()
public void setLocalMenuBar(javax.swing.JMenuBar localMenuBar)
public void init() throws InitialisationException
init
in interface ApplicationFrame
InitialisationException
public void destroy()
destroy
in interface ApplicationFrame
public javax.swing.JFrame getFrame()
getFrame
in interface ApplicationFrame
public javax.swing.JToolBar getDefaultToolBar()
getDefaultToolBar
in interface ApplicationFrame
public void addToolBar(java.lang.String name, javax.swing.JToolBar toolBar)
addToolBar
in interface ApplicationFrame
name
- toolBar
- public void removeToolBar(java.lang.String name)
removeToolBar
in interface ApplicationFrame
name
- public void addToToolBar(javax.swing.Action actionToAdd)
addToToolBar
in interface ApplicationFrame
actionToAdd
- - the action to put on the tool barpublic void addToToolBar(java.lang.String name, javax.swing.Action actionToAdd)
addToToolBar
in interface ApplicationFrame
name
- - The name of the toolbar to add toactionToAdd
- - The action to put on the tool baraddToolBar(java.lang.String, javax.swing.JToolBar)
public javax.swing.JLabel getStatusBarLabel()
getStatusBarLabel
in interface ApplicationFrame
public javax.swing.JMenuBar getJMenuBar()
getJMenuBar
in interface ApplicationFrame
getJMenuBar
in class javax.swing.JFrame
setJMenuBar(javax.swing.JMenuBar)
public void setJMenuBar(javax.swing.JMenuBar menubar)
setJMenuBar
in interface ApplicationFrame
setJMenuBar
in class javax.swing.JFrame
menubar
- the menubar being placed in the framegetJMenuBar()
public boolean hasJMenuBar()
hasJMenuBar
in interface ApplicationFrame
public void addViewChangeListener(ViewChangeListener viewChangeListener)
fireViewChanged
.
addViewChangeListener
in interface ApplicationFrame
viewChangeListener
- public void setStatus(java.lang.String status, boolean isSticky)
setStatus
in interface ApplicationFrame
status
- - The String to displayisSticky
- - Should the message be permanent or stay for 3 seconds
then gopublic void setProgress(java.lang.String label, float percentage)
ApplicationFrame
ApplicationFrame.setStatus(String, boolean)
}??
setProgress
in interface ApplicationFrame
label
- - String to display on the progress barpercentage
- - Should be in the range 0 - 100 inclusivepublic void center()
center
in interface ApplicationFrame
public boolean isPersistent()
isPersistent
in interface ApplicationFrame
public void setPersistent(boolean persistent)
setPersistent
in interface ApplicationFrame
public void addFrameListener(ApplicationFrameListener frameListener)
addFrameListener
in interface ApplicationFrame
public void removeFrameListener(ApplicationFrameListener frameListener)
removeFrameListener
in interface ApplicationFrame
frameListener
- protected void fireFrameClosing()
protected void fireFrameOpening()
protected void fireViewChange(javax.swing.JPanel oldView, javax.swing.JPanel newView)
oldView
- - The previous selected viewnewView
- - The new selected viewprotected void fireViewClosed(javax.swing.JPanel view)
view
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |