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 StringOption


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.StringOption

public class StringOption
extends TemplateOption

This template option can be used to collect string option from the user in the template section wizard page.

Since:
2.0

Constructor Summary
StringOption ( BaseOptionTemplateSection section, String name, String label)
          The constructor.
 
Method Summary
 void createControl ( Composite parent, int span)
          Creates the string option control.
  String getText ()
          A utility version of the getValue() method that converts the current value into the String object.
 boolean isEmpty ()
          A string option is empty if its text field contains no text.
 void setEnabled (boolean enabled)
          Implements the superclass method by passing the enabled state to the option's widget.
 void setReadOnly (boolean readOnly)
          Update the text widget style to be read only Added to default style (does not override)
 void setText ( String newText)
          A utility version of the setValue method that accepts String objects.
 void setValue ( Object value)
          Implements the superclass method by passing the string value of the new value to the widget
 
Methods inherited from class org.eclipse.pde.ui.templates. TemplateOption
getMessageLabel, getName, getValue, isEnabled, isRequired, setName, setRequired
 
Methods inherited from class org.eclipse.pde.ui.templates. TemplateField
createLabel, getLabel, getSection, setLabel
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringOption

public StringOption(
BaseOptionTemplateSection section,
                    
String name,
                    
String label)
The constructor.

Parameters:
section - the parent section
name - the unique option name
label - the translatable label of the option
Method Detail

setReadOnly

public void setReadOnly(boolean readOnly)
Update the text widget style to be read only Added to default style (does not override)

Parameters:
readOnly -

getText

public 
String getText()
A utility version of the getValue() method that converts the current value into the String object.

Returns:
the string version of the current value.

setText

public void setText(
String newText)
A utility version of the setValue method that accepts String objects.

Parameters:
newText - the new text value of the option
See Also:
setValue(Object)

setValue

public void setValue(
Object value)
Implements the superclass method by passing the string value of the new value to the widget

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

createControl

public void createControl(
Composite parent,
                          int span)
Creates the string option control.

Specified by:
createControl in class TemplateField
Parameters:
parent - parent composite of the string option widget
span - the number of columns that the widget should span

isEmpty

public boolean isEmpty()
A string option is empty if its text field contains no text.

Overrides:
isEmpty in class TemplateOption
Returns:
true if there is no text in the text field.

setEnabled

public void setEnabled(boolean enabled)
Implements the superclass method by passing the enabled state to the option's widget.

Overrides:
setEnabled in class TemplateOption
Parameters:
enabled -

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