com.sibvisions.rad.ui.swing.impl.component
Class SwingLabel
java.lang.Object
com.sibvisions.rad.ui.awt.impl.AwtResource<C>
com.sibvisions.rad.ui.awt.impl.AwtComponent<C>
com.sibvisions.rad.ui.awt.impl.AwtContainer<C>
com.sibvisions.rad.ui.swing.impl.SwingComponent<JLabel>
com.sibvisions.rad.ui.swing.impl.component.SwingLabel
- All Implemented Interfaces:
- ComponentListener, KeyListener, MouseListener, EventListener, ILabel, IAlignmentConstants, IComponent, IContainer, IResource, INamedObject
public class SwingLabel
- extends SwingComponent<JLabel>
- implements ILabel
The SwingLabel
is the ILabel
implementation for swing. It displays an area for a short text
string.
A SwingLabel
does not react to input events. As a
result, it cannot get the keyboard focus.
- See Also:
JLabel
,
ILabel
Constructor Summary |
SwingLabel()
Creates a new instance of SwingLabel . |
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtContainer |
add, add, add, add, addIntern, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, removeIntern, setLayout, setLayoutIntern |
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent |
componentHidden, componentMoved, componentResized, componentShown, createImage, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getVerticalAlignment, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, requestFocus, setBounds, setCursor, setEnabled, setEventSource, setFactory, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setVisible, validate |
Methods inherited from interface javax.rad.ui.IComponent |
capture, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText, setVisible |
SwingLabel
public SwingLabel()
- Creates a new instance of
SwingLabel
.
setHorizontalAlignment
public void setHorizontalAlignment(int pHorizontalAlignment)
- Sets the horizontal alignment.
Possible values are defined in AlignmentConstants.
- Specified by:
setHorizontalAlignment
in interface IAlignmentConstants
- Overrides:
setHorizontalAlignment
in class AwtComponent<JLabel>
- Parameters:
pHorizontalAlignment
- the new vertical alignment
setVerticalAlignment
public void setVerticalAlignment(int pVerticalAlignment)
- Sets the vertical alignment.
Possible values are defined in AlignmentConstants.
- Specified by:
setVerticalAlignment
in interface IAlignmentConstants
- Overrides:
setVerticalAlignment
in class AwtComponent<JLabel>
- Parameters:
pVerticalAlignment
- the new vertical alignment
setBackground
public void setBackground(IColor pBackground)
- Sets the background color of this component.
The background color affects each component differently and the
parts of the component that are affected by the background color
may differ between operating systems.
- Specified by:
setBackground
in interface IComponent
- Overrides:
setBackground
in class SwingComponent<JLabel>
- Parameters:
pBackground
- the color to become this component's color;
if this parameter is null
, then this
component will inherit the background color of its parent- See Also:
IComponent.getBackground()
getText
public String getText()
- Returns the text string that the label displays.
- Specified by:
getText
in interface ILabel
- Returns:
- a String
- See Also:
ILabel.setText(java.lang.String)
setText
public void setText(String pText)
- Defines the single line of text this component will display. If
the value of text is null or empty string, nothing is displayed.
- Specified by:
setText
in interface ILabel
- Parameters:
pText
- the text
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.