Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.editor.insight
Class TooltipDataItemListModel

java.lang.Object
  extended by oracle.javatools.editor.insight.TooltipDataItemListModel

All Implemented Interfaces:
javax.swing.ListModel

public class TooltipDataItemListModel
extends java.lang.Object
implements javax.swing.ListModel

The TooltipDataItemListModel is a basic implementation of an immutable ListModel which just takes an array of TooltipDataItem objects (or its subclasses) and can be used as the ListModel for a JList. This class makes a copy of the array (but not the objects) passed to it in case the array is modified.


Constructor Summary
TooltipDataItemListModel(TooltipDataItem[] data)
          Constructs a new TooltipDataItemListModel using the data elements specified.

 

Method Summary
 void addListDataListener(javax.swing.event.ListDataListener listener)
          Add a listener to the list that's notified each time a change to the data model occurs.
 java.lang.Object getElementAt(int index)
          Returns the value at the specified index.
 int getSize()
          Returns the length of the list.
 void removeListDataListener(javax.swing.event.ListDataListener listener)
          Remove a listener from the list that's notified each time a change to the data model occurs.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

TooltipDataItemListModel

public TooltipDataItemListModel(TooltipDataItem[] data)
Constructs a new TooltipDataItemListModel using the data elements specified. A copy of the array will be made in case the original array is changed. This will by default, sort the data passed in through the list.
Parameters:
data - the array of TooltipDataItem's to make up the model

Method Detail

getSize

public int getSize()
Returns the length of the list.
Specified by:
getSize in interface javax.swing.ListModel
Returns:
the length of the list

getElementAt

public java.lang.Object getElementAt(int index)
Returns the value at the specified index.
Specified by:
getElementAt in interface javax.swing.ListModel
Parameters:
index - the index of the value to get
Returns:
the value at the specified index

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener listener)
Add a listener to the list that's notified each time a change to the data model occurs.
Specified by:
addListDataListener in interface javax.swing.ListModel
Parameters:
listener - the ListDataListener

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener listener)
Remove a listener from the list that's notified each time a change to the data model occurs.
Specified by:
removeListDataListener in interface javax.swing.ListModel
Parameters:
listener - the ListDataListener

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.