Package uk.ac.starlink.ttools.plot2
Interface PlotFrame
public interface PlotFrame
Defines the geometry of a screen area to contain plot content.
- Since:
- 10 Aug 2023
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionstatic PlotFrame
createPlotFrame
(Surface[] surfs, boolean withScroll, Rectangle dfltBounds) Creates a PlotFrame from an array of surfaces.static PlotFrame
createPlotFrame
(Surface surf, boolean withScroll) Adapts a Surface to a PlotFrame.Returns the captioner to be used for external annotation.Returns the area within which actual plot content will reside.Returns the space required for external decorations.
-
Method Details
-
getInternalBounds
Rectangle getInternalBounds()Returns the area within which actual plot content will reside. This excludes space for external decorations.- Returns:
- internal bounds rectangle
-
getSurround
Surround getSurround()Returns the space required for external decorations.- Returns:
- decoration surround space
-
getCaptioner
Captioner getCaptioner()Returns the captioner to be used for external annotation.- Returns:
- captioner
-
createPlotFrame
Adapts a Surface to a PlotFrame. The internal bounds contain the actual plotting area, and the surround includes space for axis labels.- Parameters:
surf
- plotting surfacewithScroll
- true if the decorations should work well with future scrolling- Returns:
- PlotFrame view of surface
-
createPlotFrame
Creates a PlotFrame from an array of surfaces. The bounds are created from the plot bounds of the gang members, unless there are none, in which case the supplied fallback bounds rectangle is used.- Parameters:
surfs
- plot surfaceswithScroll
- true if the decorations should work well with future scrollingdfltBounds
- fallback bounds; only used if no surfaces are present
-