|
||||||||||
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
net.wotonomy.ui.swing.components.InfoPanel
public class InfoPanel
InfoPanel uses labels and textfields (or any other component - see below)
to display a list of keys and values in a well-aligned and consistent manner,
conforming to alignment and pixel spacing in the java look and feel
design guidelines.
Each key is displayed in a label to the left of the component that contains
the corresponding value. Each row is displayed starting at the top of the
component's available area. Each row's height is the maximum preferred
height of its components and the field itself gets as much of the width as
it can, dependent on the length of the longest label.
The values in the fields can be editable, and the
current value can be retrieved using the key - for this reason, unique keys
are recommended.
As a convenience, push buttons may be placed across the
bottom of the panel in a manner similar to ButtonPanel.
The panel forwards any ActionEvents generated by the components and
buttons on it to all registered listeners.
Optionally, any component can be used instead of a textfield.
However, get/setValueForKey()
and get/setEditable()
may not work for those components. Use getComponentForKey()
to
access them instead.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected java.awt.event.ActionListener |
actionListener
|
protected ButtonPanel |
buttonPanel
|
protected int |
columns
|
protected java.util.List |
fields
|
protected java.util.List |
fieldSpacers
|
protected int |
hgap
|
static java.lang.String |
HIDDEN
Special label for an empty pair - a label and component that take up space but are hidden from view. |
protected boolean |
isEditable
|
protected int |
labelAlign
|
protected int |
labelAnchor
|
protected java.util.List |
labels
|
protected java.awt.Container |
listContainer
|
protected java.util.Collection |
listenedToComponents
|
protected int |
margin
|
protected java.lang.String |
postfix
|
protected java.lang.String |
prefix
|
protected int |
vgap
|
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 | |
---|---|
InfoPanel()
Constructs an empty InfoPanel. |
|
InfoPanel(java.lang.String[] labelArray)
Constructs an InfoPanel with the specified labels each paired with a blank textfield. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Called by buttons on panel and by other components that might be set to broadcast events to this listener. |
void |
addActionListener(java.awt.event.ActionListener l)
Adds an action listener to the list that will be notified by events occurring in the panel. |
protected void |
addCompositeComponent(java.lang.String key,
java.awt.Component component)
Appends a label containing a key and the specified component to the bottom of the panel. |
void |
addPair(java.lang.String key,
java.awt.Component component)
Appends a label containing a key and the specified component to the bottom of the panel. |
void |
addPair(java.lang.String key,
java.lang.String value)
Convenience method that uses a stock JTextField. |
void |
addPair(java.lang.String key,
java.lang.String value,
javax.swing.JTextField textField)
Convenience method that uses the specified JTextField or subclass and sets it to the specified value. |
void |
addRow(java.lang.String key,
java.awt.Component component)
Appends a label containing a key and the specified component to the bottom of the panel. |
void |
addRow(java.lang.String key,
java.awt.Component[] components)
Appends a label containing a key and the specified components to the bottom of the panel. |
void |
addRow(java.lang.String key,
java.awt.Component west,
java.awt.Component center,
java.awt.Component east)
Appends a label containing a key and the specified components to the bottom of the panel. |
void |
addRow(java.lang.String key,
java.awt.Component west,
java.awt.Component north,
java.awt.Component center,
java.awt.Component south,
java.awt.Component east)
Appends a label containing a key and the specified components to the bottom of the panel. |
protected void |
broadcastEvent(java.awt.event.ActionEvent e)
Notifies all registered action listeners of a pending Action Event. |
protected javax.swing.JLabel |
createLabel()
Provided for backwards compatibility, and called by the default implementation of createLabelForKey. |
protected java.awt.Component |
createLabelForKey(java.lang.String aKey)
Override to return a specific component to be used as a label. |
javax.swing.JPanel |
createPanel()
Factory method for creating panel spacers. |
protected void |
doInitialLayout()
This method is responsible for the initial layout of the panel. |
ButtonPanel |
getButtonPanel()
Retrieves the actual button panel, if any. |
java.lang.String[] |
getButtons()
Retrieves the names of the buttons that are displayed, if any. |
int |
getColumns()
Gets the current number of columns. |
java.lang.Object |
getComponentForIndex(int row)
Gets the component at the specified row. |
java.lang.Object |
getComponentForIndex(int row,
int col)
Gets the component at the specified row and column. |
java.awt.Component |
getComponentForKey(java.lang.String key)
Gets the component associated with the key. |
java.awt.Component |
getComponentForKey(java.lang.String key,
int index)
Gets the component associated with the key and index. |
protected java.awt.Container |
getCompositeComponentForKey(java.lang.String key)
Gets the container associated with the key. |
javax.swing.JTextField |
getFieldForKey(java.lang.String key)
Gets the component associated with the key as a JTextField, for backwards compatibility. |
int |
getHgap()
Gets the current horizontal spacing between components. |
int |
getLabelAlignment()
Retrieves the constant used to align the labels in place. |
int |
getLabelAnchor()
Retrieves the constant used to anchor the labels in place. |
java.awt.Component |
getLabelComponentForKey(java.lang.String key)
Get the label component associated with the key. |
javax.swing.JLabel |
getLabelForKey(java.lang.String key)
Provided for backwards compatibility: calls getLabelComponentForKey. |
java.lang.String |
getLabelPostfix()
Gets the string that appears after each label's text on the panel. |
java.lang.String |
getLabelPrefix()
Gets the string that appears before each label's text on the panel. |
java.lang.String[] |
getLabels()
Retrieves the labls for the components on the panel in the order in which they are displayed from top WIDTH bottom. |
int |
getMargin()
Gets the current minimum margin for the labels column. |
protected java.lang.Object |
getValueForComponent(java.awt.Component aComponent)
Gets the value in the specified component. |
java.lang.Object |
getValueForIndex(int anIndex)
Gets the value in the field at the specified index. |
java.lang.Object |
getValueForIndex(int row,
int col)
Gets the value in the field at the specified row and column. |
java.lang.Object |
getValueForKey(java.lang.String key)
Gets the value in the field associated with the key. |
java.lang.Object |
getValueForKey(java.lang.String key,
int index)
Gets the value in the field associated with the key. |
double |
getVerticalWeightForKey(java.lang.String key)
Sets the vertical weight used for determining how to distribute additional vertical space in the component. |
int |
getVgap()
Gets the current vertical spacing between components. |
protected void |
introspectComponent(java.awt.Component aComponent,
java.lang.String aKey)
Introspects a component to set the action command and to add the InfoPanel to its list of ActionListeners. |
boolean |
isEditable()
Gets whether the values displayed in the panel are editable. |
protected java.awt.Container |
makeCompositeComponent(java.lang.String key,
java.awt.Component[] components)
Produces a container that contains the specified components, using GridLayout. |
protected java.awt.Container |
makeCompositeComponent(java.lang.String key,
java.awt.Component west,
java.awt.Component center,
java.awt.Component east)
Produces a container that contains the specified components, using BorderLayout. |
protected java.awt.Container |
makeCompositeComponent(java.lang.String key,
java.awt.Component west,
java.awt.Component north,
java.awt.Component center,
java.awt.Component south,
java.awt.Component east)
Produces a container that contains the specified components, using BorderLayout. |
void |
removeActionListener(java.awt.event.ActionListener l)
Removes an action listener from the list that will be notified by events occurring in the panel. |
void |
removeAll()
Removes all components from the list. |
void |
setButtons(java.lang.String[] buttons)
Adds one or buttons to the bottom of the panel with the specified labels from left to right. |
void |
setColumns(int newColumns)
Sets the number of columns for the panel. |
void |
setComponentForIndex(int row,
java.awt.Component c)
Replaces the first component in the specified row. |
void |
setComponentForIndex(int row,
int col,
java.awt.Component c)
Replaces the component associated with the key. |
void |
setComponentForKey(java.lang.String key,
java.awt.Component c)
Replaces the first component associated with the key. |
void |
setComponentForKey(java.lang.String key,
java.awt.Component c,
int index)
Replaces the component associated with the key. |
void |
setEditable(boolean isEditable)
Sets whether the values displayed in the panel should be editable. |
void |
setHgap(int newHgap)
Changes the horizontal spacing between the label and the components in the panel. |
void |
setLabelAlignment(int anAlignmentConstant)
Sets the constant used to align the labels in place and reflows the layout. |
void |
setLabelAnchor(int anAnchorConstant)
Sets the constant used to anchor the labels in place and reflows the layout. |
void |
setLabelPostfix(java.lang.String aString)
Sets the string that appears after each label's text on the panel. |
void |
setLabelPrefix(java.lang.String aString)
Sets the string that appears before each label's text on the panel. |
void |
setLabels(java.lang.String[] labelArray)
Creates a set of labels and empty textfields after first clearing all existing components on the panel. |
void |
setMargin(int newMargin)
Sets the minimum width for the labels column. |
protected void |
setText(java.awt.Component c,
java.lang.String text)
Called to populate a label component with the specified text. |
protected void |
setValueForComponent(java.awt.Component aComponent,
java.lang.Object value)
Sets the value in the field at the specified index. |
void |
setValueForIndex(int row,
int col,
java.lang.Object value)
Sets the field at the specified row index and column index to the specified value. |
void |
setValueForIndex(int row,
java.lang.Object value)
Sets the first field at the specified row index to the specified value. |
void |
setValueForKey(java.lang.String key,
java.lang.Object value)
Sets the field associated with the key to the specified value. |
void |
setValueForKey(java.lang.String key,
java.lang.Object value,
int index)
Sets the field associated with the key to the specified value. |
void |
setVerticalWeightForKey(java.lang.String key,
double weighty)
Sets the vertical weight used for determining how to distribute additional vertical space in the component. |
void |
setVgap(int newVgap)
Changes the vertical spacing between components in the panel. |
protected void |
updateGaps()
Updates the insets for all components. |
protected void |
updateLabels()
Updates the label alignment. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HIDDEN
protected java.awt.Container listContainer
protected int hgap
protected int vgap
protected int margin
protected int columns
protected java.util.List fields
protected java.util.List labels
protected java.util.List fieldSpacers
protected ButtonPanel buttonPanel
protected boolean isEditable
protected java.lang.String prefix
protected java.lang.String postfix
protected int labelAnchor
protected int labelAlign
protected java.awt.event.ActionListener actionListener
protected java.util.Collection listenedToComponents
Constructor Detail |
---|
public InfoPanel()
public InfoPanel(java.lang.String[] labelArray)
labelArray
- An Array containing the labels in the
order in which they should appear from top to bottom.
A null value produces an empty panel.Method Detail |
---|
public void setLabels(java.lang.String[] labelArray)
labelArray
- An Array containing the labels in the order
in which they should appear from top to bottom. A null
value will clear the panel.public java.lang.String[] getLabels()
public int getLabelAnchor()
public void setLabelAnchor(int anAnchorConstant)
anAnchorConstant
- An anchor constant from
GridBagConstraints.public int getLabelAlignment()
public void setLabelAlignment(int anAlignmentConstant)
anAlignmentConstant
- LEFT, CENTER, or RIGHT constants
from SwingUtilities.public javax.swing.JPanel createPanel()
protected void doInitialLayout()
public void setHgap(int newHgap)
newHgap
- the new spacing, in pixels. May not be negative.public int getHgap()
public void setVgap(int newVgap)
newVgap
- the new spacing, in pixels. May not be negative.public int getVgap()
public void setMargin(int newMargin)
newMargin
- the new minimum margin in pixels. May not be negative.public int getMargin()
public void setColumns(int newColumns)
newColumns
- the new number of columns. May not be less than one.public double getVerticalWeightForKey(java.lang.String key)
aComponent
- Key that exists in the layout.
public void setVerticalWeightForKey(java.lang.String key, double weighty)
aComponent
- Key that exists in the layout.weighty
- The new weight.public int getColumns()
public void addPair(java.lang.String key, java.awt.Component component)
key
- A string that will be displayed in a label, preferrably unique.component
- A component that will be placed next to the label.
If null, a blank JPanel will be used.public void addRow(java.lang.String key, java.awt.Component component)
key
- A string that will be displayed in a label, preferrably unique.component
- A component that will be placed next to the label.
If null, a blank JPanel will appear.public void addRow(java.lang.String key, java.awt.Component[] components)
key
- A string that will be displayed in a label, preferrably unique.components
- An array of components that will be placed next to the label.
Any nulls in the list will be replaced with blank JPanels.public void addRow(java.lang.String key, java.awt.Component west, java.awt.Component center, java.awt.Component east)
key
- A string that will be displayed in a label, preferrably unique.west
- A component that will appear to the left of the other components,
as wide as its preferred width and as tall as the tallest of the other components.
A null will be replaced with a blank JPanel.center
- A component that will appear between the other components,
taking up available space.
A null will be replaced with a blank JPanel.east
- A component that will appear to the right of the other components,
as wide as its preferred width and as tall as the tallest of the other components.
A null will be replaced with a blank JPanel.public void addRow(java.lang.String key, java.awt.Component west, java.awt.Component north, java.awt.Component center, java.awt.Component south, java.awt.Component east)
key
- A string that will be displayed in a label, preferrably unique.west
- A component that will appear to the left of the other components,
as wide as its preferred width and as tall as the tallest of the other components.
A null will be replaced with a blank JPanel.north
- A component that will appear above all the other components,
as tall as its preferred height and as wide as the info panel itself.center
- A component that will appear between the other components,
taking up available space. A null will be replaced with a blank JPanel.south
- A component that will appear below all the other components,
as tall as its preferred height and as wide as the info panel itself.east
- A component that will appear to the right of the other components,
as wide as its preferred width and as tall as the tallest of the other components.
A null will be replaced with a blank JPanel.protected java.awt.Container makeCompositeComponent(java.lang.String key, java.awt.Component[] components)
protected java.awt.Container makeCompositeComponent(java.lang.String key, java.awt.Component west, java.awt.Component center, java.awt.Component east)
protected java.awt.Container makeCompositeComponent(java.lang.String key, java.awt.Component west, java.awt.Component north, java.awt.Component center, java.awt.Component south, java.awt.Component east)
protected java.awt.Component createLabelForKey(java.lang.String aKey)
protected javax.swing.JLabel createLabel()
protected void addCompositeComponent(java.lang.String key, java.awt.Component component)
key
- A string that will be displayed in a label, preferrably unique.component
- A component that will be placed next to the label.
If null, a stock JTextField will be used.protected void introspectComponent(java.awt.Component aComponent, java.lang.String aKey)
aComponent
- The Component to be introspected.aKey
- The action command to be set.protected void setText(java.awt.Component c, java.lang.String text)
protected void updateGaps()
protected void updateLabels()
public void addPair(java.lang.String key, java.lang.String value)
key
- A string that will be displayed in a label, preferrably unique.value
- A string that will be displayed in a textfield.public void addPair(java.lang.String key, java.lang.String value, javax.swing.JTextField textField)
key
- A string that will be displayed in a label, preferrably unique.value
- A string that will be displayed in a textfield.textField
- A JTextField or subclass that will be used to display the value.
If null, a stock JTextField will be used.public void removeAll()
removeAll
in class java.awt.Container
public void setButtons(java.lang.String[] buttons)
buttons
- A string array containing the strings to be used for the button labels
and action commands. A null value will remove the button panel.ButtonPanel
public java.lang.String[] getButtons()
ButtonPanel
public ButtonPanel getButtonPanel()
ButtonPanel
public void setEditable(boolean isEditable)
isEditable
- Whether the values should be editable.public boolean isEditable()
public void setValueForKey(java.lang.String key, java.lang.Object value)
key
- A string representing the key associated with the field. Nulls are converted to an empty string.value
- A object to be displayed in the specified field. Nulls are converted to an empty string.public void setValueForKey(java.lang.String key, java.lang.Object value, int index)
key
- A string representing the key associated with the field. Nulls are converted to an empty string.value
- A object to be displayed in the specified field. Nulls are converted to an empty string.public void setValueForIndex(int row, java.lang.Object value)
row
- The row index of the component.value
- A object to be displayed in the specified field.
Nulls are converted to an empty string.public void setValueForIndex(int row, int col, java.lang.Object value)
row
- The row index of the component.index
- The column index of the component.value
- A object to be displayed in the specified field.
Nulls are converted to an empty string.protected void setValueForComponent(java.awt.Component aComponent, java.lang.Object value)
A
- valid index.value
- A object to be displayed in the specified field.public java.lang.Object getValueForIndex(int anIndex)
A
- valid index.
public java.lang.Object getValueForIndex(int row, int col)
A
- valid index.
public java.lang.Object getValueForKey(java.lang.String key)
key
- An string representing the key associated with the field. Nulls are converted to an empty string.
public java.lang.Object getValueForKey(java.lang.String key, int index)
key
- An string representing the key associated with the field. Nulls are converted to an empty string.
protected java.lang.Object getValueForComponent(java.awt.Component aComponent)
aComponent
- The specified component.
public javax.swing.JTextField getFieldForKey(java.lang.String key)
key
- A string representing the key associated with the component. Nulls are converted to an empty string.
public java.awt.Component getComponentForKey(java.lang.String key)
key
- A string representing the key associated with the component.
Nulls are converted to an empty string.
public java.awt.Component getComponentForKey(java.lang.String key, int index)
key
- A string representing the key associated with the component.
Nulls are converted to an empty string.
public java.lang.Object getComponentForIndex(int row)
public java.lang.Object getComponentForIndex(int row, int col)
protected java.awt.Container getCompositeComponentForKey(java.lang.String key)
key
- A string representing the key associated with the component.
Nulls are converted to an empty string.
public javax.swing.JLabel getLabelForKey(java.lang.String key)
key
- A string representing the key associated with the compoent.
Nulls are converted to an empty string.
public java.awt.Component getLabelComponentForKey(java.lang.String key)
key
- A string representing the key associated with the compoent.
Nulls are converted to an empty string.
public void setComponentForKey(java.lang.String key, java.awt.Component c)
key
- A string representing the key to be associated with the component.
Nulls are converted to an empty string.c
- A component to be placed next to the label corresponding to the key.
Nulls are converted to a JTextField.public void setComponentForKey(java.lang.String key, java.awt.Component c, int index)
key
- A string representing the key to be associated with the component.
Nulls are converted to an empty string.c
- A component to be placed next to the label corresponding to the key.
Nulls are converted to a JTextField.public void setComponentForIndex(int row, java.awt.Component c)
row
- A valid index.c
- A component to be placed next to the label corresponding to the key.public void setComponentForIndex(int row, int col, java.awt.Component c)
row
- A valid index.c
- A component to be placed next to the label corresponding to the key.public void setLabelPrefix(java.lang.String aString)
aString
- A String to be used as the label prefix.public java.lang.String getLabelPrefix()
public void setLabelPostfix(java.lang.String aString)
aString
- A String to be used as the label postfix.public java.lang.String getLabelPostfix()
public void addActionListener(java.awt.event.ActionListener l)
l
- An action listener to be notified.public void removeActionListener(java.awt.event.ActionListener l)
l
- An action listener to be removed.protected void broadcastEvent(java.awt.event.ActionEvent e)
e
- An action event to be broadcast.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- An action event to be received.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |