Class ContainerLayout

    • Field Detail

    • Constructor Detail

      • ContainerLayout

        public ContainerLayout()
    • Method Detail

      • createLayout

        public final void createLayout​(NodeData data,
                                       Rectangle area,
                                       String DataSetLabel,
                                       DataSetLayoutProperties props)
                                throws WrongDatasetTypeException
        Create the Layout for a given set of data, in a specified area using a specified Label for the underlying Dataset.
        Parameters:
        data - The nodeData to use to set up the layout.
        area - the area in which to create the layout
        DataSetLabel - 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)
        Throws:
        WrongDatasetTypeException - If an incompatible data set type was used
      • setupLayout

        protected abstract void setupLayout​(NodeData data,
                                            Rectangle area,
                                            String DataSetLabel,
                                            DataSetLayoutProperties props)
                                     throws WrongDatasetTypeException
        Setup the layout specific positions and data.
        Parameters:
        data - The nodeData to use to set up the layout.
        area - the area in which to create the layout
        DataSetLabel - 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)
        Throws:
        WrongDatasetTypeException - If an incompatible data set type was used
      • LayoutDataForNode

        public abstract void LayoutDataForNode​(NodeData data,
                                               org.apache.batik.svggen.SVGGraphics2D context,
                                               boolean Legend,
                                               ColorMap coloring)
        Layout the Data according to the previously generated layout
        Parameters:
        data - the data to layout
        context - the graphics context in which to draw the layout
        Legend - whether this is a layout for the legend or not.
        coloring - The ColorMap to use for the layout
      • updateLabel

        public abstract void updateLabel​(String DatasetLabel)
        Update the Label used in this Layout.
        Parameters:
        DatasetLabel - The new label to be used for the DataSet
      • determineDisplayRange

        public static final Double[] determineDisplayRange​(Double[] valuerange)
        This function allows to get a Range of minimal and maximal values based on a valuerange to determine suitable axes.
        Parameters:
        valuerange - the range of values (length 2, min and max value)
        Returns:
        Values which are suitable to plot the data range in.
      • roundToCommonOrder

        public static final Double[] roundToCommonOrder​(Double lowvalue,
                                                        Double highvalue)
        Round the number to the numbers Order. Either rounding up or down. e.g. 5 rounded up is 10; 101 rounded up is 200 etc.
        Parameters:
        lowvalue - the lower value to create a common Order
        highvalue - the upper value to create a common Order.
        Returns:
        the rounded values.
      • roundToOrder

        public static final Double roundToOrder​(Double value,
                                                boolean up)
        Round the number to the numbers Order. Either rounding up or down. e.g. 5 rounded up is 10; 101 rounded up is 200 etc.
        Parameters:
        value - the value to round
        up - whether to round up or down.
        Returns:
        the rounded values.
      • getLayoutArea

        public Rectangle getLayoutArea()
        Get the area assigned to this layout container (in the IMAGENODEPROPERTIES.IMAGEWIDTH // IMAGENODEPROPERTIES.IMAGEHEIGHT) range.
        Returns:
        a rectangle which should have x,y,width,height < 0 x + width < IMAGEWIDTH, and y+height < IMAGEHEIGHT