Runtime

org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance
Class LineStylesPopup

java.lang.Object
  extended by org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.LineStylesPopup
Direct Known Subclasses:
ArrowTypePopup, LineTypePopup, LineWidthPopup

public abstract class LineStylesPopup
extends java.lang.Object

The menu-like pop-up widget that allows the user to select a value for the line styles.

Since:
2.1

Field Summary
protected  java.util.Map imageMap
          The map of items in the popup.
protected  java.lang.Object selectedItem
           
protected  Shell shell
           
 
Constructor Summary
LineStylesPopup(Shell parent)
          Creates a LineStylesPopup below the specified shell.
 
Method Summary
 java.lang.Object getSelectedItem()
          Gets the item the user selected.
protected abstract  void initializeImageMap()
          Initialize the image map by adding items and images to the imageMap.
 void open(Point location)
          Open the popup, waits for an item to be selected and then closes popup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imageMap

protected java.util.Map imageMap
The map of items in the popup. The key is the return value of the popup and the value in the map is the image.


shell

protected Shell shell

selectedItem

protected java.lang.Object selectedItem
Constructor Detail

LineStylesPopup

public LineStylesPopup(Shell parent)
Creates a LineStylesPopup below the specified shell.

Parameters:
parent - a widget which will be the parent of the new instance (cannot be null)
Method Detail

initializeImageMap

protected abstract void initializeImageMap()
Initialize the image map by adding items and images to the imageMap.


open

public void open(Point location)
Open the popup, waits for an item to be selected and then closes popup.

Parameters:
location - the initial location of the popup; the popup will be positioned so that it does not run off the screen and the largest number of items are visible

getSelectedItem

public java.lang.Object getSelectedItem()
Gets the item the user selected. Could be null as the user may cancel the gesture.

Returns:
the selected item or null.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.