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

cern::gp::explorer::MultiListExplorer Class Reference

Collaboration diagram for cern::gp::explorer::MultiListExplorer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MultiListExplorer ()
 MultiListExplorer (SelectionListener selectionListener, int listCount)
 MultiListExplorer (SelectionListener selectionListener, int width, int height)
 MultiListExplorer (SelectionListener selectionListener, int listCount, int width, int height, boolean twoRows)
void addNotify ()
void removeNotify ()
void setRootNode (GPNode node)
ComponentCreator getTopComponentCreator ()
void setTopComponentCreator (ComponentCreator componentCreator)
ComponentCreator getBottomComponentCreator ()
void setBottomComponentCreator (ComponentCreator componentCreator)
void setListCount (int listCount)
int getListCount ()
void setAutomaticSelection (boolean automaticSelection)
boolean getAutomaticSelection ()

Static Public Attributes

final int DEFAULT_WIDTH = 600
final int DEFAULT_HEIGHT = 400
final int DEFAULT_LIST_COUNT = 4

Protected Member Functions

ExplorerManager getExplorerManager (int listIndex)

Static Protected Member Functions

void selectNthChildren (ExplorerManager explorerManager, int n)

Private Member Functions

javax.swing.JComponent createExplorerPanelRows (int width, int height, int listCount)
javax.swing.JComponent createExplorerPanelRow (int width, int height, int listCount, int preceedingExplorerCount, ExplorerPanel prevRightPanel)
ExplorerPanel createExplorerPanel (int listIndex, ExplorerPanel prevRightPanel)

Private Attributes

ExplorerPanel[] _explorerPanels
int _listCount = DEFAULT_LIST_COUNT
boolean _twoRows
boolean _automaticSelection = true
ComponentCreator _bottomComponentCreator
ComponentCreator _topComponentCreator
SelectionListener _selectionListener

Detailed Description

MultiListExplorer is an explorer showing several lists linked together allowing to show several levels of depth at once. The first list shows the children of the root node, the second list shows the children of the selected node in the first list, and so on.

The number of lists is parameterizable.

It is possible to register a java.beans.PropertyChangeListener to be notified of the selection in the different list. The method getExplorerManager(int) allow to register such a listener on one particular list.

It is possible to customize the top and bottom component of each list by setting a ComponentCreator for top or bottom before adding the explorer to the gui.

Version:
Revision
1.2
Date
2006/09/25 08:52:36
Author:
Lionel Mestre


Constructor & Destructor Documentation

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

cern::gp::explorer::MultiListExplorer::MultiListExplorer SelectionListener  selectionListener,
int  listCount
[inline]
 

cern::gp::explorer::MultiListExplorer::MultiListExplorer SelectionListener  selectionListener,
int  width,
int  height
[inline]
 

cern::gp::explorer::MultiListExplorer::MultiListExplorer SelectionListener  selectionListener,
int  listCount,
int  width,
int  height,
boolean  twoRows
[inline]
 


Member Function Documentation

void cern::gp::explorer::MultiListExplorer::addNotify  )  [inline]
 

ExplorerPanel cern::gp::explorer::MultiListExplorer::createExplorerPanel int  listIndex,
ExplorerPanel  prevRightPanel
[inline, private]
 

Creates one ExplorerPanel representing one list.

Parameters:
listIndex the index of the list to create (from 0 to n-1)
prevRightPanel the possibly null previous right panel displaying the content of the node selected in this list.
Returns:
the new ExplorerPanel

javax.swing.JComponent cern::gp::explorer::MultiListExplorer::createExplorerPanelRow int  width,
int  height,
int  listCount,
int  preceedingExplorerCount,
ExplorerPanel  prevRightPanel
[inline, private]
 

Creates all ExplorerPanels (one per list) making the MultiListExplorer. This method is recursive and creates list from right to left

Parameters:
width the remaining available width in pixels
height the available height in pixels
listCount the counter giving how many list remain to be created
prevRightPanel the possibly null previous right panel that was created on the previous call
Returns:
the new component containing all created explorers

javax.swing.JComponent cern::gp::explorer::MultiListExplorer::createExplorerPanelRows int  width,
int  height,
int  listCount
[inline, private]
 

Creates all ExplorerPanels (one per list) making the MultiListExplorer. This method is recursive and creates list from right to left

Parameters:
width the remaining available width in pixels
height the available height in pixels
listCount the counter giving how many list remain to be created
prevRightPanel the possibly null previous right panel that was created on the previous call
Returns:
the new component containing all created explorers

boolean cern::gp::explorer::MultiListExplorer::getAutomaticSelection  )  [inline]
 

Returns if the selection in one list triggers the selection in the subsequent lists.

Returns:
if the selection in one list triggers the selection in the subsequent lists.

ComponentCreator cern::gp::explorer::MultiListExplorer::getBottomComponentCreator  )  [inline]
 

Returns the bottomComponentCreator that is used to create the top component of each list in the explorer or null if none is set.

Returns:
the current bottomComponentCreator or null

ExplorerManager cern::gp::explorer::MultiListExplorer::getExplorerManager int  listIndex  )  [inline, protected]
 

Returns the explorer manager of the list of given index

Returns:
the explorer manager of the list of given index

int cern::gp::explorer::MultiListExplorer::getListCount  )  [inline]
 

Returns the number of lists in the explorer.

Returns:
the number of lists in the explorer.

ComponentCreator cern::gp::explorer::MultiListExplorer::getTopComponentCreator  )  [inline]
 

Returns the topComponentCreator that is used to create the top component of each list in the explorer or null if none is set.

Returns:
the current topComponentCreator or null

void cern::gp::explorer::MultiListExplorer::removeNotify  )  [inline]
 

void cern::gp::explorer::MultiListExplorer::selectNthChildren ExplorerManager  explorerManager,
int  n
[inline, static, protected]
 

void cern::gp::explorer::MultiListExplorer::setAutomaticSelection boolean  automaticSelection  )  [inline]
 

Sets if the selection in one list triggers the selection in the subsequent lists. This property is true by default.

Parameters:
automaticSelection whether the selection in one list cascade to the others

void cern::gp::explorer::MultiListExplorer::setBottomComponentCreator ComponentCreator  componentCreator  )  [inline]
 

Sets the bottomComponentCreator that is used to create the top component of each list in the explorer. Null can be used to remove an existing creator. The bottomComponentCreator cannot be changed once the explorer has been included in a gui. It can only be changed after instantiation before adding the Explorer into a container.

Parameters:
componentCreator the componentCreator to use to create the bottom components

void cern::gp::explorer::MultiListExplorer::setListCount int  listCount  )  [inline]
 

Sets the number of lists in the explorer. Cannot be inferior to 2. The number cannot be changed once the explorer has been included in a gui. The number can only be changed after instantiation before adding the Explorer into a container.

Parameters:
listCount the number of ilst in the explorer

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

set the root node of the hiearachy to be explored

void cern::gp::explorer::MultiListExplorer::setTopComponentCreator ComponentCreator  componentCreator  )  [inline]
 

Sets the topComponentCreator that is used to create the top component of each list in the explorer. Null can be used to remove an existing creator. The topComponentCreator cannot be changed once the explorer has been included in a gui. It can only be changed after instantiation before adding the Explorer into a container.

Parameters:
componentCreator the componentCreator to use to create the top components


Member Data Documentation

boolean cern::gp::explorer::MultiListExplorer::_automaticSelection = true [private]
 

ComponentCreator cern::gp::explorer::MultiListExplorer::_bottomComponentCreator [private]
 

ExplorerPanel [] cern::gp::explorer::MultiListExplorer::_explorerPanels [private]
 

int cern::gp::explorer::MultiListExplorer::_listCount = DEFAULT_LIST_COUNT [private]
 

SelectionListener cern::gp::explorer::MultiListExplorer::_selectionListener [private]
 

ComponentCreator cern::gp::explorer::MultiListExplorer::_topComponentCreator [private]
 

boolean cern::gp::explorer::MultiListExplorer::_twoRows [private]
 

final int cern::gp::explorer::MultiListExplorer::DEFAULT_HEIGHT = 400 [static]
 

final int cern::gp::explorer::MultiListExplorer::DEFAULT_LIST_COUNT = 4 [static]
 

final int cern::gp::explorer::MultiListExplorer::DEFAULT_WIDTH = 600 [static]
 


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