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

Method init

ij/src/main/java/ij/gui/Toolbar.java:178–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

176 }
177
178 public void init() {
179 dscale = Prefs.getGuiScale();
180 scale = (int)Math.round(dscale);
181 if ((dscale>=1.5&&dscale<2.0) || (dscale>=2.5&&dscale<3.0))
182 dscale = scale;
183 if (dscale>1.0) {
184 buttonWidth = (int)((BUTTON_WIDTH-2)*dscale);
185 buttonHeight = (int)((BUTTON_HEIGHT-2)*dscale);
186 offset = (int)Math.round((OFFSET-1)*dscale);
187 } else {
188 buttonWidth = BUTTON_WIDTH;
189 buttonHeight = BUTTON_HEIGHT;
190 offset = OFFSET;
191 }
192 gapSize = GAP_SIZE;
193 ps = new Dimension(buttonWidth*NUM_BUTTONS-(buttonWidth-gapSize), buttonHeight);
194 }
195
196 void addPopupMenus() {
197 rectPopup = newPopupMenu();

Callers 1

ToolbarMethod · 0.95

Calls 2

getGuiScaleMethod · 0.95
roundMethod · 0.45

Tested by

no test coverage detected