Documentation of 'org.jplot2d.layout.GridLayoutDirector' Java class
GridLayoutDirector
org.jplot2d.layout

Class GridLayoutDirector

  • All Implemented Interfaces:
    LayoutDirector


    public class GridLayoutDirector
    extends SimpleLayoutDirector
    Subplots are placed side-bye-side. The plot space are distributed to subplots according to ratio of their preferedContentSize.
    • Constructor Detail

      • GridLayoutDirector

        public GridLayoutDirector()
        Create a GridLayoutDirector with 0 horizontal gap and 0 vertical gap.
      • GridLayoutDirector

        public GridLayoutDirector(double hgap,
                                  double vgap)
        Create a GridLayoutDirector with the given horizontal gap and vertical gap.
        Parameters:
        hgap - the horizontal gap
        vgap - the vertical gap
    • Method Detail

      • getHGap

        public double getHGap()
      • getVGap

        public double getVGap()
      • layout

        public void layout(PlotEx plot)
        Description copied from interface: LayoutDirector
        Layout the plot. Normally the plot contents size is calculated by subtracting margin from plot size. If the plot has contents size constraint, the plot size is calculated by adding margin to plot content size.
        Specified by:
        layout in interface LayoutDirector
        Overrides:
        layout in class SimpleLayoutDirector
      • getPreferredContentSize

        public java.awt.geom.Dimension2D getPreferredContentSize(PlotEx plot)
        Description copied from class: SimpleLayoutDirector
        Calculate the preferred content size of the given plot. The default implementation returns the plot.getPreferredContentSize(), which can be override by subclass to consider nested subplots. The returned size may be null if there is no enough information to derive a value.
        Specified by:
        getPreferredContentSize in interface LayoutDirector
        Overrides:
        getPreferredContentSize in class SimpleLayoutDirector
        Returns:
        the preferred content size

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.