org.springframework.richclient.form.binding.swing
Class AbstractGlazedListsBinding

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.factory.AbstractControlFactory
          extended by org.springframework.richclient.form.binding.support.AbstractBinding
              extended by org.springframework.richclient.form.binding.support.CustomBinding
                  extended by org.springframework.richclient.form.binding.support.AbstractCRUDBinding
                      extended by org.springframework.richclient.form.binding.swing.AbstractGlazedListsBinding
All Implemented Interfaces:
ControlFactory, Binding
Direct Known Subclasses:
TodoItemListBinding

public abstract class AbstractGlazedListsBinding
extends AbstractCRUDBinding


Field Summary
protected  int currentMode
          Current mode of the form/dialog.
protected  String dialogId
          Id to configure the dialog.
protected  AbstractForm form
          Form used to add/create rowObjects.
protected  ApplicationDialog formDialog
          Dialog used to add/create rowObjects.
protected  GlazedListTableWidget table
          Table used to show the list.
protected  boolean useOriginalSortOrder
          Use the original sort order of the provided data
protected  Object viewControllerObject
          List on screen, has to be a cloned one to be able to detect differences.
 
Fields inherited from class org.springframework.richclient.form.binding.support.AbstractBinding
fieldMetadata, formModel, formPropertyPath
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Constructor Summary
AbstractGlazedListsBinding(FormModel formModel, String formPropertyPath)
          Constructor.
AbstractGlazedListsBinding(FormModel formModel, String formPropertyPath, boolean useOriginalSortOrder)
          Constructor.
 
Method Summary
protected  void add(Object list)
           
protected  AbstractCommand createAddCommand()
           
protected  AbstractForm createAddEditForm()
           
protected  AbstractCommand createDetailCommand()
           
protected  AbstractForm createDetailForm()
           
protected  AbstractCommand createEditCommand()
           
protected  AbstractCommand createRemoveCommand()
           
protected  JComponent doBindControl()
           
 void edit(Object[] rows)
           
protected  void enabledChanged()
          Called when the enabled state of the bound property changes.
protected  String getAddCommandSecurityControllerId()
          Returns the securityControllerId for the add command.
 String getDialogId()
           
protected  String getEditCommandSecurityControllerId()
          Returns the securityControllerId for the remove command.
protected  Collection getList(Object value)
           
protected  Object getNewFormObject()
           
protected  AbstractForm getOrCreateAddEditForm()
           
protected  AbstractForm getOrCreateDetailForm()
           
protected  String getRemoveCommandSecurityControllerId()
          Returns the securityControllerId for the remove command.
 Object[] getSelection()
           
protected  TableWidget getTable()
           
protected abstract  TableDescription getTableDescription()
           
protected  void listChanged()
           
protected  Object onFinishAdd(Object list, Object newItem)
           
protected  Object onFinishEdit(Object list, Object newItem)
           
protected  void onValueModelChanged()
           
protected  void readOnlyChanged()
          Enable/disable the commands on readOnly change or valueModelChange
protected  void remove(Object list, Object[] selection)
           
 void setDialogId(String dialogId)
           
 void showDetail(Object[] rows)
           
protected  void valueModelChanged(Object newValue)
          Called when the underlying property's value model value changes.
 
Methods inherited from class org.springframework.richclient.form.binding.support.AbstractCRUDBinding
createCommands, getAddCommand, getCommands, getDetailCommand, getEditCommand, getRemoveCommand, isAddSupported, isEditSupported, isRemoveSupported, isShowDetailSupported, setAddSupported, setEditSupported, setRemoveSupported, setShowDetailSupported
 
Methods inherited from class org.springframework.richclient.form.binding.support.CustomBinding
controlValueChanged, isReadOnly, setReadOnly
 
Methods inherited from class org.springframework.richclient.form.binding.support.AbstractBinding
createControl, getFieldFace, getFormModel, getProperty, getPropertyType, getValue, getValueModel, isEnabled
 
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.form.binding.Binding
getControl
 

Field Detail

viewControllerObject

protected Object viewControllerObject
List on screen, has to be a cloned one to be able to detect differences.


currentMode

protected int currentMode
Current mode of the form/dialog.


table

protected GlazedListTableWidget table
Table used to show the list.


formDialog

protected ApplicationDialog formDialog
Dialog used to add/create rowObjects.


form

protected AbstractForm form
Form used to add/create rowObjects.


dialogId

protected String dialogId
Id to configure the dialog.


useOriginalSortOrder

protected boolean useOriginalSortOrder
Use the original sort order of the provided data

Constructor Detail

AbstractGlazedListsBinding

public AbstractGlazedListsBinding(FormModel formModel,
                                  String formPropertyPath)
Constructor.

Parameters:
formModel - formModel met de property.
formPropertyPath - pad naar de property.

AbstractGlazedListsBinding

public AbstractGlazedListsBinding(FormModel formModel,
                                  String formPropertyPath,
                                  boolean useOriginalSortOrder)
Constructor.

Parameters:
formModel - formModel met de property.
formPropertyPath - pad naar de property.
useOriginalSortOrder - gebruik de originele sorteervolgorde van de lijst
Method Detail

valueModelChanged

protected final void valueModelChanged(Object newValue)
Description copied from class: CustomBinding
Called when the underlying property's value model value changes.

Specified by:
valueModelChanged in class CustomBinding

onValueModelChanged

protected void onValueModelChanged()

listChanged

protected final void listChanged()

doBindControl

protected JComponent doBindControl()
Specified by:
doBindControl in class AbstractBinding

getTable

protected TableWidget getTable()

getSelection

public Object[] getSelection()

readOnlyChanged

protected void readOnlyChanged()
Enable/disable the commands on readOnly change or valueModelChange

Specified by:
readOnlyChanged in class AbstractBinding
See Also:
FormPropertyState

enabledChanged

protected void enabledChanged()
Description copied from class: AbstractBinding
Called when the enabled state of the bound property changes.

Specified by:
enabledChanged in class AbstractBinding
See Also:
FormPropertyState

createAddCommand

protected AbstractCommand createAddCommand()
Specified by:
createAddCommand in class AbstractCRUDBinding

getAddCommandSecurityControllerId

protected String getAddCommandSecurityControllerId()
Returns the securityControllerId for the add command. Default returns null, provide your own id to enable security.


createRemoveCommand

protected AbstractCommand createRemoveCommand()
Specified by:
createRemoveCommand in class AbstractCRUDBinding

getRemoveCommandSecurityControllerId

protected String getRemoveCommandSecurityControllerId()
Returns the securityControllerId for the remove command. Default returns null, provide your own id to enable security.


createDetailCommand

protected AbstractCommand createDetailCommand()
Specified by:
createDetailCommand in class AbstractCRUDBinding

createEditCommand

protected AbstractCommand createEditCommand()
Specified by:
createEditCommand in class AbstractCRUDBinding

getEditCommandSecurityControllerId

protected String getEditCommandSecurityControllerId()
Returns the securityControllerId for the remove command. Default returns null, provide your own id to enable security.


edit

public void edit(Object[] rows)

add

protected void add(Object list)

remove

protected void remove(Object list,
                      Object[] selection)

showDetail

public void showDetail(Object[] rows)

getOrCreateAddEditForm

protected AbstractForm getOrCreateAddEditForm()

getOrCreateDetailForm

protected AbstractForm getOrCreateDetailForm()

createDetailForm

protected AbstractForm createDetailForm()

createAddEditForm

protected AbstractForm createAddEditForm()

getTableDescription

protected abstract TableDescription getTableDescription()

getList

protected Collection getList(Object value)

getNewFormObject

protected Object getNewFormObject()

setDialogId

public void setDialogId(String dialogId)

getDialogId

public String getDialogId()

onFinishAdd

protected Object onFinishAdd(Object list,
                             Object newItem)

onFinishEdit

protected Object onFinishEdit(Object list,
                              Object newItem)


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.