com.webcodepro.applecommander.ui.swt.util
Class DropDownSelectionListener

java.lang.Object
  extended by org.eclipse.swt.events.SelectionAdapter
      extended by com.webcodepro.applecommander.ui.swt.util.DropDownSelectionListener
All Implemented Interfaces:
java.util.EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class DropDownSelectionListener
extends org.eclipse.swt.events.SelectionAdapter

Listens to widgetSelected() events on SWT.DROP_DOWN type ToolItems and opens/closes a menu when appropriate. Code taken and modified from SWT examples to be more generic.

Date created: Nov 2, 2002 8:25:11 PM

Author:
Rob Greene

Constructor Summary
DropDownSelectionListener(org.eclipse.swt.widgets.Menu menu)
          Construct the DropDownSelectionListener with the specific menu to be used.
 
Method Summary
protected  void setMenuVisible(boolean visible)
          Set menu visibility and track state.
 void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
          Handle selection events.
 
Methods inherited from class org.eclipse.swt.events.SelectionAdapter
widgetDefaultSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropDownSelectionListener

public DropDownSelectionListener(org.eclipse.swt.widgets.Menu menu)
Construct the DropDownSelectionListener with the specific menu to be used.

Method Detail

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent event)
Handle selection events.

Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener
Overrides:
widgetSelected in class org.eclipse.swt.events.SelectionAdapter

setMenuVisible

protected void setMenuVisible(boolean visible)
Set menu visibility and track state.