|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.state.StateFilter
public abstract class StateFilter
Defines an object that will filter elements in the SimulatorState object. For instance, a filter could exclude all speck states except those of a particular flavour, etc. It will be up to the consumers of the SimulatorState object to check which elements are filtered. Note that deactivated filters will always return true to calls of isIncluded()
| Field Summary | |
|---|---|
protected StateSink |
stateSink
Reference to the StateSink object that holds the state
to be operated on |
| Constructor Summary | |
|---|---|
protected |
StateFilter(java.lang.String name)
Constructor for a new StateFilter |
| Method Summary | |
|---|---|
java.lang.String |
getName()
Gets the name of this filter |
abstract boolean |
included(int index)
Checks whether or not the entry in the state object with the given index should be included. |
boolean |
isEnabled()
Determines if the filter is active or not |
protected void |
refreshStateListeners()
Call this when something in the filter has changed to refresh the GUI |
void |
setEnabled(boolean enabled)
Turns the filter on and off |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected StateSink stateSink
StateSink object that holds the state
to be operated on
| Constructor Detail |
|---|
protected StateFilter(java.lang.String name)
StateFilter
name - The name of the StateFilter| Method Detail |
|---|
public abstract boolean included(int index)
index - The index of the element
public final void setEnabled(boolean enabled)
enabled - true to trun the filter on,
false otherwiseprotected final void refreshStateListeners()
public final boolean isEnabled()
true if the filter is active,
false if notpublic final java.lang.String getName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||