|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--dog.gui.DComponent
|
+--dog.gui.DLabel
A multiline label component.
The label can be aligned centrally, against any edge, or against any vertex of its bounds.
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected int |
align
The label alignment. |
protected java.lang.String |
label
The label text. |
| Fields inherited from class dog.gui.DComponent |
CENTER, CENTER_TILE, changes, EAST, INTEGER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_HORIZONTAL, MAXIMIZE_VERTICAL, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, TILE, tooltip, WEST |
| 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 | |
DLabel()
Constructs a label with the text "New label", aligned to the west. |
|
DLabel(java.lang.String label)
Constructs a label with the specified text, aligned to the west. |
|
DLabel(java.lang.String label,
int align)
Constructs a label with the specified text and alignment. |
|
| Method Summary | |
int |
getAlign()
Returns the alignment of this label. |
java.lang.String |
getLabel()
Returns the text of this label. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size for this label. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size for this label. |
java.lang.String |
getText()
Returns the text of this label. |
void |
paint(java.awt.Graphics g)
Paints this label. |
java.lang.String |
paramString()
Returns the parameter string for this label. |
void |
setAlign(int align)
Sets the alignment of this label. |
void |
setLabel(java.lang.String label)
Sets the text of this label. |
void |
setText(java.lang.String label)
Sets the text of this label. |
void |
update(java.awt.Graphics g)
Updates the graphics context for this label. |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String label
protected int align
| Constructor Detail |
public DLabel()
public DLabel(java.lang.String label)
public DLabel(java.lang.String label,
int align)
| Method Detail |
public java.lang.String getText()
getLabel()public void setText(java.lang.String label)
setLabel(java.lang.String)public java.lang.String getLabel()
setLabel(java.lang.String)public void setLabel(java.lang.String label)
getLabel()public int getAlign()
setAlign(int)public void setAlign(int align)
align - one of CENTER, NORTH, EAST, SOUTH, WEST, NORTHEAST, SOUTHEAST, SOUTHWEST, or NORTHWEST.getAlign()public java.awt.Dimension getMinimumSize()
getMinimumSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic void update(java.awt.Graphics g)
update in class java.awt.Componentpublic void paint(java.awt.Graphics g)
paint in class java.awt.Componentpublic java.lang.String paramString()
paramString in class DComponent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||