public abstract class VariableProjection extends AbstractProjection implements NamedVariables
defaultProjections
X, Y, Z
U, V, W
Constructor and Description |
---|
VariableProjection(String name)
Creates a named projection.
|
Modifier and Type | Method and Description |
---|---|
protected BooleanVariable |
addVariable(String name,
boolean def,
String description)
Adds a named variable with default value.
|
void |
addVariable(String name,
double add) |
protected DoubleVariable |
addVariable(String name,
double min,
double max,
double def,
String unit,
String description)
Adds a named variable with minimum, maximum and default value.
|
void |
addVariable(String name,
int add) |
protected IntegerVariable |
addVariable(String name,
int min,
int max,
int def,
String unit,
String description)
Adds a named variable with minimum, maximum and default value.
|
boolean |
exists(String name)
Return true if variable with name exists.
|
boolean |
getBooleanVariable(String name) |
String |
getDescription(String name)
Return the description
|
double |
getDoubleVariable(String name) |
int |
getIntegerVariable(String name) |
String |
getName()
Returns the name of the projection.
|
String |
getUnit(String name)
Return the unit, or null;
|
Set |
getVariableNames()
Return set of variable names
|
Collection |
getVariables()
Returns a list of all variables
|
void |
multiplyVariable(String name,
double factor) |
void |
multiplyVariable(String name,
int factor) |
void |
restore(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
save(org.freehep.xml.io.XMLIOManager xmlioManager,
org.jdom.Element nodeEl) |
void |
setVariable(String name,
boolean value)
Sets the value of a named variable.
|
void |
setVariable(String name,
double value)
Sets the value of a named variable.
|
void |
setVariable(String name,
int value)
Sets the value of a named variable.
|
String |
toString()
Returns name of projection
|
copy, deltaTransform, getFeature, getFormula, getID, getViewPort, setViewPort, supports, transform, transform, transform, transform
public VariableProjection(String name)
public String getName()
Projection
getName
in interface Projection
getName
in class AbstractProjection
protected DoubleVariable addVariable(String name, double min, double max, double def, String unit, String description)
protected IntegerVariable addVariable(String name, int min, int max, int def, String unit, String description)
protected BooleanVariable addVariable(String name, boolean def, String description)
public boolean exists(String name)
exists
in interface NamedVariables
public Set getVariableNames()
getVariableNames
in interface NamedVariables
public Collection getVariables()
public double getDoubleVariable(String name)
getDoubleVariable
in interface NamedVariables
public int getIntegerVariable(String name)
getIntegerVariable
in interface NamedVariables
public boolean getBooleanVariable(String name)
getBooleanVariable
in interface NamedVariables
public void setVariable(String name, double value)
setVariable
in interface NamedVariables
public void setVariable(String name, int value)
setVariable
in interface NamedVariables
public void setVariable(String name, boolean value)
setVariable
in interface NamedVariables
public void multiplyVariable(String name, double factor)
multiplyVariable
in interface NamedVariables
public void multiplyVariable(String name, int factor)
multiplyVariable
in interface NamedVariables
public void addVariable(String name, double add)
addVariable
in interface NamedVariables
public void addVariable(String name, int add)
addVariable
in interface NamedVariables
public String toString()
AbstractProjection
toString
in class AbstractProjection
public void save(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
save
in interface org.freehep.xml.io.XMLIO
save
in class AbstractProjection
public void restore(org.freehep.xml.io.XMLIOManager xmlioManager, org.jdom.Element nodeEl)
restore
in interface org.freehep.xml.io.XMLIO
restore
in class AbstractProjection
Copyright © 1996-2014 FreeHEP. All Rights Reserved.