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

E13403-04

oracle.ide.util
Class HistoryList

java.lang.Object
  extended by oracle.ide.util.HistoryList

public class HistoryList
extends java.lang.Object

An class which facilitates reading and writing history lists based on some underlying properties mechanism.


Constructor Summary
HistoryList(java.lang.String name)
          Constructs a new instance of HistoryList without loading items.
HistoryList(java.lang.String name, PropertyAccess properties)
          Constructs a new instance of HistoryList, loading items using the PropertyAccess parameter as the underlying properties mechanism.
 
Method Summary
 void clear()
          Clears this history list.
 java.lang.String comboBoxGetSelectedItem(javax.swing.JComboBox comboBox)
           
 java.lang.String comboBoxGetSelectedItem(javax.swing.JTextField editor)
           
 void fill(java.lang.String[] itemsToAdd)
          Fills this history list with the given items.
 java.lang.String[] getHistory()
          Returns the items in this history list.
 int getMaxHistorySize()
          Returns the maximum number of items that this history list can hold.
 int getSize()
          Returns the number of items in this history list.
 void load(PropertyAccess properties)
          Loads the history list from an underlying properties mechanism.
 boolean remove(java.lang.String item)
          Removes an item from the history list.
 void save()
          Saves the history list to the underlying properties mechanism which were used when this history list was loaded.
 void saveAs(PropertyAccess properties)
          Saves the history list to an underlying properties mechanism.
 void setMaxHistorySize(int maxHistorySize)
          Specifies the maximum number of items that this history list can hold.
 void update(java.lang.String item)
          Updates the history list by moving the specified item to the beginning of the list or inserting the specified item at the beginning of the list.
 void updateHistory(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HistoryList

public HistoryList(java.lang.String name)
Constructs a new instance of HistoryList without loading items.

Parameters:
name - the name of the history list

HistoryList

public HistoryList(java.lang.String name,
                   PropertyAccess properties)
Constructs a new instance of HistoryList, loading items using the PropertyAccess parameter as the underlying properties mechanism.

Parameters:
name - the name of the history list
properties - the underlying properties mechanism
Method Detail

getMaxHistorySize

public int getMaxHistorySize()
Returns the maximum number of items that this history list can hold.

Returns:
the maximum number of items

setMaxHistorySize

public void setMaxHistorySize(int maxHistorySize)
Specifies the maximum number of items that this history list can hold.

Parameters:
maxHistorySize - maximum number of items

load

public void load(PropertyAccess properties)
Loads the history list from an underlying properties mechanism.

Parameters:
properties - the underlying properties mechanism

clear

public void clear()
Clears this history list.


getHistory

public java.lang.String[] getHistory()
Returns the items in this history list.

Returns:
the items

getSize

public int getSize()
Returns the number of items in this history list.


fill

public void fill(java.lang.String[] itemsToAdd)
Fills this history list with the given items.


update

public void update(java.lang.String item)
Updates the history list by moving the specified item to the beginning of the list or inserting the specified item at the beginning of the list.

This method does not save the history list to the underlying properties mechanism. To save the history list, use save().

Parameters:
item - the selected item

remove

public boolean remove(java.lang.String item)
Removes an item from the history list. If this history list does not contain the item, the history list is not changed.

This method does not save the history list to the underlying properties mechanism. To save the history list, use save().

Parameters:
item - the item to remove
Returns:
true if this list contained the specified item

save

public void save()
Saves the history list to the underlying properties mechanism which were used when this history list was loaded.


saveAs

public void saveAs(PropertyAccess properties)
Saves the history list to an underlying properties mechanism.

Parameters:
properties - the underlying properties mechanism

comboBoxGetSelectedItem

public java.lang.String comboBoxGetSelectedItem(javax.swing.JComboBox comboBox)

comboBoxGetSelectedItem

public java.lang.String comboBoxGetSelectedItem(javax.swing.JTextField editor)

updateHistory

public void updateHistory(java.lang.String s)

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.