.. | .. |
---|
19 | 19 | import //weka.core. |
---|
20 | 20 | matrix.Matrix; |
---|
21 | 21 | |
---|
| 22 | +import grafeme.ui.*; |
---|
| 23 | + |
---|
22 | 24 | class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI, |
---|
23 | 25 | ActionListener, ChangeListener, |
---|
24 | 26 | InputMethodListener, |
---|
.. | .. |
---|
124 | 126 | void keyPressed(int key, int modifiers) |
---|
125 | 127 | { |
---|
126 | 128 | System.out.println("KEY PRESSED"); |
---|
127 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
128 | 130 | } |
---|
129 | 131 | */ |
---|
130 | 132 | |
---|
.. | .. |
---|
311 | 313 | toggleTextureItem.setState(CameraPane.textureon); |
---|
312 | 314 | cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
313 | 315 | toggleLiveItem.addItemListener(this); |
---|
314 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
| 316 | + toggleLiveItem.setState(Globals.isLIVE()); |
---|
315 | 317 | cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
316 | 318 | stepItem.addActionListener(this); |
---|
317 | 319 | // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
.. | .. |
---|
1217 | 1219 | //frontView.object = copy; |
---|
1218 | 1220 | //sideView.object = copy; |
---|
1219 | 1221 | |
---|
1220 | | - XYZPanel = new JPanel(); |
---|
1221 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1222 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1223 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1222 | 1224 | |
---|
1223 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1224 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1225 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1225 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
| 1226 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
| 1227 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1226 | 1228 | |
---|
1227 | 1229 | /* |
---|
1228 | 1230 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1292 | 1294 | optionsPanel = new JPanel(new GridBagLayout()); |
---|
1293 | 1295 | |
---|
1294 | 1296 | optionsPanel.setName("Options"); |
---|
| 1297 | + |
---|
| 1298 | + AddOptions(optionsPanel, aConstraints); |
---|
| 1299 | + |
---|
1295 | 1300 | scenePanel.add(optionsPanel); |
---|
1296 | 1301 | |
---|
1297 | 1302 | |
---|
.. | .. |
---|
1327 | 1332 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1328 | 1333 | //bigPanel.add(ctrlPanel); |
---|
1329 | 1334 | //bigPanel.add(gridPanel); |
---|
| 1335 | + /** |
---|
1330 | 1336 | bigThree = new JPanel(); |
---|
1331 | 1337 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1332 | 1338 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1350 | 1356 | // aConstraints.gridheight = 3; |
---|
1351 | 1357 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1352 | 1358 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1359 | + /**/ |
---|
1353 | 1360 | |
---|
| 1361 | + bigThree = new cGridBag(); |
---|
| 1362 | + bigThree.addComponent(scenePanel); |
---|
| 1363 | + bigThree.addComponent(centralPanel); |
---|
| 1364 | + bigThree.addComponent(XYZPanel); |
---|
| 1365 | + |
---|
1354 | 1366 | // // SIDE EFFECT!!! |
---|
1355 | 1367 | // aConstraints.gridx = 0; |
---|
1356 | 1368 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1393 | 1405 | }); |
---|
1394 | 1406 | } |
---|
1395 | 1407 | |
---|
| 1408 | + void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 1409 | + { |
---|
| 1410 | + } |
---|
| 1411 | + |
---|
1396 | 1412 | JTree GetTree() |
---|
1397 | 1413 | { |
---|
1398 | 1414 | return objEditor.jTree; |
---|
.. | .. |
---|
3139 | 3155 | objEditor.refreshContents(); |
---|
3140 | 3156 | } else if (event.getSource() == stepItem) |
---|
3141 | 3157 | { |
---|
3142 | | - cameraView.ONESTEP = true; |
---|
| 3158 | + //cameraView.ONESTEP = true; |
---|
| 3159 | + Globals.ONESTEP = true; |
---|
3143 | 3160 | cameraView.repaint(); |
---|
3144 | 3161 | return; |
---|
3145 | 3162 | } else if (event.getSource() == stepButton) |
---|
.. | .. |
---|
3296 | 3313 | |
---|
3297 | 3314 | void ToggleAnimation() |
---|
3298 | 3315 | { |
---|
3299 | | - if (!CameraPane.ANIMATION) |
---|
| 3316 | + if (!Globals.ANIMATION) |
---|
3300 | 3317 | { |
---|
3301 | 3318 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3302 | 3319 | browser.show(); |
---|
3303 | 3320 | String filename = browser.getFile(); |
---|
3304 | 3321 | if (filename != null && filename.length() > 0) |
---|
3305 | 3322 | { |
---|
3306 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3323 | + Globals.filename = browser.getDirectory() + filename; |
---|
3307 | 3324 | //CameraPane.framecount = 0; |
---|
3308 | | - CameraPane.imagecount = 0; |
---|
| 3325 | + Globals.imagecount = 0; |
---|
3309 | 3326 | |
---|
3310 | | - CameraPane.ANIMATION ^= true; |
---|
| 3327 | + Globals.ANIMATION ^= true; |
---|
3311 | 3328 | |
---|
3312 | 3329 | GrafreeD.wav.cursor = 0; |
---|
3313 | 3330 | GrafreeD.wav.loop = 0; |
---|
3314 | 3331 | } |
---|
3315 | 3332 | } else |
---|
3316 | 3333 | { |
---|
3317 | | - CameraPane.ANIMATION ^= true; |
---|
| 3334 | + Globals.ANIMATION ^= true; |
---|
3318 | 3335 | } |
---|
3319 | 3336 | } |
---|
3320 | 3337 | |
---|
.. | .. |
---|
4538 | 4555 | JScrollPane infoPanel; |
---|
4539 | 4556 | JPanel optionsPanel; |
---|
4540 | 4557 | JTabbedPane objectPanel; |
---|
4541 | | - JPanel XYZPanel; |
---|
| 4558 | + cGridBag XYZPanel; |
---|
4542 | 4559 | JSplitPane gridPanel; |
---|
4543 | 4560 | JSplitPane bigPanel; |
---|
4544 | | - JPanel bigThree; |
---|
| 4561 | + cGridBag bigThree; |
---|
4545 | 4562 | JTabbedPane scenePanel; |
---|
4546 | 4563 | JPanel centralPanel; |
---|
4547 | 4564 | JSplitPane cameraPanel; |
---|