|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel bibliothek.gui.dock.util.BackgroundPanel 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 |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.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. |
javax.swing.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. |
DLabel |
getLabel()
Gets direct access to the label that is used by this OrientedLabel to paint its content. |
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
java.lang.String |
getText()
Gets the text of this label |
boolean |
isHorizontal()
Tells whether the content of this label is painted horizontally. |
boolean |
isVertical()
Tells whether the content of this label is painted vertically. |
void |
paint(java.awt.Graphics g)
|
void |
paintForeground(java.awt.Graphics g)
Invokes the standard algorithm that paints the foreground of the component. |
void |
setBackground(java.awt.Color bg)
|
void |
setBounds(int x,
int y,
int w,
int h)
|
void |
setFont(java.awt.Font font)
|
void |
setFontModifier(FontModifier modifier)
Sets the modifier for the current font. |
void |
setForeground(java.awt.Color fg)
|
void |
setHorizontal(boolean horizontal)
Sets the orientation. |
void |
setIcon(javax.swing.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 |
setRotation(Rotation rotation)
Sets the orientation of this label. |
void |
setText(java.lang.String text)
Sets the text of this label |
void |
update(java.awt.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 bibliothek.gui.dock.util.BackgroundPanel |
---|
getBackgroundAlgorithm, getComponent, isSolid, isTransparent, paintBackground, paintBorder, paintChildren, paintComponent, paintOverlay, setBackground, setSolid, setTransparent |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
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(javax.swing.Icon icon)
icon
- the icon, can be null
public javax.swing.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 setRotation(Rotation rotation)
rotation
- the orientation, not null
public void setHorizontal(boolean horizontal)
horizontal
, then the rotation is set
to 0 degrees, otherwise the rotation is set to 90 degrees.
horizontal
- whether the label is painted horizontalpublic boolean isHorizontal()
public boolean isVertical()
public void setText(java.lang.String text)
text
- the text, null
is allowedpublic java.lang.String getText()
null
public void setForeground(java.awt.Color fg)
setForeground
in class javax.swing.JComponent
public void setBackground(java.awt.Color bg)
setBackground
in class javax.swing.JComponent
public void updateUI()
updateUI
in class javax.swing.JPanel
protected void updateFonts()
updateUI()
if the fonts need to be
updated, the default implementation does nothing
public void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent
public void setFontModifier(FontModifier modifier)
modifier
- the modifierDLabel.setFontModifier(FontModifier)
public FontModifier getFontModifier()
public DLabel getLabel()
OrientedLabel
to paint its content. This method
should be treated with care, modifications to the underlying label may have unexpected side effects.
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public void paint(java.awt.Graphics g)
paint
in class BackgroundPanel
public void paintForeground(java.awt.Graphics g)
PaintableComponent
paintForeground
in interface PaintableComponent
paintForeground
in class BackgroundPanel
g
- the graphics context to use, null
to just inform
this component that the foreground should not be painted automaticallypublic void update(java.awt.Graphics g)
update
in class javax.swing.JComponent
public void setBounds(int x, int y, int w, int h)
setBounds
in class java.awt.Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |