Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

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

java.lang.Object
  extended by 
org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ColorPalettePopup

public class ColorPalettePopup
extends java.lang.Object


Field Summary
static  Point ICON_SIZE
          default color icon width
 
Constructor Summary
ColorPalettePopup ( Shell parent, int rowHeight)
          Creates a PopupList above the specified shell.
ColorPalettePopup ( Shell parent, java.lang.String preferenceId, int rowHeight)
          Deprecated. Use the other constructor. This one does not retrieve the default value from the correct preference store.
 
Method Summary
 int getPreviousColor ()
           
  RGB getSelectedColor ()
          Gets the color the user selected.
  RGB open ( Point location)
          Launches the Popup List, waits for an item to be selected and then closes PopupList.
 void setPreviousColor (int previousColor)
           
 boolean useDefaultColor ()
          Returns true if the user selected to use the default color
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ICON_SIZE

public static final 
Point ICON_SIZE
default color icon width

Constructor Detail

ColorPalettePopup

public ColorPalettePopup(
Shell parent,
                         java.lang.String preferenceId,
                         int rowHeight)
Deprecated. Use the other constructor. This one does not retrieve the default value from the correct preference store.

Creates a color palette popup above the specified shell.

Parameters:
parent - a Shell control which will be the parent of the new instance (cannot be null)

ColorPalettePopup

public ColorPalettePopup(
Shell parent,
                         int rowHeight)
Creates a PopupList above the specified shell.

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

open

public 
RGB open(
Point location)
Launches the Popup List, waits for an item to be selected and then closes PopupList.

Parameters:
rect - the initial size and location of the PopupList; the dialog will be positioned so that it does not run off the screen and the largest number of items are visible
Returns:
the text of the selected item or null if no item is selected

getSelectedColor

public 
RGB getSelectedColor()
Gets the color the user selected. Could be null as the user may have cancelled the gesture or they may have selected the default color button. See useDefaultColor().

Returns:
the selected color or null

useDefaultColor

public boolean useDefaultColor()
Returns true if the user selected to use the default color

Returns:
true if the default color is to be used; false otherwise

getPreviousColor

public int getPreviousColor()

setPreviousColor

public void setPreviousColor(int previousColor)

Runtime

Guidelines for using Eclipse APIs.

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


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire