at.tuwien.ifs.commons.gui.jsap
Class SwitchControl

java.lang.Object
  extended by at.tuwien.ifs.commons.gui.jsap.ParameterControl
      extended by at.tuwien.ifs.commons.gui.jsap.SwitchControl

public class SwitchControl
extends ParameterControl

Version:
$Id: SwitchControl.java 3867 2010-10-21 15:50:10Z mayer $
Author:
Jakob Frank

Field Summary
private  javax.swing.JCheckBox control
           
private  javax.swing.JLabel label
           
private  com.martiansoftware.jsap.Switch sw
           
 
Fields inherited from class at.tuwien.ifs.commons.gui.jsap.ParameterControl
TOOL_TIP_WIDTH
 
Constructor Summary
SwitchControl(com.martiansoftware.jsap.Switch param)
           
SwitchControl(com.martiansoftware.jsap.Switch param, com.martiansoftware.jsap.JSAPResult result)
           
 
Method Summary
 java.lang.String[] getCommandLine()
           
 javax.swing.JComponent getEditor()
           
 javax.swing.JLabel getLabel()
           
 boolean isRequired()
           
(package private)  boolean isValid()
           
 
Methods inherited from class at.tuwien.ifs.commons.gui.jsap.ParameterControl
createFlagString, createParameterControl, formatToolTip, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sw

private final com.martiansoftware.jsap.Switch sw

control

private final javax.swing.JCheckBox control

label

private javax.swing.JLabel label
Constructor Detail

SwitchControl

public SwitchControl(com.martiansoftware.jsap.Switch param)
Parameters:
param - The Switch this Editor is for.

SwitchControl

public SwitchControl(com.martiansoftware.jsap.Switch param,
                     com.martiansoftware.jsap.JSAPResult result)
Parameters:
param - The Switch this Editor is for.
result - initial value;
Method Detail

getEditor

public javax.swing.JComponent getEditor()
Overrides:
getEditor in class ParameterControl
Returns:
The Control of this parameter

getCommandLine

public java.lang.String[] getCommandLine()
Specified by:
getCommandLine in class ParameterControl
Returns:
The commandline part of this parameter

getLabel

public javax.swing.JLabel getLabel()
Overrides:
getLabel in class ParameterControl

isValid

boolean isValid()
Specified by:
isValid in class ParameterControl

isRequired

public boolean isRequired()
Overrides:
isRequired in class ParameterControl