|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
bibliothek.gui.dock.util.swing.OrientedLabel
public class OrientedLabel
A label which draws some text, and can change the layout of the text between horizontal and vertical.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
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 |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
OrientedLabel()
Creates a new label with no text |
Method Summary | |
---|---|
FontModifier |
getFontModifier()
Gets the font modifier of this label. |
Icon |
getIcon()
Gets the icon of this label |
int |
getIconOffset()
Gets the distance between icon the the tree adjacent borders. |
int |
getIconTextDistance()
Gets the distance between icon and text. |
Dimension |
getMinimumSize()
|
Dimension |
getPreferredSize()
|
String |
getText()
Gets the text of this label |
boolean |
isHorizontal()
Gets the orientation. |
void |
paint(Graphics g)
|
void |
setBackground(Color bg)
|
void |
setBounds(int x,
int y,
int w,
int h)
|
void |
setFont(Font font)
|
void |
setFontModifier(FontModifier modifier)
Sets the modifier for the current font. |
void |
setForeground(Color fg)
|
void |
setHorizontal(boolean horizontal)
Sets the orientation. |
void |
setIcon(Icon icon)
Sets the icon which will be painted on the left or on the top side. |
void |
setIconOffset(int iconOffset)
Sets the distance between icon and the three adjacent borders. |
void |
setIconTextDistance(int iconTextDistance)
Sets the distance between icon and text. |
void |
setText(String text)
Sets the text of this label |
void |
update(Graphics g)
|
protected void |
updateFonts()
Called by updateUI() if the fonts need to be
updated, the default implementation does nothing |
void |
updateUI()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OrientedLabel()
Method Detail |
---|
public void setIcon(Icon icon)
icon
- the icon, can be null
public Icon getIcon()
null
public void setIconOffset(int iconOffset)
iconOffset
- the distancepublic int getIconOffset()
public void setIconTextDistance(int iconTextDistance)
iconTextDistance
- the gappublic int getIconTextDistance()
public void setHorizontal(boolean horizontal)
horizontal
- whether the label is painted horizontalpublic boolean isHorizontal()
public void setText(String text)
text
- the text, null
is allowedpublic String getText()
null
public void setForeground(Color fg)
setForeground
in class JComponent
public void setBackground(Color bg)
setBackground
in class JComponent
public void updateUI()
updateUI
in class JPanel
protected void updateFonts()
updateUI()
if the fonts need to be
updated, the default implementation does nothing
public void setFont(Font font)
setFont
in class JComponent
public void setFontModifier(FontModifier modifier)
modifier
- the modifierDLabel.setFontModifier(FontModifier)
public FontModifier getFontModifier()
public Dimension getMinimumSize()
getMinimumSize
in class JComponent
public Dimension getPreferredSize()
getPreferredSize
in class JComponent
public void paint(Graphics g)
paint
in class JComponent
public void update(Graphics g)
update
in class JComponent
public void setBounds(int x, int y, int w, int h)
setBounds
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |