.. | .. |
---|
138 | 138 | public void closeUI() |
---|
139 | 139 | { |
---|
140 | 140 | //new Exception().printStackTrace(); |
---|
141 | | - System.out.println("this = " + this); |
---|
142 | | - System.out.println("objEditor = " + objEditor); |
---|
| 141 | +// System.out.println("this = " + this); |
---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
---|
143 | 143 | //nameField.removeActionListener(this); |
---|
144 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
---|
| 145 | + |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
145 | 147 | |
---|
146 | 148 | if (!GroupEditor.allparams) |
---|
147 | 149 | return; |
---|
148 | 150 | |
---|
149 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
150 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
151 | | - objEditor.ctrlPanel.remove(markCB); |
---|
152 | | - |
---|
153 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
154 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
155 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
156 | | - |
---|
157 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
158 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
159 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
160 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
161 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
162 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
163 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
164 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
165 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
166 | | - objEditor.ctrlPanel.remove(remarkButton); |
---|
| 151 | +// objEditor.ctrlPanel.remove(liveCB); |
---|
| 152 | +// objEditor.ctrlPanel.remove(hideCB); |
---|
| 153 | +// objEditor.ctrlPanel.remove(markCB); |
---|
| 154 | +// |
---|
| 155 | +// objEditor.ctrlPanel.remove(randomCB); |
---|
| 156 | +// objEditor.ctrlPanel.remove(speedupCB); |
---|
| 157 | +// objEditor.ctrlPanel.remove(rewindCB); |
---|
| 158 | +// |
---|
| 159 | +// objEditor.ctrlPanel.remove(resetButton); |
---|
| 160 | +// objEditor.ctrlPanel.remove(stepButton); |
---|
| 161 | +//// objEditor.ctrlPanel.remove(stepAllButton); |
---|
| 162 | +//// objEditor.ctrlPanel.remove(resetAllButton); |
---|
| 163 | +// objEditor.ctrlPanel.remove(link2masterCB); |
---|
| 164 | +// //objEditor.ctrlPanel.remove(flipVCB); |
---|
| 165 | +// //objEditor.ctrlPanel.remove(texresMenu); |
---|
| 166 | +// objEditor.ctrlPanel.remove(slowerButton); |
---|
| 167 | +// objEditor.ctrlPanel.remove(fasterButton); |
---|
| 168 | +// objEditor.ctrlPanel.remove(remarkButton); |
---|
167 | 169 | |
---|
168 | | - Remove(normalpushField); |
---|
| 170 | + objEditor.ctrlPanel.remove(setupPanel); |
---|
| 171 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
| 172 | + objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 173 | + objEditor.ctrlPanel.remove(pushPanel); |
---|
| 174 | + //objEditor.ctrlPanel.remove(fillPanel); |
---|
| 175 | + |
---|
| 176 | + //Remove(normalpushField); |
---|
169 | 177 | } |
---|
170 | 178 | |
---|
171 | 179 | public ObjEditor GetEditor() |
---|
.. | .. |
---|
269 | 277 | void SetupMenu() |
---|
270 | 278 | { |
---|
271 | 279 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
272 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
273 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
274 | | - windowMenu.add("-"); |
---|
275 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
276 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
| 280 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 281 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 282 | + fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 283 | + |
---|
| 284 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 285 | + Menu menu = new Menu("Import"); |
---|
| 286 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 287 | + importOBJItem.addActionListener(this); |
---|
| 288 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 289 | + import3DSItem.addActionListener(this); |
---|
| 290 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 291 | + importVRMLX3DItem.addActionListener(this); |
---|
| 292 | + menu.add("-"); |
---|
| 293 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 294 | + importGFDItem.addActionListener(this); |
---|
| 295 | + fileMenu.add(menu); |
---|
| 296 | + fileMenu.add("-"); |
---|
| 297 | + |
---|
| 298 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 299 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
277 | 300 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
278 | | - windowMenu.add("-"); |
---|
279 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
280 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
281 | | - windowMenu.add("-"); |
---|
| 301 | + fileMenu.add("-"); |
---|
| 302 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 303 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 304 | + fileMenu.add("-"); |
---|
282 | 305 | if (client.parent != null) |
---|
283 | 306 | { |
---|
284 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 307 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
285 | 308 | } else |
---|
286 | 309 | { |
---|
287 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 310 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
288 | 311 | } |
---|
289 | 312 | |
---|
| 313 | + newItem.addActionListener(this); |
---|
290 | 314 | loadItem.addActionListener(this); |
---|
291 | 315 | saveItem.addActionListener(this); |
---|
292 | 316 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
295 | 319 | //povItem.addActionListener(this); |
---|
296 | 320 | closeItem.addActionListener(this); |
---|
297 | 321 | |
---|
298 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
299 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
300 | | - //zBufferItem.addActionListener(this); |
---|
301 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
302 | | - //normalLensItem.addActionListener(this); |
---|
303 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
304 | | - revertCameraItem.addActionListener(this); |
---|
305 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
306 | | - toggleTimelineItem.addItemListener(this); |
---|
307 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
308 | | - toggleFullScreenItem.addItemListener(this); |
---|
309 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
310 | | - cameraMenu.add("-"); |
---|
311 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
312 | | - toggleTextureItem.addItemListener(this); |
---|
313 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
314 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
315 | | - toggleLiveItem.addItemListener(this); |
---|
316 | | - toggleLiveItem.setState(Globals.isLIVE()); |
---|
317 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
318 | | - stepItem.addActionListener(this); |
---|
319 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
320 | | -// toggleDLItem.addItemListener(this); |
---|
321 | | -// toggleDLItem.setState(false); |
---|
322 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
323 | | - toggleRenderItem.addItemListener(this); |
---|
324 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
325 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
326 | | - toggleDebugItem.addItemListener(this); |
---|
327 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
328 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
329 | | - toggleFrustumItem.addItemListener(this); |
---|
330 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
331 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
332 | | - toggleFootContactItem.addItemListener(this); |
---|
333 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
334 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
335 | | - toggleRandomItem.addItemListener(this); |
---|
336 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
337 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
338 | | - toggleHandleItem.addItemListener(this); |
---|
339 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
340 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
341 | | - togglePaintItem.addItemListener(this); |
---|
342 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
343 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
344 | | -// toggleRootItem.addItemListener(this); |
---|
345 | | -// toggleRootItem.setState(false); |
---|
346 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
347 | | -// animationItem.addItemListener(this); |
---|
348 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
349 | | - cameraMenu.add("-"); |
---|
350 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
351 | | - editCameraItem.addActionListener(this); |
---|
352 | | - |
---|
353 | 322 | objectPanel = new JTabbedPane(); |
---|
354 | 323 | toolbarPanel = new JPanel(); |
---|
355 | 324 | toolbarPanel.setName("Toolbar"); |
---|
356 | | - treePanel = new JPanel(); |
---|
| 325 | + treePanel = new cGridBag(); |
---|
357 | 326 | treePanel.setName("Tree"); |
---|
358 | | - ctrlPanel = new cGridBag(); // new GridBagLayout()); |
---|
| 327 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
359 | 328 | ctrlPanel.setName("Edit"); |
---|
360 | 329 | materialPanel = new cGridBag().setVertical(true); |
---|
361 | 330 | materialPanel.setName("Material"); |
---|
362 | 331 | /*JTextPane*/ |
---|
363 | 332 | infoarea = createTextPane(); |
---|
| 333 | + doc = infoarea.getStyledDocument(); |
---|
| 334 | + |
---|
364 | 335 | infoarea.setEditable(true); |
---|
365 | 336 | SetText(); |
---|
366 | 337 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
367 | 338 | // infoarea.setOpaque(false); |
---|
368 | 339 | // //infoarea.setForeground(textcolor); |
---|
369 | | - infoarea.setLineWrap(true); |
---|
370 | | - infoarea.setWrapStyleWord(true); |
---|
| 340 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 341 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
371 | 342 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
372 | 343 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
373 | 344 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
378 | 349 | mainPanel.setName("Main"); |
---|
379 | 350 | mainPanel.setContinuousLayout(true); |
---|
380 | 351 | mainPanel.setOneTouchExpandable(true); |
---|
381 | | - mainPanel.setDividerLocation(1.0); |
---|
382 | 352 | mainPanel.setDividerSize(9); |
---|
383 | | - mainPanel.setResizeWeight(0); |
---|
| 353 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 354 | + mainPanel.setResizeWeight(0.5); |
---|
384 | 355 | |
---|
385 | 356 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
386 | 357 | //mainPanel.setLayout(new GridBagLayout()); |
---|
387 | 358 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
388 | | - treePanel.setLayout(new GridBagLayout()); |
---|
389 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 359 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 360 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
390 | 361 | //materialPanel.setLayout(new GridBagLayout()); |
---|
391 | 362 | |
---|
392 | 363 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
.. | .. |
---|
426 | 397 | static String newline = "\n"; |
---|
427 | 398 | protected static final String buttonString = "JButton"; |
---|
428 | 399 | StyledDocument doc; |
---|
429 | | - JTextArea infoarea; |
---|
| 400 | + JTextPane infoarea; |
---|
430 | 401 | |
---|
431 | 402 | void ClearInfo() |
---|
432 | 403 | { |
---|
.. | .. |
---|
449 | 420 | e.printStackTrace(); |
---|
450 | 421 | } |
---|
451 | 422 | |
---|
452 | | - String selection = infoarea.getText(); |
---|
453 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
454 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
455 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 423 | +// String selection = infoarea.getText(); |
---|
| 424 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 425 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 426 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
456 | 427 | //clipboard.setContents(data, data); |
---|
457 | 428 | } |
---|
458 | 429 | |
---|
.. | .. |
---|
475 | 446 | //SendInfo("Name:", "bold"); |
---|
476 | 447 | if (sel.GetTextures() != null || debug) |
---|
477 | 448 | { |
---|
478 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 449 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
479 | 450 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
480 | 451 | if (sel.Size() > 0) |
---|
481 | 452 | { |
---|
482 | 453 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
483 | 454 | } |
---|
484 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 455 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
485 | 456 | if (debug) |
---|
486 | 457 | { |
---|
487 | 458 | try |
---|
.. | .. |
---|
493 | 464 | } |
---|
494 | 465 | |
---|
495 | 466 | if (full) |
---|
496 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 467 | + { |
---|
| 468 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 469 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 470 | + } |
---|
497 | 471 | |
---|
498 | 472 | if (sel.bRep != null) |
---|
499 | 473 | { |
---|
.. | .. |
---|
520 | 494 | } |
---|
521 | 495 | if (sel.support != null) |
---|
522 | 496 | { |
---|
523 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 497 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
524 | 498 | } |
---|
525 | 499 | if (sel.scriptnode != null) |
---|
526 | 500 | { |
---|
.. | .. |
---|
591 | 565 | { |
---|
592 | 566 | CameraPane.pointflow = (PointFlow) sel; |
---|
593 | 567 | } |
---|
| 568 | + |
---|
| 569 | + si.SendInfo("_____________________", "regular"); |
---|
| 570 | + si.SendInfo("", "regular"); |
---|
594 | 571 | } |
---|
595 | 572 | } |
---|
596 | 573 | |
---|
.. | .. |
---|
622 | 599 | cameraView.ToggleFullScreen(); |
---|
623 | 600 | } |
---|
624 | 601 | |
---|
625 | | - private JTextArea createTextPane() |
---|
| 602 | + private JTextPane createTextPane() |
---|
626 | 603 | { |
---|
627 | | - String[] initString = |
---|
628 | | - { |
---|
629 | | - "This is an editable JTextPane, ", //regular |
---|
630 | | - "another ", //italic |
---|
631 | | - "styled ", //bold |
---|
632 | | - "text ", //small |
---|
633 | | - "component, ", //large |
---|
634 | | - "which supports embedded components..." + newline,//regular |
---|
635 | | - " " + newline, //button |
---|
636 | | - "...and embedded icons..." + newline, //regular |
---|
637 | | - " ", //icon |
---|
638 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
639 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
640 | | - + "cover methods for interacting with those objects." |
---|
641 | | - }; |
---|
| 604 | +// TEXTAREA String[] initString = |
---|
| 605 | +// { |
---|
| 606 | +// "This is an editable JTextPane, ", //regular |
---|
| 607 | +// "another ", //italic |
---|
| 608 | +// "styled ", //bold |
---|
| 609 | +// "text ", //small |
---|
| 610 | +// "component, ", //large |
---|
| 611 | +// "which supports embedded components..." + newline,//regular |
---|
| 612 | +// " " + newline, //button |
---|
| 613 | +// "...and embedded icons..." + newline, //regular |
---|
| 614 | +// " ", //icon |
---|
| 615 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 616 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 617 | +// + "cover methods for interacting with those objects." |
---|
| 618 | +// }; |
---|
| 619 | +// |
---|
| 620 | +// String[] initStyles = |
---|
| 621 | +// { |
---|
| 622 | +// "regular", "italic", "bold", "small", "large", |
---|
| 623 | +// "regular", "button", "regular", "icon", |
---|
| 624 | +// "regular" |
---|
| 625 | +// }; |
---|
| 626 | +// |
---|
| 627 | +// JTextPane textPane = new JTextPane(); |
---|
| 628 | +// textPane.setEditable(true); |
---|
| 629 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 630 | +// addStylesToDocument(doc); |
---|
| 631 | +// |
---|
| 632 | +// try |
---|
| 633 | +// { |
---|
| 634 | +// for (int j = 0; j < 2; j++) |
---|
| 635 | +// { |
---|
| 636 | +// for (int i = 0; i < initString.length; i++) |
---|
| 637 | +// { |
---|
| 638 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 639 | +// doc.getStyle(initStyles[i])); |
---|
| 640 | +// } |
---|
| 641 | +// } |
---|
| 642 | +// } catch (BadLocationException ble) |
---|
| 643 | +// { |
---|
| 644 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 645 | +// } |
---|
642 | 646 | |
---|
643 | | - String[] initStyles = |
---|
644 | | - { |
---|
645 | | - "regular", "italic", "bold", "small", "large", |
---|
646 | | - "regular", "button", "regular", "icon", |
---|
647 | | - "regular" |
---|
648 | | - }; |
---|
649 | | - |
---|
650 | | - JTextPane textPane = new JTextPane(); |
---|
651 | | - textPane.setEditable(true); |
---|
652 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
653 | | - addStylesToDocument(doc); |
---|
654 | | - |
---|
655 | | - try |
---|
656 | | - { |
---|
657 | | - for (int j = 0; j < 2; j++) |
---|
658 | | - { |
---|
659 | | - for (int i = 0; i < initString.length; i++) |
---|
660 | | - { |
---|
661 | | - doc.insertString(doc.getLength(), initString[i], |
---|
662 | | - doc.getStyle(initStyles[i])); |
---|
663 | | - } |
---|
664 | | - } |
---|
665 | | - } catch (BadLocationException ble) |
---|
666 | | - { |
---|
667 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
668 | | - } |
---|
669 | | - |
---|
670 | | - return new JTextArea(); // textPane; |
---|
| 647 | + return new JTextPane(); // textPane; |
---|
671 | 648 | } |
---|
672 | 649 | |
---|
673 | 650 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
720 | 697 | protected static ImageIcon createImageIcon(String path, |
---|
721 | 698 | String description) |
---|
722 | 699 | { |
---|
723 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 700 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
724 | 701 | if (imgURL != null) |
---|
725 | 702 | { |
---|
726 | 703 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
752 | 729 | // NumberSlider vDivsField; |
---|
753 | 730 | // JCheckBox endcaps; |
---|
754 | 731 | JCheckBox liveCB; |
---|
| 732 | + JCheckBox selectCB; |
---|
755 | 733 | JCheckBox hideCB; |
---|
756 | 734 | JCheckBox link2masterCB; |
---|
757 | 735 | JCheckBox markCB; |
---|
.. | .. |
---|
767 | 745 | JButton slowerButton; |
---|
768 | 746 | JButton fasterButton; |
---|
769 | 747 | JButton remarkButton; |
---|
| 748 | + |
---|
| 749 | + cGridBag namePanel; |
---|
| 750 | + cGridBag setupPanel; |
---|
| 751 | + cGridBag setupPanel2; |
---|
| 752 | + cGridBag commandsPanel; |
---|
| 753 | + cGridBag pushPanel; |
---|
| 754 | + cGridBag fillPanel; |
---|
770 | 755 | |
---|
771 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 756 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
772 | 757 | { |
---|
773 | 758 | JCheckBox cb; |
---|
774 | 759 | |
---|
775 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
776 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
777 | | -// oe.aConstraints.weightx = 1; |
---|
778 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
779 | | - oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 760 | + panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
780 | 761 | cb.addItemListener(this); |
---|
781 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
782 | | - oe.aConstraints.gridwidth = 1; |
---|
783 | | - oe.aConstraints.gridx += 1; |
---|
784 | 762 | |
---|
785 | 763 | return cb; |
---|
786 | 764 | } |
---|
787 | 765 | |
---|
788 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 766 | + cButton AddButton(cGridBag panel, String label) |
---|
789 | 767 | { |
---|
790 | 768 | cButton cb; |
---|
791 | 769 | |
---|
792 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
793 | | - oe.aConstraints.gridwidth = 1; |
---|
794 | | -// oe.aConstraints.weightx = 1; |
---|
795 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
796 | | - oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
| 770 | + panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
797 | 771 | cb.addActionListener(this); |
---|
798 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
799 | | - oe.aConstraints.gridwidth = 1; |
---|
800 | | - oe.aConstraints.gridx += 1; |
---|
801 | 772 | |
---|
802 | 773 | return cb; |
---|
803 | 774 | } |
---|
804 | 775 | |
---|
805 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 776 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
806 | 777 | { |
---|
807 | 778 | JComboBox combo; |
---|
808 | 779 | |
---|
809 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
810 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
811 | | - oe.aConstraints.gridx += 1; |
---|
| 780 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
812 | 781 | combo.addActionListener(this); |
---|
813 | 782 | |
---|
814 | 783 | return combo; |
---|
815 | 784 | } |
---|
816 | 785 | |
---|
817 | | - cNumberSlider AddSlider(cGridBag ctrlPanel, String label, double min, double max, double current, double pow) |
---|
| 786 | + cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow) |
---|
818 | 787 | { |
---|
819 | 788 | cGridBag control = new cGridBag(); |
---|
820 | 789 | |
---|
.. | .. |
---|
826 | 795 | control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
827 | 796 | combo.setFloat(current); |
---|
828 | 797 | |
---|
829 | | - ctrlPanel.add(control); |
---|
| 798 | + panel.add(control); |
---|
830 | 799 | |
---|
831 | | - return combo; |
---|
| 800 | + return control; |
---|
832 | 801 | } |
---|
833 | 802 | |
---|
834 | | - cNumberSlider AddSlider(cGridBag ctrlPanel, String label, int min, int max, int current) |
---|
| 803 | + cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current) |
---|
835 | 804 | { |
---|
836 | 805 | cGridBag control = new cGridBag(); |
---|
837 | 806 | |
---|
.. | .. |
---|
839 | 808 | |
---|
840 | 809 | JLabel jlabel = new JLabel(label); |
---|
841 | 810 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
842 | | - ctrlPanel.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
843 | | - ctrlPanel.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 811 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 812 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
844 | 813 | combo.setInteger(current); |
---|
845 | 814 | |
---|
846 | | - ctrlPanel.add(control); |
---|
| 815 | + panel.add(control); |
---|
847 | 816 | |
---|
848 | | - return combo; |
---|
| 817 | + return control; |
---|
849 | 818 | } |
---|
850 | 819 | |
---|
851 | 820 | JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
852 | 821 | { |
---|
853 | 822 | JTextArea text; |
---|
854 | 823 | |
---|
855 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
856 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
857 | 824 | ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
858 | 825 | text.addCaretListener(this); |
---|
859 | | - aConstraints.gridx += 1; |
---|
860 | | - aConstraints.gridwidth = 1; |
---|
861 | 826 | |
---|
862 | 827 | return text; |
---|
863 | 828 | } |
---|
.. | .. |
---|
896 | 861 | |
---|
897 | 862 | /* |
---|
898 | 863 | */ |
---|
899 | | - void Return() // ObjEditor oe) |
---|
| 864 | + void Return0() // ObjEditor oe) |
---|
900 | 865 | { |
---|
901 | 866 | aConstraints.gridy += 1; |
---|
902 | 867 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
951 | 916 | |
---|
952 | 917 | void SetupUI2(ObjEditor oe) |
---|
953 | 918 | { |
---|
954 | | -// oe.aConstraints.weightx = 0; |
---|
955 | | -// oe.aConstraints.weighty = 0; |
---|
956 | | -// oe.aConstraints.gridx = 0; |
---|
957 | | -// oe.aConstraints.gridy = 0; |
---|
958 | | - SetupName(oe); |
---|
| 919 | + //SetupName(oe); |
---|
| 920 | + |
---|
| 921 | + namePanel = new cGridBag(); |
---|
| 922 | + |
---|
| 923 | + nameField = AddText(namePanel, copy.GetName()); |
---|
| 924 | + namePanel.add(nameField); |
---|
| 925 | + oe.ctrlPanel.add(namePanel); |
---|
| 926 | + |
---|
| 927 | + oe.ctrlPanel.Return(); |
---|
959 | 928 | |
---|
960 | 929 | if (!GroupEditor.allparams) |
---|
961 | 930 | return; |
---|
962 | 931 | |
---|
963 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
964 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
965 | | - hideCB = AddCheckBox(oe, "Hide", copy.hide); |
---|
| 932 | + setupPanel = new cGridBag().setVertical(false); |
---|
| 933 | + |
---|
| 934 | + liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
| 935 | + liveCB.setToolTipText("Animate object"); |
---|
| 936 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 937 | + selectCB.setToolTipText("Make object selectable"); |
---|
966 | 938 | // Return(); |
---|
967 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
968 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
969 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
970 | | - Return(); |
---|
971 | | - resetButton = AddButton(oe, "Reset"); |
---|
972 | | - stepButton = AddButton(oe, "Step"); |
---|
| 939 | + hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 940 | + hideCB.setToolTipText("Hide object"); |
---|
| 941 | + markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
| 942 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 943 | + |
---|
| 944 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 945 | + |
---|
| 946 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
| 947 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 948 | + |
---|
| 949 | + randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
| 950 | + randomCB.setToolTipText("Rewind or Go back and forth randomly"); |
---|
| 951 | + |
---|
| 952 | + if (Globals.ADVANCED) |
---|
| 953 | + { |
---|
| 954 | + link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
| 955 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 956 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
| 957 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 958 | + } |
---|
| 959 | + |
---|
| 960 | + oe.ctrlPanel.add(setupPanel); |
---|
| 961 | + oe.ctrlPanel.Return(); |
---|
| 962 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 963 | + oe.ctrlPanel.Return(); |
---|
| 964 | + |
---|
| 965 | + commandsPanel = new cGridBag().setVertical(false); |
---|
| 966 | + |
---|
| 967 | + resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 968 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
| 969 | + stepButton = AddButton(commandsPanel, "Step"); |
---|
| 970 | + stepButton.setToolTipText("Step one frame"); |
---|
973 | 971 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
974 | 972 | // stepAllButton = AddButton(oe, "Step All"); |
---|
975 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
976 | 973 | // Return(); |
---|
977 | | - slowerButton = AddButton(oe, "Slow"); |
---|
978 | | - fasterButton = AddButton(oe, "Fast"); |
---|
979 | | - remarkButton = AddButton(oe, "Rem"); |
---|
| 974 | + slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 975 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
| 976 | + fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 977 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
| 978 | + remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 979 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
980 | 980 | |
---|
981 | | - Return(); |
---|
| 981 | + oe.ctrlPanel.add(commandsPanel); |
---|
| 982 | + oe.ctrlPanel.Return(); |
---|
982 | 983 | |
---|
983 | | - normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
---|
984 | | - Return(); |
---|
| 984 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
| 985 | + normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
| 986 | + //Return(); |
---|
| 987 | + |
---|
| 988 | + oe.ctrlPanel.Return(); |
---|
985 | 989 | |
---|
986 | 990 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
987 | 991 | // ObjEditor.aConstraints.gridx += 1; |
---|
.. | .. |
---|
1076 | 1080 | oe.aConstraints.gridwidth = 1; |
---|
1077 | 1081 | /**/ |
---|
1078 | 1082 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1079 | | - Return(); |
---|
| 1083 | + oe.ctrlPanel.Return(); |
---|
1080 | 1084 | |
---|
1081 | 1085 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1082 | 1086 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1253 | 1257 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1254 | 1258 | //tmp.setName("Edit"); |
---|
1255 | 1259 | objectPanel.add(materialPanel); |
---|
1256 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1257 | | - north.setName("Edit"); |
---|
1258 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1259 | | - objectPanel.add(north); |
---|
| 1260 | +// JPanel north = new JPanel(new BorderLayout()); |
---|
| 1261 | +// north.setName("Edit"); |
---|
| 1262 | +// north.add(ctrlPanel, BorderLayout.NORTH); |
---|
| 1263 | +// objectPanel.add(north); |
---|
| 1264 | + objectPanel.add(ctrlPanel); |
---|
1260 | 1265 | objectPanel.add(infoPanel); |
---|
1261 | 1266 | |
---|
1262 | 1267 | /* |
---|
.. | .. |
---|
1278 | 1283 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1279 | 1284 | |
---|
1280 | 1285 | /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
1281 | | - scenePanel.preferredWidth = 7; |
---|
| 1286 | + scenePanel.preferredWidth = 6; |
---|
1282 | 1287 | |
---|
1283 | 1288 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1284 | 1289 | tabbedPane.add(scrollpane); |
---|
.. | .. |
---|
1384 | 1389 | |
---|
1385 | 1390 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1386 | 1391 | |
---|
1387 | | - frame.setSize(1024, 768); |
---|
1388 | | - frame.show(); |
---|
| 1392 | + frame.setSize(1280, 860); |
---|
| 1393 | + frame.setVisible(true); |
---|
1389 | 1394 | |
---|
1390 | 1395 | gridPanel.setDividerLocation(1.0); |
---|
1391 | 1396 | |
---|
.. | .. |
---|
1415 | 1420 | ctrlPanel.removeAll(); |
---|
1416 | 1421 | } |
---|
1417 | 1422 | |
---|
1418 | | - void SetupMaterial(cGridBag ctrlPanel) |
---|
| 1423 | + void SetupMaterial(cGridBag panel) |
---|
1419 | 1424 | { |
---|
1420 | 1425 | /* |
---|
1421 | 1426 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
.. | .. |
---|
1424 | 1429 | |
---|
1425 | 1430 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1426 | 1431 | |
---|
1427 | | - editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints); |
---|
| 1432 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1433 | + createMaterialButton.setToolTipText("Create material"); |
---|
1428 | 1434 | |
---|
1429 | 1435 | /* |
---|
1430 | 1436 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1431 | 1437 | */ |
---|
1432 | 1438 | |
---|
1433 | | - editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints); |
---|
1434 | | - editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints); |
---|
1435 | | - editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1436 | | - editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1439 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1440 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1441 | + |
---|
| 1442 | + if (Globals.ADVANCED) |
---|
| 1443 | + { |
---|
| 1444 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1445 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
| 1446 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1447 | + } |
---|
1437 | 1448 | |
---|
1438 | | - ctrlPanel.add(editBar); |
---|
| 1449 | + editBar.preferredHeight = 15; |
---|
| 1450 | + |
---|
| 1451 | + panel.add(editBar); |
---|
1439 | 1452 | |
---|
1440 | 1453 | /**/ |
---|
1441 | 1454 | //aConstraints.weighty = 0; |
---|
.. | .. |
---|
1445 | 1458 | //aConstraints.gridx += 1; |
---|
1446 | 1459 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1447 | 1460 | |
---|
1448 | | - JPanel colorPanel = new JPanel(new BorderLayout()); |
---|
1449 | | - colorPanel.setBorder(BorderFactory.createLineBorder(Color.black)); |
---|
1450 | | - |
---|
1451 | 1461 | cGridBag colorSection = new cGridBag().setVertical(true); |
---|
1452 | | - |
---|
1453 | | - colorPanel.add(colorSection); |
---|
1454 | 1462 | |
---|
1455 | 1463 | cGridBag color = new cGridBag(); |
---|
1456 | 1464 | color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
1457 | 1465 | colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1458 | 1466 | color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1467 | + //colorField.preferredWidth = 200; |
---|
1459 | 1468 | colorSection.add(color); |
---|
1460 | 1469 | |
---|
1461 | 1470 | cGridBag modulation = new cGridBag(); |
---|
.. | .. |
---|
1488 | 1497 | shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1489 | 1498 | colorSection.add(shadowbias); |
---|
1490 | 1499 | |
---|
1491 | | - ctrlPanel.add(colorPanel); |
---|
| 1500 | + panel.add(new JSeparator()); |
---|
| 1501 | + |
---|
| 1502 | + panel.add(colorSection); |
---|
1492 | 1503 | |
---|
1493 | 1504 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1494 | 1505 | |
---|
1495 | | - JPanel diffusePanel = new JPanel(new BorderLayout()); |
---|
1496 | | - diffusePanel.setBorder(BorderFactory.createLineBorder(Color.black)); |
---|
1497 | | - |
---|
1498 | 1506 | cGridBag diffuseSection = new cGridBag().setVertical(true); |
---|
1499 | | - |
---|
1500 | | - diffusePanel.add(diffuseSection); |
---|
1501 | 1507 | |
---|
1502 | 1508 | cGridBag diffuse = new cGridBag(); |
---|
1503 | 1509 | diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints); |
---|
.. | .. |
---|
1541 | 1547 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1542 | 1548 | diffuseSection.add(fakedepth); |
---|
1543 | 1549 | |
---|
1544 | | - ctrlPanel.add(diffusePanel); |
---|
| 1550 | + panel.add(new JSeparator()); |
---|
| 1551 | + |
---|
| 1552 | + panel.add(diffuseSection); |
---|
1545 | 1553 | |
---|
1546 | 1554 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1547 | 1555 | |
---|
1548 | | - JPanel specularPanel = new JPanel(new BorderLayout()); |
---|
1549 | | - specularPanel.setBorder(BorderFactory.createLineBorder(Color.black)); |
---|
1550 | | - |
---|
1551 | 1556 | cGridBag specularSection = new cGridBag().setVertical(true); |
---|
1552 | | - |
---|
1553 | | - specularPanel.add(specularSection); |
---|
1554 | 1557 | |
---|
1555 | 1558 | cGridBag specular = new cGridBag(); |
---|
1556 | 1559 | specular.add(specularLabel = new JLabel("Specular")); // , aConstraints); |
---|
.. | .. |
---|
1582 | 1585 | velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1583 | 1586 | specularSection.add(velvet); |
---|
1584 | 1587 | |
---|
1585 | | - shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
| 1588 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
1586 | 1589 | //Return(); |
---|
1587 | 1590 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1588 | 1591 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
.. | .. |
---|
1595 | 1598 | // aConstraints.gridwidth = 1; |
---|
1596 | 1599 | |
---|
1597 | 1600 | |
---|
1598 | | - ctrlPanel.add(specularPanel); |
---|
| 1601 | + panel.add(new JSeparator()); |
---|
| 1602 | + |
---|
| 1603 | + panel.add(specularSection); |
---|
1599 | 1604 | |
---|
1600 | 1605 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1601 | 1606 | |
---|
1602 | | - JPanel globalPanel = new JPanel(new BorderLayout()); |
---|
1603 | | - globalPanel.setBorder(BorderFactory.createLineBorder(Color.black)); |
---|
1604 | | - |
---|
1605 | 1607 | cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1606 | | - |
---|
1607 | | - globalPanel.add(globalSection); |
---|
1608 | 1608 | |
---|
1609 | 1609 | cGridBag camera = new cGridBag(); |
---|
1610 | 1610 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
.. | .. |
---|
1630 | 1630 | opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1631 | 1631 | globalSection.add(opacity); |
---|
1632 | 1632 | |
---|
1633 | | - ctrlPanel.add(globalPanel); |
---|
| 1633 | + panel.add(new JSeparator()); |
---|
| 1634 | + |
---|
| 1635 | + panel.add(globalSection); |
---|
1634 | 1636 | |
---|
1635 | 1637 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1636 | 1638 | |
---|
1637 | | - JPanel texturePanel = new JPanel(new BorderLayout()); |
---|
1638 | | - texturePanel.setBorder(BorderFactory.createLineBorder(Color.black)); |
---|
1639 | | - |
---|
1640 | 1639 | cGridBag textureSection = new cGridBag().setVertical(true); |
---|
1641 | | - |
---|
1642 | | - texturePanel.add(textureSection); |
---|
1643 | 1640 | |
---|
1644 | 1641 | cGridBag bump = new cGridBag(); |
---|
1645 | 1642 | bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints); |
---|
.. | .. |
---|
1677 | 1674 | opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
1678 | 1675 | textureSection.add(opacityPower); |
---|
1679 | 1676 | |
---|
1680 | | - ctrlPanel.add(texturePanel); |
---|
| 1677 | + panel.add(new JSeparator()); |
---|
| 1678 | + |
---|
| 1679 | + panel.add(textureSection); |
---|
1681 | 1680 | |
---|
1682 | 1681 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1683 | 1682 | |
---|
.. | .. |
---|
1714 | 1713 | opacityPowerField.addChangeListener(this); |
---|
1715 | 1714 | /**/ |
---|
1716 | 1715 | |
---|
1717 | | - resetSlidersButton.addActionListener(this); |
---|
1718 | 1716 | clearMaterialButton.addActionListener(this); |
---|
1719 | 1717 | createMaterialButton.addActionListener(this); |
---|
1720 | | - |
---|
1721 | | - propagateToggle.addItemListener(this); |
---|
1722 | | - multiplyToggle.addItemListener(this); |
---|
| 1718 | + |
---|
| 1719 | + if (Globals.ADVANCED) |
---|
| 1720 | + { |
---|
| 1721 | + resetSlidersButton.addActionListener(this); |
---|
| 1722 | + propagateToggle.addItemListener(this); |
---|
| 1723 | + multiplyToggle.addItemListener(this); |
---|
| 1724 | + } |
---|
1723 | 1725 | } |
---|
1724 | 1726 | |
---|
1725 | 1727 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
1890 | 1892 | |
---|
1891 | 1893 | //? flashIt = false; |
---|
1892 | 1894 | CameraPane pane = (CameraPane) cameraView; |
---|
1893 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1895 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1894 | 1896 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1895 | 1897 | |
---|
1896 | 1898 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
1939 | 1941 | e2.printStackTrace(); |
---|
1940 | 1942 | } |
---|
1941 | 1943 | } |
---|
| 1944 | + |
---|
1942 | 1945 | LoadJMEThread loadThread; |
---|
1943 | 1946 | |
---|
1944 | 1947 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
1996 | 1999 | //LoadFile0(filename, converter); |
---|
1997 | 2000 | } |
---|
1998 | 2001 | } |
---|
| 2002 | + |
---|
1999 | 2003 | LoadOBJThread loadObjThread; |
---|
2000 | 2004 | |
---|
2001 | 2005 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2074 | 2078 | |
---|
2075 | 2079 | void LoadObjFile(String fullname) |
---|
2076 | 2080 | { |
---|
2077 | | - /* |
---|
| 2081 | + System.out.println("Loading " + fullname); |
---|
| 2082 | + /**/ |
---|
2078 | 2083 | //lastFilename = fullname; |
---|
2079 | 2084 | if(loadObjThread == null) |
---|
2080 | 2085 | { |
---|
2081 | | - loadObjThread = new LoadOBJThread(); |
---|
2082 | | - loadObjThread.start(); |
---|
| 2086 | + loadObjThread = new LoadOBJThread(); |
---|
| 2087 | + loadObjThread.start(); |
---|
2083 | 2088 | } |
---|
2084 | 2089 | |
---|
2085 | 2090 | loadObjThread.add(fullname); |
---|
2086 | | - */ |
---|
| 2091 | + /**/ |
---|
2087 | 2092 | |
---|
2088 | | - System.out.println("Loading " + fullname); |
---|
2089 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2093 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2090 | 2094 | } |
---|
2091 | 2095 | |
---|
2092 | 2096 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2347 | 2351 | |
---|
2348 | 2352 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2349 | 2353 | { |
---|
2350 | | - if (GrafreeD.standAlone) |
---|
| 2354 | + if (Grafreed.standAlone) |
---|
2351 | 2355 | { |
---|
2352 | 2356 | /**/ |
---|
2353 | 2357 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2354 | | - browser.show(); |
---|
| 2358 | + browser.setVisible(true); |
---|
2355 | 2359 | String filename = browser.getFile(); |
---|
2356 | 2360 | if (filename != null && filename.length() > 0) |
---|
2357 | 2361 | { |
---|
.. | .. |
---|
2496 | 2500 | } |
---|
2497 | 2501 | if (input == null) |
---|
2498 | 2502 | { |
---|
| 2503 | + new Exception().printStackTrace(); |
---|
2499 | 2504 | System.exit(0); |
---|
2500 | 2505 | } |
---|
2501 | 2506 | |
---|
.. | .. |
---|
2710 | 2715 | return; |
---|
2711 | 2716 | } |
---|
2712 | 2717 | |
---|
2713 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2718 | + if (multiplyToggle != null) |
---|
| 2719 | + multiplyToggle.setSelected(mat.multiply); |
---|
2714 | 2720 | |
---|
2715 | 2721 | assert (object.projectedVertices != null); |
---|
2716 | 2722 | |
---|
.. | .. |
---|
2925 | 2931 | frame.validate(); |
---|
2926 | 2932 | |
---|
2927 | 2933 | return; |
---|
2928 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 2934 | + } else if (event.getSource() == toggleSwitchItem) |
---|
2929 | 2935 | { |
---|
2930 | | - cameraView.ToggleRandom(); |
---|
| 2936 | + cameraView.ToggleSwitch(); |
---|
2931 | 2937 | cameraView.repaint(); |
---|
2932 | 2938 | return; |
---|
2933 | 2939 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
2956 | 2962 | { |
---|
2957 | 2963 | copy.live ^= true; |
---|
2958 | 2964 | return; |
---|
| 2965 | + } else if (event.getSource() == selectCB) |
---|
| 2966 | + { |
---|
| 2967 | + copy.dontselect ^= true; |
---|
| 2968 | + return; |
---|
2959 | 2969 | } else if (event.getSource() == hideCB) |
---|
2960 | 2970 | { |
---|
2961 | 2971 | copy.hide ^= true; |
---|
.. | .. |
---|
2970 | 2980 | if (event.getSource() == randomCB) |
---|
2971 | 2981 | { |
---|
2972 | 2982 | copy.random ^= true; |
---|
| 2983 | + objEditor.refreshContents(); |
---|
2973 | 2984 | return; |
---|
2974 | 2985 | } |
---|
2975 | 2986 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
2993 | 3004 | |
---|
2994 | 3005 | public void actionPerformed(ActionEvent event) |
---|
2995 | 3006 | { |
---|
| 3007 | + Object source = event.getSource(); |
---|
2996 | 3008 | // SCRIPT DIALOG |
---|
2997 | | - if (event.getSource() == okbutton) |
---|
| 3009 | + if (source == okbutton) |
---|
2998 | 3010 | { |
---|
2999 | 3011 | textpanel.setVisible(false); |
---|
3000 | 3012 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3006 | 3018 | textarea = null; |
---|
3007 | 3019 | textpanel = null; |
---|
3008 | 3020 | } |
---|
3009 | | - if (event.getSource() == cancelbutton) |
---|
| 3021 | + if (source == cancelbutton) |
---|
3010 | 3022 | { |
---|
3011 | 3023 | textpanel.setVisible(false); |
---|
3012 | 3024 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3018 | 3030 | //applySelf(); |
---|
3019 | 3031 | //client.refreshEditWindow(); |
---|
3020 | 3032 | //refreshContents(); |
---|
3021 | | - if (event.getSource() == nameField) |
---|
| 3033 | + if (source == nameField) |
---|
3022 | 3034 | { |
---|
3023 | 3035 | //System.out.println("ObjEditor " + event); |
---|
3024 | 3036 | applySelf0(true); |
---|
3025 | 3037 | //parent.applySelf(); |
---|
3026 | 3038 | objEditor.refreshContents(); |
---|
3027 | | - } else if (event.getSource() == resetButton) |
---|
| 3039 | + } else if (source == resetButton) |
---|
3028 | 3040 | { |
---|
3029 | 3041 | CameraPane.fullreset = true; |
---|
3030 | 3042 | copy.Reset(); // ResetMeshes(); |
---|
3031 | 3043 | copy.Touch(); |
---|
3032 | 3044 | objEditor.refreshContents(); |
---|
3033 | | - } else if (event.getSource() == stepItem) |
---|
| 3045 | + } else if (source == stepItem) |
---|
3034 | 3046 | { |
---|
3035 | 3047 | //cameraView.ONESTEP = true; |
---|
3036 | 3048 | Globals.ONESTEP = true; |
---|
3037 | 3049 | cameraView.repaint(); |
---|
3038 | 3050 | return; |
---|
3039 | | - } else if (event.getSource() == stepButton) |
---|
| 3051 | + } else if (source == stepButton) |
---|
3040 | 3052 | { |
---|
3041 | 3053 | copy.Step(); |
---|
3042 | 3054 | copy.Touch(); |
---|
3043 | 3055 | objEditor.refreshContents(); |
---|
3044 | | - } else if (event.getSource() == slowerButton) |
---|
| 3056 | + } else if (source == slowerButton) |
---|
3045 | 3057 | { |
---|
3046 | 3058 | copy.Slower(); |
---|
3047 | 3059 | copy.Touch(); |
---|
3048 | 3060 | objEditor.refreshContents(); |
---|
3049 | | - } else if (event.getSource() == fasterButton) |
---|
| 3061 | + } else if (source == fasterButton) |
---|
3050 | 3062 | { |
---|
3051 | 3063 | copy.Faster(); |
---|
3052 | 3064 | copy.Touch(); |
---|
3053 | 3065 | objEditor.refreshContents(); |
---|
3054 | | - } else if (event.getSource() == remarkButton) |
---|
| 3066 | + } else if (source == remarkButton) |
---|
3055 | 3067 | { |
---|
3056 | 3068 | copy.Remark(); |
---|
3057 | 3069 | copy.Touch(); |
---|
3058 | 3070 | objEditor.refreshContents(); |
---|
3059 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3071 | + } else if (source == stepAllButton) |
---|
3060 | 3072 | { |
---|
3061 | 3073 | copy.StepAll(); |
---|
3062 | 3074 | copy.Touch(); |
---|
3063 | 3075 | objEditor.refreshContents(); |
---|
3064 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3076 | + } else if (source == resetAllButton) |
---|
3065 | 3077 | { |
---|
3066 | 3078 | //CameraPane.fullreset = true; |
---|
3067 | 3079 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3094 | 3106 | // Close(); |
---|
3095 | 3107 | // } |
---|
3096 | 3108 | // else |
---|
3097 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3109 | + if (source == resetSlidersButton) |
---|
3098 | 3110 | { |
---|
3099 | 3111 | ResetSliders(); |
---|
3100 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3112 | + } else if (source == clearMaterialButton) |
---|
3101 | 3113 | { |
---|
3102 | 3114 | ClearMaterial(); |
---|
3103 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3115 | + } else if (source == createMaterialButton) |
---|
3104 | 3116 | { |
---|
3105 | 3117 | CreateMaterial(); |
---|
3106 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3118 | + } else if (source == clearPanelButton) |
---|
3107 | 3119 | { |
---|
3108 | 3120 | copy.ClearUI(); |
---|
3109 | 3121 | refreshContents(true); |
---|
3110 | | - } /* |
---|
3111 | | - } |
---|
3112 | | - |
---|
3113 | | - public boolean action(Event event, Object arg) |
---|
3114 | | - { |
---|
3115 | | - */ else if (event.getSource() == closeItem) |
---|
| 3122 | + } else if (source == importGFDItem) |
---|
| 3123 | + { |
---|
| 3124 | + ImportGFD(); |
---|
| 3125 | + } else |
---|
| 3126 | + if (source == importVRMLX3DItem) |
---|
| 3127 | + { |
---|
| 3128 | + ImportVRMLX3D(); |
---|
| 3129 | + } else |
---|
| 3130 | + if (source == import3DSItem) |
---|
| 3131 | + { |
---|
| 3132 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3133 | + } else |
---|
| 3134 | + if (source == importOBJItem) |
---|
| 3135 | + { |
---|
| 3136 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3137 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3138 | + browser.setVisible(true); |
---|
| 3139 | + String filename = browser.getFile(); |
---|
| 3140 | + if (filename != null && filename.length() > 0) |
---|
| 3141 | + { |
---|
| 3142 | + String fullname = browser.getDirectory() + filename; |
---|
| 3143 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3144 | + } |
---|
| 3145 | + } else |
---|
| 3146 | + if (source == closeItem) |
---|
3116 | 3147 | { |
---|
3117 | 3148 | Close(); |
---|
3118 | 3149 | //return true; |
---|
3119 | | - } else if (event.getSource() == loadItem) |
---|
| 3150 | + } else if (source == loadItem) |
---|
3120 | 3151 | { |
---|
3121 | 3152 | load(); |
---|
3122 | 3153 | //return true; |
---|
3123 | | - } else if (event.getSource() == saveItem) |
---|
| 3154 | + } else if (source == newItem) |
---|
| 3155 | + { |
---|
| 3156 | + New(); |
---|
| 3157 | + } else if (source == saveItem) |
---|
3124 | 3158 | { |
---|
3125 | 3159 | save(); |
---|
3126 | 3160 | //return true; |
---|
3127 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3161 | + } else if (source == saveAsItem) |
---|
3128 | 3162 | { |
---|
3129 | 3163 | saveAs(); |
---|
3130 | 3164 | //return true; |
---|
3131 | | - } else if (event.getSource() == reexportItem) |
---|
| 3165 | + } else if (source == reexportItem) |
---|
3132 | 3166 | { |
---|
3133 | 3167 | reexport(); |
---|
3134 | 3168 | //return true; |
---|
3135 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3169 | + } else if (source == exportAsItem) |
---|
3136 | 3170 | { |
---|
3137 | 3171 | export(); |
---|
3138 | 3172 | //return true; |
---|
3139 | | - } else if (event.getSource() == povItem) |
---|
| 3173 | + } else if (source == povItem) |
---|
3140 | 3174 | { |
---|
3141 | 3175 | generatePOV(); |
---|
3142 | 3176 | //return true; |
---|
3143 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3177 | + } else if (source == zBufferItem) |
---|
3144 | 3178 | { |
---|
3145 | 3179 | try |
---|
3146 | 3180 | { |
---|
.. | .. |
---|
3162 | 3196 | cameraView.repaint(); |
---|
3163 | 3197 | //return true; |
---|
3164 | 3198 | } |
---|
3165 | | - */ else if (event.getSource() == editCameraItem) |
---|
3166 | | - { |
---|
3167 | | - cameraView.ProtectCamera(); |
---|
3168 | | - cameraView.repaint(); |
---|
3169 | | - return; |
---|
3170 | | - } else if (event.getSource() == revertCameraItem) |
---|
3171 | | - { |
---|
3172 | | - cameraView.RevertCamera(); |
---|
3173 | | - cameraView.repaint(); |
---|
3174 | | - return; |
---|
3175 | | -// } else if (event.getSource() == textureButton) |
---|
3176 | | -// { |
---|
3177 | | -// return; // true; |
---|
3178 | | - } else // combos... |
---|
3179 | | - if (event.getSource() == texresMenu) |
---|
| 3199 | + */ else // combos... |
---|
| 3200 | + if (source == texresMenu) |
---|
3180 | 3201 | { |
---|
3181 | 3202 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3182 | 3203 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3188 | 3209 | } |
---|
3189 | 3210 | } |
---|
3190 | 3211 | |
---|
| 3212 | + void New() |
---|
| 3213 | + { |
---|
| 3214 | + while (copy.Size() > 1) |
---|
| 3215 | + { |
---|
| 3216 | + copy.remove(1); |
---|
| 3217 | + } |
---|
| 3218 | + |
---|
| 3219 | + ResetModel(); |
---|
| 3220 | + objEditor.refreshContents(); |
---|
| 3221 | + } |
---|
| 3222 | + |
---|
| 3223 | + static public byte[] Compress(Object3D o) |
---|
| 3224 | + { |
---|
| 3225 | + try |
---|
| 3226 | + { |
---|
| 3227 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3228 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 3229 | + ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 3230 | + |
---|
| 3231 | + Object3D parent = o.parent; |
---|
| 3232 | + o.parent = null; |
---|
| 3233 | + |
---|
| 3234 | + out.writeObject(o); |
---|
| 3235 | + |
---|
| 3236 | + o.parent = parent; |
---|
| 3237 | + |
---|
| 3238 | + out.flush(); |
---|
| 3239 | + |
---|
| 3240 | + zstream.close(); |
---|
| 3241 | + out.close(); |
---|
| 3242 | + |
---|
| 3243 | + return baos.toByteArray(); |
---|
| 3244 | + } catch (Exception e) |
---|
| 3245 | + { |
---|
| 3246 | + System.err.println(e); |
---|
| 3247 | + return null; |
---|
| 3248 | + } |
---|
| 3249 | + } |
---|
| 3250 | + |
---|
| 3251 | + static public Object Uncompress(byte[] bytes) |
---|
| 3252 | + { |
---|
| 3253 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3254 | + try |
---|
| 3255 | + { |
---|
| 3256 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3257 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3258 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3259 | + Object obj = in.readObject(); |
---|
| 3260 | + in.close(); |
---|
| 3261 | + |
---|
| 3262 | + return obj; |
---|
| 3263 | + } catch (Exception e) |
---|
| 3264 | + { |
---|
| 3265 | + System.err.println(e); |
---|
| 3266 | + return null; |
---|
| 3267 | + } |
---|
| 3268 | + } |
---|
| 3269 | + |
---|
| 3270 | + static public Object clone(Object o) |
---|
| 3271 | + { |
---|
| 3272 | + try |
---|
| 3273 | + { |
---|
| 3274 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3275 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3276 | + |
---|
| 3277 | + out.writeObject(o); |
---|
| 3278 | + |
---|
| 3279 | + out.flush(); |
---|
| 3280 | + out.close(); |
---|
| 3281 | + |
---|
| 3282 | + byte[] bytes = baos.toByteArray(); |
---|
| 3283 | + |
---|
| 3284 | + System.out.println("clone = " + bytes.length); |
---|
| 3285 | + |
---|
| 3286 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3287 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3288 | + Object obj = in.readObject(); |
---|
| 3289 | + in.close(); |
---|
| 3290 | + |
---|
| 3291 | + return obj; |
---|
| 3292 | + } catch (Exception e) |
---|
| 3293 | + { |
---|
| 3294 | + System.err.println(e); |
---|
| 3295 | + return null; |
---|
| 3296 | + } |
---|
| 3297 | + } |
---|
| 3298 | + |
---|
| 3299 | + cRadio GetCurrentTab() |
---|
| 3300 | + { |
---|
| 3301 | + cRadio ab; |
---|
| 3302 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3303 | + { |
---|
| 3304 | + ab = (cRadio)e.nextElement(); |
---|
| 3305 | + if(ab.GetObject() == copy) |
---|
| 3306 | + { |
---|
| 3307 | + return ab; |
---|
| 3308 | + } |
---|
| 3309 | + } |
---|
| 3310 | + |
---|
| 3311 | + return null; |
---|
| 3312 | + } |
---|
| 3313 | + |
---|
| 3314 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3315 | + |
---|
| 3316 | + public void Save() |
---|
| 3317 | + { |
---|
| 3318 | + cRadio tab = GetCurrentTab(); |
---|
| 3319 | + |
---|
| 3320 | + boolean temp = CameraPane.SWITCH; |
---|
| 3321 | + CameraPane.SWITCH = false; |
---|
| 3322 | + |
---|
| 3323 | + copy.ExtractBigData(hashtable); |
---|
| 3324 | + |
---|
| 3325 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3326 | + tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3327 | + |
---|
| 3328 | + copy.RestoreBigData(hashtable); |
---|
| 3329 | + |
---|
| 3330 | + CameraPane.SWITCH = temp; |
---|
| 3331 | + |
---|
| 3332 | + //assert(hashtable.isEmpty()); |
---|
| 3333 | + |
---|
| 3334 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3335 | + { |
---|
| 3336 | + tab.graphs[i] = null; |
---|
| 3337 | + } |
---|
| 3338 | + |
---|
| 3339 | + // test save |
---|
| 3340 | + if (false) |
---|
| 3341 | + { |
---|
| 3342 | + try |
---|
| 3343 | + { |
---|
| 3344 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3345 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3346 | + |
---|
| 3347 | + p.writeObject(copy); |
---|
| 3348 | + |
---|
| 3349 | + p.flush(); |
---|
| 3350 | + |
---|
| 3351 | + ostream.close(); |
---|
| 3352 | + } catch (Exception e) |
---|
| 3353 | + { |
---|
| 3354 | + e.printStackTrace(); |
---|
| 3355 | + } |
---|
| 3356 | + } |
---|
| 3357 | + } |
---|
| 3358 | + |
---|
| 3359 | + void CopyChanged(Object3D obj) |
---|
| 3360 | + { |
---|
| 3361 | + boolean temp = CameraPane.SWITCH; |
---|
| 3362 | + CameraPane.SWITCH = false; |
---|
| 3363 | + |
---|
| 3364 | + copy.ExtractBigData(hashtable); |
---|
| 3365 | + |
---|
| 3366 | + copy.clear(); |
---|
| 3367 | + |
---|
| 3368 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3369 | + { |
---|
| 3370 | + copy.add(obj.get(i)); |
---|
| 3371 | + } |
---|
| 3372 | + |
---|
| 3373 | + copy.RestoreBigData(hashtable); |
---|
| 3374 | + |
---|
| 3375 | + CameraPane.SWITCH = temp; |
---|
| 3376 | + |
---|
| 3377 | + //assert(hashtable.isEmpty()); |
---|
| 3378 | + |
---|
| 3379 | + copy.Touch(); |
---|
| 3380 | + |
---|
| 3381 | + ResetModel(); |
---|
| 3382 | + copy.HardTouch(); // recompile? |
---|
| 3383 | + |
---|
| 3384 | + cRadio ab; |
---|
| 3385 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3386 | + { |
---|
| 3387 | + ab = (cRadio)e.nextElement(); |
---|
| 3388 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3389 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3390 | + if (test != null) |
---|
| 3391 | + { |
---|
| 3392 | + test.editWindow = ab.object.editWindow; |
---|
| 3393 | + ab.object = test; |
---|
| 3394 | + } |
---|
| 3395 | + } |
---|
| 3396 | + |
---|
| 3397 | + refreshContents(); |
---|
| 3398 | + } |
---|
| 3399 | + |
---|
| 3400 | + public void Undo() |
---|
| 3401 | + { |
---|
| 3402 | + cRadio tab = GetCurrentTab(); |
---|
| 3403 | + |
---|
| 3404 | + if (tab.undoindex == 0) |
---|
| 3405 | + { |
---|
| 3406 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3407 | + return; |
---|
| 3408 | + } |
---|
| 3409 | + |
---|
| 3410 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3411 | + { |
---|
| 3412 | + Save(); |
---|
| 3413 | + tab.undoindex -= 1; |
---|
| 3414 | + } |
---|
| 3415 | + |
---|
| 3416 | + tab.undoindex -= 1; |
---|
| 3417 | + |
---|
| 3418 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3419 | + } |
---|
| 3420 | + |
---|
| 3421 | + public void Redo() |
---|
| 3422 | + { |
---|
| 3423 | + cRadio tab = GetCurrentTab(); |
---|
| 3424 | + |
---|
| 3425 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3426 | + { |
---|
| 3427 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3428 | + return; |
---|
| 3429 | + } |
---|
| 3430 | + |
---|
| 3431 | + tab.undoindex += 1; |
---|
| 3432 | + |
---|
| 3433 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3434 | + } |
---|
| 3435 | + |
---|
| 3436 | + void ImportGFD() |
---|
| 3437 | + { |
---|
| 3438 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
| 3439 | + browser.show(); |
---|
| 3440 | + String filename = browser.getFile(); |
---|
| 3441 | + if (filename != null && filename.length() > 0) |
---|
| 3442 | + { |
---|
| 3443 | + String fullname = browser.getDirectory() + filename; |
---|
| 3444 | + |
---|
| 3445 | + //Object3D readobj = |
---|
| 3446 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3447 | + //makeSomething(readobj); |
---|
| 3448 | + } |
---|
| 3449 | + } |
---|
| 3450 | + |
---|
| 3451 | + void ImportVRMLX3D() |
---|
| 3452 | + { |
---|
| 3453 | + if (Grafreed.standAlone) |
---|
| 3454 | + { |
---|
| 3455 | + /**/ |
---|
| 3456 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3457 | + browser.show(); |
---|
| 3458 | + String filename = browser.getFile(); |
---|
| 3459 | + if (filename != null && filename.length() > 0) |
---|
| 3460 | + { |
---|
| 3461 | + String fullname = browser.getDirectory() + filename; |
---|
| 3462 | + LoadVRMLX3D(fullname); |
---|
| 3463 | + } |
---|
| 3464 | + /**/ |
---|
| 3465 | + } |
---|
| 3466 | + } |
---|
| 3467 | + |
---|
3191 | 3468 | void ToggleAnimation() |
---|
3192 | 3469 | { |
---|
3193 | 3470 | if (!Globals.ANIMATION) |
---|
3194 | 3471 | { |
---|
3195 | 3472 | FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
3196 | | - browser.show(); |
---|
| 3473 | + browser.setVisible(true); |
---|
3197 | 3474 | String filename = browser.getFile(); |
---|
3198 | 3475 | if (filename != null && filename.length() > 0) |
---|
3199 | 3476 | { |
---|
.. | .. |
---|
3203 | 3480 | |
---|
3204 | 3481 | Globals.ANIMATION ^= true; |
---|
3205 | 3482 | |
---|
3206 | | - GrafreeD.wav.cursor = 0; |
---|
3207 | | - GrafreeD.wav.loop = 0; |
---|
| 3483 | + Grafreed.wav.cursor = 0; |
---|
| 3484 | + Grafreed.wav.loop = 0; |
---|
3208 | 3485 | } |
---|
3209 | 3486 | } else |
---|
3210 | 3487 | { |
---|
.. | .. |
---|
3254 | 3531 | void CreateMaterial() |
---|
3255 | 3532 | { |
---|
3256 | 3533 | //copy.ClearMaterial(); // PATCH |
---|
3257 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3534 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3258 | 3535 | if (copy.selection.size() > 0) |
---|
3259 | 3536 | //SetMaterial(copy); |
---|
3260 | 3537 | { |
---|
.. | .. |
---|
3313 | 3590 | { |
---|
3314 | 3591 | copy.ResetBlockLoop(); // temporary problem |
---|
3315 | 3592 | |
---|
3316 | | - boolean random = CameraPane.RANDOM; |
---|
3317 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3593 | + boolean random = CameraPane.SWITCH; |
---|
| 3594 | + CameraPane.SWITCH = false; // parse everything |
---|
3318 | 3595 | copy.ResetDisplayList(); |
---|
3319 | 3596 | copy.HardTouch(); |
---|
3320 | | - CameraPane.RANDOM = random; |
---|
| 3597 | + CameraPane.SWITCH = random; |
---|
3321 | 3598 | } |
---|
3322 | 3599 | |
---|
3323 | 3600 | // public void applySelf() |
---|
.. | .. |
---|
3391 | 3668 | { |
---|
3392 | 3669 | //System.out.println("Propagate = " + propagate); |
---|
3393 | 3670 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3671 | + |
---|
| 3672 | + if (copy.material != null) |
---|
| 3673 | + { |
---|
| 3674 | + cMaterial mat = copy.material; |
---|
| 3675 | + |
---|
| 3676 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3677 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3678 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3679 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3680 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3681 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3682 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3683 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3684 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3685 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3686 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3687 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3688 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3689 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3690 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3691 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3692 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3693 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3694 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3695 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3696 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3697 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3698 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3699 | + } |
---|
| 3700 | + |
---|
3394 | 3701 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3395 | 3702 | { |
---|
3396 | 3703 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3435 | 3742 | || e.getSource() == apertureField |
---|
3436 | 3743 | || e.getSource() == shadowblurField) |
---|
3437 | 3744 | { |
---|
| 3745 | + new Exception().printStackTrace(); |
---|
3438 | 3746 | System.exit(0); |
---|
3439 | 3747 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3440 | 3748 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
3505 | 3813 | } |
---|
3506 | 3814 | |
---|
3507 | 3815 | if (normalpushField != null) |
---|
3508 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3816 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3509 | 3817 | } |
---|
3510 | 3818 | |
---|
3511 | 3819 | void SnapObject() |
---|
.. | .. |
---|
3769 | 4077 | |
---|
3770 | 4078 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3771 | 4079 | { |
---|
| 4080 | + Save(); |
---|
3772 | 4081 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3773 | 4082 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3774 | 4083 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
3972 | 4281 | } |
---|
3973 | 4282 | } |
---|
3974 | 4283 | } |
---|
| 4284 | + |
---|
3975 | 4285 | LoadGFDThread loadGFDThread; |
---|
3976 | 4286 | |
---|
3977 | 4287 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
3991 | 4301 | |
---|
3992 | 4302 | try |
---|
3993 | 4303 | { |
---|
| 4304 | + // Try compressed version first. |
---|
3994 | 4305 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
3995 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4306 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4307 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
3996 | 4308 | |
---|
3997 | 4309 | readobj = (Object3D) p.readObject(); |
---|
3998 | 4310 | istream.close(); |
---|
.. | .. |
---|
4000 | 4312 | readobj.ResetDisplayList(); |
---|
4001 | 4313 | } catch (Exception e) |
---|
4002 | 4314 | { |
---|
4003 | | - e.printStackTrace(); |
---|
| 4315 | + //e.printStackTrace(); |
---|
| 4316 | + try |
---|
| 4317 | + { |
---|
| 4318 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4319 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4320 | + |
---|
| 4321 | + readobj = (Object3D) p.readObject(); |
---|
| 4322 | + istream.close(); |
---|
| 4323 | + |
---|
| 4324 | + readobj.ResetDisplayList(); |
---|
| 4325 | + } catch (Exception e2) |
---|
| 4326 | + { |
---|
| 4327 | + e2.printStackTrace(); |
---|
| 4328 | + } |
---|
4004 | 4329 | } |
---|
4005 | 4330 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4006 | 4331 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4046 | 4371 | |
---|
4047 | 4372 | void LoadIt(Object obj) |
---|
4048 | 4373 | { |
---|
| 4374 | + if (obj == null) |
---|
| 4375 | + { |
---|
| 4376 | + // Invalid file |
---|
| 4377 | + return; |
---|
| 4378 | + } |
---|
| 4379 | + |
---|
4049 | 4380 | System.out.println("Loaded " + obj); |
---|
4050 | 4381 | //new Exception().printStackTrace(); |
---|
4051 | 4382 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4055 | 4386 | |
---|
4056 | 4387 | if (readobj != null) |
---|
4057 | 4388 | { |
---|
| 4389 | + Save(); |
---|
4058 | 4390 | try |
---|
4059 | 4391 | { |
---|
4060 | 4392 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4117 | 4449 | |
---|
4118 | 4450 | void load() // throws ClassNotFoundException |
---|
4119 | 4451 | { |
---|
4120 | | - if (GrafreeD.standAlone) |
---|
| 4452 | + if (Grafreed.standAlone) |
---|
4121 | 4453 | { |
---|
4122 | 4454 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4123 | 4455 | browser.show(); |
---|
.. | .. |
---|
4204 | 4536 | try |
---|
4205 | 4537 | { |
---|
4206 | 4538 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4207 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4539 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4540 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4208 | 4541 | |
---|
4209 | 4542 | p.writeObject(copy); |
---|
4210 | 4543 | p.flush(); |
---|
4211 | 4544 | |
---|
| 4545 | + zstream.close(); |
---|
4212 | 4546 | ostream.close(); |
---|
4213 | 4547 | |
---|
4214 | 4548 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4218 | 4552 | { |
---|
4219 | 4553 | } |
---|
4220 | 4554 | } |
---|
| 4555 | + |
---|
4221 | 4556 | String lastname; |
---|
4222 | 4557 | |
---|
4223 | 4558 | void saveAs() |
---|
4224 | 4559 | { |
---|
4225 | | - if (GrafreeD.standAlone) |
---|
| 4560 | + if (Grafreed.standAlone) |
---|
4226 | 4561 | { |
---|
4227 | 4562 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4228 | 4563 | browser.setVisible(true); |
---|
.. | .. |
---|
4327 | 4662 | try |
---|
4328 | 4663 | { |
---|
4329 | 4664 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4330 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4331 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4665 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4666 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4332 | 4667 | |
---|
4333 | 4668 | Object3D objectparent = obj.parent; |
---|
4334 | 4669 | obj.parent = null; |
---|
4335 | 4670 | |
---|
4336 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4671 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4337 | 4672 | |
---|
4338 | 4673 | obj.parent = objectparent; |
---|
4339 | 4674 | |
---|
.. | .. |
---|
4345 | 4680 | p.writeObject(object); |
---|
4346 | 4681 | p.flush(); |
---|
4347 | 4682 | |
---|
| 4683 | + zstream.close(); |
---|
4348 | 4684 | ostream.close(); |
---|
4349 | | - // zstream.close(); |
---|
4350 | 4685 | |
---|
4351 | 4686 | // group.selection.get(0).parent = parent; |
---|
4352 | 4687 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4367 | 4702 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4368 | 4703 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4369 | 4704 | copy.generatePOV(buffer); |
---|
4370 | | - if (GrafreeD.standAlone) |
---|
| 4705 | + if (Grafreed.standAlone) |
---|
4371 | 4706 | { |
---|
4372 | 4707 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4373 | 4708 | browser.show(); |
---|
.. | .. |
---|
4393 | 4728 | Object3D client; |
---|
4394 | 4729 | Object3D copy; |
---|
4395 | 4730 | MenuBar menuBar; |
---|
4396 | | - Menu windowMenu; |
---|
| 4731 | + Menu fileMenu; |
---|
| 4732 | + MenuItem newItem; |
---|
4397 | 4733 | MenuItem loadItem; |
---|
4398 | 4734 | MenuItem saveItem; |
---|
4399 | 4735 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4401 | 4737 | MenuItem reexportItem; |
---|
4402 | 4738 | MenuItem povItem; |
---|
4403 | 4739 | MenuItem closeItem; |
---|
4404 | | - Menu cameraMenu; |
---|
| 4740 | + |
---|
4405 | 4741 | CheckboxMenuItem zBufferItem; |
---|
4406 | 4742 | //MenuItem normalLensItem; |
---|
4407 | | - MenuItem editCameraItem; |
---|
4408 | | - MenuItem revertCameraItem; |
---|
4409 | | - CheckboxMenuItem toggleLiveItem; |
---|
4410 | 4743 | MenuItem stepItem; |
---|
| 4744 | + CheckboxMenuItem toggleLiveItem; |
---|
4411 | 4745 | CheckboxMenuItem toggleFullScreenItem; |
---|
4412 | 4746 | CheckboxMenuItem toggleTimelineItem; |
---|
4413 | 4747 | CheckboxMenuItem toggleRenderItem; |
---|
.. | .. |
---|
4416 | 4750 | CheckboxMenuItem toggleFootContactItem; |
---|
4417 | 4751 | CheckboxMenuItem toggleDLItem; |
---|
4418 | 4752 | CheckboxMenuItem toggleTextureItem; |
---|
4419 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4753 | + CheckboxMenuItem toggleSwitchItem; |
---|
4420 | 4754 | CheckboxMenuItem toggleRootItem; |
---|
4421 | 4755 | CheckboxMenuItem animationItem; |
---|
4422 | 4756 | CheckboxMenuItem toggleHandleItem; |
---|
.. | .. |
---|
4424 | 4758 | JSplitPane mainPanel; |
---|
4425 | 4759 | JScrollPane scrollpane; |
---|
4426 | 4760 | JPanel toolbarPanel; |
---|
4427 | | - JPanel treePanel; |
---|
| 4761 | + cGridBag treePanel; |
---|
4428 | 4762 | JPanel radioPanel; |
---|
4429 | 4763 | ButtonGroup buttonGroup; |
---|
4430 | 4764 | cGridBag ctrlPanel; |
---|
.. | .. |
---|
4553 | 4887 | //ObjectUI parent; |
---|
4554 | 4888 | |
---|
4555 | 4889 | cNumberSlider normalpushField; |
---|
| 4890 | + |
---|
| 4891 | + private MenuItem importGFDItem; |
---|
| 4892 | + private MenuItem importVRMLX3DItem; |
---|
| 4893 | + private MenuItem import3DSItem; |
---|
| 4894 | + private MenuItem importOBJItem; |
---|
4556 | 4895 | } |
---|