SwingExt supplies the following functionality:
- MaskedField: An implementation of JTextField which displays numbers, dates and textfield with
a specific format, which allows for entering values with no or partial masks.
- Date mask set to
DD-MMM-YYYY will accept 301006,30-10-2006,30102006,30 Oktober 2006 or when
Locale is en_US 103006,10/30/2006,30 October 2006
- ExtButtonGroup: an implementation of ButtonGroup which allows only one button
to be focus owner and switch between buttons with left/right/up/down. It also allows
for better access to the buttons, enabling and making visible of the entire group at once
and setting one Tooltip for all buttons at once.
- ScrollablePanel: A Panel which allows for multiple panels added to this to be scrollable
and selectable (with SelectablePanel interface) and which handles scroll intervals correctly
- Form, FormAction and EasyForm: panels and interfaces to add default Ok/Apply/Undo/Close buttons
to a Form in a GUI. EasyForm is a set of methods to create a Form quickly, but will leave the
handling of data to the developer.
MyForm extends EasyForm {
public MyForm(int mode) {
super(mode);
init();
}
private void init() {
addField("ID",new JTextField(),1,1,20);
addComponent(new JList(new MyListModel()),1,2,30);
//etc..
}
public void performApply() {
/* retrieve the information from the form here
also called from performOk, which also closes the form
*/
}
public void performUndo() {
/* clear the altered information here
also called from performCancel, which also closes the form
*/
}
}
|