|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.factory.AbstractControlFactory
org.springframework.richclient.form.AbstractForm
org.springframework.richclient.form.AbstractDetailForm
public abstract class AbstractDetailForm
This is an abstract base implementation of the detail side of a Master/Detail form
pair. Derived types need only implement AbstractForm.createFormControl()
.
The various form commands can be secured by specifying security controller id's for
the command. Use the AbstractForm.getCommitSecurityControllerId()
and
AbstractForm.getNewFormObjectCommand()
.
Field Summary | |
---|---|
static String |
EDIT_STATE_PROPERTY
Edit state property name for change notifications. |
static int |
STATE_CLEAR
State indicating that we are editing no object. |
static int |
STATE_CREATE
State indicating that we are creating a new object. |
static int |
STATE_EDIT
State indicating that we are editing an existing object. |
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
logger |
Constructor Summary | |
---|---|
protected |
AbstractDetailForm(FormModel formModel,
String formId,
ObservableList editableItemList)
|
|
AbstractDetailForm(HierarchicalFormModel parentFormModel,
String formId,
ValueModel childFormObjectHolder,
ObservableList masterList)
Construct a detail form using the provided parent form model (we will construct our own form model as a child of the parent model). |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Register a listener to all properties of this publisher. |
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Register a listener to a specific property. |
protected JComponent |
createButtonBar()
Return a standardized row of command buttons, right-justified and all of the same size, with OK as the default button, and no mnemonics used, as per the Java Look and Feel guidelines. |
protected ActionCommand |
createCancelCommand()
Create the cancel command. |
void |
creatingNewObject()
Set the form for "create new object" mode. |
protected void |
firePropertyChange(String propertyName,
int oldValue,
int newValue)
|
ActionCommand |
getCancelCommand()
Return the configured cancel command, creating it if necessary. |
protected String |
getCancelCommandFaceDescriptorId()
|
protected String |
getCommitCommandFaceDescriptorId()
|
ValueHolder |
getEditingIndexHolder()
Get the value holder containing the editing index. |
int |
getEditState()
Get the current edit state: one of STATE_CLEAR , STATE_CREATE ,
or STATE_EDIT . |
protected String |
getNewFormObjectSecurityControllerId()
Override to return null for the new object security controller id. |
protected String |
getRevertCommandFaceDescriptorId()
|
int |
getSelectedIndex()
|
void |
postCommit(FormModel formModel)
Commit this forms data back to the master table. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove the listener from all properties of this publisher. |
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener)
Remove the listener from a specific property. |
protected void |
setEditState(int editState)
Set the current edit state. |
protected void |
setMasterList(ObservableList masterList)
Set the master list model. |
void |
setSelectedIndex(int index)
Set the selected object index. |
protected void |
updateControlsForState()
Update our controls based on our state. |
Methods inherited from class org.springframework.richclient.factory.AbstractControlFactory |
---|
createControlIfNecessary, getControl, isControlCreated, isSingleton, setSingleton |
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.springframework.richclient.factory.ControlFactory |
---|
getControl |
Field Detail |
---|
public static final int STATE_CLEAR
public static final int STATE_EDIT
public static final int STATE_CREATE
public static final String EDIT_STATE_PROPERTY
Constructor Detail |
---|
protected AbstractDetailForm(FormModel formModel, String formId, ObservableList editableItemList)
pageFormModel
- public AbstractDetailForm(HierarchicalFormModel parentFormModel, String formId, ValueModel childFormObjectHolder, ObservableList masterList)
parentFormModel
- formId
- childFormObjectHolder
- masterList
- ObservableList holding the editable itemsMethod Detail |
---|
protected void setMasterList(ObservableList masterList)
masterList
- list to use as our master datapublic void setSelectedIndex(int index)
index
- of selected itempublic int getSelectedIndex()
public ValueHolder getEditingIndexHolder()
public void creatingNewObject()
protected void updateControlsForState()
protected void setEditState(int editState)
new
- edit statepublic int getEditState()
STATE_CLEAR
, STATE_CREATE
,
or STATE_EDIT
.
public void postCommit(FormModel formModel)
postCommit
in interface CommitListener
postCommit
in class AbstractForm
protected String getRevertCommandFaceDescriptorId()
getRevertCommandFaceDescriptorId
in class AbstractForm
protected String getCommitCommandFaceDescriptorId()
getCommitCommandFaceDescriptorId
in class AbstractForm
protected String getCancelCommandFaceDescriptorId()
protected String getNewFormObjectSecurityControllerId()
AbstractMasterForm
is responsible for the real (invocable)
instance of this command.
getNewFormObjectSecurityControllerId
in class AbstractForm
SecurityControllerManager
public ActionCommand getCancelCommand()
protected ActionCommand createCancelCommand()
protected JComponent createButtonBar()
public final void addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangePublisher
addPropertyChangeListener
in interface PropertyChangePublisher
listener
- the PropertyChangeListener
to register.public final void removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangePublisher
removePropertyChangeListener
in interface PropertyChangePublisher
listener
- the PropertyChangeListener
to remove.public final void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangePublisher
addPropertyChangeListener
in interface PropertyChangePublisher
propertyName
- the property to monitor.listener
- the PropertyChangeListener
to register.public final void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
PropertyChangePublisher
removePropertyChangeListener
in interface PropertyChangePublisher
propertyName
- the property that was being monitored.listener
- the PropertyChangeListener
to remove.protected final void firePropertyChange(String propertyName, int oldValue, int newValue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |