MCPcopy
hub / github.com/arduino/Arduino / handleAbout

Method handleAbout

app/src/processing/app/Base.java:1887–1913  ·  view source on GitHub ↗

Show the About box.

()

Source from the content-addressed store, hash-verified

1885 * Show the About box.
1886 */
1887 @SuppressWarnings("serial")
1888 public void handleAbout() {
1889 final Image image = Theme.getLibImage("about", activeEditor,
1890 Theme.scale(475), Theme.scale(300));
1891 final Window window = new Window(activeEditor) {
1892 public void paint(Graphics graphics) {
1893 Graphics2D g = Theme.setupGraphics2D(graphics);
1894 g.drawImage(image, 0, 0, null);
1895
1896 Font f = new Font("SansSerif", Font.PLAIN, Theme.scale(11));
1897 g.setFont(f);
1898 g.setColor(new Color(0,151,156));
1899 g.drawString(BaseNoGui.VERSION_NAME_LONG, Theme.scale(33), Theme.scale(20));
1900 }
1901 };
1902 window.addMouseListener(new MouseAdapter() {
1903 public void mousePressed(MouseEvent e) {
1904 window.dispose();
1905 }
1906 });
1907 int w = image.getWidth(activeEditor);
1908 int h = image.getHeight(activeEditor);
1909 Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
1910 window.setBounds((screen.width - w) / 2, (screen.height - h) / 2, w, h);
1911 window.setLocationRelativeTo(activeEditor);
1912 window.setVisible(true);
1913 }
1914
1915
1916 /**

Callers 1

buildHelpMenuMethod · 0.45

Calls 3

getLibImageMethod · 0.95
scaleMethod · 0.95
setVisibleMethod · 0.80

Tested by

no test coverage detected