Class GeometryTreeModel
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.GeometryTreeModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeometryTreeModel.AreaComparatorstatic classGeometryTreeModel.LengthComparatorstatic classGeometryTreeModel.NumPointsComparator
-
Field Summary
Fields Modifier and Type Field Description static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>SORT_AREA_ASCstatic Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>SORT_AREA_DESCstatic Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>SORT_LEN_ASCstatic Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>SORT_LEN_DESCstatic Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>SORT_NUMPTS_ASCstatic Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>SORT_NUMPTS_DESC
-
Constructor Summary
Constructors Constructor Description GeometryTreeModel(Geometry geom, int source, Comparator comp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTreeModelListener(TreeModelListener l)Adds a listener for the TreeModelEvent posted after the tree changes.ObjectgetChild(Object parent, int index)Returns the child of parent at index index in the parent's child array.intgetChildCount(Object parent)Returns the number of children of parent.intgetIndexOfChild(Object parent, Object child)Returns the index of child in parent.ObjectgetRoot()Returns the root of the tree.booleanisLeaf(Object node)Returns true if node is a leaf.voidremoveTreeModelListener(TreeModelListener l)Removes a listener previously added with addTreeModelListener().voidvalueForPathChanged(TreePath path, Object newValue)Messaged when the user has altered the value for the item identified by path to newValue.
-
-
-
Field Detail
-
SORT_AREA_ASC
public static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode> SORT_AREA_ASC
-
SORT_AREA_DESC
public static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode> SORT_AREA_DESC
-
SORT_LEN_ASC
public static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode> SORT_LEN_ASC
-
SORT_LEN_DESC
public static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode> SORT_LEN_DESC
-
SORT_NUMPTS_ASC
public static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode> SORT_NUMPTS_ASC
-
SORT_NUMPTS_DESC
public static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode> SORT_NUMPTS_DESC
-
-
Constructor Detail
-
GeometryTreeModel
public GeometryTreeModel(Geometry geom, int source, Comparator comp)
-
-
Method Detail
-
addTreeModelListener
public void addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.- Specified by:
addTreeModelListenerin interfaceTreeModel
-
getChild
public Object getChild(Object parent, int index)
Returns the child of parent at index index in the parent's child array.
-
getChildCount
public int getChildCount(Object parent)
Returns the number of children of parent.- Specified by:
getChildCountin interfaceTreeModel
-
getIndexOfChild
public int getIndexOfChild(Object parent, Object child)
Returns the index of child in parent.- Specified by:
getIndexOfChildin interfaceTreeModel
-
getRoot
public Object getRoot()
Returns the root of the tree.
-
isLeaf
public boolean isLeaf(Object node)
Returns true if node is a leaf.
-
removeTreeModelListener
public void removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener().- Specified by:
removeTreeModelListenerin interfaceTreeModel
-
valueForPathChanged
public void valueForPathChanged(TreePath path, Object newValue)
Messaged when the user has altered the value for the item identified by path to newValue. Not used by this model.- Specified by:
valueForPathChangedin interfaceTreeModel
-
-