Package uk.ac.starlink.topcat.plot2
Class PlotPosition
java.lang.Object
uk.ac.starlink.topcat.plot2.PlotPosition
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
ConstructorsConstructorDescriptionConstructs 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 TypeMethodDescriptionboolean
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.getWidth()
Returns the external width for the plot, if specified.int
hashCode()
-
Constructor Details
-
PlotPosition
public PlotPosition()Constructs a PlotPosition with no explicit settings. -
PlotPosition
Constructs a PlotPosition from a Dimension and Insets.- Parameters:
width
- external plot width, may be nullheight
- external plot height, may be nullpadding
- border between external plot dimensions and data region, may be null or have null members
-
-
Method Details
-
getWidth
Returns the external width for the plot, if specified.- Returns:
- required external plot width in pixels, or null
-
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() -
equals
-