Class AbstractSelectionRenderer
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.renderer.FeatureCollectionRenderer
-
- com.vividsolutions.jump.workbench.ui.renderer.AbstractSelectionRenderer
-
- Direct Known Subclasses:
FeatureSelectionRenderer,LineStringSelectionRenderer,PartSelectionRenderer,SelectionBackgroundRenderer
public abstract class AbstractSelectionRenderer extends FeatureCollectionRenderer implements Style
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vividsolutions.jump.workbench.ui.renderer.Renderer
Renderer.ContentDependendFactory, Renderer.Factory
-
-
Field Summary
Fields Modifier and Type Field Description static intHANDLE_WIDTHprotected LayerViewPanelpanel
-
Constructor Summary
Constructors Constructor Description AbstractSelectionRenderer(Object contentID, LayerViewPanel panel, Color color, boolean paintingHandles, boolean filling)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectclone()protected abstract Map<Feature,List<org.locationtech.jts.geom.Geometry>>featureToSelectedItemsMap(Layer layer)ColorgetFillColor()Get the fillColor variable of selectedFeaturesIcongetIcon()StringgetName()voidinitialize(Layer layer)Called before #paint is applied to each Feature.booleanisEnabled()protected Map<Layer,Collection<Feature>>layerToFeaturesMap()voidpaint(Feature f, Graphics2D g, Viewport viewport)voidpaint(org.locationtech.jts.geom.Geometry geometry, Graphics2D g, Viewport viewport)static voidpaintHandles(Graphics2D g, org.locationtech.jts.geom.Coordinate[] coordinates, Stroke stroke, Color fillColor, Color lineColor, Viewport viewport)voidsetEnabled(boolean enabled)voidsetSelectionFillColor(Color color)Sets the fillColor variable of selectedFeaturesvoidsetSelectionLineColor(Color color)Sets the Color for the Selection rendering.voidsetSelectionPointForm(String selectionPointForm)Sets the point form.voidsetSelectionPointSize(int selectionPointSize)Sets the pointsize for selected features.protected Collection<Style>styles()protected booleanuseImageCaching(Map<Layer,List<Feature>> layerToFeaturesMap)-
Methods inherited from class com.vividsolutions.jump.workbench.ui.renderer.FeatureCollectionRenderer
cancel, clearImageCache, copyTo, createRunnable, getContentID, getMaxFeatures, getSimpleFeatureCollectionRenderer, isRendering, setMaxFeatures
-
-
-
-
Field Detail
-
HANDLE_WIDTH
public static final int HANDLE_WIDTH
- See Also:
- Constant Field Values
-
panel
protected LayerViewPanel panel
-
-
Constructor Detail
-
AbstractSelectionRenderer
public AbstractSelectionRenderer(Object contentID, LayerViewPanel panel, Color color, boolean paintingHandles, boolean filling)
-
-
Method Detail
-
getName
public String getName()
-
getIcon
public Icon getIcon()
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabledin interfaceStyle
-
isEnabled
public boolean isEnabled()
-
initialize
public void initialize(Layer layer)
Description copied from interface:StyleCalled before #paint is applied to each Feature.- Specified by:
initializein interfaceStyle- Parameters:
layer- the layer on which to apply this style
-
paint
public void paint(Feature f, Graphics2D g, Viewport viewport) throws NoninvertibleTransformException
- Specified by:
paintin interfaceStyle- Throws:
NoninvertibleTransformException
-
paint
public void paint(org.locationtech.jts.geom.Geometry geometry, Graphics2D g, Viewport viewport) throws NoninvertibleTransformException- Throws:
NoninvertibleTransformException
-
styles
protected Collection<Style> styles()
- Specified by:
stylesin classFeatureCollectionRenderer
-
layerToFeaturesMap
protected Map<Layer,Collection<Feature>> layerToFeaturesMap()
- Specified by:
layerToFeaturesMapin classFeatureCollectionRenderer
-
featureToSelectedItemsMap
protected abstract Map<Feature,List<org.locationtech.jts.geom.Geometry>> featureToSelectedItemsMap(Layer layer)
-
paintHandles
public static void paintHandles(Graphics2D g, org.locationtech.jts.geom.Coordinate[] coordinates, Stroke stroke, Color fillColor, Color lineColor, Viewport viewport) throws NoninvertibleTransformException
- Throws:
NoninvertibleTransformException
-
useImageCaching
protected boolean useImageCaching(Map<Layer,List<Feature>> layerToFeaturesMap)
- Overrides:
useImageCachingin classFeatureCollectionRenderer
-
setSelectionLineColor
public void setSelectionLineColor(Color color)
Sets the Color for the Selection rendering.- Parameters:
color- the Color to be used for selected features
-
setSelectionPointSize
public void setSelectionPointSize(int selectionPointSize)
Sets the pointsize for selected features.- Parameters:
selectionPointSize- the point size for selected features
-
setSelectionFillColor
public void setSelectionFillColor(Color color)
Sets the fillColor variable of selectedFeatures
-
getFillColor
public Color getFillColor()
Get the fillColor variable of selectedFeatures
-
setSelectionPointForm
public void setSelectionPointForm(String selectionPointForm)
Sets the point form. For possible forms please see VertexStylesFactory constants.- Parameters:
selectionPointForm- the form to use for selected features
-
-