()
| 32 | protected int level; |
| 33 | |
| 34 | @SuppressWarnings("deprecation") |
| 35 | FontResizeTest() { |
| 36 | menuBar = new JMenuBar(); |
| 37 | frame.getRootPane().setMenuBar(menuBar); |
| 38 | // font menu |
| 39 | JMenu fontMenu = new JMenu("Font Test"); //$NON-NLS-1$ |
| 40 | menuBar.add(fontMenu); |
| 41 | JMenuItem sizeUpItem = new JMenuItem("Increase"); //$NON-NLS-1$ |
| 42 | sizeUpItem.addActionListener(new ActionListener() { |
| 43 | @Override |
| 44 | public void actionPerformed(ActionEvent e) { |
| 45 | FontSizer.levelUp(); |
| 46 | } |
| 47 | |
| 48 | }); |
| 49 | fontMenu.add(sizeUpItem); |
| 50 | |
| 51 | table = new JTable(data, columnNames); |
| 52 | |
| 53 | FontSizer.addListener(FontSizer.PROPERTY_LEVEL, new PropertyChangeListener() { //$NON-NLS-1$ |
| 54 | @Override |
| 55 | public void propertyChange(PropertyChangeEvent e) { |
| 56 | FontSizer.setFonts(frame); |
| 57 | } |
| 58 | |
| 59 | }); |
| 60 | |
| 61 | frame.setContentPane(table); |
| 62 | frame.setSize(500, 500); |
| 63 | frame.setVisible(true); |
| 64 | } |
| 65 | |
| 66 | public static void main(String[] args) { |
| 67 | new FontResizeTest(); |
nothing calls this directly
no test coverage detected