.. | .. |
---|
4 | 4 | |
---|
5 | 5 | import java.awt.*; |
---|
6 | 6 | import java.awt.event.*; |
---|
| 7 | +import java.awt.image.BufferedImage; |
---|
7 | 8 | import javax.swing.*; |
---|
8 | 9 | import javax.swing.event.*; |
---|
9 | 10 | import javax.swing.text.*; |
---|
.. | .. |
---|
35 | 36 | |
---|
36 | 37 | GroupEditor callee; |
---|
37 | 38 | JFrame frame; |
---|
| 39 | + |
---|
| 40 | + static ObjEditor theFrame; |
---|
| 41 | + |
---|
| 42 | + cButton GetButton(String name, boolean border) |
---|
| 43 | + { |
---|
| 44 | + try |
---|
| 45 | + { |
---|
| 46 | + ImageIcon icon = GetIcon(name); |
---|
| 47 | + return new cButton(icon, border); |
---|
| 48 | + } |
---|
| 49 | + catch (Exception e) |
---|
| 50 | + { |
---|
| 51 | + return new cButton(name, border); |
---|
| 52 | + } |
---|
| 53 | + } |
---|
| 54 | + |
---|
| 55 | + cToggleButton GetToggleButton(String name, boolean border) |
---|
| 56 | + { |
---|
| 57 | + try |
---|
| 58 | + { |
---|
| 59 | + ImageIcon icon = GetIcon(name); |
---|
| 60 | + return new cToggleButton(icon, border); |
---|
| 61 | + } |
---|
| 62 | + catch (Exception e) |
---|
| 63 | + { |
---|
| 64 | + return new cToggleButton(name, border); |
---|
| 65 | + } |
---|
| 66 | + } |
---|
| 67 | + |
---|
| 68 | + cCheckBox GetCheckBox(String name, boolean border) |
---|
| 69 | + { |
---|
| 70 | + try |
---|
| 71 | + { |
---|
| 72 | + ImageIcon icon = GetIcon(name); |
---|
| 73 | + return new cCheckBox(icon, border); |
---|
| 74 | + } |
---|
| 75 | + catch (Exception e) |
---|
| 76 | + { |
---|
| 77 | + return new cCheckBox(name, border); |
---|
| 78 | + } |
---|
| 79 | + } |
---|
| 80 | + |
---|
| 81 | + private ImageIcon GetIcon(String name) throws IOException |
---|
| 82 | + { |
---|
| 83 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 84 | + |
---|
| 85 | + if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 86 | + { |
---|
| 87 | + BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
| 88 | + Graphics2D g = resized.createGraphics(); |
---|
| 89 | + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 90 | + //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 91 | + g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 92 | + g.dispose(); |
---|
| 93 | + |
---|
| 94 | + image = resized; |
---|
| 95 | + } |
---|
| 96 | + |
---|
| 97 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 98 | + return icon; |
---|
| 99 | + } |
---|
38 | 100 | |
---|
39 | 101 | // SCRIPT |
---|
40 | 102 | |
---|
.. | .. |
---|
145 | 207 | |
---|
146 | 208 | objEditor.ctrlPanel.remove(namePanel); |
---|
147 | 209 | |
---|
148 | | - if (!GroupEditor.allparams) |
---|
| 210 | + if (!allparams) |
---|
149 | 211 | return; |
---|
150 | 212 | |
---|
151 | 213 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
168 | 230 | // objEditor.ctrlPanel.remove(remarkButton); |
---|
169 | 231 | |
---|
170 | 232 | objEditor.ctrlPanel.remove(setupPanel); |
---|
171 | | - objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 233 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
| 234 | + objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
172 | 235 | objEditor.ctrlPanel.remove(pushPanel); |
---|
173 | 236 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
174 | 237 | |
---|
.. | .. |
---|
243 | 306 | //localCopy.parent = null; |
---|
244 | 307 | |
---|
245 | 308 | frame = new JFrame(); |
---|
| 309 | + frame.setUndecorated(true); |
---|
246 | 310 | objEditor = this; |
---|
247 | 311 | this.callee = callee; |
---|
248 | 312 | |
---|
.. | .. |
---|
273 | 337 | return frame.action(event, obj); |
---|
274 | 338 | } |
---|
275 | 339 | |
---|
| 340 | + // Cannot work without static |
---|
| 341 | + static boolean allparams = true; |
---|
| 342 | + |
---|
| 343 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 344 | + |
---|
276 | 345 | void SetupMenu() |
---|
277 | 346 | { |
---|
278 | 347 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
279 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
280 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
281 | | - windowMenu.add("-"); |
---|
282 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
283 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
| 348 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 349 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 350 | + fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 351 | + |
---|
| 352 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 353 | + Menu menu = new Menu("Import"); |
---|
| 354 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 355 | + importOBJItem.addActionListener(this); |
---|
| 356 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 357 | + import3DSItem.addActionListener(this); |
---|
| 358 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 359 | + importVRMLX3DItem.addActionListener(this); |
---|
| 360 | + menu.add("-"); |
---|
| 361 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 362 | + importGFDItem.addActionListener(this); |
---|
| 363 | + fileMenu.add(menu); |
---|
| 364 | + fileMenu.add("-"); |
---|
| 365 | + |
---|
| 366 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 367 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
284 | 368 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
285 | | - windowMenu.add("-"); |
---|
286 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
287 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
288 | | - windowMenu.add("-"); |
---|
| 369 | + fileMenu.add("-"); |
---|
| 370 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 371 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 372 | + fileMenu.add("-"); |
---|
289 | 373 | if (client.parent != null) |
---|
290 | 374 | { |
---|
291 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 375 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
292 | 376 | } else |
---|
293 | 377 | { |
---|
294 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 378 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
295 | 379 | } |
---|
296 | 380 | |
---|
| 381 | + newItem.addActionListener(this); |
---|
297 | 382 | loadItem.addActionListener(this); |
---|
298 | 383 | saveItem.addActionListener(this); |
---|
299 | 384 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
302 | 387 | //povItem.addActionListener(this); |
---|
303 | 388 | closeItem.addActionListener(this); |
---|
304 | 389 | |
---|
305 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
306 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
307 | | - //zBufferItem.addActionListener(this); |
---|
308 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
309 | | - //normalLensItem.addActionListener(this); |
---|
310 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
311 | | - revertCameraItem.addActionListener(this); |
---|
312 | | - |
---|
313 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
314 | | - toggleFullScreenItem.addItemListener(this); |
---|
315 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
316 | | - cameraMenu.add("-"); |
---|
317 | | - |
---|
318 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
319 | | - toggleTextureItem.addItemListener(this); |
---|
320 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
321 | | - |
---|
322 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
323 | | - toggleSwitchItem.addItemListener(this); |
---|
324 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
325 | | - |
---|
326 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
327 | | - toggleHandleItem.addItemListener(this); |
---|
328 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
329 | | - |
---|
330 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
331 | | - togglePaintItem.addItemListener(this); |
---|
332 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
333 | | - |
---|
334 | | - if (Globals.ADVANCED) |
---|
335 | | - { |
---|
336 | | - cameraMenu.add("-"); |
---|
337 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
338 | | - toggleLiveItem.addItemListener(this); |
---|
339 | | - toggleLiveItem.setState(Globals.isLIVE()); |
---|
340 | | - |
---|
341 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
342 | | - stepItem.addActionListener(this); |
---|
343 | | - // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
344 | | - // toggleDLItem.addItemListener(this); |
---|
345 | | - // toggleDLItem.setState(false); |
---|
346 | | - |
---|
347 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
348 | | - toggleRenderItem.addItemListener(this); |
---|
349 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
350 | | - |
---|
351 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
352 | | - toggleDebugItem.addItemListener(this); |
---|
353 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
354 | | - |
---|
355 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
356 | | - toggleFrustumItem.addItemListener(this); |
---|
357 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
358 | | - |
---|
359 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
360 | | - toggleFootContactItem.addItemListener(this); |
---|
361 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
362 | | - |
---|
363 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
364 | | - toggleTimelineItem.addItemListener(this); |
---|
365 | | - } |
---|
366 | | - |
---|
367 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
368 | | -// toggleRootItem.addItemListener(this); |
---|
369 | | -// toggleRootItem.setState(false); |
---|
370 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
371 | | -// animationItem.addItemListener(this); |
---|
372 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
373 | | - cameraMenu.add("-"); |
---|
374 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
375 | | - editCameraItem.addActionListener(this); |
---|
376 | | - |
---|
377 | 390 | objectPanel = new JTabbedPane(); |
---|
| 391 | + |
---|
| 392 | + ChangeListener changeListener = new ChangeListener() |
---|
| 393 | + { |
---|
| 394 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 395 | + { |
---|
| 396 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 397 | +// { |
---|
| 398 | +// if (latestObject != null) |
---|
| 399 | +// { |
---|
| 400 | +// refreshContents(true); |
---|
| 401 | +// SetMaterial(latestObject); |
---|
| 402 | +// } |
---|
| 403 | +// |
---|
| 404 | +// materialFlushed = true; |
---|
| 405 | +// } |
---|
| 406 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 407 | +// { |
---|
| 408 | +// if (listUI.size() == 0) |
---|
| 409 | +// EditSelection(false); |
---|
| 410 | +// } |
---|
| 411 | + |
---|
| 412 | + refreshContents(false); // To refresh Info tab |
---|
| 413 | + } |
---|
| 414 | + }; |
---|
| 415 | + objectPanel.addChangeListener(changeListener); |
---|
| 416 | + |
---|
378 | 417 | toolbarPanel = new JPanel(); |
---|
379 | 418 | toolbarPanel.setName("Toolbar"); |
---|
380 | 419 | treePanel = new cGridBag(); |
---|
381 | 420 | treePanel.setName("Tree"); |
---|
| 421 | + |
---|
| 422 | + editPanel = new cGridBag().setVertical(true); |
---|
| 423 | + editPanel.setName("Edit"); |
---|
| 424 | + |
---|
382 | 425 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
383 | | - ctrlPanel.setName("Edit"); |
---|
| 426 | + |
---|
| 427 | + editCommandsPanel = new cGridBag(); |
---|
| 428 | + editPanel.add(editCommandsPanel); |
---|
| 429 | + editPanel.add(ctrlPanel); |
---|
| 430 | + |
---|
| 431 | + toolboxPanel = new cGridBag().setVertical(false); |
---|
| 432 | + toolboxPanel.setName("Toolbox"); |
---|
| 433 | + |
---|
384 | 434 | materialPanel = new cGridBag().setVertical(true); |
---|
385 | 435 | materialPanel.setName("Material"); |
---|
| 436 | + |
---|
386 | 437 | /*JTextPane*/ |
---|
387 | 438 | infoarea = createTextPane(); |
---|
388 | 439 | doc = infoarea.getStyledDocument(); |
---|
.. | .. |
---|
475 | 526 | e.printStackTrace(); |
---|
476 | 527 | } |
---|
477 | 528 | |
---|
478 | | - String selection = infoarea.getText(); |
---|
479 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
480 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
481 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 529 | +// String selection = infoarea.getText(); |
---|
| 530 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 531 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 532 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
482 | 533 | //clipboard.setContents(data, data); |
---|
483 | 534 | } |
---|
484 | 535 | |
---|
.. | .. |
---|
501 | 552 | //SendInfo("Name:", "bold"); |
---|
502 | 553 | if (sel.GetTextures() != null || debug) |
---|
503 | 554 | { |
---|
504 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 555 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
505 | 556 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
506 | 557 | if (sel.Size() > 0) |
---|
507 | 558 | { |
---|
508 | 559 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
509 | 560 | } |
---|
510 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 561 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
511 | 562 | if (debug) |
---|
512 | 563 | { |
---|
513 | 564 | try |
---|
.. | .. |
---|
549 | 600 | } |
---|
550 | 601 | if (sel.support != null) |
---|
551 | 602 | { |
---|
552 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 603 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
553 | 604 | } |
---|
554 | 605 | if (sel.scriptnode != null) |
---|
555 | 606 | { |
---|
.. | .. |
---|
638 | 689 | } |
---|
639 | 690 | } |
---|
640 | 691 | |
---|
| 692 | +static GraphicsDevice device = GraphicsEnvironment |
---|
| 693 | + .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 694 | + |
---|
| 695 | + Rectangle keeprect; |
---|
| 696 | + cRadio radio; |
---|
| 697 | + |
---|
| 698 | +cButton keepButton; |
---|
| 699 | + cButton twoButton; // Full 3D |
---|
| 700 | + cButton sixButton; |
---|
| 701 | + cButton threeButton; |
---|
| 702 | + cButton sevenButton; |
---|
| 703 | + cButton fourButton; // full panel |
---|
| 704 | + cButton oneButton; // full XYZ |
---|
| 705 | + //cButton currentLayout; |
---|
| 706 | + |
---|
| 707 | + boolean maximized; |
---|
| 708 | + |
---|
| 709 | + cButton fullscreenLayout; |
---|
| 710 | + |
---|
| 711 | + void Minimize() |
---|
| 712 | + { |
---|
| 713 | + frame.setState(Frame.ICONIFIED); |
---|
| 714 | + } |
---|
| 715 | + |
---|
| 716 | + void Maximize() |
---|
| 717 | + { |
---|
| 718 | + if (maximized) |
---|
| 719 | + { |
---|
| 720 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 721 | + } |
---|
| 722 | + else |
---|
| 723 | + { |
---|
| 724 | + keeprect = frame.getBounds(); |
---|
| 725 | + Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 726 | + Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 727 | + frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 728 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 729 | + } |
---|
| 730 | + |
---|
| 731 | + maximized ^= true; |
---|
| 732 | + } |
---|
| 733 | + |
---|
641 | 734 | void ToggleFullScreen() |
---|
642 | 735 | { |
---|
643 | | - if (CameraPane.FULLSCREEN) |
---|
| 736 | + cameraView.ToggleFullScreen(); |
---|
| 737 | + |
---|
| 738 | + if (!CameraPane.FULLSCREEN) |
---|
644 | 739 | { |
---|
645 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
646 | | - framePanel.add(bigThree); |
---|
647 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 740 | + device.setFullScreenWindow(null); |
---|
| 741 | + //frame.setVisible(false); |
---|
| 742 | +// frame.removeNotify(); |
---|
| 743 | +// frame.setUndecorated(false); |
---|
| 744 | +// frame.addNotify(); |
---|
| 745 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 746 | + |
---|
| 747 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 748 | +// X framePanel.add(bigThree); |
---|
| 749 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 750 | + framePanel.setDividerLocation(1); |
---|
| 751 | + |
---|
| 752 | + //frame.setVisible(true); |
---|
| 753 | + radio.layout = keepButton; |
---|
| 754 | + //theFrame = null; |
---|
| 755 | + keepButton = null; |
---|
| 756 | + radio.layout.doClick(); |
---|
| 757 | + |
---|
648 | 758 | } else |
---|
649 | 759 | { |
---|
650 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
651 | | - framePanel.remove(bigThree); |
---|
652 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 760 | + keepButton = radio.layout; |
---|
| 761 | + //keeprect = frame.getBounds(); |
---|
| 762 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 763 | +// frame.getToolkit().getScreenSize().height); |
---|
| 764 | + //frame.setVisible(false); |
---|
| 765 | + device.setFullScreenWindow(frame); |
---|
| 766 | +// frame.removeNotify(); |
---|
| 767 | +// frame.setUndecorated(true); |
---|
| 768 | +// frame.addNotify(); |
---|
| 769 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 770 | +// X framePanel.remove(bigThree); |
---|
| 771 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 772 | + framePanel.setDividerLocation(0); |
---|
| 773 | + |
---|
| 774 | + radio.layout = fullscreenLayout; |
---|
| 775 | + radio.layout.doClick(); |
---|
| 776 | + //frame.setVisible(true); |
---|
653 | 777 | } |
---|
654 | | - cameraView.ToggleFullScreen(); |
---|
655 | 778 | } |
---|
656 | 779 | |
---|
657 | 780 | private JTextPane createTextPane() |
---|
.. | .. |
---|
784 | 907 | // NumberSlider vDivsField; |
---|
785 | 908 | // JCheckBox endcaps; |
---|
786 | 909 | JCheckBox liveCB; |
---|
| 910 | + JCheckBox selectCB; |
---|
787 | 911 | JCheckBox hideCB; |
---|
788 | 912 | JCheckBox link2masterCB; |
---|
789 | 913 | JCheckBox markCB; |
---|
.. | .. |
---|
791 | 915 | JCheckBox speedupCB; |
---|
792 | 916 | JCheckBox rewindCB; |
---|
793 | 917 | JCheckBox flipVCB; |
---|
| 918 | + |
---|
| 919 | + cCheckBox toggleTextureCB; |
---|
| 920 | + cCheckBox toggleSwitchCB; |
---|
| 921 | + |
---|
794 | 922 | JComboBox texresMenu; |
---|
| 923 | + |
---|
795 | 924 | JButton resetButton; |
---|
796 | 925 | JButton stepButton; |
---|
797 | 926 | JButton stepAllButton; |
---|
.. | .. |
---|
800 | 929 | JButton fasterButton; |
---|
801 | 930 | JButton remarkButton; |
---|
802 | 931 | |
---|
| 932 | + cGridBag editPanel; |
---|
| 933 | + cGridBag editCommandsPanel; |
---|
| 934 | + |
---|
803 | 935 | cGridBag namePanel; |
---|
804 | 936 | cGridBag setupPanel; |
---|
805 | | - cGridBag commandsPanel; |
---|
| 937 | + cGridBag setupPanel2; |
---|
| 938 | + cGridBag objectCommandsPanel; |
---|
806 | 939 | cGridBag pushPanel; |
---|
807 | 940 | cGridBag fillPanel; |
---|
808 | 941 | |
---|
.. | .. |
---|
979 | 1112 | |
---|
980 | 1113 | oe.ctrlPanel.Return(); |
---|
981 | 1114 | |
---|
982 | | - if (!GroupEditor.allparams) |
---|
| 1115 | + if (!allparams) |
---|
983 | 1116 | return; |
---|
984 | 1117 | |
---|
985 | 1118 | setupPanel = new cGridBag().setVertical(false); |
---|
986 | 1119 | |
---|
987 | 1120 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
988 | 1121 | liveCB.setToolTipText("Animate object"); |
---|
| 1122 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1123 | + selectCB.setToolTipText("Make object selectable"); |
---|
| 1124 | +// Return(); |
---|
989 | 1125 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
990 | 1126 | hideCB.setToolTipText("Hide object"); |
---|
991 | | -// Return(); |
---|
992 | 1127 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
993 | 1128 | markCB.setToolTipText("Set the animation target transform"); |
---|
994 | 1129 | |
---|
995 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 1130 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1131 | + |
---|
| 1132 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
996 | 1133 | rewindCB.setToolTipText("Rewind animation"); |
---|
997 | 1134 | |
---|
998 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
999 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 1135 | + randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
| 1136 | + randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
1000 | 1137 | |
---|
1001 | 1138 | if (Globals.ADVANCED) |
---|
1002 | 1139 | { |
---|
1003 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 1140 | + link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
1004 | 1141 | link2masterCB.setToolTipText("Attach to support"); |
---|
1005 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1142 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
1006 | 1143 | speedupCB.setToolTipText("Option motion capture"); |
---|
1007 | 1144 | } |
---|
1008 | 1145 | |
---|
1009 | 1146 | oe.ctrlPanel.add(setupPanel); |
---|
1010 | 1147 | oe.ctrlPanel.Return(); |
---|
| 1148 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1149 | + oe.ctrlPanel.Return(); |
---|
1011 | 1150 | |
---|
1012 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1151 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
1013 | 1152 | |
---|
1014 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1153 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
1015 | 1154 | resetButton.setToolTipText("Jump to frame zero"); |
---|
1016 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1155 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
1017 | 1156 | stepButton.setToolTipText("Step one frame"); |
---|
1018 | 1157 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
1019 | 1158 | // stepAllButton = AddButton(oe, "Step All"); |
---|
1020 | 1159 | // Return(); |
---|
1021 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1160 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
1022 | 1161 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
1023 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1162 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
1024 | 1163 | fasterButton.setToolTipText("Increase animation speed"); |
---|
1025 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1164 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
1026 | 1165 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
1027 | 1166 | |
---|
1028 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1167 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
1029 | 1168 | oe.ctrlPanel.Return(); |
---|
1030 | 1169 | |
---|
1031 | | - pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1170 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
1032 | 1171 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1033 | 1172 | //Return(); |
---|
1034 | 1173 | |
---|
.. | .. |
---|
1231 | 1370 | //worldPanel.setName("World"); |
---|
1232 | 1371 | centralPanel = new cGridBag(); |
---|
1233 | 1372 | centralPanel.preferredWidth = 20; |
---|
1234 | | - timelinePanel = new JPanel(new BorderLayout()); |
---|
1235 | | - timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
| 1373 | + |
---|
| 1374 | + if (Globals.ADVANCED) |
---|
| 1375 | + { |
---|
| 1376 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1377 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1236 | 1378 | |
---|
1237 | 1379 | cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
1238 | 1380 | cameraPanel.setContinuousLayout(true); |
---|
.. | .. |
---|
1241 | 1383 | // cameraPanel.setDividerSize(9); |
---|
1242 | 1384 | cameraPanel.setResizeWeight(1.0); |
---|
1243 | 1385 | |
---|
| 1386 | + } |
---|
| 1387 | + |
---|
1244 | 1388 | centralPanel.add(cameraView); |
---|
| 1389 | + centralPanel.setFocusable(true); |
---|
1245 | 1390 | //frame.setJMenuBar(timelineMenubar); |
---|
1246 | 1391 | //centralPanel.add(timelinePanel); |
---|
1247 | 1392 | |
---|
.. | .. |
---|
1308 | 1453 | // north.setName("Edit"); |
---|
1309 | 1454 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1310 | 1455 | // objectPanel.add(north); |
---|
1311 | | - objectPanel.add(ctrlPanel); |
---|
| 1456 | + objectPanel.add(editPanel); |
---|
1312 | 1457 | objectPanel.add(infoPanel); |
---|
| 1458 | + objectPanel.add(toolboxPanel); |
---|
1313 | 1459 | |
---|
1314 | 1460 | /* |
---|
1315 | 1461 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1318 | 1464 | aConstraints.gridy += 1; |
---|
1319 | 1465 | aConstraints.gridwidth = 1; |
---|
1320 | 1466 | mainPanel.add(objectPanel, aConstraints); |
---|
1321 | | - */ |
---|
| 1467 | + */ |
---|
1322 | 1468 | |
---|
1323 | 1469 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1324 | 1470 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1335 | 1481 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1336 | 1482 | tabbedPane.add(scrollpane); |
---|
1337 | 1483 | |
---|
1338 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1339 | | - |
---|
1340 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1484 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1341 | 1485 | |
---|
1342 | 1486 | optionsPanel.setName("Options"); |
---|
1343 | 1487 | |
---|
.. | .. |
---|
1345 | 1489 | |
---|
1346 | 1490 | tabbedPane.add(optionsPanel); |
---|
1347 | 1491 | |
---|
| 1492 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1493 | + |
---|
1348 | 1494 | scenePanel.add(tabbedPane); |
---|
1349 | 1495 | |
---|
1350 | 1496 | /* |
---|
.. | .. |
---|
1437 | 1583 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1438 | 1584 | |
---|
1439 | 1585 | frame.setSize(1280, 860); |
---|
| 1586 | + |
---|
| 1587 | + frame.validate(); |
---|
1440 | 1588 | frame.setVisible(true); |
---|
1441 | 1589 | |
---|
| 1590 | + cameraView.requestFocusInWindow(); |
---|
| 1591 | + |
---|
1442 | 1592 | gridPanel.setDividerLocation(1.0); |
---|
1443 | 1593 | |
---|
1444 | 1594 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
.. | .. |
---|
1988 | 2138 | e2.printStackTrace(); |
---|
1989 | 2139 | } |
---|
1990 | 2140 | } |
---|
| 2141 | + |
---|
1991 | 2142 | LoadJMEThread loadThread; |
---|
1992 | 2143 | |
---|
1993 | 2144 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
2045 | 2196 | //LoadFile0(filename, converter); |
---|
2046 | 2197 | } |
---|
2047 | 2198 | } |
---|
| 2199 | + |
---|
2048 | 2200 | LoadOBJThread loadObjThread; |
---|
2049 | 2201 | |
---|
2050 | 2202 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2123 | 2275 | |
---|
2124 | 2276 | void LoadObjFile(String fullname) |
---|
2125 | 2277 | { |
---|
2126 | | - /* |
---|
| 2278 | + System.out.println("Loading " + fullname); |
---|
| 2279 | + /**/ |
---|
2127 | 2280 | //lastFilename = fullname; |
---|
2128 | 2281 | if(loadObjThread == null) |
---|
2129 | 2282 | { |
---|
2130 | | - loadObjThread = new LoadOBJThread(); |
---|
2131 | | - loadObjThread.start(); |
---|
| 2283 | + loadObjThread = new LoadOBJThread(); |
---|
| 2284 | + loadObjThread.start(); |
---|
2132 | 2285 | } |
---|
2133 | 2286 | |
---|
2134 | 2287 | loadObjThread.add(fullname); |
---|
2135 | | - */ |
---|
| 2288 | + /**/ |
---|
2136 | 2289 | |
---|
2137 | | - System.out.println("Loading " + fullname); |
---|
2138 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2290 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2139 | 2291 | } |
---|
2140 | 2292 | |
---|
2141 | 2293 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2752 | 2904 | |
---|
2753 | 2905 | void SetMaterial(Object3D object) |
---|
2754 | 2906 | { |
---|
| 2907 | + latestObject = object; |
---|
| 2908 | + |
---|
2755 | 2909 | cMaterial mat = object.material; |
---|
2756 | 2910 | |
---|
2757 | 2911 | if (mat == null) |
---|
.. | .. |
---|
2937 | 3091 | cameraView.ToggleDL(); |
---|
2938 | 3092 | cameraView.repaint(); |
---|
2939 | 3093 | return; |
---|
2940 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3094 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2941 | 3095 | { |
---|
2942 | 3096 | cameraView.ToggleTexture(); |
---|
2943 | 3097 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
2976 | 3130 | frame.validate(); |
---|
2977 | 3131 | |
---|
2978 | 3132 | return; |
---|
2979 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3133 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
2980 | 3134 | { |
---|
2981 | | - cameraView.ToggleRandom(); |
---|
| 3135 | + cameraView.ToggleSwitch(); |
---|
2982 | 3136 | cameraView.repaint(); |
---|
2983 | 3137 | return; |
---|
2984 | 3138 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
3006 | 3160 | } else if (event.getSource() == liveCB) |
---|
3007 | 3161 | { |
---|
3008 | 3162 | copy.live ^= true; |
---|
| 3163 | + return; |
---|
| 3164 | + } else if (event.getSource() == selectCB) |
---|
| 3165 | + { |
---|
| 3166 | + copy.dontselect ^= true; |
---|
3009 | 3167 | return; |
---|
3010 | 3168 | } else if (event.getSource() == hideCB) |
---|
3011 | 3169 | { |
---|
.. | .. |
---|
3045 | 3203 | |
---|
3046 | 3204 | public void actionPerformed(ActionEvent event) |
---|
3047 | 3205 | { |
---|
| 3206 | + Object source = event.getSource(); |
---|
3048 | 3207 | // SCRIPT DIALOG |
---|
3049 | | - if (event.getSource() == okbutton) |
---|
| 3208 | + if (source == okbutton) |
---|
3050 | 3209 | { |
---|
3051 | 3210 | textpanel.setVisible(false); |
---|
3052 | 3211 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3058 | 3217 | textarea = null; |
---|
3059 | 3218 | textpanel = null; |
---|
3060 | 3219 | } |
---|
3061 | | - if (event.getSource() == cancelbutton) |
---|
| 3220 | + if (source == cancelbutton) |
---|
3062 | 3221 | { |
---|
3063 | 3222 | textpanel.setVisible(false); |
---|
3064 | 3223 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3070 | 3229 | //applySelf(); |
---|
3071 | 3230 | //client.refreshEditWindow(); |
---|
3072 | 3231 | //refreshContents(); |
---|
3073 | | - if (event.getSource() == nameField) |
---|
| 3232 | + if (source == nameField) |
---|
3074 | 3233 | { |
---|
3075 | 3234 | //System.out.println("ObjEditor " + event); |
---|
3076 | 3235 | applySelf0(true); |
---|
3077 | 3236 | //parent.applySelf(); |
---|
3078 | 3237 | objEditor.refreshContents(); |
---|
3079 | | - } else if (event.getSource() == resetButton) |
---|
| 3238 | + } else if (source == resetButton) |
---|
3080 | 3239 | { |
---|
3081 | 3240 | CameraPane.fullreset = true; |
---|
3082 | 3241 | copy.Reset(); // ResetMeshes(); |
---|
3083 | 3242 | copy.Touch(); |
---|
3084 | 3243 | objEditor.refreshContents(); |
---|
3085 | | - } else if (event.getSource() == stepItem) |
---|
| 3244 | + } else if (source == stepItem) |
---|
3086 | 3245 | { |
---|
3087 | 3246 | //cameraView.ONESTEP = true; |
---|
3088 | 3247 | Globals.ONESTEP = true; |
---|
3089 | 3248 | cameraView.repaint(); |
---|
3090 | 3249 | return; |
---|
3091 | | - } else if (event.getSource() == stepButton) |
---|
| 3250 | + } else if (source == stepButton) |
---|
3092 | 3251 | { |
---|
3093 | 3252 | copy.Step(); |
---|
3094 | 3253 | copy.Touch(); |
---|
3095 | 3254 | objEditor.refreshContents(); |
---|
3096 | | - } else if (event.getSource() == slowerButton) |
---|
| 3255 | + } else if (source == slowerButton) |
---|
3097 | 3256 | { |
---|
3098 | 3257 | copy.Slower(); |
---|
3099 | 3258 | copy.Touch(); |
---|
3100 | 3259 | objEditor.refreshContents(); |
---|
3101 | | - } else if (event.getSource() == fasterButton) |
---|
| 3260 | + } else if (source == fasterButton) |
---|
3102 | 3261 | { |
---|
3103 | 3262 | copy.Faster(); |
---|
3104 | 3263 | copy.Touch(); |
---|
3105 | 3264 | objEditor.refreshContents(); |
---|
3106 | | - } else if (event.getSource() == remarkButton) |
---|
| 3265 | + } else if (source == remarkButton) |
---|
3107 | 3266 | { |
---|
3108 | 3267 | copy.Remark(); |
---|
3109 | 3268 | copy.Touch(); |
---|
3110 | 3269 | objEditor.refreshContents(); |
---|
3111 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3270 | + } else if (source == stepAllButton) |
---|
3112 | 3271 | { |
---|
3113 | 3272 | copy.StepAll(); |
---|
3114 | 3273 | copy.Touch(); |
---|
3115 | 3274 | objEditor.refreshContents(); |
---|
3116 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3275 | + } else if (source == resetAllButton) |
---|
3117 | 3276 | { |
---|
3118 | 3277 | //CameraPane.fullreset = true; |
---|
3119 | 3278 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3146 | 3305 | // Close(); |
---|
3147 | 3306 | // } |
---|
3148 | 3307 | // else |
---|
3149 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3308 | + if (source == resetSlidersButton) |
---|
3150 | 3309 | { |
---|
3151 | 3310 | ResetSliders(); |
---|
3152 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3311 | + } else if (source == clearMaterialButton) |
---|
3153 | 3312 | { |
---|
3154 | 3313 | ClearMaterial(); |
---|
3155 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3314 | + } else if (source == createMaterialButton) |
---|
3156 | 3315 | { |
---|
3157 | 3316 | CreateMaterial(); |
---|
3158 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3317 | + } else if (source == clearPanelButton) |
---|
3159 | 3318 | { |
---|
3160 | 3319 | copy.ClearUI(); |
---|
3161 | 3320 | refreshContents(true); |
---|
3162 | | - } /* |
---|
3163 | | - } |
---|
3164 | | - |
---|
3165 | | - public boolean action(Event event, Object arg) |
---|
3166 | | - { |
---|
3167 | | - */ else if (event.getSource() == closeItem) |
---|
| 3321 | + } else if (source == importGFDItem) |
---|
| 3322 | + { |
---|
| 3323 | + ImportGFD(); |
---|
| 3324 | + } else |
---|
| 3325 | + if (source == importVRMLX3DItem) |
---|
| 3326 | + { |
---|
| 3327 | + ImportVRMLX3D(); |
---|
| 3328 | + } else |
---|
| 3329 | + if (source == import3DSItem) |
---|
| 3330 | + { |
---|
| 3331 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3332 | + } else |
---|
| 3333 | + if (source == importOBJItem) |
---|
| 3334 | + { |
---|
| 3335 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3336 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3337 | + browser.setVisible(true); |
---|
| 3338 | + String filename = browser.getFile(); |
---|
| 3339 | + if (filename != null && filename.length() > 0) |
---|
| 3340 | + { |
---|
| 3341 | + String fullname = browser.getDirectory() + filename; |
---|
| 3342 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3343 | + } |
---|
| 3344 | + } else |
---|
| 3345 | + if (source == closeItem) |
---|
3168 | 3346 | { |
---|
3169 | 3347 | Close(); |
---|
3170 | 3348 | //return true; |
---|
3171 | | - } else if (event.getSource() == loadItem) |
---|
| 3349 | + } else if (source == loadItem) |
---|
3172 | 3350 | { |
---|
3173 | 3351 | load(); |
---|
3174 | 3352 | //return true; |
---|
3175 | | - } else if (event.getSource() == saveItem) |
---|
| 3353 | + } else if (source == newItem) |
---|
| 3354 | + { |
---|
| 3355 | + New(); |
---|
| 3356 | + } else if (source == saveItem) |
---|
3176 | 3357 | { |
---|
3177 | 3358 | save(); |
---|
3178 | 3359 | //return true; |
---|
3179 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3360 | + } else if (source == saveAsItem) |
---|
3180 | 3361 | { |
---|
3181 | 3362 | saveAs(); |
---|
3182 | 3363 | //return true; |
---|
3183 | | - } else if (event.getSource() == reexportItem) |
---|
| 3364 | + } else if (source == reexportItem) |
---|
3184 | 3365 | { |
---|
3185 | 3366 | reexport(); |
---|
3186 | 3367 | //return true; |
---|
3187 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3368 | + } else if (source == exportAsItem) |
---|
3188 | 3369 | { |
---|
3189 | 3370 | export(); |
---|
3190 | 3371 | //return true; |
---|
3191 | | - } else if (event.getSource() == povItem) |
---|
| 3372 | + } else if (source == povItem) |
---|
3192 | 3373 | { |
---|
3193 | 3374 | generatePOV(); |
---|
3194 | 3375 | //return true; |
---|
3195 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3376 | + } else if (source == zBufferItem) |
---|
3196 | 3377 | { |
---|
3197 | 3378 | try |
---|
3198 | 3379 | { |
---|
.. | .. |
---|
3214 | 3395 | cameraView.repaint(); |
---|
3215 | 3396 | //return true; |
---|
3216 | 3397 | } |
---|
3217 | | - */ else if (event.getSource() == editCameraItem) |
---|
3218 | | - { |
---|
3219 | | - cameraView.ProtectCamera(); |
---|
3220 | | - cameraView.repaint(); |
---|
3221 | | - return; |
---|
3222 | | - } else if (event.getSource() == revertCameraItem) |
---|
3223 | | - { |
---|
3224 | | - cameraView.RevertCamera(); |
---|
3225 | | - cameraView.repaint(); |
---|
3226 | | - return; |
---|
3227 | | -// } else if (event.getSource() == textureButton) |
---|
3228 | | -// { |
---|
3229 | | -// return; // true; |
---|
3230 | | - } else // combos... |
---|
3231 | | - if (event.getSource() == texresMenu) |
---|
| 3398 | + */ else // combos... |
---|
| 3399 | + if (source == texresMenu) |
---|
3232 | 3400 | { |
---|
3233 | 3401 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3234 | 3402 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3240 | 3408 | } |
---|
3241 | 3409 | } |
---|
3242 | 3410 | |
---|
| 3411 | + void New() |
---|
| 3412 | + { |
---|
| 3413 | + while (copy.Size() > 1) |
---|
| 3414 | + { |
---|
| 3415 | + copy.remove(1); |
---|
| 3416 | + } |
---|
| 3417 | + |
---|
| 3418 | + ResetModel(); |
---|
| 3419 | + objEditor.refreshContents(); |
---|
| 3420 | + } |
---|
| 3421 | + |
---|
| 3422 | + static public byte[] Compress(Object3D o) |
---|
| 3423 | + { |
---|
| 3424 | + try |
---|
| 3425 | + { |
---|
| 3426 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3427 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 3428 | + ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 3429 | + |
---|
| 3430 | + Object3D parent = o.parent; |
---|
| 3431 | + o.parent = null; |
---|
| 3432 | + |
---|
| 3433 | + out.writeObject(o); |
---|
| 3434 | + |
---|
| 3435 | + o.parent = parent; |
---|
| 3436 | + |
---|
| 3437 | + out.flush(); |
---|
| 3438 | + |
---|
| 3439 | + zstream.close(); |
---|
| 3440 | + out.close(); |
---|
| 3441 | + |
---|
| 3442 | + return baos.toByteArray(); |
---|
| 3443 | + } catch (Exception e) |
---|
| 3444 | + { |
---|
| 3445 | + System.err.println(e); |
---|
| 3446 | + return null; |
---|
| 3447 | + } |
---|
| 3448 | + } |
---|
| 3449 | + |
---|
| 3450 | + static public Object Uncompress(byte[] bytes) |
---|
| 3451 | + { |
---|
| 3452 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3453 | + try |
---|
| 3454 | + { |
---|
| 3455 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3456 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3457 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3458 | + Object obj = in.readObject(); |
---|
| 3459 | + in.close(); |
---|
| 3460 | + |
---|
| 3461 | + return obj; |
---|
| 3462 | + } catch (Exception e) |
---|
| 3463 | + { |
---|
| 3464 | + System.err.println(e); |
---|
| 3465 | + return null; |
---|
| 3466 | + } |
---|
| 3467 | + } |
---|
| 3468 | + |
---|
| 3469 | + static public Object clone(Object o) |
---|
| 3470 | + { |
---|
| 3471 | + try |
---|
| 3472 | + { |
---|
| 3473 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3474 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3475 | + |
---|
| 3476 | + out.writeObject(o); |
---|
| 3477 | + |
---|
| 3478 | + out.flush(); |
---|
| 3479 | + out.close(); |
---|
| 3480 | + |
---|
| 3481 | + byte[] bytes = baos.toByteArray(); |
---|
| 3482 | + |
---|
| 3483 | + System.out.println("clone = " + bytes.length); |
---|
| 3484 | + |
---|
| 3485 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3486 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3487 | + Object obj = in.readObject(); |
---|
| 3488 | + in.close(); |
---|
| 3489 | + |
---|
| 3490 | + return obj; |
---|
| 3491 | + } catch (Exception e) |
---|
| 3492 | + { |
---|
| 3493 | + System.err.println(e); |
---|
| 3494 | + return null; |
---|
| 3495 | + } |
---|
| 3496 | + } |
---|
| 3497 | + |
---|
| 3498 | + cRadio GetCurrentTab() |
---|
| 3499 | + { |
---|
| 3500 | + cRadio ab; |
---|
| 3501 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3502 | + { |
---|
| 3503 | + ab = (cRadio)e.nextElement(); |
---|
| 3504 | + if(ab.GetObject() == copy) |
---|
| 3505 | + { |
---|
| 3506 | + return ab; |
---|
| 3507 | + } |
---|
| 3508 | + } |
---|
| 3509 | + |
---|
| 3510 | + return null; |
---|
| 3511 | + } |
---|
| 3512 | + |
---|
| 3513 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3514 | + |
---|
| 3515 | + public void Save() |
---|
| 3516 | + { |
---|
| 3517 | + System.err.println("Save"); |
---|
| 3518 | + |
---|
| 3519 | + cRadio tab = GetCurrentTab(); |
---|
| 3520 | + |
---|
| 3521 | + boolean temp = CameraPane.SWITCH; |
---|
| 3522 | + CameraPane.SWITCH = false; |
---|
| 3523 | + |
---|
| 3524 | + copy.ExtractBigData(hashtable); |
---|
| 3525 | + |
---|
| 3526 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3527 | + tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3528 | + |
---|
| 3529 | + copy.RestoreBigData(hashtable); |
---|
| 3530 | + |
---|
| 3531 | + CameraPane.SWITCH = temp; |
---|
| 3532 | + |
---|
| 3533 | + //assert(hashtable.isEmpty()); |
---|
| 3534 | + |
---|
| 3535 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3536 | + { |
---|
| 3537 | + tab.graphs[i] = null; |
---|
| 3538 | + } |
---|
| 3539 | + |
---|
| 3540 | + SetUndoStates(); |
---|
| 3541 | + |
---|
| 3542 | + // test save |
---|
| 3543 | + if (false) |
---|
| 3544 | + { |
---|
| 3545 | + try |
---|
| 3546 | + { |
---|
| 3547 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3548 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3549 | + |
---|
| 3550 | + p.writeObject(copy); |
---|
| 3551 | + |
---|
| 3552 | + p.flush(); |
---|
| 3553 | + |
---|
| 3554 | + ostream.close(); |
---|
| 3555 | + } catch (Exception e) |
---|
| 3556 | + { |
---|
| 3557 | + e.printStackTrace(); |
---|
| 3558 | + } |
---|
| 3559 | + } |
---|
| 3560 | + } |
---|
| 3561 | + |
---|
| 3562 | + void CopyChanged(Object3D obj) |
---|
| 3563 | + { |
---|
| 3564 | + SetUndoStates(); |
---|
| 3565 | + |
---|
| 3566 | + boolean temp = CameraPane.SWITCH; |
---|
| 3567 | + CameraPane.SWITCH = false; |
---|
| 3568 | + |
---|
| 3569 | + copy.ExtractBigData(hashtable); |
---|
| 3570 | + |
---|
| 3571 | + copy.clear(); |
---|
| 3572 | + |
---|
| 3573 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3574 | + { |
---|
| 3575 | + copy.add(obj.get(i)); |
---|
| 3576 | + } |
---|
| 3577 | + |
---|
| 3578 | + copy.RestoreBigData(hashtable); |
---|
| 3579 | + |
---|
| 3580 | + CameraPane.SWITCH = temp; |
---|
| 3581 | + |
---|
| 3582 | + //assert(hashtable.isEmpty()); |
---|
| 3583 | + |
---|
| 3584 | + copy.Touch(); |
---|
| 3585 | + |
---|
| 3586 | + ResetModel(); |
---|
| 3587 | + copy.HardTouch(); // recompile? |
---|
| 3588 | + |
---|
| 3589 | + cRadio ab; |
---|
| 3590 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3591 | + { |
---|
| 3592 | + ab = (cRadio)e.nextElement(); |
---|
| 3593 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3594 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3595 | + if (test != null) |
---|
| 3596 | + { |
---|
| 3597 | + test.editWindow = ab.object.editWindow; |
---|
| 3598 | + ab.object = test; |
---|
| 3599 | + } |
---|
| 3600 | + } |
---|
| 3601 | + |
---|
| 3602 | + refreshContents(); |
---|
| 3603 | + } |
---|
| 3604 | + |
---|
| 3605 | + cButton undoButton; |
---|
| 3606 | + cButton redoButton; |
---|
| 3607 | + |
---|
| 3608 | + void SetUndoStates() |
---|
| 3609 | + { |
---|
| 3610 | + cRadio tab = GetCurrentTab(); |
---|
| 3611 | + |
---|
| 3612 | + undoButton.setEnabled(tab.undoindex > 0); |
---|
| 3613 | + redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null); |
---|
| 3614 | + } |
---|
| 3615 | + |
---|
| 3616 | + public void Undo() |
---|
| 3617 | + { |
---|
| 3618 | + System.err.println("Undo"); |
---|
| 3619 | + |
---|
| 3620 | + cRadio tab = GetCurrentTab(); |
---|
| 3621 | + |
---|
| 3622 | + if (tab.undoindex == 0) |
---|
| 3623 | + { |
---|
| 3624 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3625 | + return; |
---|
| 3626 | + } |
---|
| 3627 | + |
---|
| 3628 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3629 | + { |
---|
| 3630 | + Save(); |
---|
| 3631 | + tab.undoindex -= 1; |
---|
| 3632 | + } |
---|
| 3633 | + |
---|
| 3634 | + tab.undoindex -= 1; |
---|
| 3635 | + |
---|
| 3636 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3637 | + } |
---|
| 3638 | + |
---|
| 3639 | + public void Redo() |
---|
| 3640 | + { |
---|
| 3641 | + cRadio tab = GetCurrentTab(); |
---|
| 3642 | + |
---|
| 3643 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3644 | + { |
---|
| 3645 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3646 | + return; |
---|
| 3647 | + } |
---|
| 3648 | + |
---|
| 3649 | + tab.undoindex += 1; |
---|
| 3650 | + |
---|
| 3651 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3652 | + } |
---|
| 3653 | + |
---|
| 3654 | + void ImportGFD() |
---|
| 3655 | + { |
---|
| 3656 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
| 3657 | + browser.show(); |
---|
| 3658 | + String filename = browser.getFile(); |
---|
| 3659 | + if (filename != null && filename.length() > 0) |
---|
| 3660 | + { |
---|
| 3661 | + String fullname = browser.getDirectory() + filename; |
---|
| 3662 | + |
---|
| 3663 | + //Object3D readobj = |
---|
| 3664 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3665 | + //makeSomething(readobj); |
---|
| 3666 | + } |
---|
| 3667 | + } |
---|
| 3668 | + |
---|
| 3669 | + void ImportVRMLX3D() |
---|
| 3670 | + { |
---|
| 3671 | + if (Grafreed.standAlone) |
---|
| 3672 | + { |
---|
| 3673 | + /**/ |
---|
| 3674 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3675 | + browser.show(); |
---|
| 3676 | + String filename = browser.getFile(); |
---|
| 3677 | + if (filename != null && filename.length() > 0) |
---|
| 3678 | + { |
---|
| 3679 | + String fullname = browser.getDirectory() + filename; |
---|
| 3680 | + LoadVRMLX3D(fullname); |
---|
| 3681 | + } |
---|
| 3682 | + /**/ |
---|
| 3683 | + } |
---|
| 3684 | + } |
---|
| 3685 | + |
---|
3243 | 3686 | void ToggleAnimation() |
---|
3244 | 3687 | { |
---|
3245 | 3688 | if (!Globals.ANIMATION) |
---|
.. | .. |
---|
3357 | 3800 | assert false; |
---|
3358 | 3801 | } |
---|
3359 | 3802 | |
---|
3360 | | - void EditSelection() |
---|
| 3803 | + void EditSelection(boolean newWindow) |
---|
3361 | 3804 | { |
---|
3362 | 3805 | } |
---|
3363 | 3806 | |
---|
.. | .. |
---|
3588 | 4031 | } |
---|
3589 | 4032 | |
---|
3590 | 4033 | if (normalpushField != null) |
---|
3591 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 4034 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3592 | 4035 | } |
---|
3593 | 4036 | |
---|
3594 | 4037 | void SnapObject() |
---|
.. | .. |
---|
3852 | 4295 | |
---|
3853 | 4296 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3854 | 4297 | { |
---|
| 4298 | + if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 4299 | + Save(); |
---|
3855 | 4300 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3856 | 4301 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3857 | 4302 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
3938 | 4383 | { |
---|
3939 | 4384 | ResetModel(); |
---|
3940 | 4385 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 4386 | + |
---|
| 4387 | + if (thing.Size() == 0) |
---|
| 4388 | + { |
---|
| 4389 | + //EditSelection(false); |
---|
| 4390 | + } |
---|
| 4391 | + |
---|
3941 | 4392 | refreshContents(); |
---|
3942 | 4393 | } |
---|
3943 | 4394 | |
---|
.. | .. |
---|
4055 | 4506 | } |
---|
4056 | 4507 | } |
---|
4057 | 4508 | } |
---|
| 4509 | + |
---|
4058 | 4510 | LoadGFDThread loadGFDThread; |
---|
4059 | 4511 | |
---|
4060 | 4512 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4074 | 4526 | |
---|
4075 | 4527 | try |
---|
4076 | 4528 | { |
---|
| 4529 | + // Try compressed version first. |
---|
4077 | 4530 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4078 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4531 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4532 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4079 | 4533 | |
---|
4080 | 4534 | readobj = (Object3D) p.readObject(); |
---|
4081 | 4535 | istream.close(); |
---|
.. | .. |
---|
4083 | 4537 | readobj.ResetDisplayList(); |
---|
4084 | 4538 | } catch (Exception e) |
---|
4085 | 4539 | { |
---|
4086 | | - e.printStackTrace(); |
---|
| 4540 | + //e.printStackTrace(); |
---|
| 4541 | + try |
---|
| 4542 | + { |
---|
| 4543 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4544 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4545 | + |
---|
| 4546 | + readobj = (Object3D) p.readObject(); |
---|
| 4547 | + istream.close(); |
---|
| 4548 | + |
---|
| 4549 | + readobj.ResetDisplayList(); |
---|
| 4550 | + } catch (Exception e2) |
---|
| 4551 | + { |
---|
| 4552 | + e2.printStackTrace(); |
---|
| 4553 | + } |
---|
4087 | 4554 | } |
---|
4088 | 4555 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4089 | 4556 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4129 | 4596 | |
---|
4130 | 4597 | void LoadIt(Object obj) |
---|
4131 | 4598 | { |
---|
| 4599 | + if (obj == null) |
---|
| 4600 | + { |
---|
| 4601 | + // Invalid file |
---|
| 4602 | + return; |
---|
| 4603 | + } |
---|
| 4604 | + |
---|
4132 | 4605 | System.out.println("Loaded " + obj); |
---|
4133 | 4606 | //new Exception().printStackTrace(); |
---|
4134 | 4607 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4138 | 4611 | |
---|
4139 | 4612 | if (readobj != null) |
---|
4140 | 4613 | { |
---|
| 4614 | + if (Globals.SAVEONMAKE) |
---|
| 4615 | + Save(); |
---|
4141 | 4616 | try |
---|
4142 | 4617 | { |
---|
4143 | 4618 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4287 | 4762 | try |
---|
4288 | 4763 | { |
---|
4289 | 4764 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4290 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4765 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4766 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4291 | 4767 | |
---|
4292 | 4768 | p.writeObject(copy); |
---|
4293 | 4769 | p.flush(); |
---|
4294 | 4770 | |
---|
| 4771 | + zstream.close(); |
---|
4295 | 4772 | ostream.close(); |
---|
4296 | 4773 | |
---|
4297 | 4774 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4301 | 4778 | { |
---|
4302 | 4779 | } |
---|
4303 | 4780 | } |
---|
| 4781 | + |
---|
4304 | 4782 | String lastname; |
---|
4305 | 4783 | |
---|
4306 | 4784 | void saveAs() |
---|
.. | .. |
---|
4312 | 4790 | String filename = browser.getFile(); |
---|
4313 | 4791 | if (filename != null && filename.length() > 0) |
---|
4314 | 4792 | { |
---|
| 4793 | + if (!filename.endsWith(".gfd")) |
---|
| 4794 | + filename += ".gfd"; |
---|
4315 | 4795 | lastname = browser.getDirectory() + filename; |
---|
4316 | 4796 | save(); |
---|
4317 | 4797 | } |
---|
.. | .. |
---|
4410 | 4890 | try |
---|
4411 | 4891 | { |
---|
4412 | 4892 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4413 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4414 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4893 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4894 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4415 | 4895 | |
---|
4416 | 4896 | Object3D objectparent = obj.parent; |
---|
4417 | 4897 | obj.parent = null; |
---|
.. | .. |
---|
4428 | 4908 | p.writeObject(object); |
---|
4429 | 4909 | p.flush(); |
---|
4430 | 4910 | |
---|
| 4911 | + zstream.close(); |
---|
4431 | 4912 | ostream.close(); |
---|
4432 | | - // zstream.close(); |
---|
4433 | 4913 | |
---|
4434 | 4914 | // group.selection.get(0).parent = parent; |
---|
4435 | 4915 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4476 | 4956 | Object3D client; |
---|
4477 | 4957 | Object3D copy; |
---|
4478 | 4958 | MenuBar menuBar; |
---|
4479 | | - Menu windowMenu; |
---|
| 4959 | + Menu fileMenu; |
---|
| 4960 | + MenuItem newItem; |
---|
4480 | 4961 | MenuItem loadItem; |
---|
4481 | 4962 | MenuItem saveItem; |
---|
4482 | 4963 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4484 | 4965 | MenuItem reexportItem; |
---|
4485 | 4966 | MenuItem povItem; |
---|
4486 | 4967 | MenuItem closeItem; |
---|
4487 | | - Menu cameraMenu; |
---|
| 4968 | + |
---|
4488 | 4969 | CheckboxMenuItem zBufferItem; |
---|
4489 | 4970 | //MenuItem normalLensItem; |
---|
4490 | | - MenuItem editCameraItem; |
---|
4491 | | - MenuItem revertCameraItem; |
---|
4492 | 4971 | MenuItem stepItem; |
---|
4493 | 4972 | CheckboxMenuItem toggleLiveItem; |
---|
4494 | 4973 | CheckboxMenuItem toggleFullScreenItem; |
---|
.. | .. |
---|
4506 | 4985 | CheckboxMenuItem togglePaintItem; |
---|
4507 | 4986 | JSplitPane mainPanel; |
---|
4508 | 4987 | JScrollPane scrollpane; |
---|
| 4988 | + |
---|
4509 | 4989 | JPanel toolbarPanel; |
---|
| 4990 | + |
---|
4510 | 4991 | cGridBag treePanel; |
---|
| 4992 | + |
---|
4511 | 4993 | JPanel radioPanel; |
---|
4512 | 4994 | ButtonGroup buttonGroup; |
---|
4513 | | - cGridBag ctrlPanel; |
---|
| 4995 | + |
---|
| 4996 | + cGridBag toolboxPanel; |
---|
4514 | 4997 | cGridBag materialPanel; |
---|
| 4998 | + cGridBag ctrlPanel; |
---|
| 4999 | + |
---|
4515 | 5000 | JScrollPane infoPanel; |
---|
| 5001 | + |
---|
4516 | 5002 | cGridBag optionsPanel; |
---|
| 5003 | + |
---|
4517 | 5004 | JTabbedPane objectPanel; |
---|
| 5005 | + boolean materialFlushed; |
---|
| 5006 | + Object3D latestObject; |
---|
| 5007 | + |
---|
4518 | 5008 | cGridBag XYZPanel; |
---|
| 5009 | + |
---|
4519 | 5010 | JSplitPane gridPanel; |
---|
4520 | 5011 | JSplitPane bigPanel; |
---|
| 5012 | + |
---|
4521 | 5013 | cGridBag bigThree; |
---|
4522 | 5014 | cGridBag scenePanel; |
---|
4523 | 5015 | cGridBag centralPanel; |
---|
.. | .. |
---|
4632 | 5124 | cNumberSlider fogField; |
---|
4633 | 5125 | JLabel opacityPowerLabel; |
---|
4634 | 5126 | cNumberSlider opacityPowerField; |
---|
4635 | | - JTree jTree; |
---|
| 5127 | + cTree jTree; |
---|
4636 | 5128 | //ObjectUI parent; |
---|
4637 | 5129 | |
---|
4638 | 5130 | cNumberSlider normalpushField; |
---|
| 5131 | + |
---|
| 5132 | + private MenuItem importGFDItem; |
---|
| 5133 | + private MenuItem importVRMLX3DItem; |
---|
| 5134 | + private MenuItem import3DSItem; |
---|
| 5135 | + private MenuItem importOBJItem; |
---|
4639 | 5136 | } |
---|