|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.servlet.tbeans.dualselector.html.DualTreeSelector
public class DualTreeSelector
Transformation bean definition for creating an HTML/JavaScript DualTreeSelector. A DualTreeSelector uses two TreeViews which allows to move items between the TreeViews and submit the selected items that are on the right side (Target) TreeView
The DualTreeSelector Transformation Bean gathers the Tree values from a
model via the setModel(javax.swing.tree.TreeModel) and setTargetModel(javax.swing.tree.TreeModel) methods.
The DualTreeSelector is one of several TransformationBeans that are considered composite components. A composite component allows a developer to design custom components that are made up of a combination of other components, such as TextEntry, ListBox, and Label TransformationBeans. The visual layout of a composite component can be easily controlled through a template. For more information on composite TransformationBeans, refer to the AppDev Studio Developer Site. You'll find a useful reference document entitled Composite TransformationBeans as well as the TransformationBean Component and Style Reference.
The DualTreeSelector is one of several TransformationBeans that rely on JavaScript to provide some of its functionality. These JavaScript files are including automatically by the tbean. See JavaScriptIncludeHandler for more information about how these files are included and how to customize this behavior. The DualTreeSelector uses the following JavaScript files:
Note that the toString() method on this class calls the write method, which may have undesirable side effects. See BaseTransformation.toString() for more information. Debuggers often use toString() to show the value of a variable, and this may cause unexpected behavior while debugging
For More Information:
Visit the AppDev Studio Developer's Site to access step-by-step examples, white papers and additional usage information at http://support.sas.com/rnd/appdev/.
Examples for this class may be found on the Examples Site.
Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .
BaseDualSelector,
TreeListSelector,
DualListSelector,
TreeView,
Serialized Form| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_TEMPLATE_FILE_NAME
The default template file name for the template that provides the layout for this panel. |
| Fields inherited from class com.sas.servlet.tbeans.dualselector.BaseDualSelector |
|---|
imageLocation |
| Fields inherited from interface com.sas.servlet.tbeans.dualselector.html.DualSelectorStyleKeysInterface |
|---|
DUALSELECTOR_BUTTON, DUALSELECTOR_CONTAINER, DUALSELECTOR_SOURCE_CONTAINER, DUALSELECTOR_SOURCE_LABEL_AREA, DUALSELECTOR_SOURCE_LISTBOX, DUALSELECTOR_TARGET_CONTAINER, DUALSELECTOR_TARGET_LABEL_AREA, DUALSELECTOR_TARGET_LISTBOX |
| Fields inherited from interface com.sas.servlet.tbeans.dualselector.DualSelectorKeysInterface |
|---|
DUALSELECTOR, DUALSELECTOR_DOWN_BUTTON, DUALSELECTOR_LEFT_ALL_BUTTON, DUALSELECTOR_LEFT_BUTTON, DUALSELECTOR_RIGHT_ALL_BUTTON, DUALSELECTOR_RIGHT_BUTTON, DUALSELECTOR_SOURCE, DUALSELECTOR_SOURCE_LABEL, DUALSELECTOR_SUBMIT_BUTTON, DUALSELECTOR_TARGET, DUALSELECTOR_TARGET_LABEL, DUALSELECTOR_UP_BUTTON |
| Constructor Summary | |
|---|---|
DualTreeSelector()
Construct a new DualTreeSelector |
|
DualTreeSelector(java.lang.String name,
javax.swing.tree.TreeModel model)
Construct a new DualTreeSelector |
|
| Method Summary | |
|---|---|
BaseTransformation |
getDefaultComponent()
Returns the source component used for this selector (com.sas.servlet.tbeans.html.TreeView) |
javax.swing.tree.TreeModel |
getModel()
Return the model for the Tree. |
protected java.lang.String |
getMoveAllToTarget()
Returns the JavaScript function name for moving all items from the source component to the target. |
protected java.lang.String |
getMoveItemsDown()
Returns the JavaScript function name for moving item(s) down on the target component. |
protected java.lang.String |
getMoveItemsUp()
Returns the JavaScript function name for moving item(s) up on the target component. |
protected java.lang.String |
getMoveToTarget()
Returns the JavaScript function name for moving item(s) from the source component to the target. |
protected java.lang.String |
getRemoveAllFromTarget()
Returns the JavaScript function name for removing all items from the target component. |
protected java.lang.String |
getRemoveFromTarget()
Returns the JavaScript function name for removing item(s) from the target component. |
protected java.lang.String |
getSubmitAction()
Returns the JavaScript function name for submitting the form |
javax.swing.tree.TreeModel |
getTargetModel()
Return the model for the Tree. |
java.lang.String |
getTargetNode()
Returns the name of the target node the selected nodes are moved to. |
protected void |
setDefaultComponentNames()
Sets default names for the components that are in this DualSelector. |
void |
setModel(javax.swing.tree.TreeModel treeModel)
Sets the model for the Tree. |
protected void |
setSelectorDefaults()
Sets default images, and JavaScript events for the components. |
void |
setTargetModel(javax.swing.tree.TreeModel treeModel)
Sets the model for the Tree. |
void |
setTargetNode(java.lang.String targetNode)
Sets the name of a node that is in the target tree model. |
void |
write(java.io.PrintWriter out)
Writes the transformed representation of the selector |
| Methods inherited from class com.sas.servlet.tbeans.dualselector.BaseDualSelector |
|---|
getImageLocation, getMultipleSelections, getSize, getSourceLabel, getTargetLabel, getTargetMaximumCount, isStaticSourceAllowed, isSubmitButtonVisible, isTargetButtonsVisible, isTargetDuplicateAllowed, isTransferAllButtonVisible, setImageLocation, setMultipleSelections, setSize, setStaticSourceAllowed, setSubmitButtonVisible, setTargetButtonsVisible, setTargetDuplicateAllowed, setTargetMaximumCount, setTransferAllButtonVisible |
| Methods inherited from interface com.sas.actionprovider.HttpActionProviderInterface |
|---|
getRequest |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_TEMPLATE_FILE_NAME
| Constructor Detail |
|---|
public DualTreeSelector()
public DualTreeSelector(java.lang.String name,
javax.swing.tree.TreeModel model)
name - The field namemodel - The model for the source tree| Method Detail |
|---|
protected void setSelectorDefaults()
DualSelector
setSelectorDefaults in class DualSelector
public void write(java.io.PrintWriter out)
throws java.io.IOException
write in interface TransformationInterfacewrite in interface com.sas.util.WriteToPrintWriterInterfacewrite in class BaseCompositeTransformationout - The output stream
java.io.IOException - Thrown if some type of I/O error occurspublic javax.swing.tree.TreeModel getModel()
setModel(TreeModel)public void setModel(javax.swing.tree.TreeModel treeModel)
treeModel - the model for the TreegetModel()public javax.swing.tree.TreeModel getTargetModel()
setModel(TreeModel)public void setTargetModel(javax.swing.tree.TreeModel treeModel)
treeModel - the model for the TreegetModel()protected java.lang.String getMoveToTarget()
DualSelector
getMoveToTarget in class DualSelectorprotected java.lang.String getRemoveFromTarget()
DualSelector
getRemoveFromTarget in class DualSelectorprotected java.lang.String getRemoveAllFromTarget()
DualSelector
getRemoveAllFromTarget in class DualSelectorprotected java.lang.String getMoveAllToTarget()
DualSelector
getMoveAllToTarget in class DualSelectorprotected java.lang.String getMoveItemsUp()
DualSelector
getMoveItemsUp in class DualSelectorprotected java.lang.String getMoveItemsDown()
DualSelector
getMoveItemsDown in class DualSelectorprotected java.lang.String getSubmitAction()
DualSelector
getSubmitAction in class DualSelectorpublic BaseTransformation getDefaultComponent()
getDefaultComponent in class BaseDualSelectorTreeViewpublic java.lang.String getTargetNode()
public void setTargetNode(java.lang.String targetNode)
targetNode - name of a targetNodeprotected void setDefaultComponentNames()
DualSelector
setDefaultComponentNames in class DualSelector
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||