com.sas.swing.visuals.remotefileselector
Class RemoteFileTableComponent

com.sas.swing.visuals.remotefileselector.RemoteFileTableComponent
All Implemented Interfaces:
RemoteFileComponentInterface, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.swing.event.ListSelectionListener
Direct Known Subclasses:
RemoteFileListComponent

public class RemoteFileTableComponent
implements javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener

RemoteFileTableComponent class defines the main table view for displaying the file system items and the search window items.

Since:
3.0
See Also:
Serialized Form

Field Summary
protected  java.lang.Object[] columnRenderers
          the renderers used to format the column values
protected  TableView table
          the main table component
 
Fields inherited from class com.sas.swing.visuals.remotefileselector.RemoteFileComponent
parentComponent, remoteServerModel, selections, showDirectoriesOnly, spcs
 
Constructor Summary
RemoteFileTableComponent(BaseRemoteFileSelectorPanel parentComponent)
          Allows specification of the parent component.
RemoteFileTableComponent(BaseRemoteFileSelectorPanel parentComponent, java.lang.String supportType)
          Allows specification of the parent component and the Action Provider Framework support type.
RemoteFileTableComponent(javax.swing.table.DefaultTableModel model)
          Allows specification of a table model.
 
Method Summary
 java.lang.Object[] getColumnRenderers()
          Returns the column renderers used to format the table column values.
 java.util.List getPreviousPath()
          Returns the list of previous file system paths that have been viewed.
 java.lang.Object getSelectionObject()
          Returns an object that represents the selections currently made in the table.
 javax.swing.JComponent getViewComponent()
          Returns the actual table component.
 void handleDoubleClick()
          Queries and runs the Action Provider Framework for the action associated with a table cell double click action.
protected  void init()
          Initializes the table component.
 void propertyChange(java.beans.PropertyChangeEvent e)
          Listens for the propertyChangeEvent "path".
 void refreshData(java.lang.String path)
          Fires the "path" property change event which refreshes the table.
 void setActionProvider(SwingActionProvider actionProvider)
          Allows setting of the SwingActionProvider class.
 void setColumnRenderers(java.lang.Object[] columnRenderers)
          Allows setting of an array of column renderers used to format the table column values.
 void setPath(java.lang.String path)
          Allows setting of the next file system path to be viewed.
 void setPreviousPath(java.util.List previousPath)
          Allows a list of file system paths to be set to act as a set of previously visited locations.
 void setRemoteModel(RemoteFileServerModelInterface remoteServerModel)
          Allows specification of the table model.
 void setSelectionObject(java.lang.Object newSelectionObject)
          Allows setting of an object that represents the selections to be shown in the table.
 void valueChanged(javax.swing.event.ListSelectionEvent e)
          Listens for the ListSelectionEvent, builds the current list of selections, and then fires a PropertyChangeEvent "selections".
 
Methods inherited from class com.sas.swing.visuals.remotefileselector.RemoteFileComponent
addPropertyChangeListener, getRemoteModel, getSelections, isShowDirectoriesOnly, removePropertyChangeListener, setShowDirectoriesOnly
 

Field Detail

table

protected TableView table
the main table component


columnRenderers

protected java.lang.Object[] columnRenderers
the renderers used to format the column values

Constructor Detail

RemoteFileTableComponent

public RemoteFileTableComponent(BaseRemoteFileSelectorPanel parentComponent)
Allows specification of the parent component.

Parameters:
parentComponent - the parent component

RemoteFileTableComponent

public RemoteFileTableComponent(BaseRemoteFileSelectorPanel parentComponent,
                                java.lang.String supportType)
Allows specification of the parent component and the Action Provider Framework support type.

Parameters:
parentComponent - the parent component
supportType - the support type

RemoteFileTableComponent

public RemoteFileTableComponent(javax.swing.table.DefaultTableModel model)
Allows specification of a table model.

Parameters:
model - the table model
Method Detail

init

protected void init()
Initializes the table component.


propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Listens for the propertyChangeEvent "path".

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
e - the PropertyChangeEvent

handleDoubleClick

public void handleDoubleClick()
Queries and runs the Action Provider Framework for the action associated with a table cell double click action.


getPreviousPath

public java.util.List getPreviousPath()
Returns the list of previous file system paths that have been viewed.

Specified by:
getPreviousPath in interface RemoteFileComponentInterface
Returns:
a list of String objects
See Also:
setPreviousPath(List)

setPreviousPath

public void setPreviousPath(java.util.List previousPath)
Allows a list of file system paths to be set to act as a set of previously visited locations.

Specified by:
setPreviousPath in interface RemoteFileComponentInterface
Parameters:
previousPath - a list of String objects
See Also:
getPreviousPath()

refreshData

public void refreshData(java.lang.String path)
Fires the "path" property change event which refreshes the table.

Specified by:
refreshData in interface RemoteFileComponentInterface
Parameters:
path - the file system path

setPath

public void setPath(java.lang.String path)
Allows setting of the next file system path to be viewed.

Specified by:
setPath in interface RemoteFileComponentInterface
Parameters:
path - the path to be viewed

getSelectionObject

public java.lang.Object getSelectionObject()
Returns an object that represents the selections currently made in the table.

Specified by:
getSelectionObject in interface RemoteFileComponentInterface
Returns:
the selection object
See Also:
setSelectionObject(Object)

setSelectionObject

public void setSelectionObject(java.lang.Object newSelectionObject)
Allows setting of an object that represents the selections to be shown in the table.

Specified by:
setSelectionObject in interface RemoteFileComponentInterface
Parameters:
newSelectionObject - the selection object
See Also:
getSelectionObject()

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent e)
Listens for the ListSelectionEvent, builds the current list of selections, and then fires a PropertyChangeEvent "selections".

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener
Parameters:
e - the ListSelectionEvent

setRemoteModel

public void setRemoteModel(RemoteFileServerModelInterface remoteServerModel)
Allows specification of the table model.

Specified by:
setRemoteModel in interface RemoteFileComponentInterface
Parameters:
remoteServerModel - the table model
See Also:
RemoteFileComponentInterface.getRemoteModel()

getViewComponent

public javax.swing.JComponent getViewComponent()
Returns the actual table component.

Specified by:
getViewComponent in interface RemoteFileComponentInterface
Returns:
the table component

setActionProvider

public void setActionProvider(SwingActionProvider actionProvider)
Allows setting of the SwingActionProvider class.

Specified by:
setActionProvider in interface RemoteFileComponentInterface
Parameters:
actionProvider - the action provider class

setColumnRenderers

public void setColumnRenderers(java.lang.Object[] columnRenderers)
Allows setting of an array of column renderers used to format the table column values.

Specified by:
setColumnRenderers in interface RemoteFileComponentInterface
Parameters:
columnRenderers - the column renderers
See Also:
getColumnRenderers()

getColumnRenderers

public java.lang.Object[] getColumnRenderers()
Returns the column renderers used to format the table column values.

Specified by:
getColumnRenderers in interface RemoteFileComponentInterface
Returns:
the column renderers
See Also:
setColumnRenderers(Object[])



Copyright © 2009 SAS Institute Inc. All Rights Reserved.