com.ibm.as400.ui.framework.java
Class NodeDescriptor

java.lang.Object
  extended by com.ibm.as400.ui.framework.java.AbstractDescriptor
      extended by com.ibm.as400.ui.framework.java.NodeDescriptor

public class NodeDescriptor
extends AbstractDescriptor

Describes an item in a tree. NodeDescriptors represent objects on a user interface panel as displayed in a tree view.

Since:
v4r2m0
Version:
1.0, 04/15/98
Author:
D. Petty

Constructor Summary
Constructor and Description
NodeDescriptor()
          Constructs a NodeDescriptor.
NodeDescriptor(String name, String title, String imageFile)
          Constructs a NodeDescriptor with the specified name, title, and image file.
NodeDescriptor(String name, String title, String imageFile, boolean isLeaf)
          Constructs a NodeDescriptor with the specified name and title, and image file.
NodeDescriptor(String name, String title, String imageFile, HandlerTask[] handlerTasks)
          Constructs a NodeDescriptor with the specified name, title, image file and HandlerTask list.
NodeDescriptor(String name, String title, String imageFile, String expandedImageFile)
          Constructs a NodeDescriptor with the specified name and title, image file, and selected image file.
NodeDescriptor(String name, String title, String imageFile, String expandedImageFile, boolean isLeaf)
          Constructs a NodeDescriptor with the specified name and title, and image file.
NodeDescriptor(String name, String title, String imageFile, String expandedImageFile, HandlerTask[] handlerTasks)
          Constructs a NodeDescriptor with the specified name, title, image file, selected image file, and HandlerTask list.
 
Method Summary
Modifier and Type Method and Description
 String getExpandedImageFile()
          Returns the expanded node image file name.
 String getImageFile()
          Returns this node's image file name.
 boolean isExpandRequested()
          Determines whether this node is to be initially expanded.
 boolean isLeaf()
          Determines whether this node is a leaf.
 void setExpandedImageFile(String expandedImageFile)
          Sets the expanded node image file name.
 void setExpandRequested(boolean isExpandRequested)
          Indicates whether this node is to be initially expanded, depending on the value of parameter isExpandRequested.
 void setImageFile(String imageFile)
          Sets the node image file name.
 void setLeaf(boolean isLeaf)
          Indicates whether this node is a leaf, depending on the value of parameter isLeaf.
 
Methods inherited from class com.ibm.as400.ui.framework.java.AbstractDescriptor
addHandlerTask, getName, getTitle, getUserObject, removeHandlerTask, setName, setTitle, setUserObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeDescriptor

public NodeDescriptor()
Constructs a NodeDescriptor.

Since:
v4r2m0

NodeDescriptor

public NodeDescriptor(String name,
                      String title,
                      String imageFile)
Constructs a NodeDescriptor with the specified name, title, and image file.

Parameters:
name - the name that is used to identify the node programmatically
title - the title of the node in a form suitable for displaying to the user
imageFile - the name of the image resource that will be used to create the icon for the node
Since:
v4r2m0

NodeDescriptor

public NodeDescriptor(String name,
                      String title,
                      String imageFile,
                      String expandedImageFile)
Constructs a NodeDescriptor with the specified name and title, image file, and selected image file.

Parameters:
name - the name that is used to identify the node programmatically
title - the title of the node in a form suitable for displaying to the user
imageFile - the name of the image resource that will be used to create the icon for the node
expandedImageFile - the name of the image resource to be displayed when a node is expanded
Since:
v4r5m0

NodeDescriptor

public NodeDescriptor(String name,
                      String title,
                      String imageFile,
                      boolean isLeaf)
Constructs a NodeDescriptor with the specified name and title, and image file. This constructor provides an additional parameter for indicating whether this node is a leaf.

Parameters:
name - the name that is used to identify the node programmatically
title - the title of the node in a form suitable for displaying to the user
imageFile - the name of the image resource that will be used to create the icon for the node
isLeaf - indicates node is a leaf if true
Since:
v4r2m0

NodeDescriptor

public NodeDescriptor(String name,
                      String title,
                      String imageFile,
                      String expandedImageFile,
                      boolean isLeaf)
Constructs a NodeDescriptor with the specified name and title, and image file. This constructor provides an additional parameter for indicating whether this node is a leaf.

Parameters:
name - the name that is used to identify the node programmatically
title - the title of the node in a form suitable for displaying to the user
imageFile - the name of the image resource that will be used to create the icon for the node
expandedImageFile - the name of the image resource to be displayed when a node is expanded
isLeaf - indicates node is a leaf if true
Since:
v4r2m0

NodeDescriptor

public NodeDescriptor(String name,
                      String title,
                      String imageFile,
                      HandlerTask[] handlerTasks)
Constructs a NodeDescriptor with the specified name, title, image file and HandlerTask list.

Parameters:
name - the name that is used to identify the node programmatically
title - the title of the node in a form suitable for displaying to the user
imageFile - the name of the image resource that will be used to create the icon for the node
handlerTasks - a list of HandlerTasks which describe to the UI framework actions which should be carried out when the node is selected
Since:
v4r2m0

NodeDescriptor

public NodeDescriptor(String name,
                      String title,
                      String imageFile,
                      String expandedImageFile,
                      HandlerTask[] handlerTasks)
Constructs a NodeDescriptor with the specified name, title, image file, selected image file, and HandlerTask list.

Parameters:
name - the name that is used to identify the node programmatically
title - the title of the node in a form suitable for displaying to the user
imageFile - the name of the image resource that will be used to create the icon for the node
expandedImageFile - the name of the image resource to be displayed when a node is expanded
handlerTasks - a list of HandlerTasks which describe to the UI framework actions which should be carried out when the node is selected
Since:
v4r2m0
Method Detail

getImageFile

public String getImageFile()
Returns this node's image file name.

Returns:
the name of the image resource that will be used to create the icon for the node
Since:
v4r2m0
See Also:
setImageFile(java.lang.String)

getExpandedImageFile

public String getExpandedImageFile()
Returns the expanded node image file name.

Returns:
the name of the image resource that will be used to create the icon for the node when it is expanded
Since:
v4r5m0
See Also:
setExpandedImageFile(java.lang.String)

setImageFile

public void setImageFile(String imageFile)
Sets the node image file name.

Parameters:
imageFile - the name of the image resource that will be used to create the icon for the node
Since:
v4r2m0
See Also:
getImageFile()

setExpandedImageFile

public void setExpandedImageFile(String expandedImageFile)
Sets the expanded node image file name.

Parameters:
expandedImageFile - the name of the image resource that will be used to create the icon for the node
Since:
v4r5m0
See Also:
getImageFile()

setLeaf

public void setLeaf(boolean isLeaf)
Indicates whether this node is a leaf, depending on the value of parameter isLeaf.

Parameters:
isLeaf - If true, node will be displayed as a leaf; otherwise, node will displayed as a container.
Since:
v4r2m0
See Also:
isLeaf()

isLeaf

public boolean isLeaf()
Determines whether this node is a leaf.

Returns:
true if the node is a leaf; false otherwise.
Since:
v4r2m0
See Also:
setLeaf(boolean)

isExpandRequested

public boolean isExpandRequested()
Determines whether this node is to be initially expanded.

Returns:
true if the node should be initially expanded; false otherwise.
Since:
v5r1m0
See Also:
setExpandRequested(boolean)

setExpandRequested

public void setExpandRequested(boolean isExpandRequested)
Indicates whether this node is to be initially expanded, depending on the value of parameter isExpandRequested.

Parameters:
isExpandRequested - If true, node will be initially displayed expanded; otherwise, it will be collapsed
Since:
v5r1m0
See Also:
isExpandRequested()