|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.plot2.SingleGanger<P,A>
public class SingleGanger<P,A>
Ganger implementation for single-zone gangs.
Field Summary | |
---|---|
static GangerFactory |
FACTORY
GangerFactory instance that returns SingleGangers. |
Constructor Summary | |
---|---|
SingleGanger()
Constructs a ganger with no specified padding. |
|
SingleGanger(Padding padding)
Constructs a ganger with specified padding. |
Method Summary | |
---|---|
A[] |
adjustAspects(A[] oldAspects,
int iz)
Adjusts plot surface aspects as required to ensure that plot data regions in a ganged set of zones are consistent. |
P[] |
adjustProfiles(P[] oldProfiles)
Adjusts plot surface profiles as required for plots appearing in multiple plots within a gang. |
Gang |
createApproxGang(Rectangle extBounds,
int nz)
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 extBounds,
SurfaceFactory<P,A> surfFact,
int nz,
ZoneContent[] contents,
P[] profiles,
A[] aspects,
ShadeAxis[] shadeAxes,
boolean withScroll)
Creates a gang given the external bounds for the whole plotting area and other required information that characterises each zone. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GangerFactory FACTORY
Constructor Detail |
---|
public SingleGanger()
public SingleGanger(Padding padding)
padding
- defines user preferences, if any, for space
reserved for annotationsMethod Detail |
---|
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<P,A>
zonePlotBounds
- array of data bounds, one for each zone
public Gang createGang(Rectangle extBounds, SurfaceFactory<P,A> surfFact, int nz, ZoneContent[] contents, P[] profiles, A[] aspects, ShadeAxis[] shadeAxes, boolean withScroll)
Ganger
createGang
in interface Ganger<P,A>
extBounds
- total area enclosing all zones and associated
axis labels, annotations etcsurfFact
- surface factorynz
- number of zonescontents
- plot content for each zone (nz-element array)profiles
- profile for each zone (nz-element array)aspects
- aspect for each zone (nz-element array)shadeAxes
- shading axis for each zone
(nz-element array, elements may be empty)withScroll
- true if the positioning should work well
even after some user scrolling
public Gang createApproxGang(Rectangle extBounds, int nz)
Ganger
createApproxGang
in interface Ganger<P,A>
extBounds
- total area enclosing all zones and associated
axis labels, annotations etcnz
- number of zones
public A[] adjustAspects(A[] oldAspects, int iz)
Ganger
If a zero reference index greater than 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<P,A>
oldAspects
- unadjusted aspectsiz
- index of reference aspect in array, or -1 for no reference
public P[] adjustProfiles(P[] oldProfiles)
Ganger
adjustProfiles
in interface Ganger<P,A>
oldProfiles
- unadjusted profiles
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |