ContentWelcomeProducts Abeona Gaia Hephaistos JavaGantt Features News Documentation Programming domain objects About JavaGantt model Undo / Redo support Localization support Building a treetable Painting a chart Working with the time scale JavaGantt actions License Download Purchase Services Promote your software Contact Us Links |
JavaGantt actionsAs a standard Swing component, JavaGantt is controlled by actions. The base class for gantt component actions is AbstractGanttAction. It is not necessary to subclass this class, you can use any implementation of javax.swing.Action. But AbstractGanttAction offers these features:
Language support Each descendant of AbstractGanttAction gets its properties from JavaGantt resource bundle. All action properties (currently: text, icon and tooltip) must be described in resource bundle. This process is automated, so you must observed some rules:
For example, if your action class is mydomain.mypackage.MyAction, then in the resource bundle should be: mydomain.mypackage.MyAction.text=Text for action mydomain.mypackage.MyAction.icon=mydomain/mypackage/MyIcon.gif mydomain.mypackage.MyAction.tooltip=This is a tooltip for my actionor shorter: MyAction.text=Text for action MyAction.icon=mydomain/mypackage/MyIcon.gif MyAction.tooltip=This is a tooltip for my action Undo / redo support AbstractGanttAction processes actionPerformed (ActionEvent) method to offer undo / redo support. In this action it creates an UndoStep instance and invokes executeAction (ActionEvent, UndoStep) method. If it returns true, registers all changes from UndoStep into UndoManager. The executeAction (ActionEvent, UndoStep) is an abstract method - this is what you have to implement in your action. List of actions Here is the list of the ready-to-use actions:
|