com.speckled.specksim.imp.filter
Class SpeckIDFilter

java.lang.Object
  extended by com.speckled.specksim.state.StateFilter
      extended by com.speckled.specksim.imp.filter.SpeckIDFilter

@ConfigurableType(value="Speck ID filter")
public class SpeckIDFilter
extends StateFilter

Filters the state to only include one speck

Author:
ryanm

Field Summary
static java.lang.String NAME
          The name of this filter
 
Fields inherited from class com.speckled.specksim.state.StateFilter
stateSink
 
Constructor Summary
SpeckIDFilter()
           
 
Method Summary
 int getSelectedID()
          Gets the currently selected IDs
 boolean included(int index)
          Checks whether or not the entry in the state object with the given index should be included.
 void setSelectedID(int id)
          Sets the selected IDs
 
Methods inherited from class com.speckled.specksim.state.StateFilter
getName, isEnabled, refreshStateListeners, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
The name of this filter

See Also:
Constant Field Values
Constructor Detail

SpeckIDFilter

public SpeckIDFilter()
Method Detail

getSelectedID

@ConfigurableVariable(value="Speck ID")
@Description(value="The id of the speck to pass through the filter")
@NumberRange(value=-1.0f)
public int getSelectedID()
Gets the currently selected IDs

Returns:
The selected IDs, or null if no filter

setSelectedID

@ConfigurableVariable(value="Speck ID")
public void setSelectedID(int id)
Sets the selected IDs

Parameters:
id - The ID to filter on, or -1 to include all specks

included

public boolean included(int index)
Description copied from class: StateFilter
Checks whether or not the entry in the state object with the given index should be included.

Specified by:
included in class StateFilter
Parameters:
index - The index of the element
Returns:
True if the element should be included, false otherwise