Hei .. i think you dont need to create an extension for now.. only later
if you want to distribute your plugin
best ist to create yourself an own package, or you use the test package
of the buffer
If you want to list all the attributes of neighbouring objects to the
current selected you have to work similar as you told:
- get the selected entity (using getSelectedItems() from workbench???)
=> it will return you the geometry (not the feature)
- calc a buffer around the geometry (you can either use the special
buffer function from jts or geometry.buffer(), but if you use the latter
one, you can not define the resolution of the buffer => the buffer is
not a "true" circle)
- now go through the list of all features (which have the attributes) in
the layer (layer.getFeatures() ???)
- get the geometry of every featuere and check..
if (buffer.contains(actualGeometry)) do...
or
Geometry intersection =
if ( intersection.area(actualGeometry) > 0 ) do
... do retrieve the attributes from the featuer and print them
- if you have 1000s of features you should later think about working
with the Quadtree from the jts geometry library to get a smaller
candidate set of close features
what would be goos is always to look for existing functions and to study
their sourcecode
btw: you can find the plugin location, that realizes the jump functions
by searching in the language properties files (in the language package)
for the string whichs are used to describe the functions in the menu or
separate dialog
stefan
ben abid haifa wrote:
> Hei Stefan,
> Thank you very much for your help, Finally it works : In the console,
> I have the IDs of geographic entities present in the selected layer.
> Now I need just to retreive all the gegraphic entities (their IDs)
> without the buffer function, Have I to create an extension file?
> I wanted to use BufferPlugIn class and modify it just to retreive the
> differents entities from a layer, that was the aim.
> In fact, my purpose is to retreive all the entities which are
> adjascent of a selected entity :
> for exemple in the map world, if the selected entity is Tunisia, OJ
> must list the IDs (and the differents attributes) of the adjacents
> entities in the layer which are (for our exemple) Algeria and Lybia.
> I think i will proceed in two steps:
> -1st step: retreive all the entities of a layer
> -2nd step: compare the coordinate of the retreived
> entities and the selected entity by determining if there are points in
> commun.
> I hope I was clear enough, I can explain more if you have any questions.
> thanks and regards
>
> */Stefan Steiniger <[EMAIL PROTECTED]>/* a écrit :
>
> ok .. we try it another way - which is easy for testing and debugging
> your own plugins, but not good if you want to ship your plugin
> later to
> others (=> then you need to create an Extension file.. see wiki or
> write
> me) :
>
> 1) create a new package called" test" of the project where alle the
> openjump code is
>
> 2) use the class i send to you and put it in this new package
>
> note: this is necessary if we call the plugin from the
> XXXConfiguration
> file, because if it is in a different project one would need to:
> - link the jump project with the project of the plugin (to tell
> the jump
> project the plugin class)
> - link vice versa (to let the plugin class now the jump geometry
> function) ,
> => which will create a not allowed loop in the classpath
>
> 3) Now put the following lines in the OpenJumpConfiguration file
> in the
> #loadOpenJumpPlugIns(..) method:
>
> SomeLayerPlugIn mySomeLayerPlugIn = new SomeLayerPlugIn();
> WorkbenchFrame frame = workbenchContext.getWorkbench().getFrame();
> frame.getToolBar().addPlugIn(SomeLayerPlugIn.getIcon(),
> mySomeLayerPlugIn,
> SomeLayerPlugIn.createEnableCheck(workbenchContext),
> workbenchContext);
>
> 4) if you start OJ you should now see befor the scale bar slider a
> button with a hammer.. that's it ;)
>
> hope that works,
> if not send the complete stack trace of the error
>
> ben abid haifa wrote:
>
> > Hei,
> > I think that I missed to obtain the context, I couldn't retreive
> the
> > monitor and the context from the workbench.
> > When I initialize the plugin in the jumpconfiguration.java class
> using
> > the initialize() method or I initialize it in the
> > openjumpconfigruation.java class, an Exception occurs :
> > Should never reach here.
> >
> > What Have I to do now?
> >
> >
> >
> > */Stefan Steiniger /* a écrit :
> >
> >
> > no ... you dont need to initialze monitor an context
> > but you need to retrive them from the workbench
> >
> > mhm... actually i think it is best if you initialize the plugin in
> > the
> > jumpconfiguration.java class like the other toolbar buttons (using
> > the
> > initialize() method,
> > then we can see if the error is in another place or if you missed to
> > obtain the context. Alternatively to workbench you can call the
> > plugin
> > like i have done with the properties file
> >
> > alternatively to the jumpconfiguration class you can also use the
> > openjumpconfigruation..
> >
> > stefan
> >
> >
> > ben abid haifa wrote:
> >
> > > Hei,
> > > I ve initialised the SomeLayerPlugIn class as an object in the
> > > class AttributeTab.java like this : SomeLayerPlugIn slp=new
> > > SomeLayerPlugIn();
> > > and then I call the method slp.run(monitor,context); of course I
> > > declare the variable monitor and context like this :
> > > TaskMonitor monitor;
> > > PlugInContext context;
> > > Should I initialize these two variables?
> > > Should I initialize the SomeLayerPlugIn class in an other place
> > : the
> > > jumpconfiguration class?
> > >
> > > */Stefan Steiniger /* a écrit :
> > >
> > >
> > > do you have initialized the SomeLayerPlugIn class as an object
> > > somewhere? (because toolbar plugins are for instance initialized
> > > in the
> > > jumpconfiguration class; while for external plugins a special
> > > mechanism
> > > does that
> > >
> > > stefan
> > >
> > > ben abid haifa wrote:
> > >
> > > > Hei Stefan,
> > > > I've done exactely all what you told me to do, no errors of
> > > syntax but
> > > > it still doesn't work => the same error message, so I give
> you the
> > > > stack trace : What is given in the console:
> > > > Note that I've added a JButton in the toolBar in the class
> > > > AttributeTab.java in the package
> > > com.vividsolutions.jump.workbench.ui
> > > > and in the ActionListener I put the instruction
> > > > somelayerplugin.run(monitor,context); so that I can run it.
> > > >
> > > > The Stack trace:
> > > >
> > > >
> > > > Fast Lexicon Found! Now Loading!
> > > > Lexicon OK!
> > > > LexicalRuleParser OK!
> > > > ContextualRuleParser OK!
> > > > Attempting to Load Dictionary...
> > > > Dictionary Loaded Successfully
> > > > _
> > > > java.lang.NullPointerException
> > > > _
> > > > at
> > test.SomeLayerPlugIn.setDialogValues(_SomeLayerPlugIn.java:164_)
> > > > at
> > > >
> > >
> >
>
> com.vividsolutions.jump.workbench.ui.AttributeTab$10.actionPerformed(_AttributeTab.java:274_)
> > > > at
> > > >
> > >
> >
> javax.swing.AbstractButton.fireActionPerformed(_AbstractButton.java:1849_)
> > > > at
> > > >
> > >
> >
>
> javax.swing.AbstractButton$Handler.actionPerformed(_AbstractButton.java:2169_)
> > > > at
> > > >
> > >
> >
>
> javax.swing.DefaultButtonModel.fireActionPerformed(_DefaultButtonModel.java:420_)
> > > > at
> > > >
> > >
> >
> javax.swing.DefaultButtonModel.setPressed(_DefaultButtonModel.java:258_)
> > > > at
> > > >
> > >
> >
>
> javax.swing.plaf.basic.BasicButtonListener.mouseReleased(_BasicButtonListener.java:234_)
> > > > at
> > > >
> > >
> >
> java.awt.AWTEventMulticaster.mouseReleased(_AWTEventMulticaster.java:231_)
> > > > at java.awt.Component.processMouseEvent(_Component.java:5488_)
> > > > at
> > javax.swing.JComponent.processMouseEvent(_JComponent.java:3126_)
> > > > at java.awt.Component.processEvent(_Component.java:5253_)
> > > > at java.awt.Container.processEvent(_Container.java:1966_)
> > > > at java.awt.Component.dispatchEventImpl(_Component.java:3955_)
> > > > at java.awt.Container.dispatchEventImpl(_Container.java:2024_)
> > > > at java.awt.Component.dispatchEvent(_Component.java:3803_)
> > > > at
> > > >
> > >
> >
> java.awt.LightweightDispatcher.retargetMouseEvent(_Container.java:4212_)
> > > > at
> > >
> >
> java.awt.LightweightDispatcher.processMouseEvent(_Container.java:3892_)
> > > > at
> > >
> java.awt.LightweightDispatcher.dispatchEvent(_Container.java:3822_)
> > > > at java.awt.Container.dispatchEventImpl(_Container.java:2010_)
> > > > at java.awt.Window.dispatchEventImpl(_Window.java:1774_)
> > > > at java.awt.Component.dispatchEvent(_Component.java:3803_)
> > > > at java.awt.EventQueue.dispatchEvent(_EventQueue.java:463_)
> > > > at
> > > >
> > >
> >
>
> java.awt.EventDispatchThread.pumpOneEventForHierarchy(_EventDispatchThread.java:242_)
> > > > at
> > > >
> > >
> >
>
> java.awt.EventDispatchThread.pumpEventsForHierarchy(_EventDispatchThread.java:163_)
> > > > at
> > >
> >
> java.awt.EventDispatchThread.pumpEvents(_EventDispatchThread.java:157_)
> > > > at
> > >
> >
> java.awt.EventDispatchThread.pumpEvents(_EventDispatchThread.java:149_)
> > > > at
> > java.awt.EventDispatchThread.run(_EventDispatchThread.java:110_)
> > > >
> > > >
> > > > */Thank you once again /*
> > > > *//*
> > > > *//*
> > > > *//*
> > > > *//*
> > > >
> > > > *//*
> > > > *//*
> > > > */Stefan Steiniger /* a écrit :
> > > >
> > > > Hei Ben,
> > > >
> > > > your buffer plugin works for me.
> > > > - But i renamed the class to a xxxPlugIn.java class (which
> > could be
> > > > important), have put it in a different package (goes faster
> for me
> > > > to try)
> > > > - and added the method #initialize which is used by Jump to
> > load the
> > > > plugin automatically and define the menu name
> > > >
> > > > i have started the plugin the following way:
> > > > - created a property file which calls the plugin (see attached
> > file)
> > > > - added the line which calls the propertie file to the "programm
> > > > arguments" in "run.." (or debug)
> > > > -properties
> "D:\develop\eclwork\openjumptest\jump-properties.xml"
> > > >
> > > > if it still want work it is necessary to send a complete stack
> > > > trace ..
> > > > output is given in the console
> > > > (note if you work in eclipse with the OJ sourcefiles there will
> > > > always
> > > > appear an error if hitting the BeanShell Menu option.. => don't
> > > about
> > > > this error)
> > > >
> > > > the error could be also reasoned if you missed to include a
> > > > library in
> > > > the "run.." classpaths
> > > >
> > > > stefan
> > > > package test;
> > > > import java.util.ArrayList;
> > > > import java.util.Collection;
> > > > import java.util.Iterator;
> > > > import java.util.List;
> > > >
> > > > import com.vividsolutions.jts.geom.Geometry;
> > > > import com.vividsolutions.jump.I18N;
> > > > import com.vividsolutions.jump.feature.AttributeType;
> > > > import com.vividsolutions.jump.feature.Feature;
> > > > import com.vividsolutions.jump.feature.FeatureCollection;
> > > > import com.vividsolutions.jump.feature.FeatureDataset;
> > > > import com.vividsolutions.jump.feature.FeatureDatasetFactory;
> > > > import com.vividsolutions.jump.feature.FeatureSchema;
> > > > import com.vividsolutions.jump.task.TaskMonitor;
> > > > import com.vividsolutions.jump.workbench.model.Layer;
> > > > import
> > > com.vividsolutions.jump.workbench.model.StandardCategoryNames;
> > > > import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn;
> > > > import com.vividsolutions.jump.workbench.plugin.EnableCheck;
> > > > import
> > com.vividsolutions.jump.workbench.plugin.EnableCheckFactory;
> > > > import
> com.vividsolutions.jump.workbench.plugin.MultiEnableCheck;
> > > > import com.vividsolutions.jump.workbench.plugin.PlugInContext;
> > > > import com.vividsolutions.jump.workbench.plugin.ThreadedPlugIn;
> > > > import com.vividsolutions.jump.workbench.ui.GUIUtil;
> > > > import com.vividsolutions.jump.workbench.ui.MenuNames;
> > > > import com.vividsolutions.jump.workbench.ui.MultiInputDialog;
> > > > import
> > com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller;
> > > >
> > > >
> > > > public class SomeLayerPlugIn extends AbstractPlugIn implements
> > > > ThreadedPlugIn{
> > > >
> > > >
> > > >
> > > >
> > > > private final static String LAYER =
> > > > I18N.get("ui.plugin.analysis.BufferPlugIn.layer");
> > > > private final static String DISTANCE =
> > > > I18N.get("ui.plugin.analysis.BufferPlugIn.buffer-distance");
> > > >
> > > > private Layer layer;
> > > > private double bufferDistance = 1.0;
> > > > private boolean exceptionThrown = false;
> > > > private MultiInputDialog dialog;
> > > >
> > > >
> > > > public SomeLayerPlugIn(){
> > > >
> > > > }
> > > >
> > > > public void initialize(PlugInContext context) throws Exception {
> > > > EnableCheckFactory enableCheckFactory = new
> > > EnableCheckFactory(context
> > > > .getWorkbenchContext());
> > > > EnableCheck enableCheck = new MultiEnableCheck().add(
> > > >
> > >
> >
> enableCheckFactory.createWindowWithLayerManagerMustBeActiveCheck()).add(
> > > > enableCheckFactory.createExactlyNLayersMustBeSelectedCheck(1));
> > > > new FeatureInstaller(context.getWorkbenchContext())
> > > > .addMainMenuItemWithJava14Fix(this, new
> String[]{MenuNames.TOOLS},
> > > > getName() + "...", false, null, enableCheck);
> > > >
> > > > }
> > > >
> > > > public boolean execute(PlugInContext context) throws Exception {
> > > > MultiInputDialog dialog = new MultiInputDialog(
> > > > context.getWorkbenchFrame(), getName(), true);
> > > > setDialogValues(dialog, context);
> > > > GUIUtil.centreOnWindow(dialog);
> > > > dialog.setVisible(true);
> > > > if (! dialog.wasOKPressed()) { return false; }
> > > > getDialogValues(dialog);
> > > > return true;
> > > > }
> > > >
> > > >
> > > >
> > > > public void run(TaskMonitor monitor, PlugInContext context)
> > > > throws Exception
> > > > {
> > > > FeatureSchema featureSchema = new FeatureSchema();
> > > > featureSchema.addAttribute("GEOMETRY", AttributeType.GEOMETRY);
> > > > FeatureCollection resultFC = new FeatureDataset(featureSchema);
> > > >
> > > > Collection resultColl =
> > > > runBuffer(layer.getFeatureCollectionWrapper());
> > > > resultFC = FeatureDatasetFactory.createFromGeometry(resultColl);
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > /////**************************************************
> > > > /////// THIS IS THE ADDED CODE
> > > >
> > > > List l=resultFC.getFeatures();
> > > > System.out.println("There is "+l.size()+"Features.");
> > > >
> > > > for(int j=0;j
> > > > {
> > > >
> > > > Feature f= (Feature)l.get(j);
> > > > System.out.println(f.getID()+ " ");
> > > > }
> > > >
> > > > /////***************************************************
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > context.addLayer(StandardCategoryNames.WORKING, "Buffer-" +
> > > > layer.getName(), resultFC);
> > > >
> > > > if (exceptionThrown)
> > > >
> > >
> >
>
> context.getWorkbenchFrame().warnUser(I18N.get("ui.plugin.analysis.BufferPlugIn.errors-found-while-executing-buffer"));
> > > > }
> > > >
> > > >
> > > >
> > > > private Collection runBuffer(FeatureCollection fcA)
> > > > {
> > > > exceptionThrown = false;
> > > > Collection resultColl = new ArrayList();
> > > > for (Iterator ia = fcA.iterator(); ia.hasNext(); ) {
> > > > Feature fa = (Feature) ia.next();
> > > > Geometry ga = fa.getGeometry();
> > > > Geometry result = runBuffer(ga);
> > > > if (result != null)
> > > > resultColl.add(result);
> > > > }
> > > > return resultColl;
> > > > }
> > > >
> > > >
> > > > private Geometry runBuffer(Geometry a)
> > > > {
> > > > Geometry result = null;
> > > > try {
> > > > result = a.buffer(bufferDistance);
> > > > return result;
> > > > }
> > > > catch (RuntimeException ex) {
> > > > // simply eat exceptions and report them by returning null
> > > > exceptionThrown = true;
> > > > }
> > > > return null;
> > > > }
> > > >
> > > >
> > > >
> > > >
> > > > public void setDialogValues(MultiInputDialog dialog,
> PlugInContext
> > > > context)
> > > > {
> > > > //dialog.setSideBarImage(new
> > > > ImageIcon(getClass().getResource("DiffSegments.png")));
> > > >
> > >
> >
>
> dialog.setSideBarDescription(I18N.get("ui.plugin.analysis.BufferPlugIn.buffers-all-geometries-in-the-input-layer"));
> > > > //Initial layer value is null
> > > > dialog.addLayerComboBox(LAYER, layer,
> context.getLayerManager());
> > > > dialog.addDoubleField(DISTANCE, bufferDistance, 10, null);
> > > > }
> > > >
> > > >
> > > >
> > > > public void getDialogValues(MultiInputDialog dialog) {
> > > > layer = dialog.getLayer(LAYER);
> > > > bufferDistance = dialog.getDouble(DISTANCE);
> > > > }
> > > >
> > > >
> > > > }
> > > >
> > > > //////************************************************
> > > > // AND THEN OF COURCE I Write in an other place where it
> could be
> > > > runned
> > > >
> > > > //TaskMonitor monitor;
> > > > //PlugInContext context;
> > > > // test t=new test();
> > > >
> > > > //........
> > > >
> > > >
> > > > //t.run(monitor,context);
> > > > ///////************************************************
> > > >
> > > >
> > > >
> > > > test.SomeLayerPlugIn
> > > >
> > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------
> > > > Découvrez un nouveau moyen de poser toutes vos questions quelque
> > > soit
> > > > le sujet ! Yahoo! Questions/Réponses pour partager vos
> > > connaissances,
> > > > vos opinions et vos expériences. Cliquez ici
> > > > .
> > >
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > > *Yahoo! Mail réinvente le mail !* Découvrez le nouveau Yahoo! Mail
> > >
> > > et son interface révolutionnaire.
> >
> >
> >
> >
> ------------------------------------------------------------------------
> > Découvrez un nouveau moyen de poser toutes vos questions quelque
> soit
> > le sujet ! Yahoo! Questions/Réponses pour partager vos
> connaissances,
> > vos opinions et vos expériences. Cliquez ici
> > .
>
>
> package test;
> import java.util.ArrayList;
> import java.util.Collection;
> import java.util.Iterator;
> import java.util.List;
>
> import javax.swing.ImageIcon;
>
> import com.vividsolutions.jts.geom.Geometry;
> import com.vividsolutions.jump.I18N;
> import com.vividsolutions.jump.feature.AttributeType;
> import com.vividsolutions.jump.feature.Feature;
> import com.vividsolutions.jump.feature.FeatureCollection;
> import com.vividsolutions.jump.feature.FeatureDataset;
> import com.vividsolutions.jump.feature.FeatureDatasetFactory;
> import com.vividsolutions.jump.feature.FeatureSchema;
> import com.vividsolutions.jump.task.TaskMonitor;
> import com.vividsolutions.jump.workbench.WorkbenchContext;
> import com.vividsolutions.jump.workbench.model.Layer;
> import com.vividsolutions.jump.workbench.model.StandardCategoryNames;
> import com.vividsolutions.jump.workbench.plugin.AbstractPlugIn;
> import com.vividsolutions.jump.workbench.plugin.EnableCheck;
> import com.vividsolutions.jump.workbench.plugin.EnableCheckFactory;
> import com.vividsolutions.jump.workbench.plugin.MultiEnableCheck;
> import com.vividsolutions.jump.workbench.plugin.PlugInContext;
> import com.vividsolutions.jump.workbench.plugin.ThreadedPlugIn;
> import com.vividsolutions.jump.workbench.ui.GUIUtil;
> import com.vividsolutions.jump.workbench.ui.MenuNames;
> import com.vividsolutions.jump.workbench.ui.MultiInputDialog;
> import com.vividsolutions.jump.workbench.ui.images.IconLoader;
> import com.vividsolutions.jump.workbench.ui.plugin.FeatureInstaller;
>
>
> public class SomeLayerPlugIn extends AbstractPlugIn implements
> ThreadedPlugIn{
>
>
>
>
> private final static String LAYER =
> I18N.get("ui.plugin.analysis.BufferPlugIn.layer");
> private final static String DISTANCE =
> I18N.get("ui.plugin.analysis.BufferPlugIn.buffer-distance");
>
> private Layer layer;
> private double bufferDistance = 1.0;
> private boolean exceptionThrown = false;
> private MultiInputDialog dialog;
>
>
> public SomeLayerPlugIn(){
>
> }
>
> public void initialize(PlugInContext context) throws Exception {
> /*
> EnableCheckFactory enableCheckFactory = new EnableCheckFactory(context
> .getWorkbenchContext());
> EnableCheck enableCheck = new MultiEnableCheck().add(
> enableCheckFactory.createWindowWithLayerManagerMustBeActiveCheck()).add(
> enableCheckFactory.createExactlyNLayersMustBeSelectedCheck(1));
>
> //-- this adds an entry to the Tools menu
>
> new FeatureInstaller(context.getWorkbenchContext())
> .addMainMenuItemWithJava14Fix(this, new String[]{MenuNames.TOOLS},
> getName() + "...", false, null, enableCheck);
> */
>
> }
>
> public static EnableCheck createEnableCheck(WorkbenchContext context){
> EnableCheckFactory enableCheckFactory = new
> EnableCheckFactory(context);
> EnableCheck enableCheck = new MultiEnableCheck().add(
> enableCheckFactory.createWindowWithLayerManagerMustBeActiveCheck()).add(
> enableCheckFactory.createExactlyNLayersMustBeSelectedCheck(1));
> return enableCheck;
> }
>
> public static ImageIcon getIcon() {
> return IconLoader.icon("Hammer.gif");
> }
>
> public boolean execute(PlugInContext context) throws Exception {
> MultiInputDialog dialog = new MultiInputDialog(
> context.getWorkbenchFrame(), getName(), true);
> setDialogValues(dialog, context);
> GUIUtil.centreOnWindow(dialog);
> dialog.setVisible(true);
> if (! dialog.wasOKPressed()) { return false; }
> getDialogValues(dialog);
> return true;
> }
>
>
>
> public void run(TaskMonitor monitor, PlugInContext context)
> throws Exception
> {
> FeatureSchema featureSchema = new FeatureSchema();
> featureSchema.addAttribute("GEOMETRY", AttributeType.GEOMETRY);
> FeatureCollection resultFC = new FeatureDataset(featureSchema);
>
> Collection resultColl =
> runBuffer(layer.getFeatureCollectionWrapper());
> resultFC = FeatureDatasetFactory.createFromGeometry(resultColl);
>
>
>
>
>
>
>
> /////**************************************************
> /////// THIS IS THE ADDED CODE
>
> List l=resultFC.getFeatures();
> System.out.println("There is "+l.size()+"Features.");
>
> for(int j=0;j
> {
>
> Feature f= (Feature)l.get(j);
> System.out.println(f.getID()+ " ");
> }
>
> /////***************************************************
>
>
>
>
>
>
> context.addLayer(StandardCategoryNames.WORKING, "Buffer-" +
> layer.getName(), resultFC);
>
> if (exceptionThrown)
>
> context.getWorkbenchFrame().warnUser(I18N.get("ui.plugin.analysis.BufferPlugIn.errors-found-while-executing-buffer"));
> }
>
>
>
> private Collection runBuffer(FeatureCollection fcA)
> {
> exceptionThrown = false;
> Collection resultColl = new ArrayList();
> for (Iterator ia = fcA.iterator(); ia.hasNext(); ) {
> Feature fa = (Feature) ia.next();
> Geometry ga = fa.getGeometry();
> Geometry result = runBuffer(ga);
> if (result != null)
> resultColl.add(result);
> }
> return resultColl;
> }
>
>
> private Geometry runBuffer(Geometry a)
> {
> Geometry result = null;
> try {
> result = a.buffer(bufferDistance);
> return result;
> }
> catch (RuntimeException ex) {
> // simply eat exceptions and report them by returning null
> exceptionThrown = true;
> }
> return null;
> }
>
>
>
>
> public void setDialogValues(MultiInputDialog dialog, PlugInContext
> context)
> {
> //dialog.setSideBarImage(new
> ImageIcon(getClass().getResource("DiffSegments.png")));
>
> dialog.setSideBarDescription(I18N.get("ui.plugin.analysis.BufferPlugIn.buffers-all-geometries-in-the-input-layer"));
> //Initial layer value is null
> dialog.addLayerComboBox(LAYER, layer, context.getLayerManager());
> dialog.addDoubleField(DISTANCE, bufferDistance, 10, null);
> }
>
>
>
> public void getDialogValues(MultiInputDialog dialog) {
> layer = dialog.getLayer(LAYER);
> bufferDistance = dialog.getDouble(DISTANCE);
> }
>
>
> }
>
> //////************************************************
> // AND THEN OF COURCE I Write in an other place where it could be
> runned
>
> //TaskMonitor monitor;
> //PlugInContext context;
> // test t=new test();
>
> //........
>
>
> //t.run(monitor,context);
> ///////************************************************
>
>
> ------------------------------------------------------------------------
> *Yahoo! Mail réinvente le mail !* Découvrez le nouveau Yahoo! Mail
> <http://fr.rd.yahoo.com/evt=40577/*http://fr.promotions.yahoo.com/mail/nouveaumail.html%20>
>
> et son interface révolutionnaire.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel