Interface Knob
-
- All Known Subinterfaces:
ModelKnob
,MultiModelKnob
,StatefulKnob
,Strength
- All Known Implementing Classes:
AbstractKnob
,AbstractModelKnob
,AbstractMultiModelKnob
,BeanPropertyKnob
,DeltaPKnob
,ElementAttribute
,LinearKnob
,SimpleStrength
,TwissInitialConditionKnob
public interface Knob
This interface characterizes a knob to the model. This has nothing to do with knobs in lsa etc! This Knob in principle is just a method to tune multiple values of the model in one go
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(KnobListener listener)
adds a listener which gets notified, if the knob value changesjava.lang.String
getDescription()
java.lang.String
getKey()
java.lang.String
getName()
double
getOffset()
double
getTotalValue()
KnobType
getType()
double
getValue()
void
removeListener(KnobListener listener)
removes a listener if available.void
setOffset(double value)
set the actual offset of the knobvoid
setValue(double value)
set the actual value
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- the name of the knob
-
getValue
double getValue()
- Returns:
- the actual value
-
setValue
void setValue(double value)
set the actual value- Parameters:
value
- the value to set
-
setOffset
void setOffset(double value)
set the actual offset of the knob- Parameters:
value
- the offset to set
-
getOffset
double getOffset()
- Returns:
- the actual offset of the knob
-
getDescription
java.lang.String getDescription()
- Returns:
- a description for this knob
-
getTotalValue
double getTotalValue()
- Returns:
- the total value (value+offset)
-
getType
KnobType getType()
- Returns:
- the type of this knob
-
getKey
java.lang.String getKey()
- Returns:
- a unique key (within all knobs of the same type)
-
addListener
void addListener(KnobListener listener)
adds a listener which gets notified, if the knob value changes- Parameters:
listener
- the listener to add
-
removeListener
void removeListener(KnobListener listener)
removes a listener if available.- Parameters:
listener
- the listener to remove
-
-