|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.LabeledComponent
This class creates a standardized JPanel that includes a Component with a JLabel next to it.
The label can be placed to the left, to the right, on top, or on bottom of the Component depending on the parameters used in the constructor.
Field Summary | |
static int |
BOTTOM_CENTER
Constant alignment key for aligning the label onthe bottom of the Component justified in the center. |
static int |
BOTTOM_GLUE
This will create a "glue" at the bottom of the panel, pushing the label/component pair to the top. |
static int |
BOTTOM_LEFT
Constant alignment key for aligning the label onthe bottom of the Component with left justification. |
static int |
BOTTOM_RIGHT
Constant alignment key for aligning the label on the bottom of the Component with right justification. |
static int |
LEFT
Constant alignment key for aligning the label to the left of the Component. |
static int |
LEFT_GLUE
This will create a "glue" at the left of the panel, pushing the label/component pair to the right. |
static int |
NO_GLUE
This will give the panel no glue, leaving the label/component pair in the middle. |
static int |
RIGHT
Constant alignment key for aligning the label to the right of the Component. |
static int |
RIGHT_GLUE
This will create a "glue" at the right of the panel, pushing the label/component pair to the right. |
static int |
TOP_CENTER
Constant alignment key for aligning the label on the top of the Component justified in the center. |
static int |
TOP_GLUE
This will create a "glue" at the top of the panel, pushing the label/component pair to the bottom. |
static int |
TOP_LEFT
Constant alignment key for aligning the label on the top of the Component with left justification. |
static int |
TOP_RIGHT
Constant alignment key for aligning the label on the top of the Component with right justification. |
Constructor Summary | |
LabeledComponent(java.lang.String key,
java.awt.Component comp)
Constructs a JPanel with a label next to a field with standard spacing between them. |
|
LabeledComponent(java.lang.String key,
java.awt.Component comp,
int glue)
Constructs a JPanel with a label next to a field with standard spacing between them. |
|
LabeledComponent(java.lang.String key,
java.awt.Component comp,
int alignment,
int glue)
Constructs a JPanel with a label next to a field with standard spacing between them. |
Method Summary | |
java.awt.Component |
getComponent()
Returns the Component that contains the JLabel and its associated Component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int LEFT
public static final int RIGHT
public static final int TOP_CENTER
public static final int TOP_LEFT
public static final int TOP_RIGHT
public static final int BOTTOM_CENTER
public static final int BOTTOM_LEFT
public static final int BOTTOM_RIGHT
public static final int TOP_GLUE
public static final int BOTTOM_GLUE
public static final int LEFT_GLUE
public static final int RIGHT_GLUE
public static final int NO_GLUE
Constructor Detail |
public LabeledComponent(java.lang.String key, java.awt.Component comp)
This constructor places the label to the left of the Component.
key
- the key for the text for the locale-specific labelcomp
- the component to put the label next topublic LabeledComponent(java.lang.String key, java.awt.Component comp, int glue)
This constructor places the label to the left of the Component.
key
- the key for the text for the locale-specific labelcomp
- the component to put the label next toglue
- specifies the type of glue to add to the panelpublic LabeledComponent(java.lang.String key, java.awt.Component comp, int alignment, int glue)
This method allows for a great deal of customizability for the layout of the given component, such as different alignments of the label in relation to the Component as well as a glue on any of the four sides that forces the label/component pair to one side of the panel.
comp
- the component to put the label next toalignment
- specifies the placement of the label in relation
to the Componentglue
- specifies the type of glue to add to the panelMethod Detail |
public java.awt.Component getComponent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |