Class PlotPosition

java.lang.Object
uk.ac.starlink.topcat.plot2.PlotPosition

@Equality public class PlotPosition extends Object
Characterises explicit settings for how to position a plot component in graphics coordinates. This aggregates width and height, giving the external dimensions of the whole plot graphic, and a Padding object, giving the gaps between the dimension and the data region of the plot (this is where axis annotations etc are usually drawn).

Any of these Integer dimensions may be null, indicating that no explicit settings are in force. Where there is no explicit setting, the plotting machinery is expected to come up with sensible defaults.

Since:
18 Dec 2014
Author:
Mark Taylor
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a PlotPosition with no explicit settings.
    PlotPosition(Integer width, Integer height, uk.ac.starlink.ttools.plot2.Padding padding)
    Constructs a PlotPosition from a Dimension and Insets.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the external height for the plot, if specified.
    uk.ac.starlink.ttools.plot2.Padding
    Returns settings for the border between the data region and exterior dimensions of a plot.
    Returns the external width for the plot, if specified.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PlotPosition

      public PlotPosition()
      Constructs a PlotPosition with no explicit settings.
    • PlotPosition

      public PlotPosition(Integer width, Integer height, uk.ac.starlink.ttools.plot2.Padding padding)
      Constructs a PlotPosition from a Dimension and Insets.
      Parameters:
      width - external plot width, may be null
      height - external plot height, may be null
      padding - border between external plot dimensions and data region, may be null or have null members
  • Method Details

    • getWidth

      public Integer getWidth()
      Returns the external width for the plot, if specified.
      Returns:
      required external plot width in pixels, or null
    • getHeight

      public Integer getHeight()
      Returns the external height for the plot, if specified.
      Returns:
      required external plot height in pixels, or null
    • getPadding

      public uk.ac.starlink.ttools.plot2.Padding getPadding()
      Returns settings for the border between the data region and exterior dimensions of a plot. The return value is not null, but any of its members may be.
      Returns:
      settings for border between plot data region and exterior, not null
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object