com.sas.visuals
Class ClassSelectorPanel

com.sas.visuals.ClassSelectorPanel
All Implemented Interfaces:
ContainerInterface, com.sas.awt.print.PrintableInterface, VisualInterface, com.sas.beans.PropertyChangeSource, com.sas.beans.VetoableChangeSource, com.sas.ComponentInterface, com.sas.DesignTimeDropTargetInterface, com.sas.LinkPropertiesInterface, com.sas.ModelInterface, ValidatorInterface, com.sas.ViewInterface, MultipleValueEventSourceInterface, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.ObjectInputValidation, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class ClassSelectorPanel
implements java.awt.event.ItemListener, java.beans.PropertyChangeListener

This class displays a TreeView with a ClassPathClasses model and allows the user to select a class.

See Also:
Serialized Form

Field Summary
protected  java.lang.String selectedClass
           
protected  TextField selectedClassField
           
protected  TreeView tree
           
 
Fields inherited from class com.sas.awt.Panel
RB_KEY
 
Constructor Summary
ClassSelectorPanel()
          Default constructor.
 
Method Summary
 java.lang.String getSelectedClass()
          Returns the name of the selected class.
 void itemStateChanged(java.awt.event.ItemEvent event)
          Internal event handler.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Internal event handler.
protected  com.sas.models.NodeInterface searchForClassNode(com.sas.models.NodeInterface baseNode, java.lang.String className, com.sas.collection.OrderedCollection path)
          searchForClassNode searches the descendants of baseNode
 void setSelectedClass(java.lang.String selectedClass)
          Sets the name of the selected class.
static java.lang.String showClassSelectorDialog(java.awt.Component parent, boolean modal, java.lang.String title, java.lang.String selectedClass)
          showClassSelectorDialog displays a ClassSelectorPanel in a Dialog with Ok, Cancel, and Help buttons.
 
Methods inherited from class com.sas.awt.Panel
getDefaultHeight, getDefaultWidth, getExtendedBeanInfo, remove, remove, removeAll, setDefaultHeight, setDefaultValues, setDefaultWidth
 
Methods inherited from class com.sas.awt.PanelContainerComponent
addNotify, clone, dragEnter, dragLeave, dragOver, drop, getContainerInterfaceSupportInfo, getErrorHandler, getInsets, getValidator, isIDEDnDDropBarrier, isIDEDnDDropTarget, isValid, removeNotify, setContainerInterfaceSupportInfo, setErrorHandler, setIDEDnDDropBarrier, setIDEDnDDropTarget, setInsets, setInsets, setValidator, superAddNotify, superGetInsets, superRemoveNotify, superSetDefaultValues
 
Methods inherited from class com.sas.awt.PanelVisualComponent
addLink, addPropertyChangeListener, addVetoableChangeListener, anyPropertyChangeListeners, attachModel, attachView, computePreferredSize, detachModel, detachView, dumpComponent, firePropertyChange, firePropertyChange, fireVetoableChange, getBackgroundColor, getBorder, getComponentDescription, getComponentSupportInfo, getEventMethod, getEventValues, getFont, getForegroundColor, getHeight, getHorizontalPosition, getLinkInfo, getMinimumSize, getModelInterface, getPageBounds, getPreferredSize, getPrePainter, getPrintOptionsPanel, getRequiredInterfaces, getVerticalPosition, getViewInterfaceSupportInfo, getVisualInterfaceSupportInfo, getWidth, initialize, initializeComponent, isDesignTime, isEnabled, isFocus, isLinked, isTransparent, isVisible, pageExists, paint, print, printFinalize, printInitialize, queryLinks, queryLinks, refresh, removeAllLinks, removeInterfaceTraps, removeLink, removePropertyChangeListener, removeVetoableChangeListener, setBackgroundColor, setBorder, setBounds, setComponentDescription, setComponentSupportInfo, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setLinkInfo, setModelInterface, setPreferredSize, setPrePainter, setRequiredInterfaces, setTransparent, setVerticalPosition, setViewInterfaceSupportInfo, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate, supportsListenerInterface, supportsRequiredInterfaces, trapInterfaceEvents, update, validateObject
 
Methods inherited from interface com.sas.awt.ContainerInterface
getComponents, getLayout, invalidate, setLayout, validate
 
Methods inherited from interface com.sas.awt.VisualInterface
computePreferredSize, getBackgroundColor, getBorder, getFont, getForegroundColor, getHeight, getHorizontalPosition, getMinimumSize, getPreferredSize, getPrePainter, getVerticalPosition, getVisualInterfaceSupportInfo, getWidth, isEnabled, isFocus, isTransparent, isVisible, setBackgroundColor, setBorder, setBounds, setEnabled, setFocus, setFont, setForegroundColor, setHeight, setHorizontalPosition, setPreferredSize, setPrePainter, setTransparent, setVerticalPosition, setVisible, setVisualInterfaceSupportInfo, setWidth, superGetFont, superGetMinimumSize, superGetPreferredSize, superIsEnabled, superIsVisible, superPaint, superSetBounds, superSetEnabled, superSetFont, superSetVisible, superUpdate
 

Field Detail

selectedClassField

protected TextField selectedClassField

tree

protected TreeView tree

selectedClass

protected java.lang.String selectedClass
Constructor Detail

ClassSelectorPanel

public ClassSelectorPanel()
Default constructor.

Method Detail

showClassSelectorDialog

public static java.lang.String showClassSelectorDialog(java.awt.Component parent,
                                                       boolean modal,
                                                       java.lang.String title,
                                                       java.lang.String selectedClass)
showClassSelectorDialog displays a ClassSelectorPanel in a Dialog with Ok, Cancel, and Help buttons. The user can select a class and press Ok to select it.

Parameters:
parent - The component to center the dialog over.
modal - Whether the dialog is modal
title - The title to display on the dialog.
selectedClass - The name of the class to preselect in the tree.
Returns:
The name of the selected class (including any package name), or null if the user pressed Cancel.

getSelectedClass

public java.lang.String getSelectedClass()
Returns the name of the selected class.

Returns:
The name of the selected class or null if no class is selected.

setSelectedClass

public void setSelectedClass(java.lang.String selectedClass)
Sets the name of the selected class. The TreeView will be expanded to display the selected class, and the class will be selected.

Parameters:
selectedClass - The name of the class to select.

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Internal event handler.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Overrides:
propertyChange in class PanelVisualComponent
Parameters:
event - The PropertyChangeEvent to handle.
See Also:
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)

searchForClassNode

protected com.sas.models.NodeInterface searchForClassNode(com.sas.models.NodeInterface baseNode,
                                                          java.lang.String className,
                                                          com.sas.collection.OrderedCollection path)
searchForClassNode searches the descendants of baseNode


itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent event)
Internal event handler.

Specified by:
itemStateChanged in interface java.awt.event.ItemListener
Parameters:
event - The ItemEvent to handle.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.