org.davesag.tasktracker.client
Class AbstractClientFrame
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--org.davesag.tasktracker.client.AbstractClientFrame
- All Implemented Interfaces:
- Accessible, ImageObserver, MenuContainer, RootPaneContainer, Serializable, WindowConstants
- Direct Known Subclasses:
- ListFrame, LoginFrame, NewTaskFrame
- public abstract class AbstractClientFrame
- extends JFrame
The AbstractClientFrame provides a bunch of common parts to the Client's UI windows.
It should be extended by any Frames used by this applicatoion. Key common properties
include colour scheme taken from getApplicationContext
- Version:
- 0.1 pre-release 30 Mar 2002
- See Also:
- Serialized Form
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, 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 |
Method Summary |
void |
addNotify()
|
void |
center()
Centers the window on the screen. |
ClientApp |
getApplicationContext()
The Application Context is a reference to the ClientApp that
the UI is working for. |
protected abstract void |
layoutComponents()
Sets up all the swing components in the right place and with the right defaults. |
void |
setCaution(String caution)
simply sets the caution lable's text. |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
finalize, getCursorType, getFrames, getIconImage, getMenuBar, getState, getTitle, isResizable, remove, removeNotify, setCursor, setIconImage, setMenuBar, setResizable, setState, setTitle |
Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, dispose, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, hide, isShowing, pack, postEvent, processEvent, removeWindowListener, setCursor, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, processMouseEvent, processMouseMotionEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
FRAME_MARGAIN
public static int FRAME_MARGAIN
mMyFrame
protected final AbstractClientFrame mMyFrame
mBackgroundColour
protected final Color mBackgroundColour
mDisplayTextColour
protected final Color mDisplayTextColour
mTitleColour
protected final Color mTitleColour
mDisplayFont
protected final Font mDisplayFont
mTitleLabel
protected final JLabel mTitleLabel
mCautionLabel
protected JLabel mCautionLabel
mLabelFont
protected Font mLabelFont
mGridbag
protected GridBagLayout mGridbag
mConstraints
protected GridBagConstraints mConstraints
mApplicationContext
protected ClientApp mApplicationContext
AbstractClientFrame
public AbstractClientFrame(ClientApp app,
String title,
boolean bigbanner)
- A constructor that takes the Client Application as a param. It loads the
applications global background colour and text colour info.
- Parameters:
app
- the Client Application you want to log in to.title
- the title of the frame.bigbanner
- if true this will show a larger banner.
AbstractClientFrame
public AbstractClientFrame(ClientApp app,
String title)
- A constructor that takes the Client Application as a param. It loads the
applications global background colour and text colour info.
- Parameters:
app
- the Client Application you want to log in to.title
- the title of the frame.
layoutComponents
protected abstract void layoutComponents()
- Sets up all the swing components in the right place and with the right defaults.
Called from the constructor.
The implementationof layoutComponents should assume the mGridbag and constratings
are already setup for you, as they have been set up by the constructor. also
you don't need to bother calling pack(), show() etc as this is already handled
for you by the constructor.
fyi, the order of events is
- openDefaultGridBag(name);
- layoutComponents();
- closeDefaultGridbag();
center
public void center()
- Centers the window on the screen.
setCaution
public void setCaution(String caution)
- simply sets the caution lable's text.
- Parameters:
caution
- The word of caution.
addNotify
public void addNotify()
- Overrides:
addNotify
in class Frame
getApplicationContext
public ClientApp getApplicationContext()
- The Application Context is a reference to the
ClientApp
that
the UI is working for. It is used to populate shared UI settings such as
colour scheme.
tasktracker API version 0.1 pre-release Copyright © 2002 Dave Sag. Released under the BSD Licence.