|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Panel | +--java.applet.Applet | +--dog.gui.DApplet
The base applet class for displaying lightweight components in.
This applet allows you to set a background image and render it in various ways. It performs double-buffering for the contained lightweight components.
Inner classes inherited from class java.applet.Applet |
java.applet.Applet.AccessibleApplet |
Inner classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected java.awt.Image |
backgroundImage
The image to use as the background. |
protected DButton |
cancelButton
The cancel button in this container. |
protected DButton |
defaultButton
The default button in this container. |
protected int |
mode
The rendering mode for the background image. |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface dog.gui.DRootPane |
CENTER, CENTER_TILE, INTEGER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_HORIZONTAL, MAXIMIZE_VERTICAL, TILE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DApplet()
Constructs an applet with no background image. |
|
DApplet(java.awt.Image backgroundImage)
Constructs an applet with the specified background image. |
|
DApplet(java.lang.String backgroundImage)
Constructs an applet with the specified background image. |
|
DApplet(java.net.URL backgroundImage)
Constructs an applet with the specified background image. |
Method Summary | |
java.awt.Component |
add(java.awt.Component component)
Adds the specified component to this pane. |
protected void |
addImpl(java.awt.Component component,
java.lang.Object constraints,
int index)
Overrides addImpl to manage lightweight popups. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener to receive notification of changes to this component. |
void |
doLayout()
Lays out this pane. |
java.awt.Image |
getBackgroundImage()
Returns the background image. |
DButton |
getCancelButton()
Returns the cancel button in this container. |
DButton |
getDefaultButton()
Returns the default button in this container. |
java.awt.Frame |
getFrame()
Returns the frame this root pane represents or is part of. |
java.awt.Dimension |
getMaximumSize()
Returns the maximum size for this container. |
int |
getMode()
Returns the rendering mode for the background image. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size for this container. |
java.lang.String |
getTitle()
Returns the title of this pane. |
boolean |
imageUpdate(java.awt.Image image,
int flags,
int x,
int y,
int w,
int h)
The background image has arrived... |
void |
invalidate()
Flushes the offscreen buffer as part of invalidation. |
void |
paint(java.awt.Graphics gPrime)
Paints the children into an offscreen buffer, then copies the entire image into the graphics context. |
protected void |
paintImpl(java.awt.Graphics g)
This method can be overridden to paint onto the applet. |
void |
processCancelAction(java.awt.event.ActionEvent event)
Activates the cancel button in the container. |
void |
processDefaultAction(java.awt.event.ActionEvent event)
Activates the default button in the container. |
protected void |
processKeyEvent(java.awt.event.KeyEvent event)
|
void |
remove(java.awt.Component component)
Removes the specified component from this pane. |
void |
removeAll()
Removes all components from this pane. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener so it no longer receives notification of changes to this component. |
void |
setBackgroundImage(java.awt.Image image)
Sets the background image. |
void |
setBackgroundImage(java.lang.String file)
Sets the background image from a file. |
void |
setBackgroundImage(java.net.URL url)
Sets the background image from a URL. |
void |
setCancelButton(DButton button)
Sets the cancel button in this container. |
void |
setDefaultButton(DButton button)
Sets the default button in this container. |
void |
setLayout(java.awt.LayoutManager layout)
Sets the layout manager for this pane. |
void |
setMode(int mode)
Sets the rendering mode for the background image. |
void |
setTitle(java.lang.String title)
Sets the title of this pane. |
void |
update(java.awt.Graphics g)
Update does not erase the background before painting (why bother?). |
Methods inherited from class java.applet.Applet |
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
addNotify |
Methods inherited from class java.awt.Container |
add, add, add, add, addContainerListener, countComponents, deliverEvent, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMinimumSize, insets, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, removeNotify, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, 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, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface dog.gui.DRootPane |
getFont, getFontMetrics, getInsets, getSize, setCursor |
Field Detail |
protected int mode
protected java.awt.Image backgroundImage
protected DButton defaultButton
protected DButton cancelButton
Constructor Detail |
public DApplet()
public DApplet(java.awt.Image backgroundImage)
public DApplet(java.lang.String backgroundImage)
public DApplet(java.net.URL backgroundImage)
Method Detail |
public int getMode()
getMode
in interface DRootPane
setMode(int)
public void setMode(int mode)
setMode
in interface DRootPane
mode
- one of CENTER, TILE, INTEGER_TILE, CENTER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_VERTICAL, or MAXIMIZE_HORIZONTALgetMode()
public java.awt.Image getBackgroundImage()
getBackgroundImage
in interface DRootPane
setBackgroundImage(java.awt.Image)
public void setBackgroundImage(java.awt.Image image)
setBackgroundImage
in interface DRootPane
image
- the background image.getBackgroundImage()
public void setBackgroundImage(java.lang.String file)
setBackgroundImage
in interface DRootPane
file
- the image file.getBackgroundImage()
public void setBackgroundImage(java.net.URL url)
setBackgroundImage
in interface DRootPane
url
- the image URL.getBackgroundImage()
public DButton getDefaultButton()
getDefaultButton
in interface DRootPane
public void setDefaultButton(DButton button)
setDefaultButton
in interface DRootPane
public void processDefaultAction(java.awt.event.ActionEvent event)
processDefaultAction
in interface DRootPane
public DButton getCancelButton()
getCancelButton
in interface DRootPane
public void setCancelButton(DButton button)
setCancelButton
in interface DRootPane
public void processCancelAction(java.awt.event.ActionEvent event)
processCancelAction
in interface DRootPane
public java.lang.String getTitle()
getTitle
in interface DRootPane
public void setTitle(java.lang.String title)
setTitle
in interface DRootPane
public java.awt.Frame getFrame()
getFrame
in interface DRootPane
public void setLayout(java.awt.LayoutManager layout)
setLayout
in class java.awt.Container
public java.awt.Component add(java.awt.Component component)
add
in interface DRootPane
add
in class java.awt.Container
component
- the component to be added.protected void addImpl(java.awt.Component component, java.lang.Object constraints, int index)
addImpl
in class java.awt.Container
public void remove(java.awt.Component component)
remove
in interface DRootPane
remove
in class java.awt.Container
component
- the component to be removedadd(java.awt.Component)
public void removeAll()
removeAll
in class java.awt.Container
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Container
public java.awt.Dimension getMaximumSize()
getMaximumSize
in class java.awt.Container
public void invalidate()
invalidate
in class java.awt.Container
public boolean imageUpdate(java.awt.Image image, int flags, int x, int y, int w, int h)
imageUpdate
in class java.awt.Component
public void doLayout()
doLayout
in class java.awt.Container
public void update(java.awt.Graphics g)
update
in class java.awt.Container
public void paint(java.awt.Graphics gPrime)
paint
in class java.awt.Container
protected void paintImpl(java.awt.Graphics g)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
addPropertyChangeListener
in class java.awt.Component
l
- the listenerpublic void removePropertyChangeListener(java.beans.PropertyChangeListener l)
removePropertyChangeListener
in class java.awt.Component
l
- the listenerprotected void processKeyEvent(java.awt.event.KeyEvent event)
processKeyEvent
in class java.awt.Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |