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

  




 

 


Eclipse PDE
Release 3.5

org.eclipse.pde.ui.templates
Class AbstractChoiceOption


java.lang.Object
  extended by 

org.eclipse.pde.ui.templates.TemplateField
      extended by 

org.eclipse.pde.ui.templates.TemplateOption
          extended by 
org.eclipse.pde.ui.templates.AbstractChoiceOption
Direct Known Subclasses:
ComboChoiceOption, RadioChoiceOption

public abstract class AbstractChoiceOption
extends TemplateOption

Abstract implementation of the TemplateOption that allows users to choose a value from the fixed set of options.

Since:
2.0

Field Summary
protected   String[][] fChoices
           
 
Constructor Summary
AbstractChoiceOption ( BaseOptionTemplateSection section, String name, String label, String[][] choices)
          Constructor for AbstractChoiceOption.
 
Method Summary
protected   Composite createComposite ( Composite parent, int span)
           
protected   GridData fill ( Control control, int span)
           
  String getChoice ()
          Returns the string value of the current choice.
protected  boolean isBlocked ()
           
protected  void selectChoice ( String choice)
           
protected abstract  void selectOptionChoice ( String choice)
           
 void setEnabled (boolean enabled)
          Implements the superclass method by updating the enable state of the option's widget.
protected abstract  void setOptionEnabled (boolean enabled)
           
protected abstract  void setOptionValue ( Object value)
           
 void setValue ( Object value)
          Implements the superclass method by passing the new value to the option's widget.
protected  void setValue ( Object value, boolean updateControl)
          Implements the superclass method by passing the new value to the option's widget; updates to the combo can be supressed.
 
Methods inherited from class org.eclipse.pde.ui.templates. TemplateOption
getMessageLabel, getName, getValue, isEmpty, isEnabled, isRequired, setName, setRequired
 
Methods inherited from class org.eclipse.pde.ui.templates. TemplateField
createControl, createLabel, getLabel, getSection, setLabel
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fChoices

protected 
String[][] fChoices
Constructor Detail

AbstractChoiceOption

public AbstractChoiceOption(
BaseOptionTemplateSection section,
                            
String name,
                            
String label,
                            
String[][] choices)
Constructor for AbstractChoiceOption.

Parameters:
section - the parent section.
name - the unique name
label - the presentable label
choices - the list of choices from which the value can be chosen. Each array entry should be an array of size 2, where position 0 will be interpeted as the choice unique name, and position 1 as the choice presentable label.
Method Detail

getChoice

public 
String getChoice()
Returns the string value of the current choice.

Returns:
the current choice or null if not initialized.

setValue

public void setValue(
Object value)
Implements the superclass method by passing the new value to the option's widget.

Overrides:
setValue in class TemplateOption
Parameters:
value - the new value.

setValue

protected void setValue(
Object value,
                        boolean updateControl)
Implements the superclass method by passing the new value to the option's widget; updates to the combo can be supressed.

Parameters:
value - the new value.
updateControl - true to have the Combo's displayed value updated too, false to indicate that this isn't necessary.
Since:
3.4

setOptionValue

protected abstract void setOptionValue(
Object value)

setEnabled

public void setEnabled(boolean enabled)
Implements the superclass method by updating the enable state of the option's widget.

Overrides:
setEnabled in class TemplateOption
Parameters:
enabled - the new enabled state

setOptionEnabled

protected abstract void setOptionEnabled(boolean enabled)

fill

protected 
GridData fill(
Control control,
                        int span)

createComposite

protected 
Composite createComposite(
Composite parent,
                                    int span)

selectChoice

protected void selectChoice(
String choice)

selectOptionChoice

protected abstract void selectOptionChoice(
String choice)

isBlocked

protected boolean isBlocked()

Eclipse PDE
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

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