

Classes | |
| interface | ComponentCreator |
| class | ListExplorerPanel |
| class | ListSelectionListener |
| class | NextListSelectionListener |
| interface | SelectionListener |
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 | |
| static final int | DEFAULT_WIDTH = 600 |
| static final int | DEFAULT_HEIGHT = 400 |
| static final int | DEFAULT_LIST_COUNT = 4 |
Protected Member Functions | |
| ExplorerManager | getExplorerManager (int listIndex) |
Static Protected Member Functions | |
| static 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 |
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.
| cern::gp::explorer::MultiListExplorer::MultiListExplorer | ( | ) | [inline] |
References DEFAULT_HEIGHT, DEFAULT_LIST_COUNT, and DEFAULT_WIDTH.
| cern::gp::explorer::MultiListExplorer::MultiListExplorer | ( | SelectionListener | selectionListener, | |
| int | listCount | |||
| ) | [inline] |
References DEFAULT_HEIGHT, and DEFAULT_WIDTH.
| cern::gp::explorer::MultiListExplorer::MultiListExplorer | ( | SelectionListener | selectionListener, | |
| int | width, | |||
| int | height | |||
| ) | [inline] |
References DEFAULT_LIST_COUNT.
| cern::gp::explorer::MultiListExplorer::MultiListExplorer | ( | SelectionListener | selectionListener, | |
| int | listCount, | |||
| int | width, | |||
| int | height, | |||
| boolean | twoRows | |||
| ) | [inline] |
References _listCount, _selectionListener, and _twoRows.
| 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.
| 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. |
References _explorerPanels, and getExplorerManager().
Referenced by createExplorerPanelRow().
| 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
| 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 |
References createExplorerPanel().
Referenced by addNotify(), and createExplorerPanelRows().
| 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
| 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 |
References _explorerPanels, and createExplorerPanelRow().
Referenced by addNotify().
| boolean cern::gp::explorer::MultiListExplorer::getAutomaticSelection | ( | ) | [inline] |
Returns if the selection in one list triggers the selection in the subsequent lists.
References _automaticSelection.
| 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.
References _bottomComponentCreator.
| ExplorerManager cern::gp::explorer::MultiListExplorer::getExplorerManager | ( | int | listIndex | ) | [inline, protected] |
Returns the explorer manager of the list of given index
References _explorerPanels.
Referenced by addNotify(), createExplorerPanel(), cern::gp::explorer::MultiListExplorer::ListExplorerPanel::initialize(), cern::gp::explorer::MultiListExplorer::ListExplorerPanel::removeNotify(), and setRootNode().
| int cern::gp::explorer::MultiListExplorer::getListCount | ( | ) | [inline] |
Returns the number of lists in the explorer.
References _listCount.
| 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.
References _topComponentCreator.
| void cern::gp::explorer::MultiListExplorer::removeNotify | ( | ) | [inline] |
References _explorerPanels.
| static 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.
| automaticSelection | whether the selection in one list cascade to the others |
References _automaticSelection.
| 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.
| componentCreator | the componentCreator to use to create the bottom components |
References _bottomComponentCreator.
| 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.
| listCount | the number of ilst in the explorer |
References _explorerPanels, and _listCount.
Referenced by cern::gp::explorer::test::TestMultiListExplorer::main().
| void cern::gp::explorer::MultiListExplorer::setRootNode | ( | GPNode | node | ) | [inline] |
set the root node of the hiearachy to be explored
References getExplorerManager(), and cern::gp::nodes::GPNode::getPeerNode().
Referenced by cern::gp::explorer::test::TestMultiListExplorer::main().
| 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.
| componentCreator | the componentCreator to use to create the top components |
References _topComponentCreator.
boolean cern::gp::explorer::MultiListExplorer::_automaticSelection = true [private] |
ExplorerPanel [] cern::gp::explorer::MultiListExplorer::_explorerPanels [private] |
Referenced by addNotify(), createExplorerPanel(), createExplorerPanelRows(), getExplorerManager(), removeNotify(), and setListCount().
int cern::gp::explorer::MultiListExplorer::_listCount = DEFAULT_LIST_COUNT [private] |
Referenced by addNotify(), getListCount(), MultiListExplorer(), and setListCount().
boolean cern::gp::explorer::MultiListExplorer::_twoRows [private] |
Referenced by addNotify(), and MultiListExplorer().
final int cern::gp::explorer::MultiListExplorer::DEFAULT_HEIGHT = 400 [static] |
Referenced by MultiListExplorer().
final int cern::gp::explorer::MultiListExplorer::DEFAULT_LIST_COUNT = 4 [static] |
Referenced by MultiListExplorer().
final int cern::gp::explorer::MultiListExplorer::DEFAULT_WIDTH = 600 [static] |
Referenced by MultiListExplorer().
1.6.2