Components
OutlookBar
An Outlook like bar
Calendar and CalendarView
Calendar is a date entry with a calendar popup.
CalendarView is a calendar component, which is also used by Calendar
Calculator
A simple calculation with addition,substraction,division and multiplication operations
DockingPanel
A docking container
Layouts
There is a set of simple but sometimes usefull layouts.
FormLayout
This layout orders the components putting first the label which
is assigned to, and the the component at the side, in the following way:
label 1 --- Component 1
label 2 --- Component 2
label 3 --- Component 3
label 4 --- Component 4
The label must be labeling the component to put them in a row.
VerticalFlowLayout
A layout which works simillar to FlowLayout but in vertical orientation.
SingleChildLayout
A layout to old a unique component.
Others
DragSupport
A class which manages component dragging and resizing inside a container.
To work correctly the container must have no layout.
ActionFactory
A factory which creates actions from methods marked as actions of a given object.
EventSupport
A class to manager event dispatching. It manages event listener addition and removal
and gives a listener proxy to fire events.
EventListenerFactory
Creates an event listener from an object with public metthods marked as listener methods.
Here is a sample:
public class EventListenerFactoryTester extends JFrame {
public EventListenerFactoryTester(){
setLayout(new FlowLayout());
JButton button = new JButton("Hi !!!!");
// Create an action listener. It takes all the methods
// annotated with @Listener
button.addActionListener(
EventListenerFactory.create(
this,
ActionListener.class));
add(button);
}
/**
* All methods defined in the ActionListener interface will invoke this method.
* If you set the event() attribute, then the method will be called only for the
* specified event.
*/
@Listener(type=ActionListener.class)
public void showMessage(){
JOptionPane.showMessageDialog(this,"It worked !!!");
}
public static void main(String[] args) {
EventListenerFactoryTester tester = new EventListenerFactoryTester();
tester.setSize(300,300);
tester.setVisible(true);
}
}
ActionAndEventAwareComponent
This is a base component wich has functionallities of ActionFactory and EventListenerFactory implemented
There is also a base component which has a simillar functionallity
which creates a unique listener implementing all the listener methods:
public class ActionAndEventAwareComponentTest extends
ActionAndEventAwareComponent {
private JButton button1 = new JButton("Test me");
private JButton button2 = new JButton();
public ActionAndEventAwareComponentTest(){
setLayout(new FlowLayout());
add(button1);
button1.addActionListener(
getListener(ActionListener.class));
add(button2);
button2.setAction(
getAction("anAction"));
}
/**
* This method will be called on the actionPerformed event.
*/
@Listener(type=ActionListener.class)
public void buttonClicked(){
JOptionPane.showMessageDialog(this,"It worked !!!");
}
/**
* This method will be wrapped inside an action with the name "Test me too"
* It will be accessible from the actionMap throught its name.
*/
@ActionMethod(name="Test me too")
public void anAction(){
JOptionPane.showMessageDialog(this,"It worked too !!!");
}
public static void main(String[] args){
JFrame f = new JFrame();
f.setContentPane(new ActionAndEventAwareComponentTest());
f.setSize(300,300);
f.setVisible(true);
}
}
FormattedBeanListCellRenderer and FormattedBeanTableCellRenderer
TBC
BeanCollectionTableModel
A table model which holds a collection of beans. Bean properties
are declared to be shown as columns.
UIUtils
Some utilities most of them related to window positioning, like window centering
and window resizing.
Bean related
Property editors
A set of predefined property editor, mostly related to swing/awt objects.
This is a list of the editors defined up to now
- BooleanEditor
- BooleanEditor
PropertyEditorTable
This is a property sheet, like those used in UI designers.