Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cern::gp::explorer::ListTableExplorer Class Reference

Inheritance diagram for cern::gp::explorer::ListTableExplorer:

Inheritance graph
[legend]
Collaboration diagram for cern::gp::explorer::ListTableExplorer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ListTableExplorer ()
 ListTableExplorer (GPNode[] nodes)
 ListTableExplorer (Class viewableBeanClass)
 ListTableExplorer (Class[] viewableBeanClasses)
TreeTableViewTableAccess getTreeTableAccess ()
final void setListNodes (final GPNode[] nodes)
void setRootNode (GPNode node)
void setPreferredSize (java.awt.Dimension dim)
void setTreePreferredWidth (int width)
void setTableColumnPreferredWidth (int index, int width)
void setTableColumns (String[] propNames) throws IntrospectionException
String[] getTableColumnNames ()
void setTableColumns (GPNode node, String[] propNames)
void setTableColumns (Object bean) throws IntrospectionException
void setTableColumns (Object bean, String[] propNames) throws IntrospectionException
void setTableColumns (Class[] propTypes, String[] propNames)
void setTableColumns (Class[] propTypes, String[] propNames, boolean[] sortable)
void setTableColumns (GPNode node, String[] propNames, boolean[] sortable)
void setTableColumns (Object bean, String[] propNames, boolean[] sortable) throws IntrospectionException
void setTableColumns (Class beanClass) throws IntrospectionException
void setTableColumns (Class beanClass, String[] propNames) throws IntrospectionException
void setProperties (Node.Property[] props, boolean[] sortable)

Protected Member Functions

 ListTableExplorer (TreeTableViewTableAccess view)

Private Member Functions

boolean areAllNodesLeaves (GPNode[] nodes)

Private Attributes

final TableHolder tableHolder
GPNode beanNode
String[] tableColumnNames
final TreeTableViewTableAccess treeTableViewTableAccess

Static Private Attributes

final String ATTR_COMPARABLE_COLUMN = "ComparableColumnTTV"
final String ATTR_SORTING_COLUMN = "SortingColumnTTV"
final String ATTR_DESCENDING_ORDER = "DescendingOrderTTV"

Detailed Description

A GUI component that combines a List with a Table, with the List on the left side and the Table on the right. Each node of the list corresponds to a row in the table. It can be used to explore JavaBeans in the Tree and show ther properties in the Table. This class shall simplify the task of creating and parametrizing this type of explorer. As the other Explorers provided by the GP project, it is strongly based on JavaBeans: The nodes in the List contain JavaBeans-compliant objects ("domain beans"), and the rows in the Table display the properties of these domain beans.

The implementation enables the developer to create a Explorer that s/he can easily place into a NetBeans Mode. It has methods to easily configure the colums of the Table. It is recommended that the developer uses the NodeFactory to create the Node hierarchy to be explored.

Version:
Revision
1.2
Date
2006/09/25 08:52:36
Author:
Vito Baggiolini


Constructor & Destructor Documentation

cern::gp::explorer::ListTableExplorer::ListTableExplorer  )  [inline]
 

create a ListTableExplorer with the default view and model.

cern::gp::explorer::ListTableExplorer::ListTableExplorer GPNode[]  nodes  )  [inline]
 

create a ListTableExplorer and set the nodes to display

Parameters:
nodes the nodes to display

cern::gp::explorer::ListTableExplorer::ListTableExplorer TreeTableViewTableAccess  view  )  [inline, protected]
 

cern::gp::explorer::ListTableExplorer::ListTableExplorer Class  viewableBeanClass  )  [inline]
 

create a TreeTableExplorer and specify the class of the bean from which the Table rows shall be inferred. This constructor works if you want to display the properties of only one Bean in the Table. Otherwise use another constructor.

Parameters:
viewableBeanClass the bean class whose properties shall be displayed in the Table
Deprecated:
this method is only used for a real SortableTreeTableExplorer

cern::gp::explorer::ListTableExplorer::ListTableExplorer Class[]  viewableBeanClasses  )  [inline]
 

create a TreeTableExplorer and specify which beans shall be visible in the Table part of the TreeTable. Only Bean classes that equal or inherit from one of the classes passed to this constructor will have their properties displayed in the Table. The others table cells will be empty.

Parameters:
viewableBeanClass the bean classes whose properties shall be displayed in the Table
Deprecated:
this method is only used for a real SortableTreeTableExplorer


Member Function Documentation

boolean cern::gp::explorer::ListTableExplorer::areAllNodesLeaves GPNode[]  nodes  )  [inline, private]
 

helper method, finds out if all nodes are Leaves or if any of the nodes has children

Parameters:
nodes an array of nodes
Returns:
true if all are leaves, false if at least one node has children

String [] cern::gp::explorer::ListTableExplorer::getTableColumnNames  )  [inline]
 

Accessor method, the counterpart to setTableColumns(String[])

Returns:
the names of the currently accessed table colums

TreeTableViewTableAccess cern::gp::explorer::ListTableExplorer::getTreeTableAccess  )  [inline]
 

Getter Method

Returns:
the TreeTableView of this TreeTableExplorer

final void cern::gp::explorer::ListTableExplorer::setListNodes final GPNode[]  nodes  )  [inline, virtual]
 

set the nodes to be displayed in the table.

Parameters:
nodes an array of nodes each associated with a Bean.

Implements cern::gp::explorer::GPListExplorerPanel.

void cern::gp::explorer::ListTableExplorer::setPreferredSize java.awt.Dimension  dim  )  [inline]
 

set the preferred size of the TableExplorer

void cern::gp::explorer::ListTableExplorer::setProperties Node.Property[]  props,
boolean[]  sortable
[inline]
 

Implements cern::gp::explorer::TablePropertyHolder.

void cern::gp::explorer::ListTableExplorer::setRootNode GPNode  node  )  [inline]
 

set the parent node of the list of nodes to be explored. The parent node is not displayed, only its children nodes. Use this method

  • if you already have a root node whose children you want to display
  • if you want to control the nodes with your own ChildrenManager as shown below
Otherwise, you should use setListNodes(GPNode[])

Parameters:
parentNode the parent of the nodes to be displayed in the List

Reimplemented from cern::gp::explorer::GPListExplorerPanel.

void cern::gp::explorer::ListTableExplorer::setTableColumnPreferredWidth int  index,
int  width
[inline]
 

set the preferred width of the specified column

void cern::gp::explorer::ListTableExplorer::setTableColumns Class  beanClass,
String[]  propNames
throws IntrospectionException [inline]
 

Deprecated:
use setTableColumns(Object, String[]) or setTableColumns(GPBean, String[]) instead

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns Class  beanClass  )  throws IntrospectionException [inline]
 

Deprecated:
use setTableColumns(Object) or setTableColumns(GPBean, String[]) instead

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns Object  bean,
String[]  propNames,
boolean[]  sortable
throws IntrospectionException [inline, virtual]
 

Since:
2.0.6

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns GPNode  node,
String[]  propNames,
boolean[]  sortable
[inline, virtual]
 

Since:
2.0.6

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns Class[]  propTypes,
String[]  propNames,
boolean[]  sortable
[inline, virtual]
 

Since:
2.0.6

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns Class[]  propTypes,
String[]  propNames
[inline]
 

Sets the colums of the Table. The colums are identified by their name and their type. Please make sure that the two arrays passed as arguments correspond. Cautiondo not use this with beans that implement the cern.gp.beans.BeanSupport#getPropertyInfo method to customize settings for properties. For such beans use {{setTableColumns(Object, String[])} instead.

Parameters:
propNames the names of the properties to be displayed
propTypes the types of the properties corresponding to the names

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns Object  bean,
String[]  propNames
throws IntrospectionException [inline]
 

Sets the columns of the Table. This method determines the type of the method by doing reflection on the Bean. It also takes into account the additional info specified in cern.gp.beans.BeanSupport#getPropertyInfo.

Beware: all properties passed in the propNames argument must also be present in the beanClass. If you already have created a GPNode for this bean, you should use setTableColumns(GPNode, String[]) because this is more efficient.
If you don't have such a bean, please use the {setTableColumns(Class[], String[])} method.

Parameters:
bean the bean displayed in the table
propNames the properties to be displayed as columns in the table
Exceptions:
IntrospectionException if something goes wrong while introspecting the bean

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns Object  bean  )  throws IntrospectionException [inline]
 

Sets the columns of the Table. This method determines the type of the properties by doing reflection on the beanClass. It also takes into account info specified in the method cern.gp.beans.BeanSupport#getPropertyInfo All non-hidden properties of the bean will be displayed as columns in the Table

Parameters:
the class from which the table colums are inferred

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns GPNode  node,
String[]  propNames
[inline]
 

Sets the columns of the Table. This method determines the type of the method by using the information contained in the GPNode. It also takes into account the additional info specified using the cern.gp.beans.BeanSupport#getPropertyInfo method. Beware: all properties passed in the propNames argument must also be present in the beanClass represented by this node. If you don't have a suitable GPNode, please use the {setTableColumns(Class[], String[])} method.

Parameters:
bean the bean displayed in the table
propNames the properties to be displayed as columns in the table

Implements cern::gp::explorer::TableHolder.

void cern::gp::explorer::ListTableExplorer::setTableColumns String[]  propNames  )  throws IntrospectionException [inline]
 

set the columns to be displayed. Note that before this method is called you must have called setListNodes(GPNode[])

void cern::gp::explorer::ListTableExplorer::setTreePreferredWidth int  width  )  [inline]
 

set the preferred width of the whole TableExplorer


Member Data Documentation

final String cern::gp::explorer::ListTableExplorer::ATTR_COMPARABLE_COLUMN = "ComparableColumnTTV" [static, private]
 

final String cern::gp::explorer::ListTableExplorer::ATTR_DESCENDING_ORDER = "DescendingOrderTTV" [static, private]
 

final String cern::gp::explorer::ListTableExplorer::ATTR_SORTING_COLUMN = "SortingColumnTTV" [static, private]
 

GPNode cern::gp::explorer::ListTableExplorer::beanNode [private]
 

String [] cern::gp::explorer::ListTableExplorer::tableColumnNames [private]
 

final TableHolder cern::gp::explorer::ListTableExplorer::tableHolder [private]
 

final TreeTableViewTableAccess cern::gp::explorer::ListTableExplorer::treeTableViewTableAccess [private]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:08:24 2009 for ACS Java API by doxygen 1.3.8