|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.gui.tree.TVFilter
Field Summary | |
protected boolean |
showAnnotated
|
protected boolean |
showOrdered
|
protected boolean[] |
showPlayer
|
protected boolean |
showUpdatedForward
|
protected int |
updatedTurn
|
Constructor Summary | |
TVFilter(int nplayers)
Create a TVFilter. |
Method Summary | |
void |
filter(javax.swing.tree.DefaultMutableTreeNode root)
Filter the tree, starting at the node given and working through all of the tree's children. |
protected void |
filterIterator(TVData tvd)
Logic that, based upon filter paramters, decide if a node should be hidden or not. |
void |
filterSingle(javax.swing.tree.DefaultMutableTreeNode item)
Applies a filter to a single item; useful if an item is changed or added; thus we don't have to refilter the entire tree. |
int |
getUpdatedTurn()
Returns the turn number we use for filtering. |
boolean |
isOnlyShowAnnotated()
Returns true if we are only to show nodes with annotations. |
boolean |
isOnlyShowOrderedUnits()
Returns true if only nodes with orders should be displayed. |
boolean |
isShowForward()
returns true if we are showing turns after the UpdatedTurn int, or false if we are showing turns before. |
boolean |
isShowPlayer(int id)
Returns if we are showing a particular player. |
void |
setOnlyShowAnnotated(boolean value)
Set if we should display nodes with or without annotations. |
void |
setOnlyShowOrderedUnits(boolean value)
Sets if nodes with orders should be displayed. |
void |
setShowPlayer(int id,
boolean value)
Set which players are to be shown. |
void |
setShowUpdated(int turn,
boolean forward)
Show units updated before (forward = false) or after (forward = true) the specified turn number. |
static void |
unFilter(javax.swing.tree.DefaultMutableTreeNode root)
UnFilter the tree, starting at the node given and working through all of the tree's children. |
static void |
unfilterSingle(javax.swing.tree.DefaultMutableTreeNode item)
UnFilter analog of filterSingle() |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean[] showPlayer
protected boolean showAnnotated
protected boolean showOrdered
protected boolean showUpdatedForward
protected int updatedTurn
Constructor Detail |
public TVFilter(int nplayers)
nplayers
- The number of players in the game.Method Detail |
public void setShowPlayer(int id, boolean value)
public boolean isShowPlayer(int id)
public void setOnlyShowOrderedUnits(boolean value)
public boolean isOnlyShowOrderedUnits()
public void setOnlyShowAnnotated(boolean value)
public boolean isOnlyShowAnnotated()
public void setShowUpdated(int turn, boolean forward)
public boolean isShowForward()
public int getUpdatedTurn()
public static void unFilter(javax.swing.tree.DefaultMutableTreeNode root)
If root
is the actual root of the JTree, then the
entire tree is filtered.
public void filter(javax.swing.tree.DefaultMutableTreeNode root)
If root
is the actual root of the JTree, then the
entire tree is filtered.
public void filterSingle(javax.swing.tree.DefaultMutableTreeNode item)
This method should be called whenever an item is added or changed by TVModel.
public static void unfilterSingle(javax.swing.tree.DefaultMutableTreeNode item)
protected void filterIterator(TVData tvd)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |