|
||||||||||
| 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.factory.AbstractControlFactory
org.springframework.richclient.form.AbstractForm
org.springframework.richclient.form.AbstractMasterForm
org.springframework.richclient.form.AbstractTableMasterForm
public abstract class AbstractTableMasterForm
This is an abstract implementation of AbstractMasterForm that uses a GlazedTableModel and JTable to represent the master information.
Derived types must implement:
getColumnPropertyNames()AbstractMasterForm.createDetailForm(org.springframework.binding.form.HierarchicalFormModel, org.springframework.binding.value.ValueModel, org.springframework.binding.value.support.ObservableList)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.springframework.richclient.form.AbstractMasterForm |
|---|
AbstractMasterForm.ListSelectionHandler |
| Field Summary |
|---|
| Fields inherited from class org.springframework.richclient.form.AbstractMasterForm |
|---|
IS_CREATING_PROPERTY, SELECTION_INDEX_PROPERTY |
| Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractTableMasterForm(HierarchicalFormModel parentFormModel,
String property,
String formId,
Class detailType)
Construct a new AbstractTableMasterForm using the given parent form model and property path. |
|
| Method Summary | |
|---|---|
protected void |
configureSplitter(JSplitPane splitter,
JPanel masterPanel,
JComponent detailPanel)
Override this method is one needs to re-size/change the splitter details. |
protected JComponent |
createFormControl()
|
protected JTable |
createTable(TableModel tableModel)
Create the master table. |
protected TableModel |
createTableModel()
Create the table model for the master table. |
void |
creatingNewObject()
Indicates that we are creating a new detail object. |
protected abstract String[] |
getColumnPropertyNames()
Get the property names to show in columns of the master table. |
protected ca.odell.glazedlists.EventList |
getEventList()
|
ca.odell.glazedlists.matchers.Matcher |
getFilterMatcher()
Get the Matcher to be used in filtering the elements of the master
set. |
ca.odell.glazedlists.matchers.MatcherEditor |
getFilterMatcherEditor()
Get the MatcherEditor to be used in filtering the elements of the
master set. |
protected JTable |
getMasterTable()
|
protected TableModel |
getMasterTableModel()
|
protected Dimension |
getMasterTablePreferredSize(Dimension currentSize)
Get the preferred size of the master table. |
protected ListSelectionModel |
getSelectionModel()
Get the selection model for the master list representation. |
Comparator |
getSortComparator()
Get the comparator to use for sorting the table. |
protected void |
setEventList(ca.odell.glazedlists.EventList list)
|
void |
setFilterMatcher(ca.odell.glazedlists.matchers.Matcher matcher)
Set the Matcher to be used in filtering the elements of the master
set. |
void |
setFilterMatcherEditor(ca.odell.glazedlists.matchers.MatcherEditor matcherEditor)
Set the MatcherEditor to be used in filtering the elements of the
master set. |
void |
setSortComparator(Comparator comparator)
Set the comparator to use for sorting the table. |
void |
setSortProperty(String propertyName)
Set the name of the property on which to compare for sorting elements in the master table. |
protected boolean |
useSortedList()
Default is false (unless you have given a Comparator), override this method to use the default SortedList from GlazedLists. |
| 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 |
| Constructor Detail |
|---|
public AbstractTableMasterForm(HierarchicalFormModel parentFormModel,
String property,
String formId,
Class detailType)
AbstractMasterForm#getListListModel() has been overriden, the table will
contain all the elements in the domain object referenced by property.
parentFormModel - Parent form model to access for this form's dataproperty - Property containing this forms data (must be a collection or an
array)formId - Id of this formdetailType - Type of detail object managed by this master form| Method Detail |
|---|
public void setFilterMatcher(ca.odell.glazedlists.matchers.Matcher matcher)
Matcher to be used in filtering the elements of the master
set. Note that only one of a Matcher or MatcherEditor may be used, not both. If
both are specified, then the Matcher will take precedence.
matcher - The Matcher to use to filter elements in the master set.public ca.odell.glazedlists.matchers.Matcher getFilterMatcher()
Matcher to be used in filtering the elements of the master
set.
public void setFilterMatcherEditor(ca.odell.glazedlists.matchers.MatcherEditor matcherEditor)
MatcherEditor to be used in filtering the elements of the
master set. Note that only one of a Matcher or MatcherEditor may be used, not both.
If both are specified, then the Matcher will take precedence.
matcherEditor - The MatcherEditor to use to filter elements in the master set.public ca.odell.glazedlists.matchers.MatcherEditor getFilterMatcherEditor()
MatcherEditor to be used in filtering the elements of the
master set.
public void setSortComparator(Comparator comparator)
comparator - to use for sorting the tablepublic Comparator getSortComparator()
public void setSortProperty(String propertyName)
propertyName - Name of the property on which to sort.protected boolean useSortedList()
protected JComponent createFormControl()
createFormControl in class AbstractForm
protected void configureSplitter(JSplitPane splitter,
JPanel masterPanel,
JComponent detailPanel)
splitter - masterPanel - detailPanel - protected JTable createTable(TableModel tableModel)
tableModel - to use in the table
protected TableModel createTableModel()
protected Dimension getMasterTablePreferredSize(Dimension currentSize)
currentSize - Current (requested) preferred size of the master table
protected ListSelectionModel getSelectionModel()
getSelectionModel in class AbstractMasterFormprotected abstract String[] getColumnPropertyNames()
public void creatingNewObject()
creatingNewObject in class AbstractMasterFormprotected ca.odell.glazedlists.EventList getEventList()
protected void setEventList(ca.odell.glazedlists.EventList list)
list - The eventList to set.protected JTable getMasterTable()
protected TableModel getMasterTableModel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||