org.autoplot.datasource.RecentComboBox

decorate a comboBox so that it remembers recent entries. This listens for ActionEvents from a JComboBox and adds valid items to its droplist. The recent entries are stored in the bookmarks folder in the file "recent.PREF.txt" where PREF is a string assigned to this object identifying the theme, such as "timerange". Specifically, the event is validated and recorded into the file, then the file is loaded, sorted, and saved again.

RecentComboBox( )


PREF_NODE_TIMERANGE


actionPerformed

actionPerformed( java.awt.event.ActionEvent e ) → void

Parameters

e - an ActionEvent

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


addAdditionalToRecentItems

addAdditionalToRecentItems( java.util.List items ) → void

kludge in way to add an item to the list of recent entries.

Parameters

items - items to insert (at the top of the list).

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


addToRecent

addToRecent( String s ) → void

add the item to the list of recent entries. This will reload the recent file, probably firing events.

Parameters

s - the item

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]

addToRecent( String s, boolean reload ) → void

getText

getText( ) → String

get the string value, which is also the getSelectedItem. This will also push a changed value to the recent entries.

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


isDirty

isDirty( ) → boolean

check if the human has made modifications to this value.

Returns:

true if modifications have been made.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


main

main( java.lang.String[][] args ) → void

Parameters

args - a java.lang.String[]

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setPreferenceNode

setPreferenceNode( String pref ) → void

associate the history with a file. This should be called immediately after creating the object.

Parameters

pref - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setText

setText( String text ) → void

to make it easier to convert GUIs with JTextFields to RecentComboBoxes, setText is available.

Parameters

text - a String

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


setVerifier

setVerifier( org.autoplot.datasource.InputVerifier v ) → void

allow filtering of invalid entries so they aren't recorded in history.

Parameters

v - an InputVerifier

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]