MCPcopy Create free account
hub / github.com/rambaut/figtree / getMinorTickCount

Method getMinorTickCount

src/figtree/treeviewer/ScaleAxis.java:665–679  ·  view source on GitHub ↗

Returns the number of minor tick marks within each major one By default all major ticks have the same number of minor ticks except the last which has none.

(int majorTickIndex)

Source from the content-addressed store, hash-verified

663 * except the last which has none.
664 */
665 public int getMinorTickCount(int majorTickIndex) {
666 if (!isCalibrated)
667 calibrate();
668
669 if (minorTick <= 0) {
670 return 0;
671 }
672
673 if (majorTickIndex == majorTickCount-1)
674 return (int)((maxAxis-maxTick)/minorTick);
675 else if (majorTickIndex==-1)
676 return (int)((minTick-minAxis)/minorTick);
677 else
678 return minorTickCount;
679 }
680
681 /** getMajorTick
682 * Returns the value of the majorTickIndex'th major tick

Callers 4

getLabelFirstMethod · 0.95
getLabelLastMethod · 0.95
paintAxisMethod · 0.95
paintAxisMethod · 0.95

Calls 1

calibrateMethod · 0.95

Tested by

no test coverage detected