|
|||||||||
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 | +--dog.gui.DContainer
The base class for lightweight containers.
All DContainers are beans, and property change listeners can register themselves for property changes. All DContainers can have a tooltip set, which will be managed by its root pane. Also you can set an arbitrary object reference for any component.
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 DButton |
cancelButton
The cancel button in this container. |
static int |
CENTER
The centre alignment. |
protected DButton |
defaultButton
The default button in this container. |
static int |
EAST
The east alignment. |
static int |
NORTH
The north alignment. |
static int |
NORTHEAST
The northeast alignment. |
static int |
NORTHWEST
The northwest alignment. |
protected java.lang.Object |
reference
|
static int |
SOUTH
The south alignment. |
static int |
SOUTHEAST
The southeast alignment. |
static int |
SOUTHWEST
The southwest alignment. |
protected java.lang.String |
tooltip
|
static int |
WEST
The west alignment. |
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 | |
DContainer()
Constructs a new container with no layout manager. |
|
DContainer(java.awt.LayoutManager layout)
Constructs a new container with the specified layout manager. |
Method Summary | |
protected void |
addImpl(java.awt.Component component,
java.lang.Object constraints,
int index)
Allow DRootPane access to addImpl |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener to receive notification of changes to this component. |
protected java.lang.String |
alignParamString(int align)
Returns a description of alignment for debugging. |
protected static void |
drawActiveButtonBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color pc,
java.awt.Color pcds)
Draws a border for active buttons. |
protected static void |
drawActiveOptionBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color cs,
java.awt.Color pc,
java.awt.Color pcds)
Draws a border for active options. |
protected static void |
drawArrow(java.awt.Graphics g,
java.awt.Rectangle r,
boolean active,
int orientation,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color pc)
Draws an arrow inside the specified bounds rectangle. |
protected static void |
drawBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c)
Draws a border inside the specified bounds rectangle. |
protected static void |
drawButtonBorder(java.awt.Graphics g,
java.awt.Rectangle r,
boolean active,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color pc,
java.awt.Color pcds)
Draws a border for buttons. |
protected static void |
drawCheckbox(java.awt.Graphics g,
java.awt.Rectangle r,
boolean active,
boolean value,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color cs,
java.awt.Color pc,
java.awt.Color pcds,
java.awt.Color f)
Draws a checkbox inside the specified bounds rectangle. |
protected static void |
drawDarkBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color cs)
Draws a dark border for things like sticky buttons. |
protected static void |
drawDefaultButtonBorder(java.awt.Graphics g,
java.awt.Rectangle r,
boolean active,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color pc,
java.awt.Color pcds)
Draws a border for the default button in a pane. |
protected static void |
drawDisabledBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color d)
Draws a disabled border inside the specified bounds rectangle. |
protected static void |
drawDisabledCheckbox(java.awt.Graphics g,
java.awt.Rectangle r,
boolean value,
java.awt.Color d)
Draws a disabled checkbox inside the specified bounds rectangle. |
protected static void |
drawDisabledOption(java.awt.Graphics g,
java.awt.Rectangle r,
boolean value,
java.awt.Color d)
Draws a disabled option inside the specified bounds rectangle. |
protected static void |
drawExpander(java.awt.Graphics g,
java.awt.Rectangle r,
boolean active,
boolean collapsed,
java.awt.Color pc,
java.awt.Color pch,
java.awt.Color pcs,
java.awt.Color pcds,
java.awt.Color f)
Draws an expansion symbol. |
protected static void |
drawFocusBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color f)
Draws a focus border inside the specified bounds rectangle. |
protected static void |
drawImage(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Image image,
java.awt.image.ImageObserver observer,
int align)
Draws an image into the specified bounds rectangle, rescaling it if necessary. |
protected static void |
drawLabel(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.FontMetrics fm,
java.lang.String label,
int align,
java.awt.Color f)
Draws a multiline label in the specified bounds rectangle. |
protected static void |
drawOption(java.awt.Graphics g,
java.awt.Rectangle r,
boolean active,
boolean value,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color cs,
java.awt.Color pc,
java.awt.Color pcds,
java.awt.Color f)
Draws an option inside the specified bounds rectangle. |
protected static void |
drawOptionBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c)
Draws a border for options. |
protected static void |
drawPressedBorder(java.awt.Graphics g,
java.awt.Rectangle r,
java.awt.Color ds,
java.awt.Color h,
java.awt.Color c,
java.awt.Color cs)
Draws a pressed border inside the specified bounds rectangle. |
DButton |
getCancelButton()
Returns the cancel button in this container. |
java.awt.Component |
getComponent(java.lang.Object reference)
Returns the component in this container with the specified reference, or null if no such component exists (or is not Referential). |
DButton |
getDefaultButton()
Returns the default button in this container. |
static java.awt.Toolkit |
getDefaultToolkit()
Returns the default toolkit. |
static java.awt.Image |
getImage(java.awt.Image image,
java.awt.image.ImageObserver observer)
Returns images for observers. |
static java.awt.Image |
getImage(java.lang.String file,
java.awt.image.ImageObserver observer)
Returns images for observers. |
static java.awt.Image |
getImage(java.net.URL url,
java.awt.image.ImageObserver observer)
Returns images for observers. |
java.lang.Object |
getReference()
Returns the object reference. |
DRootPane |
getRootPane()
Returns the root pane for this component. |
java.lang.String |
getTooltip()
Returns the tooltip label for this component. |
static boolean |
isPreloadImages()
Indicates whether to preload images from files or URLs. |
protected java.lang.String |
paramString()
Returns additional parameters about the component. |
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 |
processEvent(java.awt.AWTEvent event)
|
protected void |
processMouseEvent(java.awt.event.MouseEvent event)
|
protected void |
processMouseMotionEvent(java.awt.event.MouseEvent event)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a property change listener so it no longer receives notification of changes to this component. |
void |
setCancelButton(DButton button)
Sets the cancel button in this container. |
void |
setDefaultButton(DButton button)
Sets the default button in this container. |
void |
setEnabled(boolean flag)
Overrides setEnabled to repaint the component. |
static void |
setPreloadImages(boolean flag)
Sets whether to preload images from files or URLs. |
void |
setReference(java.lang.Object reference)
Sets the object reference. |
void |
setTooltip(java.lang.String tooltip)
Sets the tooltip label for this component. |
java.lang.String |
toString()
Returns a string description of this component. |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, 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, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, 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, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CENTER
public static final int NORTH
public static final int EAST
public static final int SOUTH
public static final int WEST
public static final int NORTHEAST
public static final int SOUTHEAST
public static final int SOUTHWEST
public static final int NORTHWEST
protected DButton defaultButton
protected DButton cancelButton
protected java.lang.Object reference
protected java.lang.String tooltip
Constructor Detail |
public DContainer()
public DContainer(java.awt.LayoutManager layout)
Method Detail |
public java.lang.String getTooltip()
public void setTooltip(java.lang.String tooltip)
public DButton getDefaultButton()
public void setDefaultButton(DButton button)
public void processDefaultAction(java.awt.event.ActionEvent event)
public DButton getCancelButton()
public void setCancelButton(DButton button)
public void processCancelAction(java.awt.event.ActionEvent event)
public void setEnabled(boolean flag)
setEnabled
in class java.awt.Component
public static java.awt.Toolkit getDefaultToolkit()
public static java.awt.Image getImage(java.awt.Image image, java.awt.image.ImageObserver observer)
public static java.awt.Image getImage(java.lang.String file, java.awt.image.ImageObserver observer)
public static java.awt.Image getImage(java.net.URL url, java.awt.image.ImageObserver observer)
public static boolean isPreloadImages()
public static void setPreloadImages(boolean flag)
protected void addImpl(java.awt.Component component, java.lang.Object constraints, int index)
addImpl
in class java.awt.Container
public java.lang.Object getReference()
getReference
in interface Referential
public void setReference(java.lang.Object reference)
setReference
in interface Referential
reference
- the object reference to store.public java.awt.Component getComponent(java.lang.Object reference)
public DRootPane getRootPane()
DRootPane
public java.lang.String toString()
toString
in class java.awt.Component
protected java.lang.String paramString()
paramString
in class java.awt.Container
protected java.lang.String alignParamString(int align)
protected static void drawBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color ds, java.awt.Color h, java.awt.Color c)
g
- the graphics contextr
- the bounding rectangle of the borderds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to useprotected static void drawFocusBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color f)
g
- the graphics contextr
- the bounding rectangle of the borderf
- the control focus to useprotected static void drawPressedBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color cs)
g
- the graphics contextr
- the bounding rectangle of the borderds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usecs
- the control shadow colour to useprotected static void drawDisabledBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color d)
g
- the graphics contextr
- the bounding rectangle of the borderd
- the control disabled colour to useprotected static void drawDarkBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color cs)
g
- the graphics contextr
- the bounding rectangle of the borderc
- the control colour to usecs
- the control shadow colour to useprotected static void drawButtonBorder(java.awt.Graphics g, java.awt.Rectangle r, boolean active, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color pc, java.awt.Color pcds)
g
- the graphics contextr
- the bounding rectangle of the borderactive
- whether the button is activeds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usepc
- the primary control colour to usepcds
- the primary control dark shadow colour to useprotected static void drawActiveButtonBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color pc, java.awt.Color pcds)
g
- the graphics contextr
- the bounding rectangle of the borderds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usepc
- the primary control colour to usepcds
- the primary control dark shadow colour to useprotected static void drawDefaultButtonBorder(java.awt.Graphics g, java.awt.Rectangle r, boolean active, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color pc, java.awt.Color pcds)
g
- the graphics contextr
- the bounding rectangle of the borderactive
- whether the button is activeds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usepc
- the primary control colour to usepcds
- the primary control dark shadow colour to useprotected static void drawArrow(java.awt.Graphics g, java.awt.Rectangle r, boolean active, int orientation, java.awt.Color ds, java.awt.Color h, java.awt.Color pc)
g
- the graphics contextr
- the bounding rectangle of the arrowactive
- if true, fills the arrow with the primary control colourorientation
- the orientation of the apex of the arrow (NORTH, EAST, SOUTH, or WEST)ds
- the control dark shadow colour to useh
- the control highlight colour to usepc
- the primary control colour to useprotected static void drawCheckbox(java.awt.Graphics g, java.awt.Rectangle r, boolean active, boolean value, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color cs, java.awt.Color pc, java.awt.Color pcds, java.awt.Color f)
g
- the graphics contextr
- the bounding rectangle of the checkactive
- whether the checkbox is activevalue
- if true, draws a check markds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usepc
- the primary control colour to usepcds
- the primary control dark shadow colour to usef
- the colour to draw the check inprotected static void drawDisabledCheckbox(java.awt.Graphics g, java.awt.Rectangle r, boolean value, java.awt.Color d)
g
- the graphics contextr
- the bounding rectangle of the checkvalue
- if true, draws a check markd
- the control disabled colour to useprotected static void drawOption(java.awt.Graphics g, java.awt.Rectangle r, boolean active, boolean value, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color cs, java.awt.Color pc, java.awt.Color pcds, java.awt.Color f)
g
- the graphics contextr
- the bounding rectangle of the circleactive
- whether the option is activevalue
- if true, draws a dot in the circleds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usepc
- the primary control colour to usepcds
- the primary control dark shadow colour to usef
- the colour to draw the dot inprotected static void drawDisabledOption(java.awt.Graphics g, java.awt.Rectangle r, boolean value, java.awt.Color d)
g
- the graphics contextr
- the bounding rectangle of the circlevalue
- if true, draws a dot in the circled
- the control disabled colour to useprotected static void drawOptionBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color ds, java.awt.Color h, java.awt.Color c)
g
- the graphics contextr
- the bounding rectangle of the borderds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to useprotected static void drawActiveOptionBorder(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Color ds, java.awt.Color h, java.awt.Color c, java.awt.Color cs, java.awt.Color pc, java.awt.Color pcds)
g
- the graphics contextr
- the bounding rectangle of the borderds
- the control dark shadow colour to useh
- the control highlight colour to usec
- the control colour to usepc
- the primary control colour to usepcds
- the primary control dark shadow colour to useprotected static void drawExpander(java.awt.Graphics g, java.awt.Rectangle r, boolean active, boolean collapsed, java.awt.Color pc, java.awt.Color pch, java.awt.Color pcs, java.awt.Color pcds, java.awt.Color f)
g
- the graphics contextr
- the bounding rectangle of the symbolactive
- whether the symbol is active (pressed)collapsed
- whether the symbol is collapsedpc
- the primary control colour to usepch
- the primary control highlight colour to usepcs
- the primary control shadow colour to usepcds
- the primary control dark shadow colour to usef
- the foreground colour to useprotected static void drawLabel(java.awt.Graphics g, java.awt.Rectangle r, java.awt.FontMetrics fm, java.lang.String label, int align, java.awt.Color f)
g
- the graphics contextr
- the bounding rectangle of the labelfm
- the font metrics to apply to the stringlabel
- the label stringalign
- the alignment of the label within the boundsf
- the colour of the textprotected static void drawImage(java.awt.Graphics g, java.awt.Rectangle r, java.awt.Image image, java.awt.image.ImageObserver observer, int align)
g
- the graphics contextr
- the bounding rectangle of the imageimage
- the image to drawalign
- how to align the image within the boundspublic 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 processEvent(java.awt.AWTEvent event)
processEvent
in class java.awt.Container
protected void processMouseEvent(java.awt.event.MouseEvent event)
processMouseEvent
in class java.awt.Component
protected void processMouseMotionEvent(java.awt.event.MouseEvent event)
processMouseMotionEvent
in class java.awt.Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |