Class AbstractArrayContainerLayout
- java.lang.Object
-
- idare.imagenode.Interfaces.Layout.ContainerLayout
-
- idare.imagenode.Data.BasicDataTypes.ArrayData.AbstractArrayContainerLayout
-
- All Implemented Interfaces:
Serializable
public abstract class AbstractArrayContainerLayout extends ContainerLayout
TheAbstractArrayContainerLayout
provides basic features for anyAbstractArrayContainerLayout
, such as shape placements etc.- Author:
- Thomas Pfau
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AbstractArrayContainerLayout.LegendShapePosition
AAbstractArrayContainerLayout.LegendShapePosition
extends aAbstractArrayContainerLayout.ShapePosition
by additionally drawing a Label in the center of the shape.class
AbstractArrayContainerLayout.ShapePosition
A Shapeposition combines a shape with positioning information.
-
Field Summary
-
Fields inherited from class idare.imagenode.Interfaces.Layout.ContainerLayout
layoutarea
-
-
Constructor Summary
Constructors Constructor Description AbstractArrayContainerLayout()
Basic constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractArrayContainerLayout.ShapePosition
getLegendShape(Rectangle2D Area, String itemid)
Get the ShapePosition representing the current Legend using the label indicated, and the Dimension provided.abstract Shape
getShape(Dimension Area)
Get the Shape to be used for individual items in the specified area.protected AbstractArrayContainerLayout.ShapePosition
getShapePosition(Shape currentShape, Rectangle2D position)
Generate aAbstractArrayContainerLayout.ShapePosition
from a Rectangle and a given Shape.void
LayoutDataForNode(NodeData data, org.apache.batik.svggen.SVGGraphics2D context, boolean Legend, ColorMap colors)
Layout the Data according to the previously generated layoutvoid
setupLayout(NodeData data, Rectangle AreaAndPosition, String DataSetLabel, DataSetLayoutProperties props)
Setup the layout specific positions and data.void
updateLabel(String DatasetLabel)
Update the Label used in this Layout.-
Methods inherited from class idare.imagenode.Interfaces.Layout.ContainerLayout
createLayout, determineDisplayRange, getLayoutArea, roundToCommonOrder, roundToOrder
-
-
-
-
Method Detail
-
getShapePosition
protected AbstractArrayContainerLayout.ShapePosition getShapePosition(Shape currentShape, Rectangle2D position)
Generate aAbstractArrayContainerLayout.ShapePosition
from a Rectangle and a given Shape. The Shape must be compatible with BATIK or implement its ownDefaultExtensionHandler
. see https://xmlgraphics.apache.org/batik/using/svg-generator.html- Parameters:
currentShape
- the shape to be used for thisAbstractArrayContainerLayout.ShapePosition
position
- the position the shape should occupy- Returns:
- The generated ShapePosition
-
setupLayout
public void setupLayout(NodeData data, Rectangle AreaAndPosition, String DataSetLabel, DataSetLayoutProperties props) throws WrongDatasetTypeException
Description copied from class:ContainerLayout
Setup the layout specific positions and data.- Specified by:
setupLayout
in classContainerLayout
- Parameters:
data
- The nodeData to use to set up the layout.AreaAndPosition
- the area in which to create the layoutDataSetLabel
- the label of the corresponding Dataset to display somewhere in the area.props
- the properties to use (commonly those from which theContainerLayout
was created)- Throws:
WrongDatasetTypeException
- If an incompatible data set type was used
-
getShape
public abstract Shape getShape(Dimension Area)
Get the Shape to be used for individual items in the specified area.- Parameters:
Area
- The size of the shape to be returned.- Returns:
- A Shape with appropriate dimension
-
getLegendShape
public abstract AbstractArrayContainerLayout.ShapePosition getLegendShape(Rectangle2D Area, String itemid)
Get the ShapePosition representing the current Legend using the label indicated, and the Dimension provided.- Parameters:
Area
- Area to put the legend shape intoitemid
- The Label for theAbstractArrayContainerLayout.ShapePosition
.- Returns:
- A shapeposition, that can draw itself using the provided area and d
-
LayoutDataForNode
public void LayoutDataForNode(NodeData data, org.apache.batik.svggen.SVGGraphics2D context, boolean Legend, ColorMap colors)
Description copied from class:ContainerLayout
Layout the Data according to the previously generated layout- Specified by:
LayoutDataForNode
in classContainerLayout
- Parameters:
data
- the data to layoutcontext
- the graphics context in which to draw the layoutLegend
- whether this is a layout for the legend or not.colors
- The ColorMap to use for the layout
-
updateLabel
public void updateLabel(String DatasetLabel)
Description copied from class:ContainerLayout
Update the Label used in this Layout.- Specified by:
updateLabel
in classContainerLayout
- Parameters:
DatasetLabel
- The new label to be used for theDataSet
-
-