|
|||||||||
| 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
uk.ac.starlink.table.gui.LabelledComponentStack
public class LabelledComponentStack
A component which contains a list of (name, component) pairs. The components will typically be text fields or other things into which the user can enter input; the names labels for these. Alignment is taken care of. This class is a convenience for a number of widgets which need to do the same sort of thing.
| 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.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 | |
|---|---|
LabelledComponentStack()
Constructs a new stack of input fields. |
|
| Method Summary | |
|---|---|
void |
addLine(String name,
Component comp)
Adds a (name,component) pair. |
void |
addLine(String name,
String value)
Adds a (name,value) pair. |
void |
addLine(String name,
String pad,
Component comp)
Adds a (name,component) pair with an optional padding string and default xfill. |
void |
addLine(String name,
String pad,
Component comp,
boolean xfill)
Adds a (name,component) pair with an optional padding string and explicit xfill. |
Component[] |
getFields()
Returns an array of the components which have been added. |
Font |
getInputFont()
Returns the font used for dialog boxes. |
JLabel[] |
getLabels()
Returns an array of labels which have been added. |
| 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 LabelledComponentStack()
| Method Detail |
|---|
public void addLine(String name,
String pad,
Component comp)
name - the component label, which gets displayed as a JLabelpad - an extra string which is aligned between the
name and componentcomp - the component
public void addLine(String name,
String pad,
Component comp,
boolean xfill)
name - the component label, which gets displayed as a JLabelpad - an extra string which is aligned between the
name and componentcomp - the componentxfill - true iff the component should be stretched to the
full available width
public void addLine(String name,
Component comp)
name - the component label, which gets displayed as a JLabelcomp - the component
public void addLine(String name,
String value)
public Font getInputFont()
public JLabel[] getLabels()
public Component[] getFields()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||