Convenience Classes in the jas.util
Package
- jas.util.JASEditableComboBox
This is suitable for when you want a text field with a drop-down list of recent choices.
For example, if you want the user to enter a file name, you may wish to use a
JASEditableComboBox and list recently loaded files in the drop-down list.
- jas.util.OpenLocalFilePanel
This is suitable for when you want the user to supply the name of a file that is
stored locally. It does not open a file; it simply returns the file name selected
from the method
public String getText()
- jas.util.JASTextField
This class is just like a JTextField except that you don't have to add an ActionListener
to get it to click on the default button when enter is pressed. (The default button
is the one that is clicked when 'Enter' is clicked. Unfortunately, when 'Enter' is
pressed in a normal JTextField, nothing happens except that an ActionEvent
is created.) The default button of the field's root
pane will be clicked when 'Enter' is pressed in the text field.
- jas.util.ErrorBox
To notify the user of an Exception or Error, use the constructor
public ErrorBox(Frame f, String message, Throwable t)
and invoke the doModal() method on the object.
- jas.util.FileReaderWithProgressBar
This class extends java.io.FileReader
but also takes a BoundedRangeModel
in the constructor which will represent the portion of the file read. The model will
update each time something is read from the file, so it is suitable for use with a BufferedReader,
where the file is read in buffer-sized amounts. The constructor is:
public FileReaderWithProgressBar(String fileName, BoundedRangeModel model) throws
FileNotFoundException
- jas.util.UserProperties
This class extends Properties
but has some additional methods for storing more complex objects. The application
will have one instance of this class that you may use to store settings.
Page maintained by Jonas Gifford.
Last updated 01/14/04.