de.soldin.gt2jump.cts
Class CSLayerSetExtension

java.lang.Object
  extended bycom.vividsolutions.jump.workbench.plugin.Extension
      extended byde.soldin.gt2jump.cts.CSLayerSetExtension
All Implemented Interfaces:
ActionListener, com.vividsolutions.jump.workbench.plugin.Configuration, CSTransformFilter, EventListener, com.vividsolutions.jump.workbench.plugin.PlugIn, WindowListener

public class CSLayerSetExtension
extends com.vividsolutions.jump.workbench.plugin.Extension
implements ActionListener, CSTransformFilter, WindowListener, com.vividsolutions.jump.workbench.plugin.PlugIn

CSLayerSetExtension acts as extension, plugin and therefore is a listener to this extensions ui components.

The plugin itself only creates CSSetting objects which are saved in the workbenchs blackboard. If there is a layer assigned to a cs, then there is a matching CSSetting in the blackboard.

For the setting to take effect there are CSTransform objects registered as CSSetListener which on a setting trial get informed and transform the CSSettings geometries, speak the geometries of all features in the CSSettings layer.

See Also:
Extension, PlugIn

Field Summary
 JComboBox chooser_src
           
 JComboBox chooser_trg
           
 JPanel p_buttons
           
 JPanel p_categories
           
 JPanel p_layers
           
 
Constructor Summary
CSLayerSetExtension()
           
 
Method Summary
 void actionPerformed(ActionEvent e)
          implementation of the actionlisteners method ActionListener.actionPerformed(java.awt.event.ActionEvent) to catch events from the dialog's buttons.
 void configure(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
           
 com.vividsolutions.jump.workbench.plugin.EnableCheck createCategorySelectedMustHaveAtLeastNItems(int i, com.vividsolutions.jump.workbench.WorkbenchContext workbenchContext)
          Creates a EnableCheck with the given count of layers necessary for a category.
 boolean execute(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
          builds the dialog, adds the necessary listeners, which take care of setting the cs's for the layers and transforms if requested.
 String getName()
           
 String getVersion()
           
 void initialize(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
          Adds the menu entries, intializes swix stuff
 Collection transform(Collection csss)
          implementation of changing the cs by transforming the coordinates of different geometries, parameter is a Collection of CSSettings
 Collection transform(CSSetting css)
          implementation of changing the cs by transforming the coordinates of different geometries, parameter is a CSSetting
 void windowActivated(WindowEvent e)
          does nothing
 void windowClosed(WindowEvent e)
          does nothing
 void windowClosing(WindowEvent e)
          of window closes the event will be cancelled
 void windowDeactivated(WindowEvent e)
           
 void windowDeiconified(WindowEvent e)
           
 void windowIconified(WindowEvent e)
           
 void windowOpened(WindowEvent e)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chooser_src

public JComboBox chooser_src

chooser_trg

public JComboBox chooser_trg

p_layers

public JPanel p_layers

p_categories

public JPanel p_categories

p_buttons

public JPanel p_buttons
Constructor Detail

CSLayerSetExtension

public CSLayerSetExtension()
Method Detail

configure

public void configure(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
               throws Exception
Specified by:
configure in interface com.vividsolutions.jump.workbench.plugin.Configuration
Throws:
Exception
See Also:
Configuration.configure(com.vividsolutions.jump.workbench.plugin.PlugInContext)

getVersion

public String getVersion()
See Also:
Extension.getVersion()

initialize

public void initialize(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
Adds the menu entries, intializes swix stuff

Specified by:
initialize in interface com.vividsolutions.jump.workbench.plugin.PlugIn
See Also:
PlugIn.initialize(com.vividsolutions.jump.workbench.plugin.PlugInContext)

getName

public String getName()
Specified by:
getName in interface com.vividsolutions.jump.workbench.plugin.PlugIn
See Also:
Extension.getName()

execute

public boolean execute(com.vividsolutions.jump.workbench.plugin.PlugInContext context)
                throws Exception
builds the dialog, adds the necessary listeners, which take care of setting the cs's for the layers and transforms if requested.

Specified by:
execute in interface com.vividsolutions.jump.workbench.plugin.PlugIn
Throws:
Exception
See Also:
PlugIn.execute(com.vividsolutions.jump.workbench.plugin.PlugInContext)

transform

public Collection transform(Collection csss)
implementation of changing the cs by transforming the coordinates of different geometries, parameter is a Collection of CSSettings

Specified by:
transform in interface CSTransformFilter
See Also:
CSTransformFilter.transform(java.util.Collection)

transform

public Collection transform(CSSetting css)
implementation of changing the cs by transforming the coordinates of different geometries, parameter is a CSSetting

Specified by:
transform in interface CSTransformFilter
See Also:
CSTransformFilter.transform(de.soldin.gt2jump.cts.CSSetting)

actionPerformed

public void actionPerformed(ActionEvent e)
implementation of the actionlisteners method ActionListener.actionPerformed(java.awt.event.ActionEvent) to catch events from the dialog's buttons.

Specified by:
actionPerformed in interface ActionListener
See Also:
ActionListener.actionPerformed(java.awt.event.ActionEvent)

windowActivated

public void windowActivated(WindowEvent e)
does nothing

Specified by:
windowActivated in interface WindowListener
See Also:
WindowListener.windowActivated(java.awt.event.WindowEvent)

windowClosed

public void windowClosed(WindowEvent e)
does nothing

Specified by:
windowClosed in interface WindowListener
See Also:
WindowListener.windowClosed(java.awt.event.WindowEvent)

windowClosing

public void windowClosing(WindowEvent e)
of window closes the event will be cancelled

Specified by:
windowClosing in interface WindowListener
See Also:
WindowListener.windowClosing(java.awt.event.WindowEvent)

windowDeactivated

public void windowDeactivated(WindowEvent e)
Specified by:
windowDeactivated in interface WindowListener

windowDeiconified

public void windowDeiconified(WindowEvent e)
Specified by:
windowDeiconified in interface WindowListener

windowIconified

public void windowIconified(WindowEvent e)
Specified by:
windowIconified in interface WindowListener

windowOpened

public void windowOpened(WindowEvent e)
Specified by:
windowOpened in interface WindowListener

createCategorySelectedMustHaveAtLeastNItems

public com.vividsolutions.jump.workbench.plugin.EnableCheck createCategorySelectedMustHaveAtLeastNItems(int i,
                                                                                                        com.vividsolutions.jump.workbench.WorkbenchContext workbenchContext)
Creates a EnableCheck with the given count of layers necessary for a category.

Parameters:
i - count of necessary layers, for the check not to return a errormessage
workbenchContext -
Returns:
the enable check object
See Also:
EnableCheck, MultiEnableCheck