public class MatrixGanger extends Object implements Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
Modifier and Type | Field and Description |
---|---|
static boolean |
XDIAG
True if the histogram-like plots on the diagonal are considered
to share their X coordinate with other cells in the same column;
false if they are considered to share their Y coordinate with
other cells in the same row.
|
Constructor and Description |
---|
MatrixGanger(MatrixShape shape,
Padding padding,
boolean isSquares,
int cellGap)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
PlaneAspect[] |
adjustAspects(PlaneAspect[] aspects,
int iz0)
Adjusts plot surface aspects as required to ensure that plot data
regions in a ganged set of zones are consistent.
|
PlaneSurfaceFactory.Profile[] |
adjustProfiles(PlaneSurfaceFactory.Profile[] profiles)
Adjusts plot surface profiles as required for plots appearing
in multiple plots within a gang.
|
Gang |
createApproxGang(Rectangle gangExtBox)
Constructs an approximate gang instance given only minimal information.
|
Gang |
createGang(Rectangle[] zonePlotBounds)
Creates a gang given the graphics coordinates of the individual zones.
|
Gang |
createGang(Rectangle gangExtBox,
SurfaceFactory<PlaneSurfaceFactory.Profile,PlaneAspect> surfFact,
ZoneContent<PlaneSurfaceFactory.Profile,PlaneAspect>[] zoneContents,
Trimming[] trimmings,
ShadeAxis[] shadeAxes,
boolean withScroll)
Creates a gang given the external bounds for the whole plotting area
and other required information that characterises each zone.
|
MatrixShape |
getShape()
Returns the shape used by this ganger.
|
int |
getZoneCount()
Returns the number of zones in gangs produced by this ganger.
|
boolean |
isShadingGlobal()
Indicates whether shared Aux colour ramps are to be
applied to each zone individually or to the whole plot.
|
boolean |
isTrimmingGlobal()
Indicates whether Trimming objects (legend and title) are to be
applied to each zone individually or to the whole plot.
|
public static final boolean XDIAG
public MatrixGanger(MatrixShape shape, Padding padding, boolean isSquares, int cellGap)
shape
- defines which cells contain plotspadding
- padding round the outside of the gangisSquares
- true if all zones are constrained to be squarecellGap
- gap in pixels between grid cellspublic MatrixShape getShape()
public int getZoneCount()
Ganger
getZoneCount
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
public boolean isTrimmingGlobal()
Ganger
isTrimmingGlobal
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
Trimming
public boolean isShadingGlobal()
Ganger
isShadingGlobal
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
ShadeAxisKit
public Gang createGang(Rectangle[] zonePlotBounds)
Ganger
The supplied rectangle arguments give the bounds of the data area for each zone. This does not include any space for axis labels and other annotations, which are assumed to be available as required.
createGang
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
zonePlotBounds
- array of data bounds, one for each zonepublic Gang createApproxGang(Rectangle gangExtBox)
Ganger
createApproxGang
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
gangExtBox
- total area enclosing all zones and associated
axis labels, annotations etcpublic Gang createGang(Rectangle gangExtBox, SurfaceFactory<PlaneSurfaceFactory.Profile,PlaneAspect> surfFact, ZoneContent<PlaneSurfaceFactory.Profile,PlaneAspect>[] zoneContents, Trimming[] trimmings, ShadeAxis[] shadeAxes, boolean withScroll)
Ganger
The form of the trimmings
and shadeAxes
arrays are as determined by the Ganger.isTrimmingGlobal()
and
Ganger.isShadingGlobal()
methods; the length of each respective array
must be one for the global case, and the same as the length of the
zoneContents
array in the per-zone case.
createGang
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
gangExtBox
- total area enclosing all zones and associated
axis labels, annotations etcsurfFact
- surface factoryzoneContents
- plot content for each zone (nz-element array)trimmings
- additional decorations
(1- or nz-element array, elements may be null)shadeAxes
- shading axes
(1- or nz-element array, elements may be null)withScroll
- true if the positioning should work well
even after some user scrollingpublic PlaneAspect[] adjustAspects(PlaneAspect[] aspects, int iz0)
Ganger
If a reference index greater than or equal to zero is supplied, this denotes the "master" zone, to which the other aspects should be adjusted. Otherwise, the aspects should be adjusted more democratically, treating all their requirements equally. With a reference index the other aspects might be adjusted to equal the master one, and without they might all be adjusted to cover the union of the ranges defined. If the reference index is >= the number of zones, behaviour is undefined.
adjustAspects
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
aspects
- unadjusted aspectsiz0
- index of reference aspect in array, or -1 for no referencepublic PlaneSurfaceFactory.Profile[] adjustProfiles(PlaneSurfaceFactory.Profile[] profiles)
Ganger
adjustProfiles
in interface Ganger<PlaneSurfaceFactory.Profile,PlaneAspect>
profiles
- unadjusted profilesCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.