Class GeometryTreeModel
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.GeometryTreeModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeometryTreeModel.AreaComparator
static class
GeometryTreeModel.LengthComparator
static class
GeometryTreeModel.NumPointsComparator
-
Field Summary
Fields Modifier and Type Field Description static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>
SORT_AREA_ASC
static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>
SORT_AREA_DESC
static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>
SORT_LEN_ASC
static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>
SORT_LEN_DESC
static Comparator<org.locationtech.jtstest.testbuilder.GeometricObjectNode>
SORT_NUMPTS_ASC
static 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 void
addTreeModelListener(TreeModelListener l)
Adds a listener for the TreeModelEvent posted after the tree changes.Object
getChild(Object parent, int index)
Returns the child of parent at index index in the parent's child array.int
getChildCount(Object parent)
Returns the number of children of parent.int
getIndexOfChild(Object parent, Object child)
Returns the index of child in parent.Object
getRoot()
Returns the root of the tree.boolean
isLeaf(Object node)
Returns true if node is a leaf.void
removeTreeModelListener(TreeModelListener l)
Removes a listener previously added with addTreeModelListener().void
valueForPathChanged(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:
addTreeModelListener
in 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:
getChildCount
in interfaceTreeModel
-
getIndexOfChild
public int getIndexOfChild(Object parent, Object child)
Returns the index of child in parent.- Specified by:
getIndexOfChild
in 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:
removeTreeModelListener
in 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:
valueForPathChanged
in interfaceTreeModel
-
-