MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / TextPanel

Method TextPanel

ij/src/main/java/ij/text/TextPanel.java:107–129  ·  view source on GitHub ↗

Constructs a new TextPanel.

()

Source from the content-addressed store, hash-verified

105
106 /** Constructs a new TextPanel. */
107 @AstroImageJ(reason = "Add block increment", modified = true)
108 public TextPanel() {
109 tc = new TextCanvas(this);
110 setLayout(new BorderLayout());
111 add("Center",tc);
112 sbHoriz=new Scrollbar(Scrollbar.HORIZONTAL);
113 sbHoriz.setBlockIncrement(60);
114 GUI.fixScrollbar(sbHoriz);
115 sbHoriz.addAdjustmentListener(this);
116 sbHoriz.setFocusable(false); // prevents scroll bar from blinking on Windows
117 add("South", sbHoriz);
118 sbVert=new Scrollbar(Scrollbar.VERTICAL);
119 GUI.fixScrollbar(sbVert);
120 sbVert.addAdjustmentListener(this);
121 sbVert.setFocusable(false);
122 ImageJ ij = IJ.getInstance();
123 if (ij!=null) {
124 sbHoriz.addKeyListener(ij);
125 sbVert.addKeyListener(ij);
126 }
127 add("East", sbVert);
128 addPopupMenu();
129 }
130
131 /** Constructs a new TextPanel. */
132 public TextPanel(String title) {

Callers

nothing calls this directly

Calls 11

fixScrollbarMethod · 0.95
getInstanceMethod · 0.95
addPopupMenuMethod · 0.95
addPopupItemMethod · 0.95
setBlockIncrementMethod · 0.80
addAdjustmentListenerMethod · 0.80
setFocusableMethod · 0.80
addMethod · 0.65
addKeyListenerMethod · 0.45
equalsMethod · 0.45
addSeparatorMethod · 0.45

Tested by

no test coverage detected