public class DefaultFilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements FilterControl<G,A,R>
MAX_HIGHLIGHT
Constructor and Description |
---|
DefaultFilterControl(NamedFilter filterList)
Create a new FilterControl.
|
Modifier and Type | Method and Description |
---|---|
void |
addConfigListener(FilterConfigListener listener)
Adds a
FilterConfigListener to be notified about changes. |
void |
addFilter(java.lang.String name,
Filter<?,?> filter) |
boolean |
canShow(G gameObject) |
void |
createMenuEntries(javax.swing.JMenu menu) |
boolean |
isHighlightedSquare(FilterState filterState,
int path) |
void |
newSquare(FilterState filterState) |
void |
objectInSquare(FilterState filterState,
G gameObject) |
void |
removeConfigListener(FilterConfigListener listener)
Removes a
FilterConfigListener to be notified about changes. |
void |
removeFilter(java.lang.String name) |
public DefaultFilterControl(@NotNull NamedFilter filterList)
filterList
- the filter list instance to usepublic void addConfigListener(@NotNull FilterConfigListener listener)
FilterConfigListener
to be notified about changes.addConfigListener
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
listener
- the config listenerpublic void removeConfigListener(@NotNull FilterConfigListener listener)
FilterConfigListener
to be notified about changes.removeConfigListener
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
listener
- the config listenerpublic void createMenuEntries(@NotNull javax.swing.JMenu menu)
createMenuEntries
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void newSquare(@NotNull FilterState filterState)
newSquare
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public boolean isHighlightedSquare(@NotNull FilterState filterState, int path)
isHighlightedSquare
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void objectInSquare(@NotNull FilterState filterState, @NotNull G gameObject)
objectInSquare
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public boolean canShow(@NotNull G gameObject)
canShow
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void addFilter(@NotNull java.lang.String name, @NotNull Filter<?,?> filter)
addFilter
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
public void removeFilter(@NotNull java.lang.String name)
removeFilter
in interface FilterControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>