|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.widget.AbstractWidget
org.springframework.richclient.widget.AbstractTitledWidget
org.springframework.richclient.widget.editor.AbstractDataEditorWidget
public abstract class AbstractDataEditorWidget
AbstractDataEditorWidget implements a basic editor screen, based on 3 parts:
Field Summary | |
---|---|
protected static String |
CREATE_COMMAND_ID
|
static com.jgoodies.forms.layout.ColumnSpec |
FILL_COLUMN_SPEC
|
static com.jgoodies.forms.layout.ColumnSpec |
FILL_NOGROW_COLUMN_SPEC
|
static com.jgoodies.forms.layout.RowSpec |
FILL_ROW_SPEC
|
static boolean |
OFF
|
static boolean |
ON
|
protected Observer |
tableSelectionObserver
Observer listening to changes in the table selection. |
static String |
UNSAVEDCHANGES_UNCOMMITTABLE_WARNING_ID
|
static String |
UNSAVEDCHANGES_WARNING_ID
|
protected static String |
UPDATE_COMMAND_ID
|
Fields inherited from class org.springframework.richclient.widget.AbstractWidget |
---|
showing |
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
logger |
Fields inherited from interface org.springframework.richclient.dialog.Messagable |
---|
MESSAGE_PROPERTY |
Fields inherited from interface org.springframework.richclient.widget.Widget |
---|
EMPTY_WIDGET |
Constructor Summary | |
---|---|
AbstractDataEditorWidget()
Default constructor will initialise the necessary listeners/observers. |
Method Summary | |
---|---|
void |
addDataProviderListener(Class dataProviderEventSource,
DataProviderListener listener)
|
boolean |
canClose()
Checks whether this component can be closed visually, for example when there are no unsaved changes. |
protected abstract Object |
cloneEntity(Object sampleObject)
|
protected ActionCommand |
createAddRowCommand()
|
protected ActionCommand |
createClearFilterCommand()
|
protected ActionCommand |
createCloneRowCommand()
|
protected ActionCommand |
createCreateCommand()
Creates the create command. |
protected JComponent |
createDataEditorWidget()
|
abstract Widget |
createDetailWidget()
|
protected ActionCommand |
createEditRowCommand()
|
protected ActionCommand |
createEmptyFilterCommand()
|
protected ActionCommand |
createExecuteFilterCommand()
|
protected Observer |
createListSelectionObserver()
Creates the observer that listens to selections in the listView. |
protected abstract Object |
createNewEntity(Object committedObject)
|
protected JComponent |
createQuickAddCheckBox()
|
protected ActionCommand |
createRefreshCommand()
|
protected ActionCommand |
createRemoveRowCommand()
|
protected ActionCommand |
createUpdateCommand()
Creates the save command. |
JComponent |
createWidgetContent()
|
protected void |
doCreate()
Creates a new data object according to following steps: form commit formObject sent to back-end back-end creates item back-end returns new item to client new item is selected in dataEditor if possible |
protected void |
doUpdate()
Save the changes made in the detailForm according to following steps: commit form formObject sent to back-end changes are handled in back-end changed object is returned to client old object is replaced by changed object |
protected abstract void |
executeFilter()
|
abstract void |
executeFilter(Map<String,Object> parameters)
|
protected ActionCommand |
getAddRowCommand()
|
ActionCommand |
getClearFilterCommand()
|
protected ActionCommand |
getCloneRowCommand()
|
List<AbstractCommand> |
getCommands()
Returns a list of commands for this widget. |
protected ActionCommand |
getCommitCommand()
Convenience method to retrieve the action command that should be used when changes are made in the detailForm. |
protected JComponent |
getCommitComponent()
|
protected AbstractCommand[] |
getControlCommands()
|
ActionCommand |
getCopySelectedRowsToClipboardCommand()
|
ActionCommand |
getCreateCommand()
Returns the create command, lazily creates one if needed. |
abstract AbstractForm |
getDetailForm()
|
protected JComponent |
getDetailPanel()
|
protected JComponent |
getEditButtons()
|
protected ActionCommand |
getEditRowCommand()
|
protected ActionCommand |
getEmptyFilterCommand()
|
ActionCommand |
getExecuteFilterCommand()
|
protected Object[] |
getFilterCriteria()
|
protected abstract FilterForm |
getFilterForm()
|
protected AbstractCommand |
getHelpCommand()
|
ActionCommand |
getRefreshCommand()
|
protected ActionCommand |
getRemoveRowsCommand()
|
protected AbstractCommand |
getRevertCommand()
|
String |
getSearchString()
|
protected ActionCommand |
getSelectCommand()
|
Object |
getSelectedRowObject()
|
Object |
getSelection()
|
protected CommandGroup |
getTableFilterControlCommands()
|
protected JComponent |
getTableFilterPanel()
|
protected CommandGroup |
getTablePopupMenuCommandGroup()
Returns the commandGroup that should be used to create the popup menu for the table. |
protected double |
getTableResizeWeight()
|
abstract TableWidget |
getTableWidget()
|
AbstractCommand |
getToggleDetailCommand()
|
SplitPaneExpansionToggleCommand |
getToggleFilterCommand()
|
ActionCommand |
getUpdateCommand()
Returns the save command, lazily creates one if needed. |
protected abstract DefaultValidationResultsModel |
getValidationResults()
|
protected abstract boolean |
isAddRowSupported()
|
protected abstract boolean |
isCloneRowSupported()
|
protected abstract boolean |
isFilterSupported()
|
protected abstract boolean |
isRemoveRowsSupported()
|
boolean |
isSelectMode()
|
protected abstract boolean |
isUpdateRowSupported()
|
protected Object |
loadEntityDetails(Object baseObject)
|
protected abstract Object |
loadEntityDetails(Object baseObject,
boolean forceLoad)
Fetch the detailed object from the back-end. |
protected void |
newRow(Object newClone)
|
ValidationResultsReporter |
newSingleLineResultsReporter(Messagable messagable)
|
protected void |
onRowSelection(Object rowObject)
|
void |
removeDataProviderListener(Class dataProviderEventSource,
DataProviderListener listener)
|
protected abstract void |
removeEntity(Object objectToRemove)
|
protected void |
removeRows()
|
void |
removeSelectionCommand()
|
protected void |
replaceRowObject(Object oldRowObject,
Object newRowObject)
|
protected abstract Object |
saveEntity(Object committedObject)
|
void |
setDataProviderEventSources(List dataProviderEventSources)
|
void |
setMultipleSelectionInSelectMode(boolean multipleSelection)
|
void |
setSearchString(String queryString)
Set the local text filter field value |
void |
setSelectedRowObject(Object selectedObject)
|
abstract Object |
setSelectedSearch(Object searchCriteria)
|
void |
setSelectionCommand(ActionCommand command)
Command called to set the selection for the widget. |
void |
setSelectMode(boolean selectMode)
Set the select mode of this dataEditor. |
Methods inherited from class org.springframework.richclient.widget.AbstractTitledWidget |
---|
addPropertyChangeListener, addPropertyChangeListener, getComponent, getDescription, getId, isEnabled, removePropertyChangeListener, removePropertyChangeListener, setBeanName, setCaption, setDescription, setEnabled, setId, setImage, setMessage, setTitle |
Methods inherited from class org.springframework.richclient.widget.AbstractWidget |
---|
isShowing, onAboutToHide, onAboutToShow |
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.widget.TitledWidget |
---|
getId |
Methods inherited from interface org.springframework.richclient.core.Guarded |
---|
isEnabled, setEnabled |
Methods inherited from interface org.springframework.richclient.dialog.Messagable |
---|
setMessage |
Methods inherited from interface org.springframework.binding.value.PropertyChangePublisher |
---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from interface org.springframework.richclient.core.TitleConfigurable |
---|
setTitle |
Methods inherited from interface org.springframework.richclient.image.config.ImageConfigurable |
---|
setImage |
Methods inherited from interface org.springframework.richclient.core.DescriptionConfigurable |
---|
setCaption, setDescription |
Methods inherited from interface org.springframework.beans.factory.BeanNameAware |
---|
setBeanName |
Methods inherited from interface org.springframework.richclient.widget.Widget |
---|
getComponent, isShowing, onAboutToHide, onAboutToShow |
Field Detail |
---|
protected static final String UPDATE_COMMAND_ID
protected static final String CREATE_COMMAND_ID
public static final String UNSAVEDCHANGES_WARNING_ID
public static final String UNSAVEDCHANGES_UNCOMMITTABLE_WARNING_ID
public static final com.jgoodies.forms.layout.RowSpec FILL_ROW_SPEC
public static final com.jgoodies.forms.layout.ColumnSpec FILL_NOGROW_COLUMN_SPEC
public static final com.jgoodies.forms.layout.ColumnSpec FILL_COLUMN_SPEC
public static final boolean ON
public static final boolean OFF
protected Observer tableSelectionObserver
Constructor Detail |
---|
public AbstractDataEditorWidget()
Method Detail |
---|
protected Observer createListSelectionObserver()
public void setSelectMode(boolean selectMode)
public boolean isSelectMode()
public void setSearchString(String queryString)
queryString
- filterText.public String getSearchString()
public Object getSelectedRowObject()
public void setSelectedRowObject(Object selectedObject)
public abstract Object setSelectedSearch(Object searchCriteria)
public JComponent createWidgetContent()
createWidgetContent
in class AbstractTitledWidget
protected final JComponent createDataEditorWidget()
protected double getTableResizeWeight()
public List<AbstractCommand> getCommands()
getCommands
in interface Widget
getCommands
in class AbstractWidget
protected JComponent getDetailPanel()
protected JComponent getEditButtons()
protected JComponent getCommitComponent()
protected ActionCommand getCommitCommand()
public ActionCommand getUpdateCommand()
protected ActionCommand createUpdateCommand()
doUpdate()
protected void doUpdate()
public ActionCommand getCreateCommand()
protected ActionCommand createCreateCommand()
doCreate()
protected void doCreate()
protected AbstractCommand getRevertCommand()
protected abstract DefaultValidationResultsModel getValidationResults()
public ValidationResultsReporter newSingleLineResultsReporter(Messagable messagable)
newSingleLineResultsReporter
in interface TitledWidget
newSingleLineResultsReporter
in class AbstractTitledWidget
protected JComponent createQuickAddCheckBox()
protected JComponent getTableFilterPanel()
protected CommandGroup getTablePopupMenuCommandGroup()
protected CommandGroup getTableFilterControlCommands()
protected void onRowSelection(Object rowObject)
protected void newRow(Object newClone)
protected void removeRows()
public AbstractCommand getToggleDetailCommand()
public SplitPaneExpansionToggleCommand getToggleFilterCommand()
protected ActionCommand getAddRowCommand()
protected ActionCommand createAddRowCommand()
protected ActionCommand getEditRowCommand()
protected ActionCommand createEditRowCommand()
protected ActionCommand getCloneRowCommand()
protected ActionCommand createCloneRowCommand()
protected ActionCommand getRemoveRowsCommand()
protected ActionCommand createRemoveRowCommand()
public ActionCommand getRefreshCommand()
public ActionCommand getCopySelectedRowsToClipboardCommand()
protected ActionCommand createRefreshCommand()
public ActionCommand getClearFilterCommand()
protected ActionCommand createClearFilterCommand()
public ActionCommand getExecuteFilterCommand()
protected ActionCommand createExecuteFilterCommand()
protected ActionCommand getEmptyFilterCommand()
protected ActionCommand createEmptyFilterCommand()
protected AbstractCommand getHelpCommand()
protected Object[] getFilterCriteria()
protected ActionCommand getSelectCommand()
protected AbstractCommand[] getControlCommands()
protected abstract boolean isFilterSupported()
protected abstract boolean isUpdateRowSupported()
protected abstract boolean isAddRowSupported()
protected abstract boolean isCloneRowSupported()
protected abstract boolean isRemoveRowsSupported()
protected abstract FilterForm getFilterForm()
public abstract AbstractForm getDetailForm()
public abstract Widget createDetailWidget()
public abstract TableWidget getTableWidget()
protected abstract void executeFilter()
public abstract void executeFilter(Map<String,Object> parameters)
protected final Object loadEntityDetails(Object baseObject)
protected abstract Object loadEntityDetails(Object baseObject, boolean forceLoad)
DataProvider
class.
baseObject
- object containing enough information to fetch a detailed version.forceLoad
- if true
always load the detailed object from the back-end, if
false
a shortcut can be implemented by returning the baseObject directly.
protected abstract Object saveEntity(Object committedObject)
protected abstract Object createNewEntity(Object committedObject)
protected abstract Object cloneEntity(Object sampleObject)
protected abstract void removeEntity(Object objectToRemove)
public boolean canClose()
AbstractWidget
canClose
in interface Widget
canClose
in class AbstractWidget
true
if the widget can be closed without problems.protected void replaceRowObject(Object oldRowObject, Object newRowObject)
public final void setDataProviderEventSources(List dataProviderEventSources)
public final void addDataProviderListener(Class dataProviderEventSource, DataProviderListener listener)
public final void removeDataProviderListener(Class dataProviderEventSource, DataProviderListener listener)
public Object getSelection()
getSelection
in interface SelectionWidget
public void setSelectionCommand(ActionCommand command)
SelectionWidget
setSelectionCommand
in interface SelectionWidget
public void setMultipleSelectionInSelectMode(boolean multipleSelection)
public void removeSelectionCommand()
removeSelectionCommand
in interface SelectionWidget
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |