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
TheAbstractArrayContainerLayoutprovides 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 classAbstractArrayContainerLayout.LegendShapePositionAAbstractArrayContainerLayout.LegendShapePositionextends aAbstractArrayContainerLayout.ShapePositionby additionally drawing a Label in the center of the shape.classAbstractArrayContainerLayout.ShapePositionA 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.ShapePositiongetLegendShape(Rectangle2D Area, String itemid)Get the ShapePosition representing the current Legend using the label indicated, and the Dimension provided.abstract ShapegetShape(Dimension Area)Get the Shape to be used for individual items in the specified area.protected AbstractArrayContainerLayout.ShapePositiongetShapePosition(Shape currentShape, Rectangle2D position)Generate aAbstractArrayContainerLayout.ShapePositionfrom a Rectangle and a given Shape.voidLayoutDataForNode(NodeData data, org.apache.batik.svggen.SVGGraphics2D context, boolean Legend, ColorMap colors)Layout the Data according to the previously generated layoutvoidsetupLayout(NodeData data, Rectangle AreaAndPosition, String DataSetLabel, DataSetLayoutProperties props)Setup the layout specific positions and data.voidupdateLabel(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.ShapePositionfrom 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.ShapePositionposition- 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:ContainerLayoutSetup the layout specific positions and data.- Specified by:
 setupLayoutin 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 theContainerLayoutwas 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:ContainerLayoutLayout the Data according to the previously generated layout- Specified by:
 LayoutDataForNodein 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:ContainerLayoutUpdate the Label used in this Layout.- Specified by:
 updateLabelin classContainerLayout- Parameters:
 DatasetLabel- The new label to be used for theDataSet
 
 - 
 
 -