MCPcopy Index your code
hub / github.com/adolfintel/NoteBot / setTextScale

Method setTextScale

StickyNotes/src/com/dosse/stickynotes/Note.java:660–668  ·  view source on GitHub ↗

set new text scale @param scale scale as float 0.2-4.0

(float scale)

Source from the content-addressed store, hash-verified

658 * @param scale scale as float 0.2-4.0
659 */
660 public void setTextScale(float scale) {
661 if (scale >= 0.99 && scale <= 1.01) {
662 textScale = 1;
663 text.setFont(Main.BASE_FONT);
664 } else {
665 textScale = scale < MIN_TEXT_SCALE ? MIN_TEXT_SCALE : scale > MAX_TEXT_SCALE ? MAX_TEXT_SCALE : scale;
666 text.setFont(Main.BASE_FONT.deriveFont(Main.TEXT_SIZE * textScale));
667 }
668 }
669
670 /**
671 * get current color scheme

Callers 3

mouseWheelMovedMethod · 0.95
keyPressedMethod · 0.95
attemptLoadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected