()
| 109 | } |
| 110 | |
| 111 | public Test_Event() { |
| 112 | |
| 113 | Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() { |
| 114 | |
| 115 | @Override |
| 116 | public void eventDispatched(AWTEvent event) { |
| 117 | //if(logging)System.out.println("AWTEVEnt dispatched " + event); |
| 118 | } |
| 119 | |
| 120 | }, -1); |
| 121 | this.setContentPane(new JPanel() { |
| 122 | |
| 123 | }); |
| 124 | |
| 125 | setLogging(); |
| 126 | |
| 127 | setTitle("testing editor"); |
| 128 | setLocation(100, 100); |
| 129 | |
| 130 | JPanel ptop = getTopPanel(); |
| 131 | |
| 132 | JMenuBar mb = getMenuBar(ptop); |
| 133 | |
| 134 | JPanel full = new JPanel(new BorderLayout()); |
| 135 | full.setPreferredSize(new Dimension(300, 300)); |
| 136 | full.setBackground(Color.green); |
| 137 | full.add(ptop, BorderLayout.NORTH); |
| 138 | ptop.setBackground(Color.magenta); |
| 139 | full.setName("full"); |
| 140 | ptop.setName("ptop"); |
| 141 | |
| 142 | |
| 143 | |
| 144 | if (asInternalFrame) { |
| 145 | JDesktopPane d = new JDesktopPane(); |
| 146 | add(d); |
| 147 | // this next allows floating frames outside the JDesktopPane in SwingJS |
| 148 | getRootPane().putClientProperty("swingjs.overflow.hidden", "false"); |
| 149 | |
| 150 | d.setPreferredSize(new Dimension(800, 600)); |
| 151 | |
| 152 | JInternalFrame main = new JInternalFrame(); |
| 153 | main.setName("main-frame"); |
| 154 | // main.setContentPane(new JPanel() { |
| 155 | // |
| 156 | // public String getName() { |
| 157 | // return "CP"; |
| 158 | // } |
| 159 | // }); |
| 160 | |
| 161 | main.setBackground(Color.blue); |
| 162 | main.getRootPane().setBackground(Color.RED); |
| 163 | main.getContentPane().setBackground(Color.CYAN); |
| 164 | main.getContentPane().setName("main.content"); |
| 165 | main.getRootPane().setName("main.root"); |
| 166 | main.setJMenuBar(mb); |
| 167 | |
| 168 |
nothing calls this directly
no test coverage detected