|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object swingwt.awt.Component swingwt.awt.Container swingwtx.swing.JComponent swingwtx.swing.JLabel
Nested Class Summary |
Nested classes inherited from class swingwtx.swing.JComponent |
JComponent.InternalFrameSelectionListener |
Field Summary | |
protected Component |
labelFor
If this is the label for a particular component, then show the one it's tied to |
protected int |
pHAlign
The label's horizontal alignment |
protected int |
pHTextPosition
The label's horizontal text position |
protected Icon |
pImage
A cache of the label's icon |
protected org.eclipse.swt.widgets.Label |
ppeer
The label's peer |
protected java.lang.String |
pText
A cache of the label's text |
protected int |
pVAlign
The label's vertical alignment |
protected int |
pVTextPosition
The label's vertical text position |
Fields inherited from class swingwtx.swing.JComponent |
accessibleContext, actionMap, ancestorInputMap, border, clientProperties, descendantHasPeer, focusInputMap, internalFrameAdapter, internalFrameParent, opaque, propertyChangeListeners, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, windowInputMap |
Fields inherited from class swingwt.awt.Container |
composite, comps, containerListeners, layout, queuedValidateRequest |
Fields inherited from interface swingwtx.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface swingwt.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JLabel()
Creates a new JLabel with empty text and no icon |
|
JLabel(Icon icon)
Creates a new JLabel with the specified icon |
|
JLabel(java.lang.String text)
Creates a new JLabel with the specified text |
|
JLabel(java.lang.String text,
Icon icon,
int align)
|
|
JLabel(java.lang.String text,
int align)
Creates a new JLabel with the specified text and alignment |
Method Summary | |
protected Dimension |
calculatePreferredSize()
Overriden to calculate non-realised preferred size. |
Icon |
getDisabledIcon()
NOT IMPLEMENTED |
int |
getHorizontalAlignment()
Gets the horizontal alignment for the label |
int |
getHorizontalTextPosition()
No meaning in native, calls across to getHorizontalAlignment() |
Icon |
getIcon()
Gets the icon for this label |
Component |
getLabelFor()
If this label is accompanying a component, the component |
java.lang.String |
getText()
|
int |
getVerticalAlignment()
Gets the vertical alignment for the label |
int |
getVerticalTextPosition()
No meaning in native, calls across to getVerticalAlignment() |
void |
setDisabledIcon(Icon icon)
NOT IMPLEMENTED |
void |
setDisplayedMnemonic(char c)
NOT IMPLEMENTED |
void |
setDisplayedMnemonic(int c)
NOT IMPLEMENTED |
void |
setHorizontalAlignment(int align)
Sets the horizontal alignment for this label. |
void |
setHorizontalTextPosition(int textpos)
No meaning in native, calls across to setHorizontalAlignment() |
void |
setIcon(Icon icon)
Sets the icon for this label |
void |
setLabelFor(Component c)
If this label is accompanying a component, the component |
void |
setSwingWTParent(Container parent)
Once a parent component receives an "add" call for a child, this being the child, this should be called to tell us to instantiate the peer and load in any cached properties. |
void |
setText(java.lang.String text)
Sets the label's text |
void |
setVerticalAlignment(int align)
Sets the vertical alignment for this label. |
void |
setVerticalTextPosition(int textpos)
No meaning in native, calls across to setVerticalAlignment() |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected org.eclipse.swt.widgets.Label ppeer
protected java.lang.String pText
protected Icon pImage
protected int pHTextPosition
protected int pVTextPosition
protected int pHAlign
protected int pVAlign
protected Component labelFor
Constructor Detail |
public JLabel()
public JLabel(java.lang.String text)
text
- The text of the labelpublic JLabel(java.lang.String text, int align)
text
- The text of the labelalign
- The label's horizontal alignmentpublic JLabel(Icon icon)
icon
- The label's iconpublic JLabel(java.lang.String text, Icon icon, int align)
Method Detail |
public java.lang.String getText()
public void setText(java.lang.String text)
text
- The new textpublic void setLabelFor(Component c)
c
- The component this label is accompanyingpublic Component getLabelFor()
public void setDisplayedMnemonic(char c)
public void setDisplayedMnemonic(int c)
public void setIcon(Icon icon)
icon
- The icon to display in the labelpublic Icon getIcon()
public Icon getDisabledIcon()
public void setDisabledIcon(Icon icon)
public void setHorizontalAlignment(int align)
align
- The alignmentpublic void setVerticalAlignment(int align)
align
- The alignmentpublic int getHorizontalAlignment()
public int getVerticalAlignment()
public void setHorizontalTextPosition(int textpos)
public void setVerticalTextPosition(int textpos)
public int getHorizontalTextPosition()
public int getVerticalTextPosition()
protected Dimension calculatePreferredSize()
calculatePreferredSize
in class Component
public void setSwingWTParent(Container parent) throws java.lang.Exception
setSwingWTParent
in class JComponent
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |