org.springframework.richclient.samples.simple.ui
Class ContactTable

java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.factory.AbstractControlFactory
          extended by org.springframework.richclient.table.support.AbstractObjectTable
              extended by org.springframework.richclient.samples.simple.ui.ContactTable
All Implemented Interfaces:
EventListener, ApplicationListener, ControlFactory

public class ContactTable
extends AbstractObjectTable

This class provides a concrete implementation of a table showing Contact objects.

Author:
lstreepy

Field Summary
 
Fields inherited from class org.springframework.richclient.table.support.AbstractObjectTable
SELECTEDN_MSG_KEY, SHOWINGALL_MSG_KEY, SHOWINGN_MSG_KEY
 
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor
logger
 
Constructor Summary
ContactTable(ContactDataStore dataStore)
          Default constructor.
 
Method Summary
protected  void configureTable(JTable table)
          Configure the newly created table as needed.
protected  Object[] getDefaultInitialData()
          Provide the initial data for the table.
 Contact getSelectedContact()
           
 Contact[] getSelectedContacts()
          Get the array of selected Contact objects in the table.
 
Methods inherited from class org.springframework.richclient.table.support.AbstractObjectTable
createControl, createPopupContextMenu, createPopupContextMenu, createTableModel, createTableSorter, getBaseEventList, getColumnPropertyNames, getDoubleClickHandler, getFinalEventList, getInitialData, getInitialSortColumn, getModelId, getPopupCommandGroup, getSelectionModel, getTable, getTableModel, getTableSorter, handleDeletedObject, handleNewObject, handleUpdatedObject, init, isMultipleColumnSort, onApplicationEvent, onDoubleClick, runWithReadLock, runWithWriteLock, setColumnPropertyNames, setDoubleClickHandler, setFinalEventList, setInitialData, setPopupCommandGroup, setStatusBar, shouldHandleEvent, updateStatusBar
 
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
 

Constructor Detail

ContactTable

public ContactTable(ContactDataStore dataStore)
Default constructor.

Method Detail

configureTable

protected void configureTable(JTable table)
Description copied from class: AbstractObjectTable
Configure the newly created table as needed. Install any needed column sizes, renderers, and comparators. The default implementation does nothing.

Overrides:
configureTable in class AbstractObjectTable
Parameters:
table - The table to configure

getDefaultInitialData

protected Object[] getDefaultInitialData()
Provide the initial data for the table. Note that this is hard coded for this sample. You would normally access a persistent store, or some other source to get the data for the table.

Specified by:
getDefaultInitialData in class AbstractObjectTable
Returns:
Array of data for the table

getSelectedContacts

public Contact[] getSelectedContacts()
Get the array of selected Contact objects in the table.

Returns:
array of Contacts, zero length if nothing is selected

getSelectedContact

public Contact getSelectedContact()


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