Package hec.gfx2d

Class PlotLayout

java.lang.Object
hec.gfx2d.PlotLayout

public class PlotLayout extends Object

Title: Hec Java Development

Description: This is a simple class that allows the user to configure a layout to apply to the plots

Copyright: Copyright (c) 2003

Company:

  • Constructor Details

    • PlotLayout

      public PlotLayout()
  • Method Details

    • setTitle

      public void setTitle(String title)
    • getTitle

      public String getTitle()
    • setToolbarProperties

      public void setToolbarProperties(ViewportToolbarProp properties)
      Sets the properties to use when creating toolbar buttons.If the value is NULL or never been set, default properties will be created during the construction of the plot.
      Parameters:
      properties -
    • getToolbarProperties

      public ViewportToolbarProp getToolbarProperties()
    • setToolbarOn

      public void setToolbarOn()
    • setToolbarOff

      public void setToolbarOff()
    • setHasToolbar

      public void setHasToolbar(boolean b)
    • hasToolbar

      public boolean hasToolbar()
    • setHasLegendOn

      public void setHasLegendOn()
    • setHasLegendOff

      public void setHasLegendOff()
    • setHasLegend

      public void setHasLegend(boolean b)
    • hasLegend

      public boolean hasLegend()
    • addViewport

      public ViewportLayout addViewport()
    • addViewport

      public ViewportLayout addViewport(double weight)
      Adds a viewport to the list with a given wieght. The weight is measured in % of total height of the plot window.
      Parameters:
      weight -
    • addViewport

      public void addViewport(ViewportLayout viewport, double weight)
    • getViewportWeights

      public double[] getViewportWeights()
      Returns the weights that have been assigned to each viewport. The values are in %, i.e. 10, 50,100. The sum of these weights is not guaranteed to be equal to 100% The user of these values should try an normalize these values.
      Returns:
      a double array containing the weights. They are in the same order as the viewports
    • getViewports

      public List<ViewportLayout> getViewports()
      Returns the list of of viewports contained in the layout. The list is guaranteed to be of type ViewportLayout and not NULL. The size of the list is also guaranteed to be the same size as value returned from getViewportCount();
      Returns:
    • getViewportCount

      public int getViewportCount()
      Returns the number if viewports that have been stored in this viewport. This value is guaranteed to be 0 or greater.
      Returns:
      an integer value representing the number of viewports.
    • removeViewport

      public boolean removeViewport(ViewportLayout vLayout)
      remove the ViewportLayout vLayout from the PlotLayout
      Parameters:
      vLayout - the ViewportLayout to remove
      Returns:
      true if the ViewportLayout was removed
    • getViewportWeight

      public double getViewportWeight(ViewportLayout vLayout)
      get the viewport weight for the specified viewport
      Parameters:
      vLayout - the viewport
      Returns:
      the viewport weight or -1 if not found