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

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

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.ui.views.properties
Class ComboBoxPropertyDescriptor

java.lang.Object
  extended by 

org.eclipse.ui.views.properties.PropertyDescriptor
      extended by 
org.eclipse.ui.views.properties.ComboBoxPropertyDescriptor
All Implemented Interfaces:
IPropertyDescriptor

public class ComboBoxPropertyDescriptor
extends PropertyDescriptor

Descriptor for a property that has a value which should be edited with a combo box cell editor. This class provides a default ILabelProvider that will render the label of the given descriptor as the String found in the labels array at the currently selected index.

The value of the property is a 0-based Integer index into the labels array.

This class may be instantiated; it is not intended to be subclassed.

Example:

 String[] values = {"Top left", "Top right", "Bottom left", "Bottom right"};
 IPropertyDescriptor pd = new ComboBoxPropertyDescriptor("origin", "Origin", values);
 

Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
ComboBoxPropertyDescriptor ( Object id, String displayName, String[] labelsArray)
          Creates an property descriptor with the given id, display name, and list of value labels to display in the combo box cell editor.
 
Method Summary
  CellEditor createPropertyEditor ( Composite parent)
          The ComboBoxPropertyDescriptor implementation of this IPropertyDescriptor method creates and returns a new ComboBoxCellEditor.
  ILabelProvider getLabelProvider ()
          The ComboBoxPropertyDescriptor implementation of this IPropertyDescriptor method returns the value set by the setProvider method or, if no value has been set it returns a ComboBoxLabelProvider created from the valuesArray of this ComboBoxPropertyDescriptor.
 
Methods inherited from class org.eclipse.ui.views.properties. PropertyDescriptor
getAlwaysIncompatible, getCategory, getDescription, getDisplayName, getFilterFlags, getHelpContextIds, getId, getValidator, isCompatibleWith, isLabelProviderSet, setAlwaysIncompatible, setCategory, setDescription, setFilterFlags, setHelpContextIds, setLabelProvider, setValidator
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComboBoxPropertyDescriptor

public ComboBoxPropertyDescriptor(
Object id,
                                  
String displayName,
                                  
String[] labelsArray)
Creates an property descriptor with the given id, display name, and list of value labels to display in the combo box cell editor.

Parameters:
id - the id of the property
displayName - the name to display for the property
labelsArray - the labels to display in the combo box
Method Detail

createPropertyEditor

public 
CellEditor createPropertyEditor(
Composite parent)
The ComboBoxPropertyDescriptor implementation of this IPropertyDescriptor method creates and returns a new ComboBoxCellEditor.

The editor is configured with the current validator if there is one.

Specified by:
createPropertyEditor in interface IPropertyDescriptor
Overrides:
createPropertyEditor in class PropertyDescriptor
Parameters:
parent - the parent widget for the cell editor
Returns:
the cell editor for this property, or null if this property cannot be edited

getLabelProvider

public 
ILabelProvider getLabelProvider()
The ComboBoxPropertyDescriptor implementation of this IPropertyDescriptor method returns the value set by the setProvider method or, if no value has been set it returns a ComboBoxLabelProvider created from the valuesArray of this ComboBoxPropertyDescriptor.

Specified by:
getLabelProvider in interface IPropertyDescriptor
Overrides:
getLabelProvider in class PropertyDescriptor
Returns:
the label provider used to display this property
See Also:
PropertyDescriptor.setLabelProvider(ILabelProvider)

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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