JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource.beans
Class TreeProperties

java.lang.Object
  |
  +--com.klg.jclass.datasource.beans.SerializedProperties
        |
        +--com.klg.jclass.datasource.beans.TreeProperties
All Implemented Interfaces:
EventListener, JCDataListener, Serializable

public class TreeProperties
extends SerializedProperties
implements JCDataListener

This class encapsulates the data hierarchy for a JCTreeData. This is a tree of NodeProperties.

See Also:
JCTreeData, NodeProperties, Serialized Form

Field Summary
protected  int dataSourceType
          Data source type of the tree data bean.
 
Fields inherited from class com.klg.jclass.datasource.beans.SerializedProperties
defaultSerializationFileBase, resourceName, serializationFile
 
Constructor Summary
TreeProperties()
           
TreeProperties(int type, String model_name)
           
TreeProperties(String resource_name, Class caller_class)
          Constructs a TreeProperties from a resource.
TreeProperties(String resource_name, ClassLoader cl)
           
TreeProperties(String resource_name, ClassLoader cl, String[] names, Object[] data_sources)
           
TreeProperties(String resource_name, Class caller_class, String sfile)
          Constructs a TreeProperties from a resource.
TreeProperties(String resource_name, Class caller_class, String[] names, Object[] data_sources)
          Constructs a TreeProperties from a resource.
TreeProperties(String resource_name, Class caller_class, String sfile, String[] names, Object[] data_sources)
          Constructs a TreeProperties from a resource.
 
Method Summary
static com.klg.jclass.datasource.beans.SerializedProperties fromResource(ClassLoader cl, String name)
          Instantiates a SerializedProperties from a resource.
 String[] getDataSourceNames()
          Return an array of the names of IDE data source objects.
 Object[] getDataSources()
          Return an array of IDE data source objects.
 int getDataSourceType()
          Return the data source type.
 String getModelName()
          Sets the model name.
 com.klg.jclass.datasource.DataSourceTreeNode getRoot()
          Gets the root of the tree structure.
static String getSerializedVersion()
          Gets the serialized version of the bean component currently being de-serialized.
static String getVersion()
          Gets the current version.
 void JCDataValueChanged(com.klg.jclass.datasource.beans.JCDataEvent e)
          When value(s) of the data bean component is changed.
 void remove(com.klg.jclass.datasource.DataSourceTreeNode node)
          Removes a node from the tree.
 void removeAll()
          Removes all nodes from the tree.
 void setDataSourceType(int type)
          Sets the data source type.
 void setModelName(String s)
          Sets the model name.
 void setRoot(com.klg.jclass.datasource.DataSourceTreeNode root)
          Sets the root of the tree structure.
 String toString()
           
 
Methods inherited from class com.klg.jclass.datasource.beans.SerializedProperties
addJCDataListener, fireJCDataEvent, fromFile, fromResource, getDefaultSerializationFile, getDefaultSerializationFileToOpen, getResourceName, getSerializationFile, isResourceNameSpecified, isSameString, isSerializationRequired, removeJCDataListener, setChanged, setDefaultSerializationFileBase, setResourceName, setSerializationFile, toFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dataSourceType

protected int dataSourceType
Data source type of the tree data bean.

Constructor Detail

TreeProperties

public TreeProperties()

TreeProperties

public TreeProperties(int type,
                      String model_name)

TreeProperties

public TreeProperties(String resource_name,
                      Class caller_class,
                      String sfile)
               throws DataModelException
Constructs a TreeProperties from a resource. First, the package name of the caller class is prepended to the resource name to locate the resource. If no resource is found, the passed-in resource name is used.

Parameters:
resource_name - resource name relative to a class loader to the bean component. It must have the right extension.
caller_class - class that uses the serialized bean component.
sfile - serialization file that is used at design-time in JBuilder to load a TreeProperties.
Throws:
DataModelException - If the class can't be loaded.
See Also:
ClassLoader

TreeProperties

public TreeProperties(String resource_name,
                      Class caller_class,
                      String sfile,
                      String[] names,
                      Object[] data_sources)
               throws DataModelException
Constructs a TreeProperties from a resource. First, the package name of the caller class is prepended to the resource name to locate the resource. If no resource is found, the passed-in resource name is used.

Parameters:
resource_name - resource name relative to a class loader to the bean component. It must have the right extension.
caller_class - class that uses the serialized bean component.
sfile - serialization file that is used at design-time in JBuilder to load a TreeProperties.
Throws:
DataModelException - If the class can't be loaded.
See Also:
ClassLoader

TreeProperties

public TreeProperties(String resource_name,
                      Class caller_class)
               throws DataModelException
Constructs a TreeProperties from a resource. First, the package name of the caller class is prepended to the resource name to locate the resource. If no resource is found, the passed-in resource name is used.

Parameters:
resource_name - resource name relative to a class loader to the bean component. It must have the right extension.
caller_class - class that uses the serialized bean component.
Throws:
DataModelException - If the class can't be loaded.
See Also:
ClassLoader

TreeProperties

public TreeProperties(String resource_name,
                      Class caller_class,
                      String[] names,
                      Object[] data_sources)
               throws DataModelException
Constructs a TreeProperties from a resource. First, the package name of the caller class is prepended to the resource name to locate the resource. If no resource is found, the passed-in resource name is used.

Parameters:
resource_name - resource name relative to a class loader to the bean component. It must have the right extension.
caller_class - class that uses the serialized bean component.
Throws:
DataModelException - If the class can't be loaded.
See Also:
ClassLoader

TreeProperties

public TreeProperties(String resource_name,
                      ClassLoader cl)
               throws DataModelException

TreeProperties

public TreeProperties(String resource_name,
                      ClassLoader cl,
                      String[] names,
                      Object[] data_sources)
               throws DataModelException
Method Detail

setModelName

public void setModelName(String s)
Sets the model name.


getModelName

public String getModelName()
Sets the model name.


setDataSourceType

public void setDataSourceType(int type)
Sets the data source type.


getDataSourceType

public int getDataSourceType()
Return the data source type.


getDataSourceNames

public String[] getDataSourceNames()
Return an array of the names of IDE data source objects.


getDataSources

public Object[] getDataSources()
Return an array of IDE data source objects.


JCDataValueChanged

public void JCDataValueChanged(com.klg.jclass.datasource.beans.JCDataEvent e)
When value(s) of the data bean component is changed.

Specified by:
JCDataValueChanged in interface JCDataListener

fromResource

public static com.klg.jclass.datasource.beans.SerializedProperties fromResource(ClassLoader cl,
                                                                                String name)
                                                                         throws ClassNotFoundException,
                                                                                IOException
Instantiates a SerializedProperties from a resource.

Parameters:
cl - class loader used to get the resource.
name - resource name relative to a class loader to the bean component. It must have the right extension.
Throws:
ClassNotFoundException - If the class can't be loaded.
IOException - If an IO exception occurs.
See Also:
Beans.instantiate(java.lang.ClassLoader, java.lang.String)

getRoot

public com.klg.jclass.datasource.DataSourceTreeNode getRoot()
Gets the root of the tree structure.


setRoot

public void setRoot(com.klg.jclass.datasource.DataSourceTreeNode root)
Sets the root of the tree structure.


removeAll

public void removeAll()
Removes all nodes from the tree.


remove

public void remove(com.klg.jclass.datasource.DataSourceTreeNode node)
Removes a node from the tree.


getVersion

public static String getVersion()
Gets the current version.


getSerializedVersion

public static String getSerializedVersion()
Gets the serialized version of the bean component currently being de-serialized.


toString

public String toString()
Overrides:
toString in class Object

Copyright © 2004 Quest Software Inc..
All rights reserved.