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

Method loadCursors

ij/src/main/java/ij/ImageJ.java:331–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

329 }
330
331 @AstroImageJ(reason = "Use astronomy_icon", modified = true)
332 private void loadCursors() {
333 Toolkit toolkit = Toolkit.getDefaultToolkit();
334 String path = Prefs.getImageJDir()+"/astronomy_icon.gif";
335 File f = new File(path);
336 if (!f.exists())
337 return;
338 //Image image = toolkit.getImage(path);
339 ImageIcon icon = new ImageIcon(path);
340 Image image = icon.getImage();
341 if (image==null)
342 return;
343 int width = icon.getIconWidth();
344 int height = icon.getIconHeight();
345 Point hotSpot = new Point(width/2, height/2);
346 Cursor crosshairCursor = toolkit.createCustomCursor(image, hotSpot, "crosshair-cursor.gif");
347 ImageCanvas.setCursor(crosshairCursor, 0);
348 }
349
350 void configureProxy() {
351 if (Prefs.useSystemProxies) {

Callers 1

ImageJMethod · 0.95

Calls 6

getImageJDirMethod · 0.95
setCursorMethod · 0.95
getImageMethod · 0.65
existsMethod · 0.45
getIconWidthMethod · 0.45
getIconHeightMethod · 0.45

Tested by

no test coverage detected