|
||||||||||
| 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.tentackle.ui.FormPanel
org.tentackle.ui.FormComponentPanel
org.tentackle.ui.FormSpinField
public class FormSpinField
Generic spinnable field.
| 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 | |
|---|---|
FormSpinField()
Creates a spin field with a default editor IntegerFormField. |
|
FormSpinField(FormComponent editingComponent)
Creates a spin field. |
|
| Method Summary | |
|---|---|
void |
addSpinListener(SpinListener listener)
Adds a SpinListener. |
protected void |
downButton_actionPerformed(ActionEvent e)
Handles the DOWN button action. |
void |
fireDecrement()
Notifies all SpinListeners that the field has to be decremented. |
void |
fireIncrement()
Notifies all SpinListeners that the field has to be incremented. |
boolean |
isChangeable()
Returns if this component is changeable. |
void |
removeSpinListener(SpinListener listener)
Removes a SpinListener. |
void |
setChangeable(boolean flag)
Set the component to be changeable. This is a unified abstraction and will be translated to setEditable or setEnabled, whatever is appropriate to this component. |
void |
setFormField(FormComponent comp)
Sets the form component to spin up or down. |
protected void |
upButton_actionPerformed(ActionEvent e)
Handles the UP button action. |
void |
valueChanged(ValueEvent e)
Updates the view of the component with the representation of the data. |
void |
valueEntered(ValueEvent e)
Updates the data according to the view of the component. |
| Methods inherited from class org.tentackle.ui.FormPanel |
|---|
addActionListener, areValuesChanged, componentAdded, componentRemoved, fireActionPerformed, getFormValues, getTitle, isAllChangeable, isHonourAllChangeable, removeActionListener, saveValues, setAllChangeable, setFormValues, setFormValuesKeepChanged, setHonourAllChangeable, setTitle, triggerValuesChanged |
| 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 |
| Methods inherited from interface org.tentackle.ui.FormComponent |
|---|
transferFocus, transferFocusBackward |
| Constructor Detail |
|---|
public FormSpinField(FormComponent editingComponent)
editingComponent - the form componentpublic FormSpinField()
IntegerFormField.
| Method Detail |
|---|
public void setFormField(FormComponent comp)
comp - the editor componentpublic void setChangeable(boolean flag)
FormComponent
setChangeable in interface FormComponentsetChangeable in class FormComponentPanelflag - true the user can edit the data, false if show onlypublic boolean isChangeable()
FormComponent
isChangeable in interface FormComponentisChangeable in class FormComponentPanelpublic void addSpinListener(SpinListener listener)
listener - the spin listener to addpublic void removeSpinListener(SpinListener listener)
listener - the spin listener to removepublic void fireIncrement()
public void fireDecrement()
public void valueChanged(ValueEvent e)
ValueListener
valueChanged in interface ValueListenere - the value eventpublic void valueEntered(ValueEvent e)
ValueListener
valueEntered in interface ValueListenere - the value eventprotected void upButton_actionPerformed(ActionEvent e)
e - the action eventprotected void downButton_actionPerformed(ActionEvent e)
e - the action event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||