com.sas.swing.visuals.remotefileselector
Class RemoteFileSearchComponent

com.sas.swing.visuals.remotefileselector.RemoteFileSearchComponent
All Implemented Interfaces:
ActionProviderViewInterface, SwingActionProviderViewInterface, com.sas.collection.ContentsChangedListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class RemoteFileSearchComponent
implements SwingActionProviderViewInterface, com.sas.collection.ContentsChangedListener

RemoteFileSearchComponent is the class used to display a window used to search for files. It combines fields to specify the search with a table displaying the search results.

Since:
3.0
See Also:
Serialized Form

Field Summary
protected  ActionSupportFilter buttonFilter
          the Action Provider Framework button filter class
protected  RemoteFileTableComponent component
          the table component used to show the search results
protected  RemoteFileServerModelInterface model
          the table model containing the search results
protected  javax.swing.JComboBox searchWhereField
          the field that displays the directory where the search starts
protected  SwingAction startAction
          the action class associated with the start button
protected  javax.swing.JButton startSearch
          the button used to start the search process
protected  SwingViewerSupport viewerSupport
          the Action Provider Framework viewer support class
 
Constructor Summary
RemoteFileSearchComponent(java.lang.String supportType, RemoteFileSearchModelInterface serviceModel, RemoteFileTableComponent tablePanel, RemoteFileServerModelInterface model)
          Constructor that allows setting the support type, the file system service model, the search results table panel, and the table panel's model.
 
Method Summary
 void contentsChanged(com.sas.collection.ContentsChangedEvent event)
          Listens for the search contentsChanged events from the command.
 SwingActionProvider getActionProvider()
          Returns the ActionProvider object
 java.lang.String getActionSupportType()
          Return the key that associated with a particular support class in the ActionProvider framework.
 java.lang.Object getUniqueId()
          Returns the Viewer's uniqueId
 boolean isActionVisible(java.lang.String actionType, java.lang.String areaType)
          Returns a boolean indicating if the action type is visible everywhere in the specified areaType.
 java.util.Collection listActionTypes(java.lang.String areaType)
          Returns a Collection of String keys that define the valid actionTypes for the specified area of the action support class designated the actionSupportType attribute.
 java.util.Collection listAreaTypes()
          Returns a Collection of String keys that define the valid areaTypes for the action support class designated by the actionSupportType attribute.
 void setActionProvider(SwingActionProvider actionProvider)
          Sets the ActionProvider object
 void setActionSupportType(java.lang.String actionSupportType)
          Set the key that associated with a particular support class in the ActionProvider framework.
 void setActionVisible(java.lang.String actionType, java.lang.String areaType, boolean visible)
          Sets the visible status of the specified actionType for the specified area.
 void setCurrentPath(java.lang.String path)
          Sets the path to be used as the search start location.
 void setUniqueId(java.lang.Object uniqueId)
          Returns the Viewer's uniqueId
 

Field Detail

viewerSupport

protected SwingViewerSupport viewerSupport
the Action Provider Framework viewer support class


buttonFilter

protected ActionSupportFilter buttonFilter
the Action Provider Framework button filter class


startSearch

protected javax.swing.JButton startSearch
the button used to start the search process


startAction

protected SwingAction startAction
the action class associated with the start button


component

protected RemoteFileTableComponent component
the table component used to show the search results


searchWhereField

protected javax.swing.JComboBox searchWhereField
the field that displays the directory where the search starts


model

protected RemoteFileServerModelInterface model
the table model containing the search results

Constructor Detail

RemoteFileSearchComponent

public RemoteFileSearchComponent(java.lang.String supportType,
                                 RemoteFileSearchModelInterface serviceModel,
                                 RemoteFileTableComponent tablePanel,
                                 RemoteFileServerModelInterface model)
Constructor that allows setting the support type, the file system service model, the search results table panel, and the table panel's model.

Parameters:
supportType - the Action Provider Framework support type
serviceModel - the file system service model
tablePanel - the search results table model
model - the table panel's model
Method Detail

setCurrentPath

public void setCurrentPath(java.lang.String path)
Sets the path to be used as the search start location.

Parameters:
path - the currently used path

setActionProvider

public void setActionProvider(SwingActionProvider actionProvider)
Sets the ActionProvider object

Specified by:
setActionProvider in interface SwingActionProviderViewInterface
Parameters:
ActionProvider - object
See Also:
SwingActionProviderViewInterface.getActionProvider()

getActionProvider

public SwingActionProvider getActionProvider()
Returns the ActionProvider object

Specified by:
getActionProvider in interface SwingActionProviderViewInterface
Returns:
ActionProvider object
See Also:
SwingActionProviderViewInterface.setActionProvider(com.sas.actionprovider.SwingActionProvider)

setActionVisible

public void setActionVisible(java.lang.String actionType,
                             java.lang.String areaType,
                             boolean visible)
Sets the visible status of the specified actionType for the specified area. The actionType must be non-null. The actionType and areaType must be valid in the support class that is associated with this classes current actionSupportType attribute.

Specified by:
setActionVisible in interface ActionProviderViewInterface
Parameters:
actionType - The key that identifies the type of action.
area - The area affected by the change in visibility fort the actionType. If null, then the method call applies to all the known areaTypes.
visible - The boolean indicating whether the actionType should be hidden or unhidden.
Throws:
java.lang.IllegalArgumentException - if null or invalid actionType specified.
java.lang.IllegalArgumentException - if invalid areaType specified.
java.lang.IllegalStateException - if actionSupportType not set.
See Also:
ActionProviderViewInterface.isActionVisible(java.lang.String, java.lang.String), ActionProviderSupportTypes

isActionVisible

public boolean isActionVisible(java.lang.String actionType,
                               java.lang.String areaType)
Returns a boolean indicating if the action type is visible everywhere in the specified areaType. If the actionType is not visible anywhere anywhere in the areaType, then false is returned.

Specified by:
isActionVisible in interface ActionProviderViewInterface
Parameters:
actionType - The key that identifies the type of action as defined by the support class.
areaType - The key that identifies the type of area as defined by the support class.
Returns:
a boolean indicating if the action type is visible everywhere in the specified areaType.
See Also:
ActionProviderViewInterface.setActionVisible(java.lang.String, java.lang.String, boolean), ActionProviderSupportTypes

getUniqueId

public java.lang.Object getUniqueId()
Returns the Viewer's uniqueId

Specified by:
getUniqueId in interface ActionProviderViewInterface
Returns:
the Viewer's uniqueId
See Also:
ActionProviderViewInterface.setUniqueId(java.lang.Object)

setUniqueId

public void setUniqueId(java.lang.Object uniqueId)
Returns the Viewer's uniqueId

Specified by:
setUniqueId in interface ActionProviderViewInterface
See Also:
ActionProviderViewInterface.getUniqueId()

listAreaTypes

public java.util.Collection listAreaTypes()
Returns a Collection of String keys that define the valid areaTypes for the action support class designated by the actionSupportType attribute.

Specified by:
listAreaTypes in interface ActionProviderViewInterface
Parameters:
actionSupportType - The key associated with a support class.
Returns:
a Collection of String keys that define the valid areaTypes for the specified support class.
See Also:
ActionProviderViewInterface.listActionTypes(java.lang.String), ActionProviderViewInterface.setActionSupportType(java.lang.String)

listActionTypes

public java.util.Collection listActionTypes(java.lang.String areaType)
Returns a Collection of String keys that define the valid actionTypes for the specified area of the action support class designated the actionSupportType attribute.

Specified by:
listActionTypes in interface ActionProviderViewInterface
Parameters:
actionSupportType - The key associated with a support class.
areaType - The key associated with a defined areaType.
Returns:
a Collection of String keys that define the valid actionTypes for the specified area of the specified support class.
See Also:
ActionProviderViewInterface.listAreaTypes(), ActionProviderViewInterface.setActionSupportType(java.lang.String)

setActionSupportType

public void setActionSupportType(java.lang.String actionSupportType)
Set the key that associated with a particular support class in the ActionProvider framework.

Specified by:
setActionSupportType in interface ActionProviderViewInterface
Parameters:
actionSupportType - The key that is associated with a particular support class.
See Also:
ActionProviderViewInterface.getActionSupportType(), ActionProviderSupportTypes

getActionSupportType

public java.lang.String getActionSupportType()
Return the key that associated with a particular support class in the ActionProvider framework.

Specified by:
getActionSupportType in interface ActionProviderViewInterface
Returns:
the key that associated with a particular support class.
See Also:
ActionProviderViewInterface.setActionSupportType(java.lang.String), ActionProviderSupportTypes

contentsChanged

public void contentsChanged(com.sas.collection.ContentsChangedEvent event)
Listens for the search contentsChanged events from the command. Tells the table to refresh to show the results.

Specified by:
contentsChanged in interface com.sas.collection.ContentsChangedListener
Parameters:
event - the contentsChanged event



Copyright © 2009 SAS Institute Inc. All Rights Reserved.