Package uk.ac.starlink.ttools.plot2.geom
Class OrientationPolicy
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.OrientationPolicy
Characterises choices about the orientations of axis numeric labels.
- Since:
- 10 Sep 2024
- Author:
- Mark Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OrientationPolicy
X labels may be horizontal or angled depending on crowding.static final OrientationPolicy
All X labels are at an angle.static final OrientationPolicy
All X labels are horizontal. -
Constructor Summary
ConstructorsConstructorDescriptionOrientationPolicy
(String name, String description, Orientation[] xorients, Orientation[] yorients, Orientation[] x2orients, Orientation[] y2orients) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of this policy.getName()
Returns the name of this policy.static OrientationPolicy[]
Returns a list of the available options.Returns acceptable orientations for X axis labels, in order of preference.Returns acceptable orientations for secondary X axis labels, in order of preference.Returns acceptable orientations for Y axis labels, in order of preference.Returns acceptable orientations for secondary Y axis labels, in order of preference.toString()
-
Field Details
-
HORIZONTAL
All X labels are horizontal. -
ANGLED
All X labels are at an angle. -
ADAPTIVE
X labels may be horizontal or angled depending on crowding.
-
-
Constructor Details
-
OrientationPolicy
public OrientationPolicy(String name, String description, Orientation[] xorients, Orientation[] yorients, Orientation[] x2orients, Orientation[] y2orients) Constructor.- Parameters:
name
- policy namedescription
- short user-directed description of policyxorients
- acceptable orientations for X axis labels, in order of preferenceyorients
- acceptable orientations for Y axis labels, in order of preferencex2orients
- acceptable orientations for secondary X axis labels, in order of preferencey2orients
- acceptable orientations for secondary Y axis labels, in order of preference
-
-
Method Details
-
getName
Returns the name of this policy.- Returns:
- name
-
getDescription
Returns the description of this policy.- Returns:
- user-directed description
-
getOrientationsX
Returns acceptable orientations for X axis labels, in order of preference.- Returns:
- ordered orientation list
-
getOrientationsY
Returns acceptable orientations for Y axis labels, in order of preference.- Returns:
- ordered orientation list
-
getOrientationsX2
Returns acceptable orientations for secondary X axis labels, in order of preference.- Returns:
- ordered orientation list
-
getOrientationsY2
Returns acceptable orientations for secondary Y axis labels, in order of preference.- Returns:
- ordered orientation list
-
toString
-
getOptions
Returns a list of the available options.- Returns:
- policy options
-