org.gswing.components.common.gui
Class ConstituencyTreeModel

java.lang.Object
  extended by javax.swing.tree.DefaultTreeModel
      extended by org.gswing.components.common.gui.ConstituencyTreeModel
All Implemented Interfaces:
Serializable, TreeModel

public class ConstituencyTreeModel
extends DefaultTreeModel

Models a tree view of constituencies. That is state contains regions, regions contains constituencies and councils and councils contain wards.

See Also:
Serialized Form

Field Summary
static int ALL
           
static int CONSTITUENCIES_ONLY
           
static int COUNCILS_ONLY
           
 
Fields inherited from class javax.swing.tree.DefaultTreeModel
asksAllowsChildren, listenerList, root
 
Constructor Summary
ConstituencyTreeModel(IConstituencyBrowsing browser)
          Tree model for full constituency tree.
ConstituencyTreeModel(IConstituencyBrowsing browser, char type)
          Constructor for simple constituency tree.
ConstituencyTreeModel(IConstituencyBrowsing browser, int mode)
          Tree model with a specified mode - ALL, CONSTITUENCIES_ONLY or COUNCILS_ONLY
ConstituencyTreeModel(IConstituencyBrowsing browser, String councilName)
          Constructor for local results.
 
Method Summary
 void refreshNode(ConstituencyNode node, char childType)
          Refresh a node by deleting all exsting children and refetching the constituency list from the database.
 
Methods inherited from class javax.swing.tree.DefaultTreeModel
addTreeModelListener, asksAllowsChildren, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getChild, getChildCount, getIndexOfChild, getListeners, getPathToRoot, getPathToRoot, getRoot, getTreeModelListeners, insertNodeInto, isLeaf, nodeChanged, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, removeNodeFromParent, removeTreeModelListener, setAsksAllowsChildren, setRoot, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final int ALL
See Also:
Constant Field Values

CONSTITUENCIES_ONLY

public static final int CONSTITUENCIES_ONLY
See Also:
Constant Field Values

COUNCILS_ONLY

public static final int COUNCILS_ONLY
See Also:
Constant Field Values
Constructor Detail

ConstituencyTreeModel

public ConstituencyTreeModel(IConstituencyBrowsing browser,
                             char type)
Constructor for simple constituency tree.

Parameters:
browser - The constituency browser.
type - The constituency type.

ConstituencyTreeModel

public ConstituencyTreeModel(IConstituencyBrowsing browser)
Tree model for full constituency tree.

Parameters:
browser - The constituency browser.

ConstituencyTreeModel

public ConstituencyTreeModel(IConstituencyBrowsing browser,
                             int mode)
Tree model with a specified mode - ALL, CONSTITUENCIES_ONLY or COUNCILS_ONLY

Parameters:
browser - The constituency browser.
mode - The tree mode.

ConstituencyTreeModel

public ConstituencyTreeModel(IConstituencyBrowsing browser,
                             String councilName)
Constructor for local results.

Parameters:
browser - The constituency browser.
councilName - The parent council.
Method Detail

refreshNode

public void refreshNode(ConstituencyNode node,
                        char childType)
Refresh a node by deleting all exsting children and refetching the constituency list from the database.

Parameters:
node - The node to refresh.
childType - The constituency type of the children Result.COUNCIL, CONSTITUENCY or LOCAL


Copyright © 2008. All Rights Reserved.