Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.javatools.ui.combo
Class TreeFixListComboModel

java.lang.Object
  extended by oracle.javatools.ui.combo.TreeFixListComboModel
All Implemented Interfaces:
javax.swing.ComboBoxModel, javax.swing.ListModel

public class TreeFixListComboModel
extends java.lang.Object
implements javax.swing.ComboBoxModel

Model for JTreeComboBox Constructed with a regular TreeModel, this class delegates most calls to the TreeModel, but adds the concept of selection to get the ComboBoxModel to work


Constructor Summary
TreeFixListComboModel(javax.swing.JTree tree, javax.swing.JList fixList, boolean fixListBelow)
           
 
Method Summary
 void addListDataListener(javax.swing.event.ListDataListener l)
          Currently does nothing
 java.lang.Object getElementAt(int index)
          Returns the item at the given index.
 boolean getFixListBelow()
          get the position of the fix list in the popup.
 java.lang.Object getSelectedItem()
           
 int getSize()
           
 javax.swing.tree.TreePath getTreePath(java.lang.Object obj)
           
 void removeListDataListener(javax.swing.event.ListDataListener l)
          Currently does nothing
 void setFixListBelow(boolean fixListBelow)
          Set the position of the fix list in the popup
 void setSelectedItem(java.lang.Object anItem)
          set the given item as selected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeFixListComboModel

public TreeFixListComboModel(javax.swing.JTree tree,
                             javax.swing.JList fixList,
                             boolean fixListBelow)
Method Detail

setSelectedItem

public void setSelectedItem(java.lang.Object anItem)
set the given item as selected. The item can be in either the tree or fixed area of the popup.

Specified by:
setSelectedItem in interface javax.swing.ComboBoxModel
Parameters:
anItem -

getTreePath

public javax.swing.tree.TreePath getTreePath(java.lang.Object obj)

getSelectedItem

public java.lang.Object getSelectedItem()
Specified by:
getSelectedItem in interface javax.swing.ComboBoxModel

getSize

public int getSize()
Specified by:
getSize in interface javax.swing.ListModel

getElementAt

public java.lang.Object getElementAt(int index)
Returns the item at the given index. The index spans both the visible items of the tree and the fixed list of items. These lists are combined in their visible top down order, i.e. if the tree is at the top of the popup then the first item in the tree has index '0', and the first item in the fixed list is at index 'tree.getRowCount()'.

Specified by:
getElementAt in interface javax.swing.ListModel
Parameters:
index -
Returns:

getFixListBelow

public boolean getFixListBelow()
get the position of the fix list in the popup.

Returns:

setFixListBelow

public void setFixListBelow(boolean fixListBelow)
Set the position of the fix list in the popup

Parameters:
fixListBelow - - true = place fix list at bottom, false = at top.

addListDataListener

public void addListDataListener(javax.swing.event.ListDataListener l)
Currently does nothing

Specified by:
addListDataListener in interface javax.swing.ListModel
Parameters:
l -

removeListDataListener

public void removeListDataListener(javax.swing.event.ListDataListener l)
Currently does nothing

Specified by:
removeListDataListener in interface javax.swing.ListModel
Parameters:
l -

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

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