Class ColouredSizedArrowLayer
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.style.Drawable
-
- uk.ac.rdg.resc.edal.graphics.style.ImageLayer
-
- uk.ac.rdg.resc.edal.graphics.style.GriddedImageLayer
-
- uk.ac.rdg.resc.edal.graphics.style.SizedArrowLayer
-
- uk.ac.rdg.resc.edal.graphics.style.ColouredSizedArrowLayer
-
public class ColouredSizedArrowLayer extends SizedArrowLayer
AGriddedImageLayerwhich draws arrows which can be scaled and coloured according to two (potentially different) data fields User: JRIDate: 02/08/2016
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class uk.ac.rdg.resc.edal.graphics.style.GriddedImageLayer
GriddedImageLayer.MapFeatureDataReader
-
Nested classes/interfaces inherited from class uk.ac.rdg.resc.edal.graphics.style.ImageLayer
ImageLayer.MetadataFilter
-
Nested classes/interfaces inherited from class uk.ac.rdg.resc.edal.graphics.style.Drawable
Drawable.NameAndRange
-
-
Field Summary
-
Fields inherited from class uk.ac.rdg.resc.edal.graphics.style.SizedArrowLayer
arrowSizeFieldName, directionFieldName
-
-
Constructor Summary
Constructors Constructor Description ColouredSizedArrowLayer(String directionField, String arrowSizeField, String arrowColourField, Integer arrowMinSize, Integer arrowMaxSize, ScaleRange scale, ColourScheme arrowColourScheme, ArrowLayer.ArrowStyle arrowStyle, ArrowLayer.ArrowDirectionConvention arrowDirectionConvention)Instantiates a newColouredSizedArrowLayer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddrawIntoImage(BufferedImage image, GriddedImageLayer.MapFeatureDataReader dataReader)Draws the data into the supplied image.protected ColorgetArrowColour(Number arrowSize)Set<Drawable.NameAndRange>getFieldsWithScales()-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.SizedArrowLayer
drawArrows
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.GriddedImageLayer
drawIntoImage, supportedFeatureTypes
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.ImageLayer
drawImage, getMetadataFilter
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.Drawable
getOpacityTransform, setOpacityTransform
-
-
-
-
Constructor Detail
-
ColouredSizedArrowLayer
public ColouredSizedArrowLayer(String directionField, String arrowSizeField, String arrowColourField, Integer arrowMinSize, Integer arrowMaxSize, ScaleRange scale, ColourScheme arrowColourScheme, ArrowLayer.ArrowStyle arrowStyle, ArrowLayer.ArrowDirectionConvention arrowDirectionConvention)
Instantiates a newColouredSizedArrowLayer- Parameters:
directionField- The name of the data layer used to determine directionarrowSizeField- The name of the data layer used to determine arrow sizearrowColourField- The name of the data layer used to determine arrow colourarrowMinSize- The minimum arrow size to plot, in pixelsarrowMaxSize- The maximum arrow size to plot, in pixelsscale- TheScaleRangeused to scale the arrow sizearrowColourScheme- TheColourSchemeused to determine arrow colourarrowStyle- The style of arrow to plotarrowDirectionConvention- The direction convention of arrow to plot
-
-
Method Detail
-
getArrowColour
protected Color getArrowColour(Number arrowSize)
- Overrides:
getArrowColourin classSizedArrowLayer
-
drawIntoImage
protected void drawIntoImage(BufferedImage image, GriddedImageLayer.MapFeatureDataReader dataReader) throws EdalException
Description copied from class:GriddedImageLayerDraws the data into the supplied image.- Overrides:
drawIntoImagein classSizedArrowLayer- Parameters:
image- ABufferedImageto draw intodataReader- AGriddedImageLayer.MapFeatureDataReaderwhich is used to obtain the actual data values and domain. TheMapDomainreturned will match the size of the image, and pixels are georeferenced to the GridCell2Ds which comprise the domain- Throws:
EdalException- If there is a problem reading the data or drawing into the image
-
getFieldsWithScales
public Set<Drawable.NameAndRange> getFieldsWithScales()
- Overrides:
getFieldsWithScalesin classSizedArrowLayer- Returns:
- A list of all the fields used in this image layer, and their
appropriate scale ranges. If there is NO scale range there can be
NO data field and vice versa - i.e. a
Drawable.NameAndRangeobject must have all non-null fields. If the layer doesn't depend on any data, this should return an empty set. It should never returnnull.
-
-