|
Holger's Java API |
|||||||||
| 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
com.antelmann.util.gui.JMethodTableModelComponent<T>
public class JMethodTableModelComponent<T>
implements a general component for editing an object based on the meta-data provided by
a MethodTableModel.
JPropertyEntryComponent,
Serialized Form| Nested Class Summary |
|---|
| 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 | |
|---|---|
JMethodTableModelComponent(MethodTableModel<T> model)
uses the first row of the given model as the relevant entry |
|
JMethodTableModelComponent(MethodTableModel<T> model,
T entry)
|
|
JMethodTableModelComponent(MethodTableModel<T> model,
T entry,
int padding,
int maxRows)
|
|
JMethodTableModelComponent(MethodTableModel<T> model,
T entry,
int padding,
int maxRows,
FormHelper formHelper)
|
|
JMethodTableModelComponent(T entry)
uses a model that contains all editable methods/fields of the given entry |
|
JMethodTableModelComponent(T entry,
boolean allowNullForSpinner)
uses a model that contains all editable methods/fields of the given entry |
|
| Method Summary | |
|---|---|
void |
applyFormToEntry()
applies the current values of the components to the entry |
protected JComponent |
createComponentFor(int column)
returns the editor component for the given property key; if the key is not to be edited, null is to be returned. |
protected JComponent |
createLabelFor(int column)
allows to customize the way the labels for each key are created |
JComponent[] |
getFields()
provides direct access to the fields in use |
T |
getRelevantValue()
returns the relevant value for this instance at the time of calling |
protected void |
initListener(JComponent field)
this method is called by createComponentFor(int) to fire a property change event
upon field alterations with the key Form.EDIT_PROPERTY_KEY on this instance. |
boolean |
isEditable()
|
void |
setEditable(boolean flag)
|
void |
setEnabled(boolean flag)
|
void |
setEntry(T entry)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JMethodTableModelComponent(T entry)
public JMethodTableModelComponent(T entry,
boolean allowNullForSpinner)
public JMethodTableModelComponent(MethodTableModel<T> model)
public JMethodTableModelComponent(MethodTableModel<T> model,
T entry)
public JMethodTableModelComponent(MethodTableModel<T> model,
T entry,
int padding,
int maxRows)
public JMethodTableModelComponent(MethodTableModel<T> model,
T entry,
int padding,
int maxRows,
FormHelper formHelper)
| Method Detail |
|---|
public void setEntry(T entry)
public T getRelevantValue()
ValueRetriever
getRelevantValue in interface ValueRetriever<T>public JComponent[] getFields()
public void applyFormToEntry()
throws IllegalArgumentException
IllegalArgumentExceptionprotected JComponent createComponentFor(int column)
initListener(JComponent) on the returned component.
If certain keys are to be handled more specifically (like using a JSpinner, JComboBox, etc.),
this method should be overwritten accordingly.
initListener(JComponent)protected void initListener(JComponent field)
createComponentFor(int) to fire a property change event
upon field alterations with the key Form.EDIT_PROPERTY_KEY on this instance.
public void setEnabled(boolean flag)
setEnabled in class JComponentpublic boolean isEditable()
isEditable in interface EditableComponentpublic void setEditable(boolean flag)
setEditable in interface EditableComponentprotected JComponent createLabelFor(int column)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||