|
|||||||||
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 | +--javax.swing.JComponent | +--kiwi.ui.KLabel
A multi-line label. This class renders a string as one or more lines,
breaking text on whitespace and producing a left-justified paragraph.
The preferred width of the column may be specified in terms of columns.
The resulting minimum and preferred size of the component will be equal
to this preferred width and the minimum height required to fully display
all of the text. As with all JComponent
s, borders may be
applied using setBorder()
.
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Constructor Summary | |
KLabel(String text,
int cols)
Construct a new KLabel for the given text and column
width. |
Method Summary | |
Dimension |
getMinimumSize()
Get the minimum size of the component. |
Dimension |
getPreferredSize()
Get the preferred size of the component. |
void |
paint(Graphics gc)
Paint the component. |
void |
setText(String text)
Set the text to be displayed by the label. |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public KLabel(String text, int cols)
KLabel
for the given text and column
width.text
- The text to display.cols
- The number of columns wide to make the label. The width of
one "column" is the pixel width of the letter 'm' in the current font.Method Detail |
public void paint(Graphics gc)
public void setText(String text)
text
- The new text.public Dimension getMinimumSize()
public Dimension getPreferredSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |