I got an idea what you mean, but yes, two examples (how to do it right) would help :)
stefan Am 05.04.13 05:29, schrieb Giuseppe Aruta: > OK Ede, > can you just show a couple of example in OJ core? > thanks > > Peppe > > > 2013/4/5 <edgar.sol...@web.de <mailto:edgar.sol...@web.de>> > > Peppe, > > could you please refrain from adding icons manually in > featureinstaller calls for the future? > > it's much cleaner to either > A. implement the Iconified interface > or > B. if the plugin is based oon AbstractPlugin it already is, so you > can simply implement a getIcon() method. > > thanks.. ede > > On 05.04.2013 10 <tel:05.04.2013%2010>:19, > ma15...@users.sourceforge.net <mailto:ma15...@users.sourceforge.net> > wrote: > > Revision: 3473 > > http://jump-pilot.svn.sourceforge.net/jump-pilot/?rev=3473&view=rev > > Author: ma15569 > > Date: 2013-04-05 08:19:03 +0000 (Fri, 05 Apr 2013) > > Log Message: > > ----------- > > 2013-04-05 Giuseppe Aruta (giuseppe_ar...@yahoo.it > <mailto:giuseppe_ar...@yahoo.it>) > > * Add icons to Style Layer Context Submenu, RasterColorEditor, > SarchAllAttribute, SimpleQuery and SpatialQuery plugins > > > > Modified Paths: > > -------------- > > core/trunk/ChangeLog > > > core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java > > > > core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java > > > > core/trunk/src/org/openjump/core/ui/plugin/queries/SearchAllAttributes.java > > > core/trunk/src/org/openjump/core/ui/plugin/queries/SimpleQueryPlugIn.java > > > > core/trunk/src/org/openjump/core/ui/plugin/raster/color/RasterColorEditorPlugIn.java > > > > Added Paths: > > ----------- > > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/color_wheel.png > > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/search.png > > > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/simple_query.png > > > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/spatial_query.png > > > > Modified: core/trunk/ChangeLog > > =================================================================== > > --- core/trunk/ChangeLog 2013-04-04 22:51:32 UTC (rev 3472) > > +++ core/trunk/ChangeLog 2013-04-05 08:19:03 UTC (rev 3473) > > @@ -1,5 +1,9 @@ > > # for display continuity sake please use 2 spaces instead of tabs > > > > +2013-04-05 Giuseppe Aruta (giuseppe_ar...@yahoo.it > <mailto:giuseppe_ar...@yahoo.it>) > > + * Add icons to Style Layer Context Submenu, RasterColorEditor, > SearchAllAttribute, > > + SimpleQuery and SpatialQuery plugins > > + > > 2013-04-04 mmichaud <michael.mich...@free.fr > <mailto:michael.mich...@free.fr>> > > * add Flatten3DGeometries.bsh BeanTool and improve beantools > sorting > > > > > > Modified: > core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java > > =================================================================== > > --- > core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java > 2013-04-04 22:51:32 UTC (rev 3472) > > +++ > core/trunk/src/com/vividsolutions/jump/workbench/JUMPConfiguration.java > 2013-04-05 08:19:03 UTC (rev 3473) > > @@ -567,7 +567,7 @@ > > GUIUtil.toSmallIcon(pasteStylesPlugIn.getIcon()), > > PasteStylesPlugIn.createEnableCheck(workbenchContext)); > > FeatureInstaller.childMenuItem(MenuNames.STYLE, > layerNamePopupMenu) > > - .setIcon(GUIUtil.toSmallIcon(pasteStylesPlugIn.getIcon())); > > + .setIcon(IconLoader.icon("color_wheel.png")); > > > > featureInstaller.addPopupMenuItem(layerNamePopupMenu, > > refreshDataStoreLayerPlugin, new String[] { > MenuNames.DATASTORE }, > > > > Added: > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/color_wheel.png > > =================================================================== > > (Binary files differ) > > > > > > Property changes on: > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/color_wheel.png > > ___________________________________________________________________ > > Added: svn:mime-type > > + application/octet-stream > > > > Added: > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/search.png > > =================================================================== > > (Binary files differ) > > > > > > Property changes on: > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/search.png > > ___________________________________________________________________ > > Added: svn:mime-type > > + application/octet-stream > > > > Added: > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/simple_query.png > > =================================================================== > > (Binary files differ) > > > > > > Property changes on: > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/simple_query.png > > ___________________________________________________________________ > > Added: svn:mime-type > > + application/octet-stream > > > > Added: > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/spatial_query.png > > =================================================================== > > (Binary files differ) > > > > > > Property changes on: > > core/trunk/src/com/vividsolutions/jump/workbench/ui/images/spatial_query.png > > ___________________________________________________________________ > > Added: svn:mime-type > > + application/octet-stream > > > > Modified: > > core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java > > =================================================================== > > --- > > core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java > 2013-04-04 22:51:32 UTC (rev 3472) > > +++ > > core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/analysis/SpatialQueryPlugIn.java > 2013-04-05 08:19:03 UTC (rev 3473) > > @@ -46,6 +46,7 @@ > > import com.vividsolutions.jump.workbench.plugin.*; > > import com.vividsolutions.jump.workbench.plugin.util.*; > > import com.vividsolutions.jump.workbench.ui.*; > > +import com.vividsolutions.jump.workbench.ui.images.IconLoader; > > import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller; > > import com.vividsolutions.jump.I18N; > > > > @@ -94,12 +95,17 @@ > > } > > > > public void initialize(PlugInContext context) throws Exception { > > - FeatureInstaller featureInstaller = new > FeatureInstaller(context.getWorkbenchContext()); > > - featureInstaller.addMainMenuItem( > > - this, > > - new String[] {MenuNames.TOOLS, MenuNames.TOOLS_QUERIES}, > > - new JMenuItem(this.getName() + "..."), > > - createEnableCheck(context.getWorkbenchContext())); > > + context.getFeatureInstaller().addMainMenuItem(this, > > + new String[]{MenuNames.TOOLS, > MenuNames.TOOLS_QUERIES}, > > + this.getName() + "...", false, > IconLoader.icon("spatial_query.png"), > > + > createEnableCheck(context.getWorkbenchContext())); > > + > > + /* FeatureInstaller featureInstaller = new > FeatureInstaller(context.getWorkbenchContext()); > > + featureInstaller.addMainMenuItem( > > + this, > > + new String[] {MenuNames.TOOLS, MenuNames.TOOLS_QUERIES}, > > + new JMenuItem(this.getName() + "..."), > > + createEnableCheck(context.getWorkbenchContext()));*/ > > } > > > > public static MultiEnableCheck > createEnableCheck(WorkbenchContext workbenchContext) { > > > > Modified: > > core/trunk/src/org/openjump/core/ui/plugin/queries/SearchAllAttributes.java > > =================================================================== > > --- > > core/trunk/src/org/openjump/core/ui/plugin/queries/SearchAllAttributes.java > 2013-04-04 22:51:32 UTC (rev 3472) > > +++ > > core/trunk/src/org/openjump/core/ui/plugin/queries/SearchAllAttributes.java > 2013-04-05 08:19:03 UTC (rev 3473) > > @@ -50,6 +50,7 @@ > > import com.vividsolutions.jump.workbench.ui.MenuNames; > > import com.vividsolutions.jump.workbench.ui.MultiInputDialog; > > import com.vividsolutions.jump.workbench.ui.SelectionManager; > > +import com.vividsolutions.jump.workbench.ui.images.IconLoader; > > > > public class SearchAllAttributes extends AbstractPlugIn > > { > > @@ -84,7 +85,7 @@ > > public void initialize(PlugInContext context) throws Exception > > { > > context.getFeatureInstaller().addMainMenuItem(this, > > - new String[] { > MenuNames.TOOLS,MenuNames.TOOLS_QUERIES}, getName()+"...", false, null, > > + new String[] { > MenuNames.TOOLS,MenuNames.TOOLS_QUERIES}, getName()+"...", false, > IconLoader.icon("search.png"), > > null); > > } > > > > > > Modified: > core/trunk/src/org/openjump/core/ui/plugin/queries/SimpleQueryPlugIn.java > > =================================================================== > > --- > core/trunk/src/org/openjump/core/ui/plugin/queries/SimpleQueryPlugIn.java > 2013-04-04 22:51:32 UTC (rev 3472) > > +++ > core/trunk/src/org/openjump/core/ui/plugin/queries/SimpleQueryPlugIn.java > 2013-04-05 08:19:03 UTC (rev 3473) > > @@ -3,6 +3,7 @@ > > import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn; > > import com.vividsolutions.jump.workbench.plugin.PlugInContext; > > import com.vividsolutions.jump.workbench.ui.MenuNames; > > +import com.vividsolutions.jump.workbench.ui.images.IconLoader; > > > > import org.openjump.core.ui.plugin.queries.QueryDialog; > > import com.vividsolutions.jump.I18N; > > @@ -27,7 +28,7 @@ > > > > context.getFeatureInstaller().addMainMenuItem(this, > > new String[]{MenuNames.TOOLS, > MenuNames.TOOLS_QUERIES}, > > - this.getName() + "...", false, null, null); > > + this.getName() + "...", false, > IconLoader.icon("simple_query.png"), null); > > } > > > > public boolean execute(PlugInContext context) throws Exception { > > > > Modified: > > core/trunk/src/org/openjump/core/ui/plugin/raster/color/RasterColorEditorPlugIn.java > > =================================================================== > > --- > > core/trunk/src/org/openjump/core/ui/plugin/raster/color/RasterColorEditorPlugIn.java > 2013-04-04 22:51:32 UTC (rev 3472) > > +++ > > core/trunk/src/org/openjump/core/ui/plugin/raster/color/RasterColorEditorPlugIn.java > 2013-04-05 08:19:03 UTC (rev 3473) > > @@ -9,13 +9,14 @@ > > import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck; > > import com.vividsolutions.jump.workbench.plugin.PlugInContext; > > import com.vividsolutions.jump.workbench.ui.MenuNames; > > +import com.vividsolutions.jump.workbench.ui.images.IconLoader; > > > > /** > > * 16 sept. 2005 > > * > > * @author Paul PLOUY > > * Laboratoire RESO > > - * universit\xE9 de Rennes 2 > > + * universit� de Rennes 2 > > * FRANCE > > * modified by Stefan Steiniger > (perri...@gmx.de <mailto:perri...@gmx.de>) > > */ > > @@ -40,7 +41,7 @@ > > new String[] {MenuNames.RASTER}, > > this.sName + "...", > > false, > > - null, > > + IconLoader.icon("color_wheel.png"), > > > > new MultiEnableCheck() > > .add( > > > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > <mailto:Jump-pilot-devel@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > ------------------------------------------------------------------------------ > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > > > > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel