|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.dishevelled.layout.LabelFieldPanel
public class LabelFieldPanel
Label field panel.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, 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 | |
|---|---|
LabelFieldPanel()
Create a new label field panel. |
|
| Method Summary | |
|---|---|
Component |
add(Component component)
|
Component |
add(Component component,
int index)
|
void |
add(Component component,
Object constraints)
|
void |
add(Component component,
Object constraints,
int index)
|
Component |
add(String name,
Component component)
|
void |
addField(JComponent field)
Add the specified field to this label field panel. |
void |
addField(JLabel label,
JComponent field)
Add the specified label and field to this label field panel. |
void |
addField(String text,
JComponent field)
Add the specified label and field to this label field panel. |
void |
addField(String labelText,
String fieldText)
Add the specified field to this label field panel. |
void |
addFinalField(JComponent field)
Add the specified final field to this label field panel, that is a field that stretches horizontally across both the label and field columns and stretches vertically to cover space left at the bottom of this container. |
void |
addFinalSpacing()
Add final spacing to this label field panel, that is spacing that stretches vertically to cover space left at the bottom of this container. |
void |
addFinalSpacing(int spacing)
Add final spacing to this label field panel of at least the specified number of pixels, that is spacing that stretches vertically to cover space left at the bottom of this container. |
void |
addLabel(JLabel label)
Add the specified label to this label field panel. |
void |
addLabel(String text)
Add the specified label to this label field panel. |
void |
addSpacing(int spacing)
Add spacing to this label field panel of at least the specified number of pixels. |
float |
getFieldPercent()
Return the percentage of the width of this label field panel to use for fields. |
float |
getLabelPercent()
Return the percentage of the width of this label field panel to use for labels. |
void |
setFieldPercent(float fieldPercent)
Set the percentage of the width of this label field panel to use for fields to fieldPercent. |
void |
setLabelPercent(float labelPercent)
Set the percentage of the width of this label field panel to use for labels to labelPercent. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabelFieldPanel()
| Method Detail |
|---|
public final float getLabelPercent()
public final void setLabelPercent(float labelPercent)
labelPercent. The
sum of the label and field percentages must be less
than 1.0f.
labelPercent - the percentage of the width of this label field panel
to use for labels, must be >= 0.0f and <= 1.0fpublic final float getFieldPercent()
public final void setFieldPercent(float fieldPercent)
fieldPercent. The sum of
the label and field percentages must be less than or
equal to 1.0f.
fieldPercent - the percentage of the width of this label field panel
to use for fields, must be >= 0.0f and <= 1.0fpublic final void addLabel(String text)
text - label textpublic final void addLabel(JLabel label)
label - label to add, must not be nullpublic final void addField(JComponent field)
field - field to add, must not be null
public final void addField(String labelText,
String fieldText)
labelText - label textfieldText - field text
public final void addField(String text,
JComponent field)
text - label textfield - field to add, must not be null
public final void addField(JLabel label,
JComponent field)
label - label to add, must not be nullfield - field to add, must not be nullpublic final void addSpacing(int spacing)
spacing - number of pixels, must be >= 0public final void addFinalSpacing()
IllegalStateException - if a final component has already been
added to this label field panelpublic final void addFinalSpacing(int spacing)
spacing - minimum number of pixels, must be >= 0
IllegalStateException - if a final component has already been
added to this label field panelpublic final void addFinalField(JComponent field)
field - field to add, must not be null
IllegalStateException - if a final component has already been
added to this label field panelpublic final Component add(Component component)
add in class Container
public final Component add(String name,
Component component)
add in class Container
public final Component add(Component component,
int index)
add in class Container
public final void add(Component component,
Object constraints)
add in class Container
public final void add(Component component,
Object constraints,
int index)
add in class Container
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||