Class AbstractArrayContainer
- java.lang.Object
-
- idare.imagenode.Data.BasicDataTypes.ArrayData.AbstractArrayContainer
-
- All Implemented Interfaces:
DataContainer
public abstract class AbstractArrayContainer extends Object implements DataContainer
A Basis class for container usingArrayNodeData. providing some functionality common to any item based data.- Author:
- Thomas Pfau
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayNodeDatadataprotected Localisationlocprotected DataSetorigin
-
Constructor Summary
Constructors Constructor Description AbstractArrayContainer(DataSet origin, NodeData data)Basic constructor with a sourceDataSetand the data used in this container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)The common Item container will use a flexible adjustment of its height/width to best fill the availablearea.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface idare.imagenode.Interfaces.DataSets.DataContainer
createEmptyLayout
-
-
-
-
Field Detail
-
loc
protected Localisation loc
-
origin
protected DataSet origin
-
data
protected ArrayNodeData data
-
-
Constructor Detail
-
AbstractArrayContainer
public AbstractArrayContainer(DataSet origin, NodeData data)
Basic constructor with a sourceDataSetand the data used in this container.- Parameters:
origin- the Dataset represented by thisDataContainerdata- the data to be used in thisDataContainer
-
-
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)
The common Item container will use a flexible adjustment of its height/width to best fill the availablearea.- 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
-
-