hep.wired.cut
Class AbstractConditionDefinition

java.lang.Object
  extended by hep.wired.cut.AbstractConditionDefinition
All Implemented Interfaces:
ConditionDefinition
Direct Known Subclasses:
BooleanConditionDefinition, DoubleConditionDefinition, IntegerConditionDefinition, LongConditionDefinition, StringConditionDefinition

public abstract class AbstractConditionDefinition
extends Object
implements ConditionDefinition

Adapter for implementing ConditionDefinition.

Version:
$Id: AbstractConditionDefinition.java 13824 2011-05-04 18:30:02Z onoprien $
Author:
Dmitry Onoprienko

Nested Class Summary
 
Nested classes/interfaces inherited from interface hep.wired.cut.ConditionDefinition
ConditionDefinition.Type
 
Field Summary
protected  HashSet<Condition> _conditions
           
protected  String _description
           
protected  String _name
           
protected  String _unit
           
protected  boolean _valueIsAdjusting
           
 
Constructor Summary
AbstractConditionDefinition(String name)
           
AbstractConditionDefinition(String name, String unit, String description)
           
 
Method Summary
 void addChangeListener(ChangeListener listener)
          Adds change listener.
 Condition createCondition()
          Returns a new Condition object linked to this ConditionDefinition.
protected  void fireStateChanged()
           
protected  void fireStateChanged(ChangeEvent event)
           
 String getDescription()
          Returns a brief description of the condition.
 String getName()
          Returns the name of this definition.
 String getUnit()
          Returns the unit name for conditions based on numerical value.
 boolean getValueIsAdjusting()
          Returns valueIsAdjusting property.
 void remove()
          Called when this definition is being deleted.
 void removeChangeListener(ChangeListener listener)
          Removes change listener.
 void removeCondition(Condition condition)
          Unregisters the specified Condition.
 void setValueIsAdjusting(boolean isValueAdjusting)
          Sets valueIsAdjusting property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hep.wired.cut.ConditionDefinition
addToDomain, createCondition, getDomain, getType, setDomain
 

Field Detail

_name

protected String _name

_unit

protected String _unit

_description

protected String _description

_valueIsAdjusting

protected boolean _valueIsAdjusting

_conditions

protected HashSet<Condition> _conditions
Constructor Detail

AbstractConditionDefinition

public AbstractConditionDefinition(String name)

AbstractConditionDefinition

public AbstractConditionDefinition(String name,
                                   String unit,
                                   String description)
Method Detail

getName

public String getName()
Returns the name of this definition.

Specified by:
getName in interface ConditionDefinition

getUnit

public String getUnit()
Returns the unit name for conditions based on numerical value.

Specified by:
getUnit in interface ConditionDefinition

getDescription

public String getDescription()
Returns a brief description of the condition.

Specified by:
getDescription in interface ConditionDefinition

createCondition

public Condition createCondition()
Returns a new Condition object linked to this ConditionDefinition. The newly created Condition is registered with this ConditionDefinition. Conditions created with this method are not enabled and not inverted.

Specified by:
createCondition in interface ConditionDefinition

removeCondition

public void removeCondition(Condition condition)
Unregisters the specified Condition.

Specified by:
removeCondition in interface ConditionDefinition

remove

public void remove()
Called when this definition is being deleted. Tells Cuts of all registered conditions that they need to delete themselves.

Specified by:
remove in interface ConditionDefinition

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds change listener.

Specified by:
addChangeListener in interface ConditionDefinition

removeChangeListener

public void removeChangeListener(ChangeListener listener)
Removes change listener.

Specified by:
removeChangeListener in interface ConditionDefinition

setValueIsAdjusting

public void setValueIsAdjusting(boolean isValueAdjusting)
Sets valueIsAdjusting property. Change events are not generated while the property is set to false. An event is generated when the property is set to true.

Specified by:
setValueIsAdjusting in interface ConditionDefinition

getValueIsAdjusting

public boolean getValueIsAdjusting()
Returns valueIsAdjusting property. Change events are not generated while the property is set to false.

Specified by:
getValueIsAdjusting in interface ConditionDefinition

fireStateChanged

protected void fireStateChanged()

fireStateChanged

protected void fireStateChanged(ChangeEvent event)


Copyright © 1996-2013 FreeHEP. All Rights Reserved.