public abstract class ContainerLayout extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Rectangle |
layoutarea |
Constructor and Description |
---|
ContainerLayout() |
Modifier and Type | Method and Description |
---|---|
void |
createLayout(NodeData data,
Rectangle area,
String DataSetLabel,
DataSetLayoutProperties props)
Create the Layout for a given set of data, in a specified area using a specified Label for the underlying Dataset.
|
static Double[] |
determineDisplayRange(Double[] valuerange)
This function allows to get a
Range of minimal and maximal values based on a valuerange to determine suitable axes.
|
Rectangle |
getLayoutArea()
Get the area assigned to this layout container (in the
IMAGENODEPROPERTIES .IMAGEWIDTH // IMAGENODEPROPERTIES .IMAGEHEIGHT) range. |
abstract void |
LayoutDataForNode(NodeData data,
org.apache.batik.svggen.SVGGraphics2D context,
boolean Legend,
ColorMap coloring)
Layout the Data according to the previously generated layout
|
static Double[] |
roundToCommonOrder(Double lowvalue,
Double highvalue)
Round the number to the numbers Order.
|
static Double |
roundToOrder(Double value,
boolean up)
Round the number to the numbers Order.
|
protected abstract void |
setupLayout(NodeData data,
Rectangle area,
String DataSetLabel,
DataSetLayoutProperties props)
Setup the layout specific positions and data.
|
abstract void |
updateLabel(String DatasetLabel)
Update the Label used in this Layout.
|
protected Rectangle layoutarea
public final void createLayout(NodeData data, Rectangle area, String DataSetLabel, DataSetLayoutProperties props) throws WrongDatasetTypeException
data
- The nodeData to use to set up the layout.area
- 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 the ContainerLayout
was created)WrongDatasetTypeException
- If an incompatible data set type was usedprotected abstract void setupLayout(NodeData data, Rectangle area, String DataSetLabel, DataSetLayoutProperties props) throws WrongDatasetTypeException
data
- The nodeData to use to set up the layout.area
- 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 the ContainerLayout
was created)WrongDatasetTypeException
- If an incompatible data set type was usedpublic abstract void LayoutDataForNode(NodeData data, org.apache.batik.svggen.SVGGraphics2D context, boolean Legend, ColorMap coloring)
data
- the data to layoutcontext
- the graphics context in which to draw the layoutLegend
- whether this is a layout for the legend or not.coloring
- The ColorMap to use for the layoutpublic abstract void updateLabel(String DatasetLabel)
DatasetLabel
- The new label to be used for the DataSet
public static final Double[] determineDisplayRange(Double[] valuerange)
valuerange
- the range of values (length 2, min and max value)public static final Double[] roundToCommonOrder(Double lowvalue, Double highvalue)
lowvalue
- the lower value to create a common Orderhighvalue
- the upper value to create a common Order.public static final Double roundToOrder(Double value, boolean up)
value
- the value to roundup
- whether to round up or down.public Rectangle getLayoutArea()
IMAGENODEPROPERTIES
.IMAGEWIDTH // IMAGENODEPROPERTIES
.IMAGEHEIGHT) range.Copyright © 2018. All rights reserved.