|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
jv.objectGui.PsMultiLineLabel
A label that may contain multiple lines. Lines are automatically wrapped at the end
of the label. Use Label.CENTER, Label.LEFT, Label.RIGHT
to specify the horizontal alignment of the text.
After changing the text or alignment of this component, validate() must be called to enforce a new layout.
PuString.splitString(String, int, FontMetrics),
Serialized Form| Field Summary |
| 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 | |
PsMultiLineLabel()
Create label with empty text and left alignment. |
|
PsMultiLineLabel(java.lang.String text)
Create label with given text in multiple lines, and left alignment. |
|
PsMultiLineLabel(java.lang.String text,
int align)
Create label with given text in multiple lines and given alignment. |
|
| Method Summary | |
int |
getAlignment()
Get alignment of label. |
java.awt.Dimension |
getPreferredSize()
Get preferred layout size of this component. |
java.lang.String |
getText()
Get text on this multi line label. |
java.awt.Color |
getTextColor()
Get color of text, if null then default color of component is used. |
void |
paint(java.awt.Graphics g)
Draw splitted string if splitting was successful, otherwise just return without any drawing. |
void |
setAlignment(int align)
Same as in java.awt.Label. |
void |
setText(java.lang.String text)
Set text on this multi line label. |
void |
setTextColor(java.awt.Color color)
Set color of text, if null then default color of component is used. |
void |
validate()
Enforce recomputation of splitting of string, and call super.validate(). |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PsMultiLineLabel()
PsMultiLineLabel(String),
PsMultiLineLabel(String, int)public PsMultiLineLabel(java.lang.String text)
PsMultiLineLabel(),
PsMultiLineLabel(String, int)
public PsMultiLineLabel(java.lang.String text,
int align)
Label.CENTER, Label.LEFT, Label.RIGHT
to specify the horizontal alignment of the text.
PsMultiLineLabel(),
PsMultiLineLabel(String)| Method Detail |
public java.awt.Color getTextColor()
public void setTextColor(java.awt.Color color)
public int getAlignment()
Label.CENTER, Label.LEFT, Label.RIGHT
to specify the horizontal alignment of the text.
public void setAlignment(int align)
java.awt.Label. Use Label.CENTER, Label.LEFT, Label.RIGHT
to specify the horizontal alignment of the text.
public java.lang.String getText()
public void setText(java.lang.String text)
text - String contains the contents of this labelpublic void paint(java.awt.Graphics g)
public java.awt.Dimension getPreferredSize()
public void validate()
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||