OpenJUMP
Adding A Toolbar Button
Here’s an example of adding a plugin to the toolbar as a button:
workbenchFrame.getToolBar().addPlugIn(outputWindowPlugIn.getIcon(), outputWindowPlugIn, new MultiEnableCheck(), workbenchContext)
Another way to do it is to use WorkbenchToolBar#add(AbstractButton button, String tooltip, Icon icon, ActionListener actionListener, EnableCheck enableCheck)
Still another way is to use WorkbenchToolBar#add(Component)
[31. Aug 2006]
Hei XXX,
to add a button you need:
- to specify an icon for you plugin => xxxPlugIn.getIcon();
- to add it to the toolbar. For Jump own plugins this is done in JumpConfiguration.configureToolBar(final WorkbenchContext workbenchContext,
EnableCheckFactory checkFactory)
e.g.
WorkbenchFrame frame = workbenchContext.getWorkbench().getFrame();
frame.getToolBar().addPlugIn(zoomToSelectedItemsPlugIn.getIcon(),
zoomToSelectedItemsPlugIn,
ZoomToSelectedItemsPlugIn.createEnableCheck(workbenchContext),
workbenchContext);
If you have access to the openjump c-v-s repository you can see an example in the NewTaskPlugIn.java in package com.vividsolutions.jump.workbench.ui.plugin; (which i added on the weekend to the toolbar of OpenJump)
another example .. if you use original JUMP .. may be look on ZoomToSelectedItemsPlugIn.java in package workbench.ui.zoom
stefan
Showing changes from revision #3 to #4:
Added | Removed
Here’s an example of adding a plugin to the toolbar as a button:
g
OpenJUMP
Editing Adding A Toolbar Button
Textile formatting tips (advanced)
your text → your text
your text → your text
hello → hello
- Bulleted list
- Second item → • Bulleted list
• Second item
- Numbered list
- Second item → 1. Numbered list
2. Second item
linkname → linkname
|a|table|row|
|b|table|row| → Table
http://url
email@address.com → Auto-linked
→ Image
Wiki words
Two or more used dj mixer uppercase words stuck together (camel case) or any phrase surrounded by double brackets is a wiki word. A camel-case wiki word can be escaped by putting \ in front of it.
Wiki words: HomePage, ThreeWordsTogether, C++?, Let's play again!?
Not wiki words: IBM, School
Here’s an example of adding a plugin to the toolbar as a button:
workbenchFrame.getToolBar().addPlugIn(outputWindowPlugIn.getIcon(), outputWindowPlugIn, new MultiEnableCheck(), workbenchContext) workbenchContext)
Another way to do it is to use WorkbenchToolBar#add(AbstractButton button, String tooltip, Icon icon, ActionListener actionListener, EnableCheck enableCheck) Still another way is to use WorkbenchToolBar#add(Component)
as | Cancel (unlocks page)
workbnew
Frame.getToolBar().addPlugIn(outputWindowPlugIn.getIcon(), outputWindowPlugIn, new MultiEnableCheck(), workbenchContext)
Another way to do it buy zyban online is to use WorkbenchToolBar#add(AbstractButton button, String tooltip, Icon icon, ActionListener actionListener, EnableCheck enableCheck)
Still another way is to use WorkbenchToolBar#add(Component)
[31. Aug 2006]
Hei XXX,
to add a button you need:
- to specify an icon for you plugin => xxxPlugIn.getIcon();
- to add it to the toolbar. For Jump own plugins this is done in JumpConfiguration.configureToolBar(final WorkbenchContext workbenchContext,
EnableCheckFactory checkFactory)
e.g.
WorkbenchFrame frame = workbenchContext.getWorkbench().getFrame();
frame.getToolBar().addPlugIn(zoomToSelectedItemsPlugIn.getIcon(),
zoomToSelectedItemsPlugIn,
ZoomToSelectedItemsPlugIn.createEnableCheck(workbenchContext),
workbenchContext);
If you have access to the openjump c-v-s repository you can see an example in the NewTaskPlugIn.java in package com.vividsolutions.jump.workbench.ui.plugin; (which i added on the weekend to the toolbar of OpenJump)
another example .. if you use original JUMP .. may be look on ZoomToSelectedItemsPlugIn.java in package workbench.ui.zoom
stefan
Revised on January 24, 2007 22:03
by
sstein
(84.75.99.33)