public class ComplexListDataEvent extends ListDataEvent
VeryComplexListDataEvent
(which can also report
about relocation of items) should be merged into this class; it's currently
slightly crufty.Modifier and Type | Field and Description |
---|---|
static int |
ITEMS_ADDED
ID for events in which non-contiguous elements have been added
|
static int |
ITEMS_REMOVED
ID for events in which non-contiguous elements have been removed
|
CONTENTS_CHANGED, INTERVAL_ADDED, INTERVAL_REMOVED
source
Constructor and Description |
---|
ComplexListDataEvent(Object source,
int id,
int[] indices,
boolean textChanged)
Creates a new instance of ComplexListDataEvent.
|
ComplexListDataEvent(Object source,
int id,
int start,
int end)
Passthrough constructor for ListDataEvent.
|
ComplexListDataEvent(Object source,
int id,
int start,
int end,
boolean textChanged)
Passthrough constructor for ListDataEvent.
|
ComplexListDataEvent(Object source,
int id,
int start,
int end,
boolean textChanged,
boolean compChange) |
Modifier and Type | Method and Description |
---|---|
TabData[] |
getAffectedItems() |
int[] |
getIndices()
Get the indices which have changed for this event.
|
boolean |
isTextChanged()
Does the change event represent a change that can affect display metrics
|
boolean |
isUserObjectChanged()
Does the change event represent a change in components.
|
void |
setAffectedItems(TabData[] td) |
String |
toString() |
getIndex0, getIndex1, getType
getSource
public static final int ITEMS_ADDED
public static final int ITEMS_REMOVED
public ComplexListDataEvent(Object source, int id, int[] indices, boolean textChanged)
source
- The event sourceid
- The type of changeindices
- An array of possibly non-contiguous indices of data
which has changedtextChanged
- True if the change is one that can affect display
(icon width or text changes)public ComplexListDataEvent(Object source, int id, int start, int end)
getIndices()
will return null for this event.source
- The source of the eventid
- The type of changestart
- The start index for the changeend
- The end index for the changepublic ComplexListDataEvent(Object source, int id, int start, int end, boolean textChanged, boolean compChange)
public ComplexListDataEvent(Object source, int id, int start, int end, boolean textChanged)
getIndices()
will return null for this event.source
- The source of the eventid
- The type of changestart
- The start index of a contiguous changeend
- The end index of a contiguous changetextChanged
- True if the change is one that can affect display
metrics (text or icon size)public int[] getIndices()
public boolean isTextChanged()
public boolean isUserObjectChanged()
public String toString()
toString
in class ListDataEvent
public void setAffectedItems(TabData[] td)
public TabData[] getAffectedItems()