MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / setText

Method setText

src/org/opensourcephysics/display/TextPanel.java:66–76  ·  view source on GitHub ↗

Sets the text. -- BH never called?? The position is ignored if the location is set to a corner. @param _text

(String _text)

Source from the content-addressed store, hash-verified

64 * @param _text
65 */
66 public void setText(String _text) {
67 text = fixText(_text);
68 final Container c = this.getParent();
69 if (c == null) {
70 return;
71 }
72 c.validate();
73// BH -- don't we want this? c.repaint();
74// // BH ? How does this help? Layout but no refresh??
75// OSPRuntime.postEvent(() -> { c.validate();});
76 }
77
78 /**
79 * Sets the font. Added by Doug Brown Feb 2018

Callers

nothing calls this directly

Calls 2

fixTextMethod · 0.95
getParentMethod · 0.65

Tested by

no test coverage detected