dsto.dfc.swt.controls
Class MenuToolItem

java.lang.Object
  extended by dsto.dfc.swt.controls.MenuToolItem
All Implemented Interfaces:
EventListener, org.eclipse.swt.events.SelectionListener, org.eclipse.swt.internal.SWTEventListener

public class MenuToolItem
extends Object
implements org.eclipse.swt.events.SelectionListener

A pseudo SWT ToolItem that wraps a real dropdown item and a menu.

Version:
$Revision$
Author:
mpp

Constructor Summary
MenuToolItem(org.eclipse.swt.widgets.ToolBar toolbar, org.eclipse.swt.widgets.Menu menu, int index)
           
 
Method Summary
 void dispose()
           
 org.eclipse.swt.widgets.ToolItem getToolItem()
           
 boolean isMenuAlways()
           
 void setMenuAlways(boolean menuOnly)
          Set to true to display the menu on any click, rather than only when the down arrow is selected.
 void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
           
 void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuToolItem

public MenuToolItem(org.eclipse.swt.widgets.ToolBar toolbar,
                    org.eclipse.swt.widgets.Menu menu,
                    int index)
Method Detail

dispose

public void dispose()

setMenuAlways

public void setMenuAlways(boolean menuOnly)
Set to true to display the menu on any click, rather than only when the down arrow is selected.


isMenuAlways

public boolean isMenuAlways()

getToolItem

public org.eclipse.swt.widgets.ToolItem getToolItem()

widgetSelected

public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
Specified by:
widgetSelected in interface org.eclipse.swt.events.SelectionListener

widgetDefaultSelected

public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
Specified by:
widgetDefaultSelected in interface org.eclipse.swt.events.SelectionListener


Copyright © 2008 Commonwealth of Australia