.. | .. |
---|
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 | |
---|
.. | .. |
---|
1187 | 1189 | //JPanel worldPanel = |
---|
1188 | 1190 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1189 | 1191 | //worldPanel.setName("World"); |
---|
1190 | | - centralPanel = new JPanel(new BorderLayout()); |
---|
| 1192 | + centralPanel = new cGridBag(); |
---|
| 1193 | + centralPanel.preferredWidth = 20; |
---|
1191 | 1194 | timelinePanel = new JPanel(new BorderLayout()); |
---|
1192 | 1195 | timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1193 | 1196 | |
---|
.. | .. |
---|
1217 | 1220 | //frontView.object = copy; |
---|
1218 | 1221 | //sideView.object = copy; |
---|
1219 | 1222 | |
---|
1220 | | - XYZPanel = new JPanel(); |
---|
1221 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1223 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1224 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1222 | 1225 | |
---|
1223 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1224 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1225 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1226 | + XYZPanel.preferredWidth = 5; |
---|
| 1227 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
| 1228 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
| 1229 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1226 | 1230 | |
---|
1227 | 1231 | /* |
---|
1228 | 1232 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1284 | 1288 | scrollpane.setWheelScrollingEnabled(true); |
---|
1285 | 1289 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1286 | 1290 | |
---|
1287 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
1288 | | - scenePanel.add(scrollpane); |
---|
| 1291 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1292 | + scenePanel.preferredWidth = 7; |
---|
| 1293 | + |
---|
| 1294 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1295 | + tabbedPane.add(scrollpane); |
---|
1289 | 1296 | |
---|
1290 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
| 1297 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1291 | 1298 | |
---|
1292 | 1299 | optionsPanel = new JPanel(new GridBagLayout()); |
---|
1293 | 1300 | |
---|
1294 | 1301 | optionsPanel.setName("Options"); |
---|
1295 | | - scenePanel.add(optionsPanel); |
---|
1296 | | - |
---|
| 1302 | + |
---|
| 1303 | + AddOptions(optionsPanel, aConstraints); |
---|
| 1304 | + |
---|
| 1305 | + tabbedPane.add(optionsPanel); |
---|
| 1306 | + |
---|
| 1307 | + scenePanel.add(tabbedPane); |
---|
1297 | 1308 | |
---|
1298 | 1309 | /* |
---|
1299 | 1310 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1327 | 1338 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1328 | 1339 | //bigPanel.add(ctrlPanel); |
---|
1329 | 1340 | //bigPanel.add(gridPanel); |
---|
| 1341 | + /** |
---|
1330 | 1342 | bigThree = new JPanel(); |
---|
1331 | 1343 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1332 | 1344 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1350 | 1362 | // aConstraints.gridheight = 3; |
---|
1351 | 1363 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1352 | 1364 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1365 | + /**/ |
---|
1353 | 1366 | |
---|
| 1367 | + bigThree = new cGridBag(); |
---|
| 1368 | + bigThree.addComponent(scenePanel); |
---|
| 1369 | + bigThree.addComponent(centralPanel); |
---|
| 1370 | + bigThree.addComponent(XYZPanel); |
---|
| 1371 | + |
---|
1354 | 1372 | // // SIDE EFFECT!!! |
---|
1355 | 1373 | // aConstraints.gridx = 0; |
---|
1356 | 1374 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1393 | 1411 | }); |
---|
1394 | 1412 | } |
---|
1395 | 1413 | |
---|
| 1414 | + void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 1415 | + { |
---|
| 1416 | + } |
---|
| 1417 | + |
---|
1396 | 1418 | JTree GetTree() |
---|
1397 | 1419 | { |
---|
1398 | 1420 | return objEditor.jTree; |
---|
.. | .. |
---|
3297 | 3319 | |
---|
3298 | 3320 | void ToggleAnimation() |
---|
3299 | 3321 | { |
---|
3300 | | - if (!CameraPane.ANIMATION) |
---|
| 3322 | + if (!Globals.ANIMATION) |
---|
3301 | 3323 | { |
---|
3302 | 3324 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3303 | 3325 | browser.show(); |
---|
3304 | 3326 | String filename = browser.getFile(); |
---|
3305 | 3327 | if (filename != null && filename.length() > 0) |
---|
3306 | 3328 | { |
---|
3307 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3329 | + Globals.filename = browser.getDirectory() + filename; |
---|
3308 | 3330 | //CameraPane.framecount = 0; |
---|
3309 | | - CameraPane.imagecount = 0; |
---|
| 3331 | + Globals.imagecount = 0; |
---|
3310 | 3332 | |
---|
3311 | | - CameraPane.ANIMATION ^= true; |
---|
| 3333 | + Globals.ANIMATION ^= true; |
---|
3312 | 3334 | |
---|
3313 | 3335 | GrafreeD.wav.cursor = 0; |
---|
3314 | 3336 | GrafreeD.wav.loop = 0; |
---|
3315 | 3337 | } |
---|
3316 | 3338 | } else |
---|
3317 | 3339 | { |
---|
3318 | | - CameraPane.ANIMATION ^= true; |
---|
| 3340 | + Globals.ANIMATION ^= true; |
---|
3319 | 3341 | } |
---|
3320 | 3342 | } |
---|
3321 | 3343 | |
---|
.. | .. |
---|
4539 | 4561 | JScrollPane infoPanel; |
---|
4540 | 4562 | JPanel optionsPanel; |
---|
4541 | 4563 | JTabbedPane objectPanel; |
---|
4542 | | - JPanel XYZPanel; |
---|
| 4564 | + cGridBag XYZPanel; |
---|
4543 | 4565 | JSplitPane gridPanel; |
---|
4544 | 4566 | JSplitPane bigPanel; |
---|
4545 | | - JPanel bigThree; |
---|
4546 | | - JTabbedPane scenePanel; |
---|
4547 | | - JPanel centralPanel; |
---|
| 4567 | + cGridBag bigThree; |
---|
| 4568 | + cGridBag scenePanel; |
---|
| 4569 | + cGridBag centralPanel; |
---|
4548 | 4570 | JSplitPane cameraPanel; |
---|
4549 | 4571 | JPanel timelinePanel; |
---|
4550 | 4572 | JMenuBar timelineMenubar; |
---|