MCPcopy Index your code
hub / github.com/processing/processing / About

Method About

app/src/processing/app/ui/About.java:48–89  ·  view source on GitHub ↗
(Frame frame)

Source from the content-addressed store, hash-verified

46
47
48 public About(Frame frame) {
49 super(frame);
50
51 icon = Toolkit.getLibIconX("about");
52 width = icon.getIconWidth();
53 height = icon.getIconHeight();
54
55 /*
56 if (Toolkit.highResDisplay()) {
57 image = Toolkit.getLibImage("about-2x.jpg"); //$NON-NLS-1$
58 width = image.getWidth(null) / 2;
59 height = image.getHeight(null) / 2;
60 } else {
61 image = Toolkit.getLibImage("about.jpg"); //$NON-NLS-1$
62 width = image.getWidth(null);
63 height = image.getHeight(null);
64 }
65 */
66
67 addMouseListener(new MouseAdapter() {
68 public void mousePressed(MouseEvent e) {
69 dispose();
70 }
71 });
72
73 addKeyListener(new KeyAdapter() {
74 public void keyTyped(KeyEvent e) {
75 System.out.println(e);
76 if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
77 dispose();
78 }
79 }
80 });
81
82// Dimension screen = Toolkit.getScreenSize();
83// setBounds((screen.width-width)/2, (screen.height-height)/2, width, height);
84 setSize(width, height);
85// setLocationRelativeTo(null);
86 setLocationRelativeTo(frame);
87 setVisible(true);
88 requestFocus();
89 }
90
91
92 public void paint(Graphics g) {

Callers

nothing calls this directly

Calls 6

getLibIconXMethod · 0.95
getIconWidthMethod · 0.80
getIconHeightMethod · 0.80
setSizeMethod · 0.65
setVisibleMethod · 0.65
requestFocusMethod · 0.45

Tested by

no test coverage detected