Personal tools
You are here: Home Developer Kepler Developer Manual

Kepler Developer Manual

There is a need for a developer manual that gets into more nitty gritty details about the "proper" way to do certain tasks. However, we do not have a single developer who is best positioned to answer all such questions. It is my hope to start a collective effort to create such a module here, starting with a FAQ and growing into a more comprehensive document over time. The difference between this FAQ and the "FAQ for Developers" will be that this FAQ focuses on more nitty gritty questions rather than the more general questions addressed by the other FAQ.


How do you add menu items?

Documentation for how to perform this task may be found here.

How do you add items onto the icons to the toolbar?

A good example module for this question is the tagging module. You can take a look here.
First, you need to create a create a new class named org.kepler.modules.<module-name>.Initialize where <module-name> is the name of your module. This new class must implement both KeplerGraphFrameUpdater and ModuleInitializer.
Next, you need to override the compareTo method. It is easiest to put the button either on the far right or the far left. To put it on the far right return a negative number like the example below. To put it on the far right, you would use a positive number. To put it another location, you would need to do a more complex comparison (email kepler-dev if you have this problem).
	/** Compares this object with the specified object for order. */
	public int compareTo(KeplerGraphFrameUpdater o) 
		// always return less than
		return -1;
Next, you need to register the Initialize class itself with KeplerGraphFrame in the initialize method like the example below:
	/** Perform any module-specific initializations. */
	public void initializeModule()
		// add ourself as an updater so we can add a button

Next, you need to override the updateFrameComponents method in the manner show below. But before doing so, you need to create a new FigureAction which will be triggered when your toolbar button is pushed. This will often be a separate class so that it can also be triggered elsewhere (such as by a menu item, but the example below uses an anonymous inner class...

	/** Update the components. */
	public void updateFrameComponents(KeplerGraphFrame.Components components)
		MyAction action = new FigureAction()
                    public void actionPerformed(ActionEvent event)
		JToolBar toolbar = components.getToolBar();
		JButton button = diva.gui.GUIUtilities.addToolBarButton(toolbar, action);
		button.setToolTipText("Provenance recorder");
		// tell the action about its button so it can change the icon

How do I add actors to the library?

See Developing a Hello World Actor using the Kepler Build System and Eclipse.

Using older build systems such build-area-2.0, build-area-2.1, or build-area-2.2 gives me an error about the AntClassLoader. What is wrong?

You need to checkout these old build-area directories as "build-area" instead of "build-area-x.y." If you have already checked out, you can just rename the folder name manually.
Document Actions