Class LayerStyle2SLDPlugIn
java.lang.Object
com.vividsolutions.jump.workbench.plugin.AbstractPlugIn
de.latlon.deejump.plugin.style.LayerStyle2SLDPlugIn
- All Implemented Interfaces:
EnableChecked, Iconified, PlugIn, Recordable, ShortcutEnabled
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ImageIconprotected static TransformerTheTransformerobject used in the transformation of a task/project/layer xml to sld.Fields inherited from class AbstractPlugIn
shortcutKeys, shortcutModifiers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEnableCheck(WorkbenchContext workbenchContext) booleanexecute(PlugInContext context) Execute the PlugIn.getIcon()Plugin icon assumed to be 16x16 by defaultgetName()Returns a very brief description of this PlugIn e.g. for display as a menu itemvoidinitialize(PlugInContext context) Called when Workbench starts up to allow plugins to initialize themselves.voidinstall(PlugInContext context) Use this method to install the LayerStyle2SLD plugin in the toolbarstatic doubletoRealWorldScale(double scaleFactor, double jumpScale) static StringtransformContext(InputStream layerXML, Map<String, String> parameters) static StringtransformContext(Reader layerXML, Map<String, String> parameters) Methods inherited from class AbstractPlugIn
addParameter, createName, execute, execute, getBooleanParam, getContext, getDoubleParam, getEnableCheck, getIcon, getIcon, getIntegerParam, getParameter, getParameters, getShortcutKeys, getShortcutKeyStroke, getShortcutModifiers, getStringParam, getWorkbenchContext, isRollingBackInvalidEdits, isShortcutEnabled, reportNothingToUndoYet, setParameters, setShortcutKeys, setShortcutModifiers, toActionListener, toString
-
Field Details
-
ICON
-
transformer
TheTransformerobject used in the transformation of a task/project/layer xml to sld.
-
-
Constructor Details
-
LayerStyle2SLDPlugIn
public LayerStyle2SLDPlugIn()
-
-
Method Details
-
getName
Description copied from interface:PlugInReturns a very brief description of this PlugIn e.g. for display as a menu item- Specified by:
getNamein interfacePlugIn- Overrides:
getNamein classAbstractPlugIn- Returns:
- the class name, minus "PlugIn", with spaces inserted at the appropriate point before each uppercase+lowercase and lowercase+uppercase combination.
-
install
Use this method to install the LayerStyle2SLD plugin in the toolbar- Parameters:
context- PlugInContext- Throws:
Exception- if an Exception occurs
-
initialize
Description copied from interface:PlugInCalled when Workbench starts up to allow plugins to initialize themselves.- Specified by:
initializein interfacePlugIn- Overrides:
initializein classAbstractPlugIn- Parameters:
context- context of the PlugIn- Throws:
Exception- if an exception occur during initialization
-
execute
Description copied from class:AbstractPlugInExecute the PlugIn.- Specified by:
executein interfacePlugIn- Overrides:
executein classAbstractPlugIn- Parameters:
context- context of this PlugIn- Returns:
- true if the PlugIn has been executed
- Throws:
Exception- if an Exception occurs during execution- See Also:
-
getIcon
Description copied from class:AbstractPlugInPlugin icon assumed to be 16x16 by default- Specified by:
getIconin interfaceIconified- Overrides:
getIconin classAbstractPlugIn- Returns:
- the icon
-
transformContext
public static String transformContext(InputStream layerXML, Map<String, String> parameters) throws TransformerException- Parameters:
layerXML- xml InputStream defining the symbolizationparameters- Map of parameters for XML transformation- Returns:
- the transformed XML (?)
- Throws:
TransformerException- if an Exception occurs during XML transformation
-
transformContext
public static String transformContext(Reader layerXML, Map<String, String> parameters) throws TransformerException- Parameters:
layerXML- Reader reading symbology definition in XMLparameters- a Map of parameters- Returns:
- the transformed XML (?)
- Throws:
TransformerException- if an Exception occurs during XML transformation
-
createEnableCheck
- Parameters:
workbenchContext- the WorkbenchContext- Returns:
- the EnableCheck object to enable/disable the PlugIn
-
toRealWorldScale
public static double toRealWorldScale(double scaleFactor, double jumpScale) - Parameters:
scaleFactor- scale factor between internalScale (screen pixels to model units) and realScale (image and model in homogeneous coordinates)jumpScale- map scale as defined in the min/max scale style interface- Returns:
- the scale TODO seems that we do a lot of redundant work to compute this scale
-