I quickly put together a build of BizzJUMP (OpenJUMP) yesterday that
included modifications to the BasicFeature class that allows OpenJUMP
to track modifications to Feature attribute values. This would allow
client code to determine which features have been modified. (This
might be used by a database plug-in to write modified features back to
a database.)

I have included a plug-in in the build that tests this new
functionality of the BasicFeature class. Under the "Edit" top-level
menu there is now a menu item called "Select Modified Features". It
will select any Features in visible layers that have been modified
after they were initially loaded from their source.

I implemented this functionality in the BasicFeature class as
previously discussed on this list. I used a single in to count the
number of times the setAttribute or setAttributes methods are called.
Every time this occures the counter is incremented. I then provided a
method that compared this counter to the number of attributes and
returns a boolean variable indicating if the setAttribute or
setAttributes method had been called after the initialization of the
Feature.

I have not made the link to the build public, but if you want to test
the BasicFeature mods, you can download it here:

http://www.redefinedhorizons.com/shared_files/software/openjump-20090430.zip

I have attached the source code for the plug-in and the BasicFeature
class to this e-mail.

This build of BizzJUMP also integrates the InfoNode Docking Window
framework and contains the following changes to the core:

com.vividsolutions.jump.workbench.WorkbenchFrame Changes (2009-04-10)
- I removed the anonymous class implementing the LayerListener interface
  from the addTaskFrame method and made the WorkbenchFrame itself
  implement the LayerListener interface.
- I added the following member variables:
  - private TaskFrame activeTaskFrame
  - private boolean hasActiveTaskFrame
  - private int numberOfTaskFrames
- I added the following methods:
  -  public boolean hasTaskFrame
  -  public boolean hasActiveTaskFrame
  -  public TaskFrame getActiveTaskFrame
  -  public int getNumberOfTaskFrames
- I removed the anonymous class implementing the InternalFrameListener
  interface from the addInternalTaskFrame method and made the
  WorkbenchFrame itself implement the InternalFrameListener interface.
  This change allowed the WorkbenchFrame to maintain a count of the
  TaskFrames it contained and to properly track the active TaskFrame.

com.vividsolutions.jump.workbench.WorkbenchContext Changes (2009-04-10)
- Added the following methods:
  - public TaskFrame getActiveTaskFrame
  - public boolean workbenchHasActiveTaskFrame

com.vividsolutions.jump.feature.BasicFeature
- Modified the following methods to support the tracking modifications
to BasicFeature attributes:
  - public void setAttributes
  - public void setAttribute
- Added a new method:
  - public boolean isModified

I'm currently working on a custom build process that will allow me to
automatically graft my latest BizzJUMP changes onto the latest
OpenJUMP core from the JPP. I will make an official release of
BizzJUMP based on OpenJUMP 1.3 as soon as I have this process
complete. If other programmers are interested in this build set-up for
their own forks of OpenJUMP, I would be willing to share it.

The Sunburned Surveyor

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to