kiwi.ui
Class KFrame
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--javax.swing.JFrame
|
+--kiwi.ui.KFrame
Direct Known Subclasses: AboutFrame , ConsoleFrame , DocumentBrowserFrame
public class KFrame extends JFrame
KFrame is a trivial extension of JFrame
that provides support for tiling the background of the frame with an image.
The method getMainContainer() will return the frame's
KPanel. Add child components to the frame by adding
them to this KPanel.
An example KFrame.
Version: 1.1 (10/98)
Author: Mark Lindner, PING Software Group
See Also: KPanel , 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
Constructor Summary
KFrame ()
Construct a new KFrame.
KFrame (String title)
Construct a new KFrame.
Method Summary
protected boolean
canClose ()
Called in response to a frame close event to determine if this frame
may be closed.
void
destroy ()
Destroy this frame.
KPanel
getMainContainer ()
Get a reference to the main container (in this case, the
KPanel that is the child of the frame's content pane).
void
setBusyCursor (boolean flag)
Turn the busy cursor on or off for this window.
void
setColor (Color color)
Set the background color.
void
setTexture (Image image)
Set the background texture.
void
setVisible (boolean flag)
Show or hide the frame.
protected void
startFocus ()
This method is called when the frame is made visible; it should
transfer focus to the appropriate child component.
Methods inherited from class javax.swing.JFrame
addImpl ,
createRootPane ,
frameInit ,
getAccessibleContext ,
getContentPane ,
getDefaultCloseOperation ,
getGlassPane ,
getJMenuBar ,
getLayeredPane ,
getRootPane ,
isRootPaneCheckingEnabled ,
paramString ,
processKeyEvent ,
processWindowEvent ,
setContentPane ,
setDefaultCloseOperation ,
setGlassPane ,
setJMenuBar ,
setLayeredPane ,
setLayout ,
setRootPane ,
setRootPaneCheckingEnabled ,
update
Methods inherited from class java.awt.Frame
addNotify ,
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 ,
getInputContext ,
getLocale ,
getOwnedWindows ,
getOwner ,
getToolkit ,
getWarningString ,
isShowing ,
pack ,
postEvent ,
processEvent ,
removeWindowListener ,
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 ,
remove ,
removeAll ,
removeContainerListener ,
setFont ,
validate ,
validateTree
Methods inherited from class java.awt.Component
action ,
add ,
addComponentListener ,
addFocusListener ,
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 ,
hide ,
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 ,
processInputMethodEvent ,
processMouseEvent ,
processMouseMotionEvent ,
removeComponentListener ,
removeFocusListener ,
removeInputMethodListener ,
removeKeyListener ,
removeMouseListener ,
removeMouseMotionListener ,
removePropertyChangeListener ,
removePropertyChangeListener ,
repaint ,
repaint ,
repaint ,
repaint ,
requestFocus ,
reshape ,
resize ,
resize ,
setBackground ,
setBounds ,
setBounds ,
setComponentOrientation ,
setCursor ,
setDropTarget ,
setEnabled ,
setForeground ,
setLocale ,
setLocation ,
setLocation ,
setName ,
setSize ,
setSize ,
show ,
size ,
toString ,
transferFocus
KFrame
public KFrame ()
Construct a new KFrame.
KFrame
public KFrame (String title)
Construct a new KFrame.
Parameters: title - The title for the frame.
getMainContainer
public KPanel getMainContainer ()
Get a reference to the main container (in this case, the
KPanel that is the child of the frame's content pane).
setTexture
public void setTexture (Image image)
Set the background texture.
Parameters: image - The image to use as the background texture for the frame.
setColor
public void setColor (Color color)
Set the background color.
Parameters: color - The new background color.
canClose
protected boolean canClose ()
Called in response to a frame close event to determine if this frame
may be closed.
Returns: true if the frame is allowed to close, and false
otherwise. The default implementation returns true .
setVisible
public void setVisible (boolean flag)
Show or hide the frame.
Parameters: flag - A flag specifying whether the frame should be shown or
hidden. If true , the startFocus() method is called
to allow the subclasser to request focus for a given child component.Overrides: setVisible in class Component See Also: startFocus()
startFocus
protected void startFocus ()
This method is called when the frame is made visible; it should
transfer focus to the appropriate child component. The default
implementation does nothing.
setBusyCursor
public void setBusyCursor (boolean flag)
Turn the busy cursor on or off for this window.
Parameters: flag - If true , the wait cursor will be set for this window,
otherwise the default cursor will be set.
destroy
public void destroy ()
Destroy this frame. Call this method when the frame is no longer needed.
The frame will detach its listeners from the
UIChanageManager.