Class MultiArrayContainer
- java.lang.Object
-
- idare.imagenode.Data.BasicDataTypes.MultiArrayData.MultiArrayContainer
-
- All Implemented Interfaces:
DataContainer
public class MultiArrayContainer extends Object implements DataContainer
A Container for aMultiArrayDataSet
- Author:
- Thomas Pfau
-
-
Field Summary
Fields Modifier and Type Field Description protected MultiArrayNodeData
data
TheNodeData
this container is associated withprotected Localisation
loc
The localisation information of thisDataContainer
protected static int
minheight
The minimal height (out of 10) of the container.protected static int
minwidth
The minimal width (out of 10) of the containerprotected DataSet
origin
TheDataSet
this container is associated with
-
Constructor Summary
Constructors Constructor Description MultiArrayContainer(DataSet origin, NodeData data)
Standard Constructor using the Source Dataset and a NodeData
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContainerLayout
createEmptyLayout()
Create a new Layout for this container.NodeData
getData()
Get theNodeData
associated with this ContainerDataSet
getDataSet()
Get the source Dataset this Container was build from.Rectangle
getMinimalSize()
A container should provide information on its size This dimension is assumed to simultaneously represent the number of items (i.e.Dimension
getPreferredSize(Dimension availablearea, IMAGENODEPROPERTIES.LayoutStyle style)
-
-
-
Field Detail
-
loc
protected Localisation loc
The localisation information of thisDataContainer
-
data
protected MultiArrayNodeData data
TheNodeData
this container is associated with
-
minwidth
protected static int minwidth
The minimal width (out of 10) of the container
-
minheight
protected static int minheight
The minimal height (out of 10) of the container.
-
-
Method Detail
-
getMinimalSize
public Rectangle getMinimalSize()
Description copied from interface:DataContainer
A container should provide information on its size This dimension is assumed to simultaneously represent the number of items (i.e. Dimension.x * Dimension.y = Number of items The maximal dimension allowed for a non flexible container is 10*10 in the center and 10*6 in the edges For a flexible container it is assumed, that the container can be rescaled and thus a maximal item count of 100 is allowed for center and 60 for edge containers- Specified by:
getMinimalSize
in interfaceDataContainer
- Returns:
- the minimal Size of this container (in units)
-
getDataSet
public DataSet getDataSet()
Description copied from interface:DataContainer
Get the source Dataset this Container was build from.- Specified by:
getDataSet
in interfaceDataContainer
- Returns:
- the source dataset of this container
-
getPreferredSize
public Dimension getPreferredSize(Dimension availablearea, IMAGENODEPROPERTIES.LayoutStyle style)
Description copied from interface:DataContainer
Get the preferred size (as a rectangle with Integer width and height, based on the available area provided The resultingRectangle
width must be smaller or equal to the providedRectangle
. The same applies to its height.- Specified by:
getPreferredSize
in interfaceDataContainer
- Parameters:
availablearea
- The area available to generate the layoutstyle
- the localisation (either CENTER or EDGE).- Returns:
- the preferred size within the provided rectangle
-
getData
public NodeData getData()
Description copied from interface:DataContainer
Get theNodeData
associated with this Container- Specified by:
getData
in interfaceDataContainer
- Returns:
- the
NodeData
for this container
-
createEmptyLayout
public ContainerLayout createEmptyLayout()
Description copied from interface:DataContainer
Create a new Layout for this container.- Specified by:
createEmptyLayout
in interfaceDataContainer
- Returns:
- an uninitialized
ContainerLayout
-
-