MCPcopy Index your code
hub / github.com/OpenSourcePhysics/osp / Test_Event

Method Test_Event

src/test/Test_Event.java:111–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 15

setLoggingMethod · 0.95
getTopPanelMethod · 0.95
getMenuBarMethod · 0.95
setContentPaneMethod · 0.80
getRootPaneMethod · 0.80
getLayeredPaneMethod · 0.80
setTitleMethod · 0.65
setNameMethod · 0.65
getComponentMethod · 0.65
printlnMethod · 0.65
printMethod · 0.65
getSizeMethod · 0.65

Tested by

no test coverage detected