public class AutomaticNodeLayout extends Object implements ImageNodeLayout, IDAREService
| Constructor and Description |
|---|
AutomaticNodeLayout() |
AutomaticNodeLayout(Collection<DataSetLayoutInfoBundle> DataSetsToUse)
Generate an automatic layout for a set of DataSetLayouts
|
| Modifier and Type | Method and Description |
|---|---|
void |
datasetChanged(DataSetChangedEvent e)
Inform that there will be a change in the
DataSets |
void |
datasetsChanged(DataSetsChangedEvent e)
Inform that a Collection of changes coming up in the
DataSets. |
void |
doLayout()
Produce the layout based on the added DataSets.
|
void |
generateLayoutForDataSets(Collection<DataSetLayoutInfoBundle> Datasets)
Generate a Layout for a given set of
DataSets. |
ColorMap |
getColorsForDataSet(DataSetLink dsl)
|
String |
getDataSetLabel(DataSetLink dsl)
Get the label for a specific
DataSet used in this layout; |
Vector<? extends DataSetLink> |
getDatasetsInOrder()
Get the DataSets used in this Layout in the order of labeling
|
ContainerLayout |
getLayoutContainerUsedFor(DataSet set)
Get the Container used for the provided dataset
|
boolean |
isValid()
Check whether this
AutomaticNodeLayout is valid. |
void |
layoutLegendNode(Collection<NodeData> datacollection,
org.apache.batik.svggen.SVGGraphics2D svg)
Lay out the legend for a specific set of node data
|
void |
layoutNode(Collection<NodeData> datacollection,
org.apache.batik.svggen.SVGGraphics2D svg)
Layout a specific node in a given context.
|
boolean |
readLayout(DataSetManager dsm,
ObjectInputStream os,
Object currentobject)
Read a layout object from an
ObjectInputStream given the last object read (which is the first object of the layout) |
void |
writeLayout(ObjectOutputStream os)
Write all data that is relevant to restore this nodelayout to a
ObjectOutputStream |
public AutomaticNodeLayout()
public AutomaticNodeLayout(Collection<DataSetLayoutInfoBundle> DataSetsToUse)
DataSetsToUse - the Datasets and layouts to use.public boolean isValid()
ImageNodeLayoutAutomaticNodeLayout is valid. A Layout is valid, if its ImageNodeContainer contains
at least one DataSet.
Thus, by default a newly generated layout is invalid until a DataSet is added.isValid in interface ImageNodeLayoutpublic void writeLayout(ObjectOutputStream os) throws IOException
ImageNodeLayoutObjectOutputStreamwriteLayout in interface ImageNodeLayoutos - The ObjectOutputStream to write the dlayout infromation toIOException - If errors occur with the given streampublic boolean readLayout(DataSetManager dsm, ObjectInputStream os, Object currentobject) throws IOException
ImageNodeLayoutObjectInputStream given the last object read (which is the first object of the layout)readLayout in interface ImageNodeLayoutdsm - the DataSetManager to get information about DataSets from.os - The ObjectInputStream to read fromcurrentobject - The last object read in the ObjectInputStream provided (the first object of the nodelayout saveIOException.IOException - If errors occur with the given streampublic ContainerLayout getLayoutContainerUsedFor(DataSet set)
set - The DataSet for which the ContainerLayout is requested.ContainerLayout or null if there is no associated ContainerLayoutpublic void generateLayoutForDataSets(Collection<DataSetLayoutInfoBundle> Datasets) throws TooManyItemsException, ContainerUnplaceableExcpetion, DimensionMismatchException, WrongDatasetTypeException
DataSets.Datasets - the DataSets to generate a layout for.TooManyItemsException - If there are too many itemsContainerUnplaceableExcpetion - if a container is unplaceableDimensionMismatchException - if the given dimensions cant fitWrongDatasetTypeException - if an Invalid DatasetLayoutinfo bundle is addedpublic void doLayout()
throws TooManyItemsException,
ContainerUnplaceableExcpetion,
DimensionMismatchException,
WrongDatasetTypeException
ImageNodeLayoutdoLayout in interface ImageNodeLayoutTooManyItemsException - If there are too many Items to layoutContainerUnplaceableExcpetion - If a container is not placeableDimensionMismatchException - If the given dimensions don't fit.WrongDatasetTypeException - IF the given Dataset does not it to the layoutpublic String getDataSetLabel(DataSetLink dsl)
ImageNodeLayoutDataSet used in this layout;getDataSetLabel in interface ImageNodeLayoutdsl - the DataSet to get the label forDataSetpublic ColorMap getColorsForDataSet(DataSetLink dsl)
ImageNodeLayoutgetColorsForDataSet in interface ImageNodeLayoutdsl - - The requested DatasetColorMap associated with the DataSet in this AutomaticNodeLayoutpublic Vector<? extends DataSetLink> getDatasetsInOrder()
ImageNodeLayoutgetDatasetsInOrder in interface ImageNodeLayoutVector of DataSets in the order they were added during the layout processpublic void layoutNode(Collection<NodeData> datacollection, org.apache.batik.svggen.SVGGraphics2D svg)
ImageNodeLayoutlayoutNode in interface ImageNodeLayoutdatacollection - The data to be used for drawingsvg - the SVGGraphics2D to draw inpublic void layoutLegendNode(Collection<NodeData> datacollection, org.apache.batik.svggen.SVGGraphics2D svg)
ImageNodeLayoutlayoutLegendNode in interface ImageNodeLayoutdatacollection - The data to be used for drawingsvg - the SVGGraphics2D to draw inpublic void datasetChanged(DataSetChangedEvent e)
DataSetAboutToBeChangedListenerDataSetsdatasetChanged in interface DataSetAboutToBeChangedListenerdatasetChanged in interface ImageNodeLayoute - the DataSetChangedEvent to processpublic void datasetsChanged(DataSetsChangedEvent e)
DataSetAboutToBeChangedListenerDataSets.datasetsChanged in interface DataSetAboutToBeChangedListenerdatasetsChanged in interface ImageNodeLayoute - the DataSetChangedEvent to processCopyright © 2018. All rights reserved.