站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ComplexListDataEvent (Tab Control) - NetBeans API Javadoc (Current Development Version)

org.netbeans.swing.tabcontrol 1.8

org.netbeans.swing.tabcontrol.event
Class ComplexListDataEvent

java.lang.Object
  extended by java.util.EventObject
      extended by javax.swing.event.ListDataEvent
          extended by org.netbeans.swing.tabcontrol.event.ComplexListDataEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
VeryComplexListDataEvent

public class ComplexListDataEvent
extends ListDataEvent

An extension to ListDataEvent which can report data about non-contiguous changes to data. Eventually VeryComplexListDataEvent (which can also report about relocation of items) should be merged into this class; it's currently slightly crufty.

See Also:
Serialized Form

Field Summary
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
 
Fields inherited from class javax.swing.event.ListDataEvent
CONTENTS_CHANGED, INTERVAL_ADDED, INTERVAL_REMOVED
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
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)
           
 
Method Summary
 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()
           
 
Methods inherited from class javax.swing.event.ListDataEvent
getIndex0, getIndex1, getType
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ITEMS_ADDED

public static final int ITEMS_ADDED
ID for events in which non-contiguous elements have been added

See Also:
Constant Field Values

ITEMS_REMOVED

public static final int ITEMS_REMOVED
ID for events in which non-contiguous elements have been removed

See Also:
Constant Field Values
Constructor Detail

ComplexListDataEvent

public ComplexListDataEvent(Object source,
                            int id,
                            int[] indices,
                            boolean textChanged)
Creates a new instance of ComplexListDataEvent. The index0 and index1 properties will return -1.

Parameters:
source - The event source
id - The type of change
indices - An array of possibly non-contiguous indices of data which has changed
textChanged - True if the change is one that can affect display (icon width or text changes)

ComplexListDataEvent

public ComplexListDataEvent(Object source,
                            int id,
                            int start,
                            int end)
Passthrough constructor for ListDataEvent. getIndices() will return null for this event.

Parameters:
source - The source of the event
id - The type of change
start - The start index for the change
end - The end index for the change

ComplexListDataEvent

public ComplexListDataEvent(Object source,
                            int id,
                            int start,
                            int end,
                            boolean textChanged,
                            boolean compChange)

ComplexListDataEvent

public ComplexListDataEvent(Object source,
                            int id,
                            int start,
                            int end,
                            boolean textChanged)
Passthrough constructor for ListDataEvent. getIndices() will return null for this event.

Parameters:
source - The source of the event
id - The type of change
start - The start index of a contiguous change
end - The end index of a contiguous change
textChanged - True if the change is one that can affect display metrics (text or icon size)
Method Detail

getIndices

public int[] getIndices()
Get the indices which have changed for this event.

Returns:
The changed indices, or null for contiguous data changes

isTextChanged

public boolean isTextChanged()
Does the change event represent a change that can affect display metrics

Returns:
True if the change affected text length or icon width

isUserObjectChanged

public boolean isUserObjectChanged()
Does the change event represent a change in components. This should be true for cases where a component was replaced, added or removed


toString

public String toString()
Overrides:
toString in class ListDataEvent

setAffectedItems

public void setAffectedItems(TabData[] td)

getAffectedItems

public TabData[] getAffectedItems()

org.netbeans.swing.tabcontrol 1.8

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.