.. | .. |
---|
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.*; |
---|
.. | .. |
---|
13 | 14 | import javax.swing.plaf.metal.MetalLookAndFeel; |
---|
14 | 15 | //import javax.swing.plaf.ColorUIResource; |
---|
15 | 16 | //import javax.swing.plaf.metal.DefaultMetalTheme; |
---|
| 17 | + |
---|
| 18 | +import javax.swing.plaf.basic.BasicSplitPaneDivider; |
---|
| 19 | +import javax.swing.plaf.basic.BasicSplitPaneUI; |
---|
16 | 20 | |
---|
17 | 21 | //import javax.media.opengl.GLCanvas; |
---|
18 | 22 | |
---|
.. | .. |
---|
35 | 39 | |
---|
36 | 40 | GroupEditor callee; |
---|
37 | 41 | JFrame frame; |
---|
| 42 | + |
---|
| 43 | + static ObjEditor theFrame; |
---|
| 44 | + |
---|
| 45 | + cButton GetButton(String name, boolean border) |
---|
| 46 | + { |
---|
| 47 | + try |
---|
| 48 | + { |
---|
| 49 | + ImageIcon icon = GetIcon(name); |
---|
| 50 | + return new cButton(icon, border); |
---|
| 51 | + } |
---|
| 52 | + catch (Exception e) |
---|
| 53 | + { |
---|
| 54 | + return new cButton(name, border); |
---|
| 55 | + } |
---|
| 56 | + } |
---|
| 57 | + |
---|
| 58 | + cToggleButton GetToggleButton(String name, boolean border) |
---|
| 59 | + { |
---|
| 60 | + try |
---|
| 61 | + { |
---|
| 62 | + ImageIcon icon = GetIcon(name); |
---|
| 63 | + return new cToggleButton(icon, border); |
---|
| 64 | + } |
---|
| 65 | + catch (Exception e) |
---|
| 66 | + { |
---|
| 67 | + return new cToggleButton(name, border); |
---|
| 68 | + } |
---|
| 69 | + } |
---|
| 70 | + |
---|
| 71 | + cCheckBox GetCheckBox(String name, boolean border) |
---|
| 72 | + { |
---|
| 73 | + try |
---|
| 74 | + { |
---|
| 75 | + ImageIcon icon = GetIcon(name); |
---|
| 76 | + return new cCheckBox(icon, border); |
---|
| 77 | + } |
---|
| 78 | + catch (Exception e) |
---|
| 79 | + { |
---|
| 80 | + return new cCheckBox(name, border); |
---|
| 81 | + } |
---|
| 82 | + } |
---|
| 83 | + |
---|
| 84 | + private ImageIcon GetIcon(String name) throws IOException |
---|
| 85 | + { |
---|
| 86 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 87 | + |
---|
| 88 | + if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 89 | + { |
---|
| 90 | + BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
| 91 | + Graphics2D g = resized.createGraphics(); |
---|
| 92 | + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 93 | + //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 94 | + g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 95 | + g.dispose(); |
---|
| 96 | + |
---|
| 97 | + image = resized; |
---|
| 98 | + } |
---|
| 99 | + |
---|
| 100 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 101 | + return icon; |
---|
| 102 | + } |
---|
38 | 103 | |
---|
39 | 104 | // SCRIPT |
---|
40 | 105 | |
---|
.. | .. |
---|
145 | 210 | |
---|
146 | 211 | objEditor.ctrlPanel.remove(namePanel); |
---|
147 | 212 | |
---|
148 | | - if (!GroupEditor.allparams) |
---|
| 213 | + if (!allparams) |
---|
149 | 214 | return; |
---|
150 | 215 | |
---|
151 | 216 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
168 | 233 | // objEditor.ctrlPanel.remove(remarkButton); |
---|
169 | 234 | |
---|
170 | 235 | objEditor.ctrlPanel.remove(setupPanel); |
---|
171 | | - objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 236 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
| 237 | + objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
172 | 238 | objEditor.ctrlPanel.remove(pushPanel); |
---|
173 | 239 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
174 | 240 | |
---|
.. | .. |
---|
243 | 309 | //localCopy.parent = null; |
---|
244 | 310 | |
---|
245 | 311 | frame = new JFrame(); |
---|
| 312 | + frame.setUndecorated(false); |
---|
246 | 313 | objEditor = this; |
---|
247 | 314 | this.callee = callee; |
---|
248 | 315 | |
---|
.. | .. |
---|
273 | 340 | return frame.action(event, obj); |
---|
274 | 341 | } |
---|
275 | 342 | |
---|
| 343 | + // Cannot work without static |
---|
| 344 | + static boolean allparams = true; |
---|
| 345 | + |
---|
| 346 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 347 | + |
---|
276 | 348 | void SetupMenu() |
---|
277 | 349 | { |
---|
278 | 350 | 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...")); |
---|
| 351 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 352 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 353 | + fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 354 | + |
---|
| 355 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 356 | + Menu menu = new Menu("Import"); |
---|
| 357 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 358 | + importOBJItem.addActionListener(this); |
---|
| 359 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 360 | + import3DSItem.addActionListener(this); |
---|
| 361 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 362 | + importVRMLX3DItem.addActionListener(this); |
---|
| 363 | + menu.add("-"); |
---|
| 364 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 365 | + importGFDItem.addActionListener(this); |
---|
| 366 | + fileMenu.add(menu); |
---|
| 367 | + fileMenu.add("-"); |
---|
| 368 | + |
---|
| 369 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 370 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
284 | 371 | //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("-"); |
---|
| 372 | + fileMenu.add("-"); |
---|
| 373 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 374 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 375 | + fileMenu.add("-"); |
---|
289 | 376 | if (client.parent != null) |
---|
290 | 377 | { |
---|
291 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 378 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
292 | 379 | } else |
---|
293 | 380 | { |
---|
294 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 381 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
295 | 382 | } |
---|
296 | 383 | |
---|
| 384 | + newItem.addActionListener(this); |
---|
297 | 385 | loadItem.addActionListener(this); |
---|
298 | 386 | saveItem.addActionListener(this); |
---|
299 | 387 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
302 | 390 | //povItem.addActionListener(this); |
---|
303 | 391 | closeItem.addActionListener(this); |
---|
304 | 392 | |
---|
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 | | - if (Globals.ADVANCED) |
---|
323 | | - { |
---|
324 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
325 | | - toggleLiveItem.addItemListener(this); |
---|
326 | | - toggleLiveItem.setState(Globals.isLIVE()); |
---|
327 | | - |
---|
328 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
329 | | - stepItem.addActionListener(this); |
---|
330 | | - // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
331 | | - // toggleDLItem.addItemListener(this); |
---|
332 | | - // toggleDLItem.setState(false); |
---|
333 | | - |
---|
334 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
335 | | - toggleRenderItem.addItemListener(this); |
---|
336 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
337 | | - |
---|
338 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
339 | | - toggleDebugItem.addItemListener(this); |
---|
340 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
341 | | - |
---|
342 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
343 | | - toggleFrustumItem.addItemListener(this); |
---|
344 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
345 | | - |
---|
346 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
347 | | - toggleFootContactItem.addItemListener(this); |
---|
348 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
349 | | - |
---|
350 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
351 | | - toggleTimelineItem.addItemListener(this); |
---|
352 | | - } |
---|
353 | | - |
---|
354 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
355 | | - toggleSwitchItem.addItemListener(this); |
---|
356 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
357 | | - |
---|
358 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
359 | | - toggleHandleItem.addItemListener(this); |
---|
360 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
361 | | - |
---|
362 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
363 | | - togglePaintItem.addItemListener(this); |
---|
364 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
365 | | - |
---|
366 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
367 | | -// toggleRootItem.addItemListener(this); |
---|
368 | | -// toggleRootItem.setState(false); |
---|
369 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
370 | | -// animationItem.addItemListener(this); |
---|
371 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
372 | | - cameraMenu.add("-"); |
---|
373 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
374 | | - editCameraItem.addActionListener(this); |
---|
375 | | - |
---|
376 | 393 | objectPanel = new JTabbedPane(); |
---|
| 394 | + |
---|
| 395 | + ChangeListener changeListener = new ChangeListener() |
---|
| 396 | + { |
---|
| 397 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 398 | + { |
---|
| 399 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 400 | +// { |
---|
| 401 | +// if (latestObject != null) |
---|
| 402 | +// { |
---|
| 403 | +// refreshContents(true); |
---|
| 404 | +// SetMaterial(latestObject); |
---|
| 405 | +// } |
---|
| 406 | +// |
---|
| 407 | +// materialFlushed = true; |
---|
| 408 | +// } |
---|
| 409 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 410 | +// { |
---|
| 411 | +// if (listUI.size() == 0) |
---|
| 412 | +// EditSelection(false); |
---|
| 413 | +// } |
---|
| 414 | + |
---|
| 415 | + refreshContents(false); // To refresh Info tab |
---|
| 416 | + } |
---|
| 417 | + }; |
---|
| 418 | + objectPanel.addChangeListener(changeListener); |
---|
| 419 | + |
---|
377 | 420 | toolbarPanel = new JPanel(); |
---|
378 | 421 | toolbarPanel.setName("Toolbar"); |
---|
379 | 422 | treePanel = new cGridBag(); |
---|
380 | 423 | treePanel.setName("Tree"); |
---|
| 424 | + |
---|
| 425 | + editPanel = new cGridBag().setVertical(true); |
---|
| 426 | + editPanel.setName("Edit"); |
---|
| 427 | + |
---|
381 | 428 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
382 | | - ctrlPanel.setName("Edit"); |
---|
| 429 | + |
---|
| 430 | + editCommandsPanel = new cGridBag(); |
---|
| 431 | + editPanel.add(editCommandsPanel); |
---|
| 432 | + editPanel.add(ctrlPanel); |
---|
| 433 | + |
---|
| 434 | + toolboxPanel = new cGridBag().setVertical(false); |
---|
| 435 | + toolboxPanel.setName("Toolbox"); |
---|
| 436 | + |
---|
383 | 437 | materialPanel = new cGridBag().setVertical(true); |
---|
384 | 438 | materialPanel.setName("Material"); |
---|
| 439 | + |
---|
385 | 440 | /*JTextPane*/ |
---|
386 | 441 | infoarea = createTextPane(); |
---|
387 | 442 | doc = infoarea.getStyledDocument(); |
---|
.. | .. |
---|
394 | 449 | // TEXTAREA infoarea.setLineWrap(true); |
---|
395 | 450 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
396 | 451 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
397 | | - infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
| 452 | + //infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
398 | 453 | infoPanel.setName("Info"); |
---|
399 | 454 | //infoPanel.setLayout(new BorderLayout()); |
---|
400 | 455 | //infoPanel.add(createTextPane()); |
---|
.. | .. |
---|
406 | 461 | mainPanel.setDividerSize(9); |
---|
407 | 462 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
408 | 463 | mainPanel.setResizeWeight(0.5); |
---|
409 | | - |
---|
| 464 | + |
---|
| 465 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 466 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 467 | + divider.setDividerSize(15); |
---|
| 468 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 469 | + |
---|
| 470 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 471 | + |
---|
410 | 472 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
411 | 473 | //mainPanel.setLayout(new GridBagLayout()); |
---|
412 | 474 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
474 | 536 | e.printStackTrace(); |
---|
475 | 537 | } |
---|
476 | 538 | |
---|
477 | | - String selection = infoarea.getText(); |
---|
478 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
479 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
480 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 539 | +// String selection = infoarea.getText(); |
---|
| 540 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 541 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 542 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
481 | 543 | //clipboard.setContents(data, data); |
---|
482 | 544 | } |
---|
483 | 545 | |
---|
.. | .. |
---|
500 | 562 | //SendInfo("Name:", "bold"); |
---|
501 | 563 | if (sel.GetTextures() != null || debug) |
---|
502 | 564 | { |
---|
503 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 565 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
504 | 566 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
505 | 567 | if (sel.Size() > 0) |
---|
506 | 568 | { |
---|
507 | 569 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
508 | 570 | } |
---|
509 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 571 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
510 | 572 | if (debug) |
---|
511 | 573 | { |
---|
512 | 574 | try |
---|
.. | .. |
---|
548 | 610 | } |
---|
549 | 611 | if (sel.support != null) |
---|
550 | 612 | { |
---|
551 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 613 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
552 | 614 | } |
---|
553 | 615 | if (sel.scriptnode != null) |
---|
554 | 616 | { |
---|
.. | .. |
---|
637 | 699 | } |
---|
638 | 700 | } |
---|
639 | 701 | |
---|
| 702 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 703 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 704 | + |
---|
| 705 | + Rectangle keeprect; |
---|
| 706 | + cRadio radio; |
---|
| 707 | + |
---|
| 708 | +cButton keepButton; |
---|
| 709 | + cButton twoButton; // Full 3D |
---|
| 710 | + cButton sixButton; |
---|
| 711 | + cButton threeButton; |
---|
| 712 | + cButton sevenButton; |
---|
| 713 | + cButton fourButton; // full panel |
---|
| 714 | + cButton oneButton; // full XYZ |
---|
| 715 | + //cButton currentLayout; |
---|
| 716 | + |
---|
| 717 | + boolean maximized; |
---|
| 718 | + |
---|
| 719 | + cButton fullscreenLayout; |
---|
| 720 | + |
---|
| 721 | + void Minimize() |
---|
| 722 | + { |
---|
| 723 | + frame.setState(Frame.ICONIFIED); |
---|
| 724 | + frame.validate(); |
---|
| 725 | + } |
---|
| 726 | + |
---|
| 727 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 728 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 729 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
| 730 | + void Maximize() |
---|
| 731 | + { |
---|
| 732 | + if (CameraPane.FULLSCREEN) |
---|
| 733 | + { |
---|
| 734 | + ToggleFullScreen(); |
---|
| 735 | + } |
---|
| 736 | + |
---|
| 737 | + if (maximized) |
---|
| 738 | + { |
---|
| 739 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 740 | + } |
---|
| 741 | + else |
---|
| 742 | + { |
---|
| 743 | + keeprect = frame.getBounds(); |
---|
| 744 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 745 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 746 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 747 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 748 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
| 749 | + } |
---|
| 750 | + |
---|
| 751 | + maximized ^= true; |
---|
| 752 | + |
---|
| 753 | + frame.validate(); |
---|
| 754 | + } |
---|
| 755 | + |
---|
| 756 | + cButton minButton; |
---|
| 757 | + cButton maxButton; |
---|
| 758 | + cButton fullButton; |
---|
| 759 | + |
---|
640 | 760 | void ToggleFullScreen() |
---|
641 | 761 | { |
---|
642 | | - if (CameraPane.FULLSCREEN) |
---|
| 762 | +GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 763 | + |
---|
| 764 | + cameraView.ToggleFullScreen(); |
---|
| 765 | + |
---|
| 766 | + if (!CameraPane.FULLSCREEN) |
---|
643 | 767 | { |
---|
644 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
645 | | - framePanel.add(bigThree); |
---|
646 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 768 | + device.setFullScreenWindow(null); |
---|
| 769 | + frame.dispose(); |
---|
| 770 | + frame.setUndecorated(false); |
---|
| 771 | + frame.validate(); |
---|
| 772 | + frame.setVisible(true); |
---|
| 773 | + |
---|
| 774 | + //frame.setVisible(false); |
---|
| 775 | +// frame.removeNotify(); |
---|
| 776 | +// frame.setUndecorated(false); |
---|
| 777 | +// frame.addNotify(); |
---|
| 778 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 779 | + |
---|
| 780 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 781 | +// X framePanel.add(bigThree); |
---|
| 782 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 783 | + framePanel.setDividerLocation(1); |
---|
| 784 | + |
---|
| 785 | + //frame.setVisible(true); |
---|
| 786 | + radio.layout = keepButton; |
---|
| 787 | + //theFrame = null; |
---|
| 788 | + keepButton = null; |
---|
| 789 | + radio.layout.doClick(); |
---|
| 790 | + |
---|
647 | 791 | } else |
---|
648 | 792 | { |
---|
649 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
650 | | - framePanel.remove(bigThree); |
---|
651 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 793 | + keepButton = radio.layout; |
---|
| 794 | + //keeprect = frame.getBounds(); |
---|
| 795 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 796 | +// frame.getToolkit().getScreenSize().height); |
---|
| 797 | + //frame.setVisible(false); |
---|
| 798 | + |
---|
| 799 | + frame.dispose(); |
---|
| 800 | + frame.setUndecorated(true); |
---|
| 801 | + device.setFullScreenWindow(frame); |
---|
| 802 | + frame.validate(); |
---|
| 803 | + frame.setVisible(true); |
---|
| 804 | +// frame.removeNotify(); |
---|
| 805 | +// frame.setUndecorated(true); |
---|
| 806 | +// frame.addNotify(); |
---|
| 807 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 808 | +// X framePanel.remove(bigThree); |
---|
| 809 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 810 | + framePanel.setDividerLocation(0); |
---|
| 811 | + |
---|
| 812 | + radio.layout = fullscreenLayout; |
---|
| 813 | + radio.layout.doClick(); |
---|
| 814 | + //frame.setVisible(true); |
---|
652 | 815 | } |
---|
653 | | - cameraView.ToggleFullScreen(); |
---|
| 816 | + frame.validate(); |
---|
654 | 817 | } |
---|
655 | 818 | |
---|
656 | 819 | private JTextPane createTextPane() |
---|
.. | .. |
---|
751 | 914 | protected static ImageIcon createImageIcon(String path, |
---|
752 | 915 | String description) |
---|
753 | 916 | { |
---|
754 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 917 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
755 | 918 | if (imgURL != null) |
---|
756 | 919 | { |
---|
757 | 920 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
783 | 946 | // NumberSlider vDivsField; |
---|
784 | 947 | // JCheckBox endcaps; |
---|
785 | 948 | JCheckBox liveCB; |
---|
| 949 | + JCheckBox selectCB; |
---|
786 | 950 | JCheckBox hideCB; |
---|
787 | 951 | JCheckBox link2masterCB; |
---|
788 | 952 | JCheckBox markCB; |
---|
.. | .. |
---|
790 | 954 | JCheckBox speedupCB; |
---|
791 | 955 | JCheckBox rewindCB; |
---|
792 | 956 | JCheckBox flipVCB; |
---|
| 957 | + |
---|
| 958 | + cCheckBox toggleTextureCB; |
---|
| 959 | + cCheckBox toggleSwitchCB; |
---|
| 960 | + |
---|
793 | 961 | JComboBox texresMenu; |
---|
| 962 | + |
---|
794 | 963 | JButton resetButton; |
---|
795 | 964 | JButton stepButton; |
---|
796 | 965 | JButton stepAllButton; |
---|
.. | .. |
---|
799 | 968 | JButton fasterButton; |
---|
800 | 969 | JButton remarkButton; |
---|
801 | 970 | |
---|
| 971 | + cGridBag editPanel; |
---|
| 972 | + cGridBag editCommandsPanel; |
---|
| 973 | + |
---|
802 | 974 | cGridBag namePanel; |
---|
803 | 975 | cGridBag setupPanel; |
---|
804 | | - cGridBag commandsPanel; |
---|
| 976 | + cGridBag setupPanel2; |
---|
| 977 | + cGridBag objectCommandsPanel; |
---|
805 | 978 | cGridBag pushPanel; |
---|
806 | 979 | cGridBag fillPanel; |
---|
807 | 980 | |
---|
.. | .. |
---|
973 | 1146 | namePanel = new cGridBag(); |
---|
974 | 1147 | |
---|
975 | 1148 | nameField = AddText(namePanel, copy.GetName()); |
---|
976 | | - namePanel.add(nameField); |
---|
| 1149 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
977 | 1150 | oe.ctrlPanel.add(namePanel); |
---|
978 | 1151 | |
---|
979 | 1152 | oe.ctrlPanel.Return(); |
---|
980 | 1153 | |
---|
981 | | - if (!GroupEditor.allparams) |
---|
| 1154 | + if (!allparams) |
---|
982 | 1155 | return; |
---|
983 | 1156 | |
---|
984 | 1157 | setupPanel = new cGridBag().setVertical(false); |
---|
985 | 1158 | |
---|
986 | 1159 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
987 | 1160 | liveCB.setToolTipText("Animate object"); |
---|
| 1161 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1162 | + selectCB.setToolTipText("Make object selectable"); |
---|
| 1163 | +// Return(); |
---|
988 | 1164 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
989 | 1165 | hideCB.setToolTipText("Hide object"); |
---|
990 | | -// Return(); |
---|
991 | 1166 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
992 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1167 | + markCB.setToolTipText("As animation target transform"); |
---|
993 | 1168 | |
---|
994 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 1169 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1170 | + |
---|
| 1171 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
995 | 1172 | rewindCB.setToolTipText("Rewind animation"); |
---|
996 | 1173 | |
---|
997 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
998 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 1174 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1175 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
999 | 1176 | |
---|
1000 | 1177 | if (Globals.ADVANCED) |
---|
1001 | 1178 | { |
---|
1002 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 1179 | + link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
1003 | 1180 | link2masterCB.setToolTipText("Attach to support"); |
---|
1004 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1181 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
1005 | 1182 | speedupCB.setToolTipText("Option motion capture"); |
---|
1006 | 1183 | } |
---|
1007 | 1184 | |
---|
1008 | 1185 | oe.ctrlPanel.add(setupPanel); |
---|
1009 | 1186 | oe.ctrlPanel.Return(); |
---|
| 1187 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1188 | + oe.ctrlPanel.Return(); |
---|
1010 | 1189 | |
---|
1011 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1190 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
1012 | 1191 | |
---|
1013 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1192 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
1014 | 1193 | resetButton.setToolTipText("Jump to frame zero"); |
---|
1015 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1194 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
1016 | 1195 | stepButton.setToolTipText("Step one frame"); |
---|
1017 | 1196 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
1018 | 1197 | // stepAllButton = AddButton(oe, "Step All"); |
---|
1019 | 1198 | // Return(); |
---|
1020 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1199 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
1021 | 1200 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
1022 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1201 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
1023 | 1202 | fasterButton.setToolTipText("Increase animation speed"); |
---|
1024 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1203 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
1025 | 1204 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
1026 | 1205 | |
---|
1027 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1206 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
1028 | 1207 | oe.ctrlPanel.Return(); |
---|
1029 | 1208 | |
---|
1030 | | - pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1209 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
1031 | 1210 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1032 | 1211 | //Return(); |
---|
1033 | 1212 | |
---|
.. | .. |
---|
1230 | 1409 | //worldPanel.setName("World"); |
---|
1231 | 1410 | centralPanel = new cGridBag(); |
---|
1232 | 1411 | centralPanel.preferredWidth = 20; |
---|
1233 | | - timelinePanel = new JPanel(new BorderLayout()); |
---|
1234 | | - timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
| 1412 | + |
---|
| 1413 | + if (Globals.ADVANCED) |
---|
| 1414 | + { |
---|
| 1415 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1416 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1235 | 1417 | |
---|
1236 | 1418 | cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
1237 | 1419 | cameraPanel.setContinuousLayout(true); |
---|
.. | .. |
---|
1240 | 1422 | // cameraPanel.setDividerSize(9); |
---|
1241 | 1423 | cameraPanel.setResizeWeight(1.0); |
---|
1242 | 1424 | |
---|
| 1425 | + } |
---|
| 1426 | + |
---|
1243 | 1427 | centralPanel.add(cameraView); |
---|
| 1428 | + centralPanel.setFocusable(true); |
---|
1244 | 1429 | //frame.setJMenuBar(timelineMenubar); |
---|
1245 | 1430 | //centralPanel.add(timelinePanel); |
---|
1246 | 1431 | |
---|
.. | .. |
---|
1307 | 1492 | // north.setName("Edit"); |
---|
1308 | 1493 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1309 | 1494 | // objectPanel.add(north); |
---|
1310 | | - objectPanel.add(ctrlPanel); |
---|
| 1495 | + objectPanel.add(editPanel); |
---|
1311 | 1496 | objectPanel.add(infoPanel); |
---|
| 1497 | + objectPanel.add(toolboxPanel); |
---|
1312 | 1498 | |
---|
1313 | 1499 | /* |
---|
1314 | 1500 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1317 | 1503 | aConstraints.gridy += 1; |
---|
1318 | 1504 | aConstraints.gridwidth = 1; |
---|
1319 | 1505 | mainPanel.add(objectPanel, aConstraints); |
---|
1320 | | - */ |
---|
| 1506 | + */ |
---|
1321 | 1507 | |
---|
1322 | 1508 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1323 | 1509 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1329 | 1515 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1330 | 1516 | |
---|
1331 | 1517 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1332 | | - scenePanel.preferredWidth = 7; |
---|
| 1518 | + scenePanel.preferredWidth = 6; |
---|
1333 | 1519 | |
---|
1334 | 1520 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1335 | 1521 | tabbedPane.add(scrollpane); |
---|
1336 | 1522 | |
---|
1337 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1338 | | - |
---|
1339 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1523 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1340 | 1524 | |
---|
1341 | 1525 | optionsPanel.setName("Options"); |
---|
1342 | 1526 | |
---|
.. | .. |
---|
1344 | 1528 | |
---|
1345 | 1529 | tabbedPane.add(optionsPanel); |
---|
1346 | 1530 | |
---|
| 1531 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1532 | + |
---|
1347 | 1533 | scenePanel.add(tabbedPane); |
---|
1348 | 1534 | |
---|
1349 | 1535 | /* |
---|
.. | .. |
---|
1435 | 1621 | |
---|
1436 | 1622 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1437 | 1623 | |
---|
1438 | | - frame.setSize(1024, 768); |
---|
1439 | | - frame.show(); |
---|
1440 | | - |
---|
| 1624 | + frame.setSize(1280, 860); |
---|
| 1625 | + |
---|
| 1626 | + cameraView.requestFocusInWindow(); |
---|
| 1627 | + |
---|
1441 | 1628 | gridPanel.setDividerLocation(1.0); |
---|
| 1629 | + |
---|
| 1630 | + frame.validate(); |
---|
| 1631 | + |
---|
| 1632 | + frame.setVisible(true); |
---|
1442 | 1633 | |
---|
1443 | 1634 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1444 | 1635 | frame.addWindowListener(new WindowAdapter() |
---|
.. | .. |
---|
1475 | 1666 | |
---|
1476 | 1667 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1477 | 1668 | |
---|
1478 | | - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1669 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1479 | 1670 | createMaterialButton.setToolTipText("Create material"); |
---|
1480 | 1671 | |
---|
1481 | 1672 | /* |
---|
1482 | 1673 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1483 | 1674 | */ |
---|
1484 | 1675 | |
---|
1485 | | - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1676 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1486 | 1677 | clearMaterialButton.setToolTipText("Clear material"); |
---|
1487 | 1678 | |
---|
1488 | 1679 | if (Globals.ADVANCED) |
---|
1489 | 1680 | { |
---|
1490 | | - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1681 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1491 | 1682 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1492 | 1683 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1493 | 1684 | } |
---|
.. | .. |
---|
1524 | 1715 | textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1525 | 1716 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1526 | 1717 | colorSection.add(texture); |
---|
1527 | | - |
---|
1528 | | - cGridBag anisoU = new cGridBag(); |
---|
1529 | | - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
1530 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1531 | | - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1532 | | - colorSection.add(anisoU); |
---|
1533 | | - |
---|
1534 | | - cGridBag anisoV = new cGridBag(); |
---|
1535 | | - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
1536 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1537 | | - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1538 | | - colorSection.add(anisoV); |
---|
1539 | | - |
---|
1540 | | - cGridBag shadowbias = new cGridBag(); |
---|
1541 | | - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
1542 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1543 | | - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1544 | | - colorSection.add(shadowbias); |
---|
1545 | 1718 | |
---|
1546 | 1719 | panel.add(new JSeparator()); |
---|
1547 | 1720 | |
---|
.. | .. |
---|
1593 | 1766 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1594 | 1767 | diffuseSection.add(fakedepth); |
---|
1595 | 1768 | |
---|
| 1769 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1770 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1771 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1772 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1773 | + diffuseSection.add(shadowbias); |
---|
| 1774 | + |
---|
1596 | 1775 | panel.add(new JSeparator()); |
---|
1597 | 1776 | |
---|
1598 | 1777 | panel.add(diffuseSection); |
---|
.. | .. |
---|
1643 | 1822 | // aConstraints.gridy += 1; |
---|
1644 | 1823 | // aConstraints.gridwidth = 1; |
---|
1645 | 1824 | |
---|
| 1825 | + cGridBag anisoU = new cGridBag(); |
---|
| 1826 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1827 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1828 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1829 | + specularSection.add(anisoU); |
---|
| 1830 | + |
---|
| 1831 | + cGridBag anisoV = new cGridBag(); |
---|
| 1832 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1833 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1834 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1835 | + specularSection.add(anisoV); |
---|
| 1836 | + |
---|
1646 | 1837 | |
---|
1647 | 1838 | panel.add(new JSeparator()); |
---|
1648 | 1839 | |
---|
.. | .. |
---|
1650 | 1841 | |
---|
1651 | 1842 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1652 | 1843 | |
---|
1653 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 1844 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1654 | 1845 | |
---|
1655 | 1846 | cGridBag camera = new cGridBag(); |
---|
1656 | 1847 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1657 | 1848 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1658 | 1849 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1659 | | - globalSection.add(camera); |
---|
| 1850 | + colorSection.add(camera); |
---|
1660 | 1851 | |
---|
1661 | 1852 | cGridBag ambient = new cGridBag(); |
---|
1662 | 1853 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1663 | 1854 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1664 | 1855 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1665 | | - globalSection.add(ambient); |
---|
| 1856 | + colorSection.add(ambient); |
---|
1666 | 1857 | |
---|
1667 | 1858 | cGridBag backlit = new cGridBag(); |
---|
1668 | 1859 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1669 | 1860 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1670 | 1861 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1671 | | - globalSection.add(backlit); |
---|
| 1862 | + colorSection.add(backlit); |
---|
1672 | 1863 | |
---|
1673 | 1864 | cGridBag opacity = new cGridBag(); |
---|
1674 | 1865 | opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1675 | 1866 | opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1676 | 1867 | opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1677 | | - globalSection.add(opacity); |
---|
| 1868 | + colorSection.add(opacity); |
---|
1678 | 1869 | |
---|
1679 | | - panel.add(new JSeparator()); |
---|
| 1870 | + //panel.add(new JSeparator()); |
---|
1680 | 1871 | |
---|
1681 | | - panel.add(globalSection); |
---|
| 1872 | + //panel.add(globalSection); |
---|
1682 | 1873 | |
---|
1683 | 1874 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1684 | 1875 | |
---|
.. | .. |
---|
1938 | 2129 | |
---|
1939 | 2130 | //? flashIt = false; |
---|
1940 | 2131 | CameraPane pane = (CameraPane) cameraView; |
---|
1941 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 2132 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1942 | 2133 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1943 | 2134 | |
---|
1944 | 2135 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
1987 | 2178 | e2.printStackTrace(); |
---|
1988 | 2179 | } |
---|
1989 | 2180 | } |
---|
| 2181 | + |
---|
1990 | 2182 | LoadJMEThread loadThread; |
---|
1991 | 2183 | |
---|
1992 | 2184 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
2044 | 2236 | //LoadFile0(filename, converter); |
---|
2045 | 2237 | } |
---|
2046 | 2238 | } |
---|
| 2239 | + |
---|
2047 | 2240 | LoadOBJThread loadObjThread; |
---|
2048 | 2241 | |
---|
2049 | 2242 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2122 | 2315 | |
---|
2123 | 2316 | void LoadObjFile(String fullname) |
---|
2124 | 2317 | { |
---|
2125 | | - /* |
---|
| 2318 | + System.out.println("Loading " + fullname); |
---|
| 2319 | + /**/ |
---|
2126 | 2320 | //lastFilename = fullname; |
---|
2127 | 2321 | if(loadObjThread == null) |
---|
2128 | 2322 | { |
---|
2129 | | - loadObjThread = new LoadOBJThread(); |
---|
2130 | | - loadObjThread.start(); |
---|
| 2323 | + loadObjThread = new LoadOBJThread(); |
---|
| 2324 | + loadObjThread.start(); |
---|
2131 | 2325 | } |
---|
2132 | 2326 | |
---|
2133 | 2327 | loadObjThread.add(fullname); |
---|
2134 | | - */ |
---|
| 2328 | + /**/ |
---|
2135 | 2329 | |
---|
2136 | | - System.out.println("Loading " + fullname); |
---|
2137 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2330 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2138 | 2331 | } |
---|
2139 | 2332 | |
---|
2140 | 2333 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2395 | 2588 | |
---|
2396 | 2589 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2397 | 2590 | { |
---|
2398 | | - if (GrafreeD.standAlone) |
---|
| 2591 | + if (Grafreed.standAlone) |
---|
2399 | 2592 | { |
---|
2400 | 2593 | /**/ |
---|
2401 | 2594 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2402 | | - browser.show(); |
---|
| 2595 | + browser.setVisible(true); |
---|
2403 | 2596 | String filename = browser.getFile(); |
---|
2404 | 2597 | if (filename != null && filename.length() > 0) |
---|
2405 | 2598 | { |
---|
.. | .. |
---|
2751 | 2944 | |
---|
2752 | 2945 | void SetMaterial(Object3D object) |
---|
2753 | 2946 | { |
---|
| 2947 | + latestObject = object; |
---|
| 2948 | + |
---|
2754 | 2949 | cMaterial mat = object.material; |
---|
2755 | 2950 | |
---|
2756 | 2951 | if (mat == null) |
---|
.. | .. |
---|
2862 | 3057 | // } |
---|
2863 | 3058 | |
---|
2864 | 3059 | /**/ |
---|
2865 | | - if (deselect) |
---|
| 3060 | + if (deselect || child == null) |
---|
2866 | 3061 | { |
---|
2867 | 3062 | //group.deselectAll(); |
---|
2868 | 3063 | //freeze = true; |
---|
2869 | 3064 | GetTree().clearSelection(); |
---|
2870 | 3065 | //freeze = false; |
---|
| 3066 | + |
---|
| 3067 | + if (child == null) |
---|
| 3068 | + { |
---|
| 3069 | + return; |
---|
| 3070 | + } |
---|
2871 | 3071 | } |
---|
2872 | 3072 | |
---|
2873 | 3073 | //group.addSelectee(child); |
---|
.. | .. |
---|
2936 | 3136 | cameraView.ToggleDL(); |
---|
2937 | 3137 | cameraView.repaint(); |
---|
2938 | 3138 | return; |
---|
2939 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3139 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2940 | 3140 | { |
---|
2941 | 3141 | cameraView.ToggleTexture(); |
---|
2942 | 3142 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
2975 | 3175 | frame.validate(); |
---|
2976 | 3176 | |
---|
2977 | 3177 | return; |
---|
2978 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3178 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
2979 | 3179 | { |
---|
2980 | | - cameraView.ToggleRandom(); |
---|
| 3180 | + cameraView.ToggleSwitch(); |
---|
2981 | 3181 | cameraView.repaint(); |
---|
2982 | 3182 | return; |
---|
2983 | 3183 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
3005 | 3205 | } else if (event.getSource() == liveCB) |
---|
3006 | 3206 | { |
---|
3007 | 3207 | copy.live ^= true; |
---|
| 3208 | + return; |
---|
| 3209 | + } else if (event.getSource() == selectCB) |
---|
| 3210 | + { |
---|
| 3211 | + copy.dontselect ^= true; |
---|
3008 | 3212 | return; |
---|
3009 | 3213 | } else if (event.getSource() == hideCB) |
---|
3010 | 3214 | { |
---|
.. | .. |
---|
3044 | 3248 | |
---|
3045 | 3249 | public void actionPerformed(ActionEvent event) |
---|
3046 | 3250 | { |
---|
| 3251 | + Object source = event.getSource(); |
---|
3047 | 3252 | // SCRIPT DIALOG |
---|
3048 | | - if (event.getSource() == okbutton) |
---|
| 3253 | + if (source == okbutton) |
---|
3049 | 3254 | { |
---|
3050 | 3255 | textpanel.setVisible(false); |
---|
3051 | 3256 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3057 | 3262 | textarea = null; |
---|
3058 | 3263 | textpanel = null; |
---|
3059 | 3264 | } |
---|
3060 | | - if (event.getSource() == cancelbutton) |
---|
| 3265 | + if (source == cancelbutton) |
---|
3061 | 3266 | { |
---|
3062 | 3267 | textpanel.setVisible(false); |
---|
3063 | 3268 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3069 | 3274 | //applySelf(); |
---|
3070 | 3275 | //client.refreshEditWindow(); |
---|
3071 | 3276 | //refreshContents(); |
---|
3072 | | - if (event.getSource() == nameField) |
---|
| 3277 | + if (source == nameField) |
---|
3073 | 3278 | { |
---|
3074 | 3279 | //System.out.println("ObjEditor " + event); |
---|
3075 | 3280 | applySelf0(true); |
---|
3076 | 3281 | //parent.applySelf(); |
---|
3077 | 3282 | objEditor.refreshContents(); |
---|
3078 | | - } else if (event.getSource() == resetButton) |
---|
| 3283 | + } else if (source == resetButton) |
---|
3079 | 3284 | { |
---|
3080 | 3285 | CameraPane.fullreset = true; |
---|
3081 | 3286 | copy.Reset(); // ResetMeshes(); |
---|
3082 | 3287 | copy.Touch(); |
---|
3083 | 3288 | objEditor.refreshContents(); |
---|
3084 | | - } else if (event.getSource() == stepItem) |
---|
| 3289 | + } else if (source == stepItem) |
---|
3085 | 3290 | { |
---|
3086 | 3291 | //cameraView.ONESTEP = true; |
---|
3087 | 3292 | Globals.ONESTEP = true; |
---|
3088 | 3293 | cameraView.repaint(); |
---|
3089 | 3294 | return; |
---|
3090 | | - } else if (event.getSource() == stepButton) |
---|
| 3295 | + } else if (source == stepButton) |
---|
3091 | 3296 | { |
---|
3092 | 3297 | copy.Step(); |
---|
3093 | 3298 | copy.Touch(); |
---|
3094 | 3299 | objEditor.refreshContents(); |
---|
3095 | | - } else if (event.getSource() == slowerButton) |
---|
| 3300 | + } else if (source == slowerButton) |
---|
3096 | 3301 | { |
---|
3097 | 3302 | copy.Slower(); |
---|
3098 | 3303 | copy.Touch(); |
---|
3099 | 3304 | objEditor.refreshContents(); |
---|
3100 | | - } else if (event.getSource() == fasterButton) |
---|
| 3305 | + } else if (source == fasterButton) |
---|
3101 | 3306 | { |
---|
3102 | 3307 | copy.Faster(); |
---|
3103 | 3308 | copy.Touch(); |
---|
3104 | 3309 | objEditor.refreshContents(); |
---|
3105 | | - } else if (event.getSource() == remarkButton) |
---|
| 3310 | + } else if (source == remarkButton) |
---|
3106 | 3311 | { |
---|
3107 | 3312 | copy.Remark(); |
---|
3108 | 3313 | copy.Touch(); |
---|
3109 | 3314 | objEditor.refreshContents(); |
---|
3110 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3315 | + } else if (source == stepAllButton) |
---|
3111 | 3316 | { |
---|
3112 | 3317 | copy.StepAll(); |
---|
3113 | 3318 | copy.Touch(); |
---|
3114 | 3319 | objEditor.refreshContents(); |
---|
3115 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3320 | + } else if (source == resetAllButton) |
---|
3116 | 3321 | { |
---|
3117 | 3322 | //CameraPane.fullreset = true; |
---|
3118 | 3323 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3145 | 3350 | // Close(); |
---|
3146 | 3351 | // } |
---|
3147 | 3352 | // else |
---|
3148 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3353 | + if (source == resetSlidersButton) |
---|
3149 | 3354 | { |
---|
3150 | 3355 | ResetSliders(); |
---|
3151 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3356 | + } else if (source == clearMaterialButton) |
---|
3152 | 3357 | { |
---|
3153 | 3358 | ClearMaterial(); |
---|
3154 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3359 | + } else if (source == createMaterialButton) |
---|
3155 | 3360 | { |
---|
3156 | 3361 | CreateMaterial(); |
---|
3157 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3362 | + } else if (source == clearPanelButton) |
---|
3158 | 3363 | { |
---|
3159 | 3364 | copy.ClearUI(); |
---|
3160 | 3365 | refreshContents(true); |
---|
3161 | | - } /* |
---|
3162 | | - } |
---|
3163 | | - |
---|
3164 | | - public boolean action(Event event, Object arg) |
---|
3165 | | - { |
---|
3166 | | - */ else if (event.getSource() == closeItem) |
---|
| 3366 | + } else if (source == importGFDItem) |
---|
| 3367 | + { |
---|
| 3368 | + ImportGFD(); |
---|
| 3369 | + } else |
---|
| 3370 | + if (source == importVRMLX3DItem) |
---|
| 3371 | + { |
---|
| 3372 | + ImportVRMLX3D(); |
---|
| 3373 | + } else |
---|
| 3374 | + if (source == import3DSItem) |
---|
| 3375 | + { |
---|
| 3376 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3377 | + } else |
---|
| 3378 | + if (source == importOBJItem) |
---|
| 3379 | + { |
---|
| 3380 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3381 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3382 | + browser.setVisible(true); |
---|
| 3383 | + String filename = browser.getFile(); |
---|
| 3384 | + if (filename != null && filename.length() > 0) |
---|
| 3385 | + { |
---|
| 3386 | + String fullname = browser.getDirectory() + filename; |
---|
| 3387 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3388 | + } |
---|
| 3389 | + } else |
---|
| 3390 | + if (source == closeItem) |
---|
3167 | 3391 | { |
---|
3168 | 3392 | Close(); |
---|
3169 | 3393 | //return true; |
---|
3170 | | - } else if (event.getSource() == loadItem) |
---|
| 3394 | + } else if (source == loadItem) |
---|
3171 | 3395 | { |
---|
3172 | 3396 | load(); |
---|
3173 | 3397 | //return true; |
---|
3174 | | - } else if (event.getSource() == saveItem) |
---|
| 3398 | + } else if (source == newItem) |
---|
| 3399 | + { |
---|
| 3400 | + New(); |
---|
| 3401 | + } else if (source == saveItem) |
---|
3175 | 3402 | { |
---|
3176 | 3403 | save(); |
---|
3177 | 3404 | //return true; |
---|
3178 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3405 | + } else if (source == saveAsItem) |
---|
3179 | 3406 | { |
---|
3180 | 3407 | saveAs(); |
---|
3181 | 3408 | //return true; |
---|
3182 | | - } else if (event.getSource() == reexportItem) |
---|
| 3409 | + } else if (source == reexportItem) |
---|
3183 | 3410 | { |
---|
3184 | 3411 | reexport(); |
---|
3185 | 3412 | //return true; |
---|
3186 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3413 | + } else if (source == exportAsItem) |
---|
3187 | 3414 | { |
---|
3188 | 3415 | export(); |
---|
3189 | 3416 | //return true; |
---|
3190 | | - } else if (event.getSource() == povItem) |
---|
| 3417 | + } else if (source == povItem) |
---|
3191 | 3418 | { |
---|
3192 | 3419 | generatePOV(); |
---|
3193 | 3420 | //return true; |
---|
3194 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3421 | + } else if (source == zBufferItem) |
---|
3195 | 3422 | { |
---|
3196 | 3423 | try |
---|
3197 | 3424 | { |
---|
.. | .. |
---|
3213 | 3440 | cameraView.repaint(); |
---|
3214 | 3441 | //return true; |
---|
3215 | 3442 | } |
---|
3216 | | - */ else if (event.getSource() == editCameraItem) |
---|
3217 | | - { |
---|
3218 | | - cameraView.ProtectCamera(); |
---|
3219 | | - cameraView.repaint(); |
---|
3220 | | - return; |
---|
3221 | | - } else if (event.getSource() == revertCameraItem) |
---|
3222 | | - { |
---|
3223 | | - cameraView.RevertCamera(); |
---|
3224 | | - cameraView.repaint(); |
---|
3225 | | - return; |
---|
3226 | | -// } else if (event.getSource() == textureButton) |
---|
3227 | | -// { |
---|
3228 | | -// return; // true; |
---|
3229 | | - } else // combos... |
---|
3230 | | - if (event.getSource() == texresMenu) |
---|
| 3443 | + */ else // combos... |
---|
| 3444 | + if (source == texresMenu) |
---|
3231 | 3445 | { |
---|
3232 | 3446 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3233 | 3447 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3239 | 3453 | } |
---|
3240 | 3454 | } |
---|
3241 | 3455 | |
---|
| 3456 | + void New() |
---|
| 3457 | + { |
---|
| 3458 | + while (copy.Size() > 1) |
---|
| 3459 | + { |
---|
| 3460 | + copy.remove(1); |
---|
| 3461 | + } |
---|
| 3462 | + |
---|
| 3463 | + ResetModel(); |
---|
| 3464 | + objEditor.refreshContents(); |
---|
| 3465 | + } |
---|
| 3466 | + |
---|
| 3467 | + static public byte[] Compress(Object3D o) |
---|
| 3468 | + { |
---|
| 3469 | + try |
---|
| 3470 | + { |
---|
| 3471 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3472 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 3473 | + ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 3474 | + |
---|
| 3475 | + Object3D parent = o.parent; |
---|
| 3476 | + o.parent = null; |
---|
| 3477 | + |
---|
| 3478 | + out.writeObject(o); |
---|
| 3479 | + |
---|
| 3480 | + o.parent = parent; |
---|
| 3481 | + |
---|
| 3482 | + out.flush(); |
---|
| 3483 | + |
---|
| 3484 | + zstream.close(); |
---|
| 3485 | + out.close(); |
---|
| 3486 | + |
---|
| 3487 | + return baos.toByteArray(); |
---|
| 3488 | + } catch (Exception e) |
---|
| 3489 | + { |
---|
| 3490 | + System.err.println(e); |
---|
| 3491 | + return null; |
---|
| 3492 | + } |
---|
| 3493 | + } |
---|
| 3494 | + |
---|
| 3495 | + static public Object Uncompress(byte[] bytes) |
---|
| 3496 | + { |
---|
| 3497 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3498 | + try |
---|
| 3499 | + { |
---|
| 3500 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3501 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3502 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3503 | + Object obj = in.readObject(); |
---|
| 3504 | + in.close(); |
---|
| 3505 | + |
---|
| 3506 | + return obj; |
---|
| 3507 | + } catch (Exception e) |
---|
| 3508 | + { |
---|
| 3509 | + System.err.println(e); |
---|
| 3510 | + return null; |
---|
| 3511 | + } |
---|
| 3512 | + } |
---|
| 3513 | + |
---|
| 3514 | + static public Object clone(Object o) |
---|
| 3515 | + { |
---|
| 3516 | + try |
---|
| 3517 | + { |
---|
| 3518 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3519 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3520 | + |
---|
| 3521 | + out.writeObject(o); |
---|
| 3522 | + |
---|
| 3523 | + out.flush(); |
---|
| 3524 | + out.close(); |
---|
| 3525 | + |
---|
| 3526 | + byte[] bytes = baos.toByteArray(); |
---|
| 3527 | + |
---|
| 3528 | + System.out.println("clone = " + bytes.length); |
---|
| 3529 | + |
---|
| 3530 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3531 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3532 | + Object obj = in.readObject(); |
---|
| 3533 | + in.close(); |
---|
| 3534 | + |
---|
| 3535 | + return obj; |
---|
| 3536 | + } catch (Exception e) |
---|
| 3537 | + { |
---|
| 3538 | + System.err.println(e); |
---|
| 3539 | + return null; |
---|
| 3540 | + } |
---|
| 3541 | + } |
---|
| 3542 | + |
---|
| 3543 | + cRadio GetCurrentTab() |
---|
| 3544 | + { |
---|
| 3545 | + cRadio ab; |
---|
| 3546 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3547 | + { |
---|
| 3548 | + ab = (cRadio)e.nextElement(); |
---|
| 3549 | + if(ab.GetObject() == copy) |
---|
| 3550 | + { |
---|
| 3551 | + return ab; |
---|
| 3552 | + } |
---|
| 3553 | + } |
---|
| 3554 | + |
---|
| 3555 | + return null; |
---|
| 3556 | + } |
---|
| 3557 | + |
---|
| 3558 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3559 | + |
---|
| 3560 | + public void Save() |
---|
| 3561 | + { |
---|
| 3562 | + System.err.println("Save"); |
---|
| 3563 | + |
---|
| 3564 | + cRadio tab = GetCurrentTab(); |
---|
| 3565 | + |
---|
| 3566 | + boolean temp = CameraPane.SWITCH; |
---|
| 3567 | + CameraPane.SWITCH = false; |
---|
| 3568 | + |
---|
| 3569 | + copy.ExtractBigData(hashtable); |
---|
| 3570 | + |
---|
| 3571 | + byte[] compress = Compress(copy); |
---|
| 3572 | + |
---|
| 3573 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3574 | + tab.graphs[tab.undoindex++] = compress; |
---|
| 3575 | + |
---|
| 3576 | + copy.RestoreBigData(hashtable); |
---|
| 3577 | + |
---|
| 3578 | + CameraPane.SWITCH = temp; |
---|
| 3579 | + |
---|
| 3580 | + //assert(hashtable.isEmpty()); |
---|
| 3581 | + |
---|
| 3582 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3583 | + { |
---|
| 3584 | + tab.graphs[i] = null; |
---|
| 3585 | + } |
---|
| 3586 | + |
---|
| 3587 | + SetUndoStates(); |
---|
| 3588 | + |
---|
| 3589 | + // test save |
---|
| 3590 | + if (false) |
---|
| 3591 | + { |
---|
| 3592 | + try |
---|
| 3593 | + { |
---|
| 3594 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3595 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3596 | + |
---|
| 3597 | + p.writeObject(copy); |
---|
| 3598 | + |
---|
| 3599 | + p.flush(); |
---|
| 3600 | + |
---|
| 3601 | + ostream.close(); |
---|
| 3602 | + } catch (Exception e) |
---|
| 3603 | + { |
---|
| 3604 | + e.printStackTrace(); |
---|
| 3605 | + } |
---|
| 3606 | + } |
---|
| 3607 | + } |
---|
| 3608 | + |
---|
| 3609 | + void CopyChanged(Object3D obj) |
---|
| 3610 | + { |
---|
| 3611 | + SetUndoStates(); |
---|
| 3612 | + |
---|
| 3613 | + boolean temp = CameraPane.SWITCH; |
---|
| 3614 | + CameraPane.SWITCH = false; |
---|
| 3615 | + |
---|
| 3616 | + copy.ExtractBigData(hashtable); |
---|
| 3617 | + |
---|
| 3618 | + copy.clear(); |
---|
| 3619 | + |
---|
| 3620 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3621 | + { |
---|
| 3622 | + copy.add(obj.get(i)); |
---|
| 3623 | + } |
---|
| 3624 | + |
---|
| 3625 | + copy.RestoreBigData(hashtable); |
---|
| 3626 | + |
---|
| 3627 | + CameraPane.SWITCH = temp; |
---|
| 3628 | + |
---|
| 3629 | + //assert(hashtable.isEmpty()); |
---|
| 3630 | + |
---|
| 3631 | + copy.Touch(); |
---|
| 3632 | + |
---|
| 3633 | + ResetModel(); |
---|
| 3634 | + copy.HardTouch(); // recompile? |
---|
| 3635 | + |
---|
| 3636 | + cRadio ab; |
---|
| 3637 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3638 | + { |
---|
| 3639 | + ab = (cRadio)e.nextElement(); |
---|
| 3640 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3641 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3642 | + if (test != null) |
---|
| 3643 | + { |
---|
| 3644 | + test.editWindow = ab.object.editWindow; |
---|
| 3645 | + ab.object = test; |
---|
| 3646 | + } |
---|
| 3647 | + } |
---|
| 3648 | + |
---|
| 3649 | + refreshContents(); |
---|
| 3650 | + } |
---|
| 3651 | + |
---|
| 3652 | + cButton undoButton; |
---|
| 3653 | + cButton redoButton; |
---|
| 3654 | + |
---|
| 3655 | + void SetUndoStates() |
---|
| 3656 | + { |
---|
| 3657 | + cRadio tab = GetCurrentTab(); |
---|
| 3658 | + |
---|
| 3659 | + undoButton.setEnabled(tab.undoindex > 0); |
---|
| 3660 | + redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null); |
---|
| 3661 | + } |
---|
| 3662 | + |
---|
| 3663 | + public void Undo() |
---|
| 3664 | + { |
---|
| 3665 | + System.err.println("Undo"); |
---|
| 3666 | + |
---|
| 3667 | + cRadio tab = GetCurrentTab(); |
---|
| 3668 | + |
---|
| 3669 | + if (tab.undoindex == 0) |
---|
| 3670 | + { |
---|
| 3671 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3672 | + return; |
---|
| 3673 | + } |
---|
| 3674 | + |
---|
| 3675 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3676 | + { |
---|
| 3677 | + Save(); |
---|
| 3678 | + tab.undoindex -= 1; |
---|
| 3679 | + } |
---|
| 3680 | + |
---|
| 3681 | + tab.undoindex -= 1; |
---|
| 3682 | + |
---|
| 3683 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3684 | + } |
---|
| 3685 | + |
---|
| 3686 | + public void Redo() |
---|
| 3687 | + { |
---|
| 3688 | + cRadio tab = GetCurrentTab(); |
---|
| 3689 | + |
---|
| 3690 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3691 | + { |
---|
| 3692 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3693 | + return; |
---|
| 3694 | + } |
---|
| 3695 | + |
---|
| 3696 | + tab.undoindex += 1; |
---|
| 3697 | + |
---|
| 3698 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3699 | + } |
---|
| 3700 | + |
---|
| 3701 | + void ImportGFD() |
---|
| 3702 | + { |
---|
| 3703 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
| 3704 | + browser.show(); |
---|
| 3705 | + String filename = browser.getFile(); |
---|
| 3706 | + if (filename != null && filename.length() > 0) |
---|
| 3707 | + { |
---|
| 3708 | + String fullname = browser.getDirectory() + filename; |
---|
| 3709 | + |
---|
| 3710 | + //Object3D readobj = |
---|
| 3711 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3712 | + //makeSomething(readobj); |
---|
| 3713 | + } |
---|
| 3714 | + } |
---|
| 3715 | + |
---|
| 3716 | + void ImportVRMLX3D() |
---|
| 3717 | + { |
---|
| 3718 | + if (Grafreed.standAlone) |
---|
| 3719 | + { |
---|
| 3720 | + /**/ |
---|
| 3721 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3722 | + browser.show(); |
---|
| 3723 | + String filename = browser.getFile(); |
---|
| 3724 | + if (filename != null && filename.length() > 0) |
---|
| 3725 | + { |
---|
| 3726 | + String fullname = browser.getDirectory() + filename; |
---|
| 3727 | + LoadVRMLX3D(fullname); |
---|
| 3728 | + } |
---|
| 3729 | + /**/ |
---|
| 3730 | + } |
---|
| 3731 | + } |
---|
| 3732 | + |
---|
3242 | 3733 | void ToggleAnimation() |
---|
3243 | 3734 | { |
---|
3244 | 3735 | if (!Globals.ANIMATION) |
---|
.. | .. |
---|
3254 | 3745 | |
---|
3255 | 3746 | Globals.ANIMATION ^= true; |
---|
3256 | 3747 | |
---|
3257 | | - GrafreeD.wav.cursor = 0; |
---|
3258 | | - GrafreeD.wav.loop = 0; |
---|
| 3748 | + Grafreed.wav.cursor = 0; |
---|
| 3749 | + Grafreed.wav.loop = 0; |
---|
3259 | 3750 | } |
---|
3260 | 3751 | } else |
---|
3261 | 3752 | { |
---|
.. | .. |
---|
3276 | 3767 | callee.refreshContents(); |
---|
3277 | 3768 | } else |
---|
3278 | 3769 | { |
---|
3279 | | - new Exception().printStackTrace(); |
---|
3280 | 3770 | System.exit(0); |
---|
3281 | 3771 | } |
---|
3282 | 3772 | } |
---|
.. | .. |
---|
3357 | 3847 | assert false; |
---|
3358 | 3848 | } |
---|
3359 | 3849 | |
---|
3360 | | - void EditSelection() |
---|
| 3850 | + void EditSelection(boolean newWindow) |
---|
3361 | 3851 | { |
---|
3362 | 3852 | } |
---|
3363 | 3853 | |
---|
.. | .. |
---|
3443 | 3933 | { |
---|
3444 | 3934 | //System.out.println("Propagate = " + propagate); |
---|
3445 | 3935 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3936 | + |
---|
| 3937 | + if (copy.material != null) |
---|
| 3938 | + { |
---|
| 3939 | + cMaterial mat = copy.material; |
---|
| 3940 | + |
---|
| 3941 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3942 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3943 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3944 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3945 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3946 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3947 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3948 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3949 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3950 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3951 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3952 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3953 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3954 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3955 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3956 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3957 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3958 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3959 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3960 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3961 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3962 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3963 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3964 | + } |
---|
| 3965 | + |
---|
3446 | 3966 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3447 | 3967 | { |
---|
3448 | 3968 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3558 | 4078 | } |
---|
3559 | 4079 | |
---|
3560 | 4080 | if (normalpushField != null) |
---|
3561 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 4081 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3562 | 4082 | } |
---|
3563 | 4083 | |
---|
3564 | 4084 | void SnapObject() |
---|
.. | .. |
---|
3822 | 4342 | |
---|
3823 | 4343 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3824 | 4344 | { |
---|
| 4345 | + if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 4346 | + Save(); |
---|
3825 | 4347 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3826 | 4348 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3827 | 4349 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
3908 | 4430 | { |
---|
3909 | 4431 | ResetModel(); |
---|
3910 | 4432 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 4433 | + |
---|
| 4434 | + if (thing.Size() == 0) |
---|
| 4435 | + { |
---|
| 4436 | + //EditSelection(false); |
---|
| 4437 | + } |
---|
| 4438 | + |
---|
3911 | 4439 | refreshContents(); |
---|
3912 | 4440 | } |
---|
3913 | 4441 | |
---|
.. | .. |
---|
4025 | 4553 | } |
---|
4026 | 4554 | } |
---|
4027 | 4555 | } |
---|
| 4556 | + |
---|
4028 | 4557 | LoadGFDThread loadGFDThread; |
---|
4029 | 4558 | |
---|
4030 | 4559 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4044 | 4573 | |
---|
4045 | 4574 | try |
---|
4046 | 4575 | { |
---|
| 4576 | + // Try compressed version first. |
---|
4047 | 4577 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4048 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4578 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4579 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4049 | 4580 | |
---|
4050 | 4581 | readobj = (Object3D) p.readObject(); |
---|
4051 | 4582 | istream.close(); |
---|
.. | .. |
---|
4053 | 4584 | readobj.ResetDisplayList(); |
---|
4054 | 4585 | } catch (Exception e) |
---|
4055 | 4586 | { |
---|
4056 | | - e.printStackTrace(); |
---|
| 4587 | + //e.printStackTrace(); |
---|
| 4588 | + try |
---|
| 4589 | + { |
---|
| 4590 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4591 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4592 | + |
---|
| 4593 | + readobj = (Object3D) p.readObject(); |
---|
| 4594 | + istream.close(); |
---|
| 4595 | + |
---|
| 4596 | + readobj.ResetDisplayList(); |
---|
| 4597 | + } catch (Exception e2) |
---|
| 4598 | + { |
---|
| 4599 | + e2.printStackTrace(); |
---|
| 4600 | + } |
---|
4057 | 4601 | } |
---|
4058 | 4602 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4059 | 4603 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4099 | 4643 | |
---|
4100 | 4644 | void LoadIt(Object obj) |
---|
4101 | 4645 | { |
---|
| 4646 | + if (obj == null) |
---|
| 4647 | + { |
---|
| 4648 | + // Invalid file |
---|
| 4649 | + return; |
---|
| 4650 | + } |
---|
| 4651 | + |
---|
4102 | 4652 | System.out.println("Loaded " + obj); |
---|
4103 | 4653 | //new Exception().printStackTrace(); |
---|
4104 | 4654 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4108 | 4658 | |
---|
4109 | 4659 | if (readobj != null) |
---|
4110 | 4660 | { |
---|
| 4661 | + if (Globals.SAVEONMAKE) |
---|
| 4662 | + Save(); |
---|
4111 | 4663 | try |
---|
4112 | 4664 | { |
---|
4113 | 4665 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4170 | 4722 | |
---|
4171 | 4723 | void load() // throws ClassNotFoundException |
---|
4172 | 4724 | { |
---|
4173 | | - if (GrafreeD.standAlone) |
---|
| 4725 | + if (Grafreed.standAlone) |
---|
4174 | 4726 | { |
---|
4175 | 4727 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4176 | 4728 | browser.show(); |
---|
.. | .. |
---|
4257 | 4809 | try |
---|
4258 | 4810 | { |
---|
4259 | 4811 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4260 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4812 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4813 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4261 | 4814 | |
---|
4262 | 4815 | p.writeObject(copy); |
---|
4263 | 4816 | p.flush(); |
---|
4264 | 4817 | |
---|
| 4818 | + zstream.close(); |
---|
4265 | 4819 | ostream.close(); |
---|
4266 | 4820 | |
---|
4267 | 4821 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4271 | 4825 | { |
---|
4272 | 4826 | } |
---|
4273 | 4827 | } |
---|
| 4828 | + |
---|
4274 | 4829 | String lastname; |
---|
4275 | 4830 | |
---|
4276 | 4831 | void saveAs() |
---|
4277 | 4832 | { |
---|
4278 | | - if (GrafreeD.standAlone) |
---|
| 4833 | + if (Grafreed.standAlone) |
---|
4279 | 4834 | { |
---|
4280 | 4835 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4281 | 4836 | browser.setVisible(true); |
---|
4282 | 4837 | String filename = browser.getFile(); |
---|
4283 | 4838 | if (filename != null && filename.length() > 0) |
---|
4284 | 4839 | { |
---|
| 4840 | + if (!filename.endsWith(".gfd")) |
---|
| 4841 | + filename += ".gfd"; |
---|
4285 | 4842 | lastname = browser.getDirectory() + filename; |
---|
4286 | 4843 | save(); |
---|
4287 | 4844 | } |
---|
.. | .. |
---|
4380 | 4937 | try |
---|
4381 | 4938 | { |
---|
4382 | 4939 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4383 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4384 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4940 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4941 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4385 | 4942 | |
---|
4386 | 4943 | Object3D objectparent = obj.parent; |
---|
4387 | 4944 | obj.parent = null; |
---|
4388 | 4945 | |
---|
4389 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4946 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4390 | 4947 | |
---|
4391 | 4948 | obj.parent = objectparent; |
---|
4392 | 4949 | |
---|
.. | .. |
---|
4398 | 4955 | p.writeObject(object); |
---|
4399 | 4956 | p.flush(); |
---|
4400 | 4957 | |
---|
| 4958 | + zstream.close(); |
---|
4401 | 4959 | ostream.close(); |
---|
4402 | | - // zstream.close(); |
---|
4403 | 4960 | |
---|
4404 | 4961 | // group.selection.get(0).parent = parent; |
---|
4405 | 4962 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4420 | 4977 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4421 | 4978 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4422 | 4979 | copy.generatePOV(buffer); |
---|
4423 | | - if (GrafreeD.standAlone) |
---|
| 4980 | + if (Grafreed.standAlone) |
---|
4424 | 4981 | { |
---|
4425 | 4982 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4426 | 4983 | browser.show(); |
---|
.. | .. |
---|
4446 | 5003 | Object3D client; |
---|
4447 | 5004 | Object3D copy; |
---|
4448 | 5005 | MenuBar menuBar; |
---|
4449 | | - Menu windowMenu; |
---|
| 5006 | + Menu fileMenu; |
---|
| 5007 | + MenuItem newItem; |
---|
4450 | 5008 | MenuItem loadItem; |
---|
4451 | 5009 | MenuItem saveItem; |
---|
4452 | 5010 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4454 | 5012 | MenuItem reexportItem; |
---|
4455 | 5013 | MenuItem povItem; |
---|
4456 | 5014 | MenuItem closeItem; |
---|
4457 | | - Menu cameraMenu; |
---|
| 5015 | + |
---|
4458 | 5016 | CheckboxMenuItem zBufferItem; |
---|
4459 | 5017 | //MenuItem normalLensItem; |
---|
4460 | | - MenuItem editCameraItem; |
---|
4461 | | - MenuItem revertCameraItem; |
---|
4462 | 5018 | MenuItem stepItem; |
---|
4463 | 5019 | CheckboxMenuItem toggleLiveItem; |
---|
4464 | 5020 | CheckboxMenuItem toggleFullScreenItem; |
---|
.. | .. |
---|
4476 | 5032 | CheckboxMenuItem togglePaintItem; |
---|
4477 | 5033 | JSplitPane mainPanel; |
---|
4478 | 5034 | JScrollPane scrollpane; |
---|
| 5035 | + |
---|
4479 | 5036 | JPanel toolbarPanel; |
---|
| 5037 | + |
---|
4480 | 5038 | cGridBag treePanel; |
---|
| 5039 | + |
---|
4481 | 5040 | JPanel radioPanel; |
---|
4482 | 5041 | ButtonGroup buttonGroup; |
---|
4483 | | - cGridBag ctrlPanel; |
---|
| 5042 | + |
---|
| 5043 | + cGridBag toolboxPanel; |
---|
4484 | 5044 | cGridBag materialPanel; |
---|
| 5045 | + cGridBag ctrlPanel; |
---|
| 5046 | + |
---|
4485 | 5047 | JScrollPane infoPanel; |
---|
| 5048 | + |
---|
4486 | 5049 | cGridBag optionsPanel; |
---|
| 5050 | + |
---|
4487 | 5051 | JTabbedPane objectPanel; |
---|
| 5052 | + boolean materialFlushed; |
---|
| 5053 | + Object3D latestObject; |
---|
| 5054 | + |
---|
4488 | 5055 | cGridBag XYZPanel; |
---|
| 5056 | + |
---|
4489 | 5057 | JSplitPane gridPanel; |
---|
4490 | 5058 | JSplitPane bigPanel; |
---|
| 5059 | + |
---|
4491 | 5060 | cGridBag bigThree; |
---|
4492 | 5061 | cGridBag scenePanel; |
---|
4493 | 5062 | cGridBag centralPanel; |
---|
.. | .. |
---|
4602 | 5171 | cNumberSlider fogField; |
---|
4603 | 5172 | JLabel opacityPowerLabel; |
---|
4604 | 5173 | cNumberSlider opacityPowerField; |
---|
4605 | | - JTree jTree; |
---|
| 5174 | + cTree jTree; |
---|
4606 | 5175 | //ObjectUI parent; |
---|
4607 | 5176 | |
---|
4608 | 5177 | cNumberSlider normalpushField; |
---|
| 5178 | + |
---|
| 5179 | + private MenuItem importGFDItem; |
---|
| 5180 | + private MenuItem importVRMLX3DItem; |
---|
| 5181 | + private MenuItem import3DSItem; |
---|
| 5182 | + private MenuItem importOBJItem; |
---|
4609 | 5183 | } |
---|