public class Cut extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Cut.Result |
Modifier and Type | Field and Description |
---|---|
protected ChangeEvent |
_defaultEvent |
protected static String |
_defaultName |
protected boolean |
_eventsPending |
protected boolean |
_valueIsAdjusting |
Modifier and Type | Method and Description |
---|---|
void |
add(Condition condition)
Adds condition to this cut.
|
void |
addAll(Collection<? extends Condition> conditions) |
void |
addChangeListener(ChangeListener a) |
void |
addCutSet(CutSet set)
Adds the specified CutSet to the list of known sets.
|
void |
fireStateChanged() |
void |
fireStateChanged(ChangeEvent e) |
Condition |
getCondition(int index)
Returns condition specified by the index.
|
List<Condition> |
getConditions()
Returns the list of conditions in this cut.
|
Set |
getEnabledConditions()
Returns a set of enabled conditions.
|
String |
getName()
Returns the name of the cut.
|
Cut.Result |
pass(Map<String,org.freehep.util.Value> data,
boolean invert)
Tells the client whether this cut is satisfied by the supplied data.
|
Cut.Result |
pass(Map<String,org.freehep.util.Value> data,
Object moreData,
boolean invert)
Tells the client whether this cut is satisfied by the supplied data.
|
void |
remove()
Called when this Cut needs to be deleted.
|
void |
remove(Condition condition)
Removes the specified condition from this cut.
|
void |
removeAll()
Removes all conditions from this cut.
|
void |
removeChangeListener(ChangeListener r) |
void |
removeCutSet(CutSet set)
Removes the specified CutSet from the list of known sets.
|
void |
removeDisabled()
Removes disabled conditions from this cut.
|
void |
reset()
Resets all conditions to their default state.
|
void |
setName(String newName)
Sets the name of this cut.
|
void |
setValueIsAdjusting(boolean valueIsAdjusting)
Sets valueIsAdjusting property.
|
int |
size()
Returns the number of conditions in this cut.
|
void |
synchronize(Collection<ConditionDefinition> definitions)
Removes conditions whose definitions are not in the supplied collection, creates and adds disabled condition
for every definition from the collection that is not already used by this cut.
|
String |
toString() |
protected static final String _defaultName
protected final ChangeEvent _defaultEvent
protected boolean _valueIsAdjusting
protected boolean _eventsPending
public Cut()
public Cut(String name)
public String getName()
public Condition getCondition(int index)
public int size()
public Set getEnabledConditions()
public void setName(String newName)
public void addCutSet(CutSet set)
public void removeCutSet(CutSet set)
public void add(Condition condition)
public void addAll(Collection<? extends Condition> conditions)
public void remove(Condition condition)
public void removeAll()
public void removeDisabled()
public void synchronize(Collection<ConditionDefinition> definitions)
public void reset()
public void remove()
CutSet
s, unregisters its Condition
s from ConditionDefinition
s.public Cut.Result pass(Map<String,org.freehep.util.Value> data, boolean invert)
data
- Map of attribute names to values.invert
- True if this cut should be inverted.public Cut.Result pass(Map<String,org.freehep.util.Value> data, Object moreData, boolean invert)
pass(java.util.Map, boolean)
, ignoring moreData parameter.
Subclasses may override to implement more complex filtering.data
- Map of attribute names to values.moreData
- Additional data to be used in filtering.invert
- True if this cut should be inverted.public void addChangeListener(ChangeListener a)
public void removeChangeListener(ChangeListener r)
public void fireStateChanged(ChangeEvent e)
public void fireStateChanged()
public void setValueIsAdjusting(boolean valueIsAdjusting)
Copyright © 1996-2014 FreeHEP. All Rights Reserved.