com.sibvisions.rad.ui.qt.impl.component
Class QtLabel
java.lang.Object
com.sibvisions.rad.ui.qt.impl.QtResource<C>
com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
com.sibvisions.rad.ui.qt.impl.QtComponent<QVxLabel>
com.sibvisions.rad.ui.qt.impl.component.QtLabel
- All Implemented Interfaces:
- ILabel, IAlignmentConstants, IComponent, IResource
public class QtLabel
- extends QtComponent<QVxLabel>
- implements ILabel
The QtLabel is the ILabel
implementation for QT. It is used for displaying text or an image.
No user interaction functionality is provided.
|
Constructor Summary |
QtLabel()
Creates a new instance of QtLabel. |
|
Method Summary |
String |
getText()
Returns the text string that the label displays. |
boolean |
isPreferredSizeSet()
Returns true if the preferred size has been set to a
non-null value otherwise returns false. |
void |
setHorizontalAlignment(int pHorizontalAlignment)
Sets the horizontal alignment.
Possible values are defined in AlignmentConstants. |
void |
setPreferredSize(IDimension pPreferredSize)
Sets the preferred size of this component to a constant
value. Subsequent calls to getPreferredSize will always
return this value. Setting the preferred size to null
restores the default behavior. |
void |
setText(String pText)
Defines the single line of text this component will display. |
void |
setVerticalAlignment(int pVerticalAlignment)
Sets the vertical alignment.
Possible values are defined in AlignmentConstants. |
| Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponent |
addStyle, capture, getBackground, getBounds, getCursor, getFont, getForeground, getHorizontalAlignment, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyleSheet, getToolTipText, getVerticalAlignment, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setResourceVisible, setSize, setToolTipText |
| Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtComponentBase |
eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getFactory, isVisible, setFactory, setVisible |
| Methods inherited from interface javax.rad.ui.IComponent |
capture, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getFactory, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setSize, setToolTipText, setVisible |
QtLabel
public QtLabel()
- Creates a new instance of
QtLabel.
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 QtComponent<QVxLabel>
- 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 QtComponent<QVxLabel>
- Parameters:
pVerticalAlignment - the new vertical alignment
setPreferredSize
public void setPreferredSize(IDimension pPreferredSize)
- Sets the preferred size of this component to a constant
value. Subsequent calls to
getPreferredSize will always
return this value. Setting the preferred size to null
restores the default behavior.
- Specified by:
setPreferredSize in interface IComponent- Overrides:
setPreferredSize in class QtComponent<QVxLabel>
- Parameters:
pPreferredSize - the new preferred size, or null- See Also:
IComponent.getPreferredSize(),
IComponent.isPreferredSizeSet()
isPreferredSizeSet
public boolean isPreferredSizeSet()
- Returns true if the preferred size has been set to a
non-
null value otherwise returns false.
- Specified by:
isPreferredSizeSet in interface IComponent- Overrides:
isPreferredSizeSet in class QtComponent<QVxLabel>
- Returns:
- true if
setPreferredSize has been invoked
with a non-null value.
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.