Class TickLook
java.lang.Object
uk.ac.starlink.ttools.plot2.TickLook
Defines the appearance of tick marks on a plot axis.
- Since:
- 21 Dec 2022
- Author:
- Mark Taylor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TickLookcreateClassicLook(String name, int unit) Returns a look with major ticks extending both below and above the axis, minor ticks only above.static TickLookcreateStandardLook(String name, int unit) Returns a look with major ticks twice as long as minor ones, all ticks only extending above the axis.abstract voiddrawMajor(Graphics2D g2) Draws a major tickmark at the origin, with the axis considered horizontal and the plot in the direction of the positive Y axis.abstract voiddrawMinor(Graphics2D g2) Draws a minor tickmark at the origin, with the axis considered horizontal and the plot in the direction of the positive Y axis.getName()Returns the name of this style.toString()
-
Field Details
-
CLASSIC
Old-style look - major tickmarks extend above and below axis. -
STANDARD
Standard look - major tickmarks are twice as high as minor. -
NONE
No ticks are drawn.
-
-
Constructor Details
-
TickLook
-
-
Method Details
-
drawMinor
Draws a minor tickmark at the origin, with the axis considered horizontal and the plot in the direction of the positive Y axis.- Parameters:
g2- graphics context
-
drawMajor
Draws a major tickmark at the origin, with the axis considered horizontal and the plot in the direction of the positive Y axis.- Parameters:
g2- graphics context
-
getName
-
toString
-
createClassicLook
-
createStandardLook
-