public class TreeDataEvent
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
CONTENTS_CHANGED
Identifies changing contents of nodes.
|
static int |
DISABLE_CLIENT_UPDATE
Identified the state that Component's client update to be disabled
|
static int |
ENABLE_CLIENT_UPDATE
Identified the state that Component's client update to be enabled
|
static int |
INTERVAL_ADDED
Identifies the addition of children to a node.
|
static int |
INTERVAL_REMOVED
Identifies the removal of children to a node.
|
static int |
MULTIPLE_CHANGED
Identified the state of
Selectable.isMultiple() is changed. |
static int |
OPEN_CHANGED
Identifies the open status of the tree has changed.
|
static int |
SELECTION_CHANGED
Identifies the selection of the tree has changed.
|
static int |
STRUCTURE_CHANGED
Identifies the structure of the tree has changed.
|
Constructor and Description |
---|
TreeDataEvent(TreeModel model,
int type,
int[] nodePath,
int indexFrom,
int indexTo)
Constructor.
|
TreeDataEvent(TreeModel model,
int type,
int[] nodePath,
int indexFrom,
int indexTo,
int[] affectedPath)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getAffectedPath()
Return the path of removed node
|
int |
getIndexFrom()
Return the lower index of the change range
|
int |
getIndexTo()
Return the upper index of the change range
|
TreeModel |
getModel()
Returns the tree model that fires this event.
|
int[] |
getPath()
Returns the path of the affected node.
|
int |
getType()
Returns the event type.
|
public static final int CONTENTS_CHANGED
public static final int INTERVAL_ADDED
public static final int INTERVAL_REMOVED
public static final int STRUCTURE_CHANGED
public static final int SELECTION_CHANGED
public static final int OPEN_CHANGED
public static final int MULTIPLE_CHANGED
Selectable.isMultiple()
is changed.public static final int DISABLE_CLIENT_UPDATE
public static final int ENABLE_CLIENT_UPDATE
public TreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo)
type
- one of CONTENTS_CHANGED
,
INTERVAL_ADDED
, INTERVAL_REMOVED
, SELECTION_CHANGED
,
OPEN_CHANGED
, STRUCTURE_CHANGED
or MULTIPLE_CHANGED
.nodePath
- the path of the affected node.
If CONTENTS_CHANGED
, INTERVAL_ADDED
or INTERVAL_REMOVED
,
it is the parent node. If SELECTION_CHANGED
or OPEN_CHANGED
,
it is the node being selected or opened.
If STRUCTURE_CHANGED
or MULTIPLE_CHANGED
, it is null.indexFrom
- the lower index of the change rangeindexTo
- the upper index of the change rangepublic TreeDataEvent(TreeModel model, int type, int[] nodePath, int indexFrom, int indexTo, int[] affectedPath)
type
- one of CONTENTS_CHANGED
,
INTERVAL_ADDED
, INTERVAL_REMOVED
, SELECTION_CHANGED
,
OPEN_CHANGED
, STRUCTURE_CHANGED
or MULTIPLE_CHANGED
.nodePath
- the path of the affected node.
If CONTENTS_CHANGED
, INTERVAL_ADDED
or INTERVAL_REMOVED
,
it is the parent node. If SELECTION_CHANGED
or OPEN_CHANGED
,
it is the node being selected or opened.
If STRUCTURE_CHANGED
or MULTIPLE_CHANGED
, it is null.indexFrom
- the lower index of the change rangeindexTo
- the upper index of the change rangeaffectedPath
- the path to be removed or addedpublic TreeModel getModel()
public int getType()
public int[] getPath()
CONTENTS_CHANGED
, INTERVAL_ADDED
or INTERVAL_REMOVED
,
it is the parent node. If SELECTION_CHANGED
or OPEN_CHANGED
,
it is the node being selected or opened.
If STRUCTURE_CHANGED
or MULTIPLE_CHANGED
, it is null.public int getIndexFrom()
public int getIndexTo()
public int[] getAffectedPath()
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.