PTP
Release 7.0

org.eclipse.ptp.etfw.toolopts
Class ToolOption

java.lang.Object
  extended by org.eclipse.ptp.etfw.toolopts.ToolOption

public class ToolOption
extends Object

An individual element encapsulating a single option for display and user-manipulation/selection in an option pane


Field Summary
 Text argbox
          Holds/displays text arguments if any
static int BOOL
           
 Button browser
          Launches file/directory browser for argbox
static int COMBO
           
 Combo combopt
           
 String confArgString
          Name of the configuration value associated with the argument of this option, if any
 String confDefString
          Name of the configuration value associated with the default argument of this option, if any
 String confStateString
          Name of the configuration value associated with the toggle button state for this option
 int defNum
          The default numerical value for numerical arguments, if any
 boolean defState
          Sets the default state of the check button
 String defText
          The default value for the argument, if any
static int DIR
           
 boolean fieldrequired
           
static int FILE
           
 String fileLike
           
 boolean isArgument
          If true this option is for an argument, if false it is for an environment variable
 String[] items
          List of items availabel in the combo widget
 int maxNum
          The maximum numerical value for numerical arguments, if any
 int minNum
          The minimum numerical value for numerical arguments, if any
static int NUMBER
           
 Spinner numopt
           
 String optID
           
 StringBuffer optionLine
          The whole option as sent to the system, up to the argument component
 String optLabel
          Text for the option button
 String optName
          The name, or prefix of the option
 Label reqLabel
          The label used if this option is required
 boolean required
          If true this option is always used and has just a title rather than a checkbox
 String setOff
           
 String setOn
           
static int SUBOPT
           
static int TEXT
           
static int TOGGLE
           
 String toolTip
          Context sensitive help info
 int type
          Specifies the type of option(bool,text,dir,file or combo)
 Button unitCheck
          The check button to activate/deactivate this option if it is optional
 String valueToolTip
          Context sensitive help info for entry widget
 boolean visible
          If false this option can not be seen or manipulated in the UI.
 
Constructor Summary
ToolOption()
          Creates a new ToolOption
 
Method Summary
 String getArg()
           
 String getID()
           
 String getName()
           
 boolean getSelected()
           
 void setArg(int arg)
          Sets the arg widgt's value with a numerical input, if valid
 void setArg(String arg)
          Set's the arg widget's value with a string input, if valid
 void setEnabled(boolean set)
          Sets the tool option's widget to the enabled condition of the boolean input
 void setIsArgument(boolean isarg)
          Sets if this is an argument or an env variable.
 boolean setSelected(boolean set)
          Sets this option's selected status.
 void setWidgetsEnabled(boolean bool)
          Enable or disable (true or false) whichever widget this option uses to take its argument value
protected  boolean usesTextBox()
          Determines if this option includes a text box
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOL

public static final int BOOL
See Also:
Constant Field Values

TEXT

public static final int TEXT
See Also:
Constant Field Values

DIR

public static final int DIR
See Also:
Constant Field Values

FILE

public static final int FILE
See Also:
Constant Field Values

COMBO

public static final int COMBO
See Also:
Constant Field Values

NUMBER

public static final int NUMBER
See Also:
Constant Field Values

SUBOPT

public static final int SUBOPT
See Also:
Constant Field Values

TOGGLE

public static final int TOGGLE
See Also:
Constant Field Values

items

public String[] items
List of items availabel in the combo widget

Since:
5.0

unitCheck

public Button unitCheck
The check button to activate/deactivate this option if it is optional

Since:
5.0

reqLabel

public Label reqLabel
The label used if this option is required

Since:
5.0

argbox

public Text argbox
Holds/displays text arguments if any

Since:
5.0

browser

public Button browser
Launches file/directory browser for argbox

Since:
5.0

defState

public boolean defState
Sets the default state of the check button

Since:
5.0

type

public int type
Specifies the type of option(bool,text,dir,file or combo)

Since:
5.0

optName

public String optName
The name, or prefix of the option

Since:
5.0

optID

public String optID
Since:
5.0

defText

public String defText
The default value for the argument, if any

Since:
5.0

defNum

public int defNum
The default numerical value for numerical arguments, if any

Since:
5.0

minNum

public int minNum
The minimum numerical value for numerical arguments, if any

Since:
5.0

maxNum

public int maxNum
The maximum numerical value for numerical arguments, if any

Since:
5.0

optLabel

public String optLabel
Text for the option button

Since:
5.0

toolTip

public String toolTip
Context sensitive help info

Since:
5.0

valueToolTip

public String valueToolTip
Context sensitive help info for entry widget

Since:
5.0

required

public boolean required
If true this option is always used and has just a title rather than a checkbox


visible

public boolean visible
If false this option can not be seen or manipulated in the UI.


combopt

public Combo combopt
Since:
5.0

numopt

public Spinner numopt
Since:
5.0

isArgument

public boolean isArgument
If true this option is for an argument, if false it is for an environment variable

Since:
5.0

setOn

public String setOn
Since:
5.0

setOff

public String setOff
Since:
5.0

fieldrequired

public boolean fieldrequired
Since:
5.0

optionLine

public StringBuffer optionLine
The whole option as sent to the system, up to the argument component

Since:
5.0

confStateString

public String confStateString
Name of the configuration value associated with the toggle button state for this option

Since:
5.0

confArgString

public String confArgString
Name of the configuration value associated with the argument of this option, if any

Since:
5.0

confDefString

public String confDefString
Name of the configuration value associated with the default argument of this option, if any

Since:
5.0

fileLike

public String fileLike
Constructor Detail

ToolOption

public ToolOption()
Creates a new ToolOption

Since:
5.0
Method Detail

getArg

public String getArg()
Returns:
the value for the argument set in this widget
Since:
4.0

getID

public String getID()
Returns:
the id for this option

getName

public String getName()
Returns:
the name of this widget

getSelected

public boolean getSelected()
Returns:
true if this widget has an associated checkbox, otherwise false

setArg

public void setArg(int arg)
Sets the arg widgt's value with a numerical input, if valid

Since:
4.0

setArg

public void setArg(String arg)
Set's the arg widget's value with a string input, if valid

Parameters:
arg -

setEnabled

public void setEnabled(boolean set)
Sets the tool option's widget to the enabled condition of the boolean input

Parameters:
set -

setIsArgument

public void setIsArgument(boolean isarg)
Sets if this is an argument or an env variable.

Parameters:
isarg -
Since:
5.0

setSelected

public boolean setSelected(boolean set)
Sets this option's selected status. Returns true upon success or false if there is no widget to set.

Parameters:
set -
Returns:

setWidgetsEnabled

public void setWidgetsEnabled(boolean bool)
Enable or disable (true or false) whichever widget this option uses to take its argument value

Parameters:
bool -
Since:
4.0

usesTextBox

protected boolean usesTextBox()
Determines if this option includes a text box

Returns:
returns if this option includes a text field

PTP
Release 7.0

Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.