org.gswing.components.common
Class SelectionHandler

java.lang.Object
  extended by org.gswing.components.common.SelectionHandler
All Implemented Interfaces:
ActionListener, EventListener, PopupMenuListener

public class SelectionHandler
extends Object
implements PopupMenuListener, ActionListener

Generic handler for constituency tree navigation.


Field Summary
static int BACK_HANDLER
           
static int CONSTITUENCY_HANDLER
           
static int TYPE_HANDLER
           
 
Constructor Summary
SelectionHandler(ISelectionSource source, int type, JComboBox combo)
          Constructor.
SelectionHandler(ISelectionSource source, int type, JComboBox combo, JButton backButton)
          Constructor.
 
Method Summary
 void actionPerformed(ActionEvent ev)
           
static String getLastCouncilSelection()
          Get the last region selection.
 void handleBack()
          Handle the back navigation selection.
 void popupMenuCanceled(PopupMenuEvent arg0)
           
 void popupMenuWillBecomeInvisible(PopupMenuEvent ev)
           
 void popupMenuWillBecomeVisible(PopupMenuEvent arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_HANDLER

public static final int TYPE_HANDLER
See Also:
Constant Field Values

CONSTITUENCY_HANDLER

public static final int CONSTITUENCY_HANDLER
See Also:
Constant Field Values

BACK_HANDLER

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

SelectionHandler

public SelectionHandler(ISelectionSource source,
                        int type,
                        JComboBox combo,
                        JButton backButton)
Constructor.

Parameters:
source - The parent object.
type - The type of the action.
combo - The constituency list combo box.
backButton - Go back to previous constituency type button.

SelectionHandler

public SelectionHandler(ISelectionSource source,
                        int type,
                        JComboBox combo)
Constructor.

Parameters:
source - The parent object.
type - The type of the action.
combo - The constituency list combo box.
Method Detail

handleBack

public void handleBack()
Handle the back navigation selection.


getLastCouncilSelection

public static String getLastCouncilSelection()
Get the last region selection.

Returns:
The last selected council name.

actionPerformed

public void actionPerformed(ActionEvent ev)
Specified by:
actionPerformed in interface ActionListener

popupMenuWillBecomeInvisible

public void popupMenuWillBecomeInvisible(PopupMenuEvent ev)
Specified by:
popupMenuWillBecomeInvisible in interface PopupMenuListener

popupMenuCanceled

public void popupMenuCanceled(PopupMenuEvent arg0)
Specified by:
popupMenuCanceled in interface PopupMenuListener

popupMenuWillBecomeVisible

public void popupMenuWillBecomeVisible(PopupMenuEvent arg0)
Specified by:
popupMenuWillBecomeVisible in interface PopupMenuListener


Copyright © 2008. All Rights Reserved.