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 MultiArrayNodeDatadataTheNodeDatathis container is associated withprotected LocalisationlocThe localisation information of thisDataContainerprotected static intminheightThe minimal height (out of 10) of the container.protected static intminwidthThe minimal width (out of 10) of the containerprotected DataSetoriginTheDataSetthis 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 ContainerLayoutcreateEmptyLayout()Create a new Layout for this container.NodeDatagetData()Get theNodeDataassociated with this ContainerDataSetgetDataSet()Get the source Dataset this Container was build from.RectanglegetMinimalSize()A container should provide information on its size This dimension is assumed to simultaneously represent the number of items (i.e.DimensiongetPreferredSize(Dimension availablearea, IMAGENODEPROPERTIES.LayoutStyle style)
-
-
-
Field Detail
-
loc
protected Localisation loc
The localisation information of thisDataContainer
-
data
protected MultiArrayNodeData data
TheNodeDatathis 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:DataContainerA 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:
getMinimalSizein interfaceDataContainer- Returns:
- the minimal Size of this container (in units)
-
getDataSet
public DataSet getDataSet()
Description copied from interface:DataContainerGet the source Dataset this Container was build from.- Specified by:
getDataSetin interfaceDataContainer- Returns:
- the source dataset of this container
-
getPreferredSize
public Dimension getPreferredSize(Dimension availablearea, IMAGENODEPROPERTIES.LayoutStyle style)
Description copied from interface:DataContainerGet the preferred size (as a rectangle with Integer width and height, based on the available area provided The resultingRectanglewidth must be smaller or equal to the providedRectangle. The same applies to its height.- Specified by:
getPreferredSizein 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:DataContainerGet theNodeDataassociated with this Container- Specified by:
getDatain interfaceDataContainer- Returns:
- the
NodeDatafor this container
-
createEmptyLayout
public ContainerLayout createEmptyLayout()
Description copied from interface:DataContainerCreate a new Layout for this container.- Specified by:
createEmptyLayoutin interfaceDataContainer- Returns:
- an uninitialized
ContainerLayout
-
-