.. | .. |
---|
19 | 19 | import //weka.core. |
---|
20 | 20 | matrix.Matrix; |
---|
21 | 21 | |
---|
| 22 | +import grafeme.ui.*; |
---|
| 23 | + |
---|
22 | 24 | class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI, |
---|
23 | 25 | ActionListener, ChangeListener, |
---|
24 | 26 | InputMethodListener, |
---|
.. | .. |
---|
124 | 126 | void keyPressed(int key, int modifiers) |
---|
125 | 127 | { |
---|
126 | 128 | System.out.println("KEY PRESSED"); |
---|
127 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
128 | 130 | } |
---|
129 | 131 | */ |
---|
130 | 132 | |
---|
.. | .. |
---|
136 | 138 | public void closeUI() |
---|
137 | 139 | { |
---|
138 | 140 | //new Exception().printStackTrace(); |
---|
139 | | - System.out.println("this = " + this); |
---|
140 | | - System.out.println("objEditor = " + objEditor); |
---|
| 141 | +// System.out.println("this = " + this); |
---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
---|
141 | 143 | //nameField.removeActionListener(this); |
---|
142 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
---|
| 145 | + |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
143 | 147 | |
---|
144 | 148 | if (!GroupEditor.allparams) |
---|
145 | 149 | return; |
---|
146 | 150 | |
---|
147 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
148 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
149 | | - objEditor.ctrlPanel.remove(markCB); |
---|
150 | | - |
---|
151 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
152 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
153 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
154 | | - |
---|
155 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
156 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
157 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
158 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
159 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
160 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
161 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
162 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
163 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
164 | | - 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); |
---|
165 | 169 | |
---|
166 | | - Remove(normalpushField); |
---|
| 170 | + objEditor.ctrlPanel.remove(setupPanel); |
---|
| 171 | + objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 172 | + objEditor.ctrlPanel.remove(pushPanel); |
---|
| 173 | + //objEditor.ctrlPanel.remove(fillPanel); |
---|
| 174 | + |
---|
| 175 | + //Remove(normalpushField); |
---|
167 | 176 | } |
---|
168 | 177 | |
---|
169 | 178 | public ObjEditor GetEditor() |
---|
.. | .. |
---|
267 | 276 | void SetupMenu() |
---|
268 | 277 | { |
---|
269 | 278 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
270 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
271 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
272 | | - windowMenu.add("-"); |
---|
273 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
274 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
| 279 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 280 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 281 | + fileMenu.add(loadItem = new MenuItem("Load...")); |
---|
| 282 | + |
---|
| 283 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 284 | + Menu menu = new Menu("Import"); |
---|
| 285 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 286 | + importOBJItem.addActionListener(this); |
---|
| 287 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 288 | + import3DSItem.addActionListener(this); |
---|
| 289 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 290 | + importVRMLX3DItem.addActionListener(this); |
---|
| 291 | + menu.add("-"); |
---|
| 292 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 293 | + importGFDItem.addActionListener(this); |
---|
| 294 | + fileMenu.add(menu); |
---|
| 295 | + fileMenu.add("-"); |
---|
| 296 | + |
---|
| 297 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 298 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
275 | 299 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
276 | | - windowMenu.add("-"); |
---|
277 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
278 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
279 | | - windowMenu.add("-"); |
---|
| 300 | + fileMenu.add("-"); |
---|
| 301 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 302 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 303 | + fileMenu.add("-"); |
---|
280 | 304 | if (client.parent != null) |
---|
281 | 305 | { |
---|
282 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 306 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
283 | 307 | } else |
---|
284 | 308 | { |
---|
285 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 309 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
286 | 310 | } |
---|
287 | 311 | |
---|
| 312 | + newItem.addActionListener(this); |
---|
288 | 313 | loadItem.addActionListener(this); |
---|
289 | 314 | saveItem.addActionListener(this); |
---|
290 | 315 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
293 | 318 | //povItem.addActionListener(this); |
---|
294 | 319 | closeItem.addActionListener(this); |
---|
295 | 320 | |
---|
296 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
297 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
298 | | - //zBufferItem.addActionListener(this); |
---|
299 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
300 | | - //normalLensItem.addActionListener(this); |
---|
301 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
302 | | - revertCameraItem.addActionListener(this); |
---|
303 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
304 | | - toggleTimelineItem.addItemListener(this); |
---|
305 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
306 | | - toggleFullScreenItem.addItemListener(this); |
---|
307 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
308 | | - cameraMenu.add("-"); |
---|
309 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
310 | | - toggleTextureItem.addItemListener(this); |
---|
311 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
312 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
313 | | - toggleLiveItem.addItemListener(this); |
---|
314 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
315 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
316 | | - stepItem.addActionListener(this); |
---|
317 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
318 | | -// toggleDLItem.addItemListener(this); |
---|
319 | | -// toggleDLItem.setState(false); |
---|
320 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
321 | | - toggleRenderItem.addItemListener(this); |
---|
322 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
323 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
324 | | - toggleDebugItem.addItemListener(this); |
---|
325 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
326 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
327 | | - toggleFrustumItem.addItemListener(this); |
---|
328 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
329 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
330 | | - toggleFootContactItem.addItemListener(this); |
---|
331 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
332 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
333 | | - toggleRandomItem.addItemListener(this); |
---|
334 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
335 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
336 | | - toggleHandleItem.addItemListener(this); |
---|
337 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
338 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
339 | | - togglePaintItem.addItemListener(this); |
---|
340 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
341 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
342 | | -// toggleRootItem.addItemListener(this); |
---|
343 | | -// toggleRootItem.setState(false); |
---|
344 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
345 | | -// animationItem.addItemListener(this); |
---|
346 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
347 | | - cameraMenu.add("-"); |
---|
348 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
349 | | - editCameraItem.addActionListener(this); |
---|
350 | | - |
---|
351 | 321 | objectPanel = new JTabbedPane(); |
---|
352 | 322 | toolbarPanel = new JPanel(); |
---|
353 | 323 | toolbarPanel.setName("Toolbar"); |
---|
354 | | - treePanel = new JPanel(); |
---|
| 324 | + treePanel = new cGridBag(); |
---|
355 | 325 | treePanel.setName("Tree"); |
---|
356 | | - ctrlPanel = new JPanel(); // new GridBagLayout()); |
---|
| 326 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
357 | 327 | ctrlPanel.setName("Edit"); |
---|
358 | | - materialPanel = new JPanel(); |
---|
| 328 | + materialPanel = new cGridBag().setVertical(true); |
---|
359 | 329 | materialPanel.setName("Material"); |
---|
360 | 330 | /*JTextPane*/ |
---|
361 | 331 | infoarea = createTextPane(); |
---|
| 332 | + doc = infoarea.getStyledDocument(); |
---|
| 333 | + |
---|
362 | 334 | infoarea.setEditable(true); |
---|
363 | 335 | SetText(); |
---|
364 | 336 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
365 | 337 | // infoarea.setOpaque(false); |
---|
366 | 338 | // //infoarea.setForeground(textcolor); |
---|
367 | | - infoarea.setLineWrap(true); |
---|
368 | | - infoarea.setWrapStyleWord(true); |
---|
| 339 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 340 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
369 | 341 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
370 | 342 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
371 | 343 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
376 | 348 | mainPanel.setName("Main"); |
---|
377 | 349 | mainPanel.setContinuousLayout(true); |
---|
378 | 350 | mainPanel.setOneTouchExpandable(true); |
---|
379 | | - mainPanel.setDividerLocation(1.0); |
---|
380 | 351 | mainPanel.setDividerSize(9); |
---|
381 | | - mainPanel.setResizeWeight(0); |
---|
| 352 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 353 | + mainPanel.setResizeWeight(0.5); |
---|
382 | 354 | |
---|
383 | 355 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
384 | 356 | //mainPanel.setLayout(new GridBagLayout()); |
---|
385 | 357 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
386 | | - treePanel.setLayout(new GridBagLayout()); |
---|
387 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
388 | | - materialPanel.setLayout(new GridBagLayout()); |
---|
| 358 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 359 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 360 | + //materialPanel.setLayout(new GridBagLayout()); |
---|
389 | 361 | |
---|
390 | 362 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
391 | 363 | GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0); |
---|
.. | .. |
---|
424 | 396 | static String newline = "\n"; |
---|
425 | 397 | protected static final String buttonString = "JButton"; |
---|
426 | 398 | StyledDocument doc; |
---|
427 | | - JTextArea infoarea; |
---|
| 399 | + JTextPane infoarea; |
---|
428 | 400 | |
---|
429 | 401 | void ClearInfo() |
---|
430 | 402 | { |
---|
.. | .. |
---|
473 | 445 | //SendInfo("Name:", "bold"); |
---|
474 | 446 | if (sel.GetTextures() != null || debug) |
---|
475 | 447 | { |
---|
476 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 448 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
477 | 449 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
478 | 450 | if (sel.Size() > 0) |
---|
479 | 451 | { |
---|
480 | 452 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
481 | 453 | } |
---|
482 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 454 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
483 | 455 | if (debug) |
---|
484 | 456 | { |
---|
485 | 457 | try |
---|
.. | .. |
---|
491 | 463 | } |
---|
492 | 464 | |
---|
493 | 465 | if (full) |
---|
494 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 466 | + { |
---|
| 467 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 468 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 469 | + } |
---|
495 | 470 | |
---|
496 | 471 | if (sel.bRep != null) |
---|
497 | 472 | { |
---|
.. | .. |
---|
518 | 493 | } |
---|
519 | 494 | if (sel.support != null) |
---|
520 | 495 | { |
---|
521 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 496 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
522 | 497 | } |
---|
523 | 498 | if (sel.scriptnode != null) |
---|
524 | 499 | { |
---|
.. | .. |
---|
589 | 564 | { |
---|
590 | 565 | CameraPane.pointflow = (PointFlow) sel; |
---|
591 | 566 | } |
---|
| 567 | + |
---|
| 568 | + si.SendInfo("_____________________", "regular"); |
---|
| 569 | + si.SendInfo("", "regular"); |
---|
592 | 570 | } |
---|
593 | 571 | } |
---|
594 | 572 | |
---|
.. | .. |
---|
620 | 598 | cameraView.ToggleFullScreen(); |
---|
621 | 599 | } |
---|
622 | 600 | |
---|
623 | | - private JTextArea createTextPane() |
---|
| 601 | + private JTextPane createTextPane() |
---|
624 | 602 | { |
---|
625 | | - String[] initString = |
---|
626 | | - { |
---|
627 | | - "This is an editable JTextPane, ", //regular |
---|
628 | | - "another ", //italic |
---|
629 | | - "styled ", //bold |
---|
630 | | - "text ", //small |
---|
631 | | - "component, ", //large |
---|
632 | | - "which supports embedded components..." + newline,//regular |
---|
633 | | - " " + newline, //button |
---|
634 | | - "...and embedded icons..." + newline, //regular |
---|
635 | | - " ", //icon |
---|
636 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
637 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
638 | | - + "cover methods for interacting with those objects." |
---|
639 | | - }; |
---|
| 603 | +// TEXTAREA String[] initString = |
---|
| 604 | +// { |
---|
| 605 | +// "This is an editable JTextPane, ", //regular |
---|
| 606 | +// "another ", //italic |
---|
| 607 | +// "styled ", //bold |
---|
| 608 | +// "text ", //small |
---|
| 609 | +// "component, ", //large |
---|
| 610 | +// "which supports embedded components..." + newline,//regular |
---|
| 611 | +// " " + newline, //button |
---|
| 612 | +// "...and embedded icons..." + newline, //regular |
---|
| 613 | +// " ", //icon |
---|
| 614 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 615 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 616 | +// + "cover methods for interacting with those objects." |
---|
| 617 | +// }; |
---|
| 618 | +// |
---|
| 619 | +// String[] initStyles = |
---|
| 620 | +// { |
---|
| 621 | +// "regular", "italic", "bold", "small", "large", |
---|
| 622 | +// "regular", "button", "regular", "icon", |
---|
| 623 | +// "regular" |
---|
| 624 | +// }; |
---|
| 625 | +// |
---|
| 626 | +// JTextPane textPane = new JTextPane(); |
---|
| 627 | +// textPane.setEditable(true); |
---|
| 628 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 629 | +// addStylesToDocument(doc); |
---|
| 630 | +// |
---|
| 631 | +// try |
---|
| 632 | +// { |
---|
| 633 | +// for (int j = 0; j < 2; j++) |
---|
| 634 | +// { |
---|
| 635 | +// for (int i = 0; i < initString.length; i++) |
---|
| 636 | +// { |
---|
| 637 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 638 | +// doc.getStyle(initStyles[i])); |
---|
| 639 | +// } |
---|
| 640 | +// } |
---|
| 641 | +// } catch (BadLocationException ble) |
---|
| 642 | +// { |
---|
| 643 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 644 | +// } |
---|
640 | 645 | |
---|
641 | | - String[] initStyles = |
---|
642 | | - { |
---|
643 | | - "regular", "italic", "bold", "small", "large", |
---|
644 | | - "regular", "button", "regular", "icon", |
---|
645 | | - "regular" |
---|
646 | | - }; |
---|
647 | | - |
---|
648 | | - JTextPane textPane = new JTextPane(); |
---|
649 | | - textPane.setEditable(true); |
---|
650 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
651 | | - addStylesToDocument(doc); |
---|
652 | | - |
---|
653 | | - try |
---|
654 | | - { |
---|
655 | | - for (int j = 0; j < 2; j++) |
---|
656 | | - { |
---|
657 | | - for (int i = 0; i < initString.length; i++) |
---|
658 | | - { |
---|
659 | | - doc.insertString(doc.getLength(), initString[i], |
---|
660 | | - doc.getStyle(initStyles[i])); |
---|
661 | | - } |
---|
662 | | - } |
---|
663 | | - } catch (BadLocationException ble) |
---|
664 | | - { |
---|
665 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
666 | | - } |
---|
667 | | - |
---|
668 | | - return new JTextArea(); // textPane; |
---|
| 646 | + return new JTextPane(); // textPane; |
---|
669 | 647 | } |
---|
670 | 648 | |
---|
671 | 649 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
718 | 696 | protected static ImageIcon createImageIcon(String path, |
---|
719 | 697 | String description) |
---|
720 | 698 | { |
---|
721 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 699 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
722 | 700 | if (imgURL != null) |
---|
723 | 701 | { |
---|
724 | 702 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
750 | 728 | // NumberSlider vDivsField; |
---|
751 | 729 | // JCheckBox endcaps; |
---|
752 | 730 | JCheckBox liveCB; |
---|
| 731 | + JCheckBox selectCB; |
---|
753 | 732 | JCheckBox hideCB; |
---|
754 | 733 | JCheckBox link2masterCB; |
---|
755 | 734 | JCheckBox markCB; |
---|
.. | .. |
---|
765 | 744 | JButton slowerButton; |
---|
766 | 745 | JButton fasterButton; |
---|
767 | 746 | JButton remarkButton; |
---|
| 747 | + |
---|
| 748 | + cGridBag namePanel; |
---|
| 749 | + cGridBag setupPanel; |
---|
| 750 | + cGridBag commandsPanel; |
---|
| 751 | + cGridBag pushPanel; |
---|
| 752 | + cGridBag fillPanel; |
---|
768 | 753 | |
---|
769 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 754 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
770 | 755 | { |
---|
771 | 756 | JCheckBox cb; |
---|
772 | 757 | |
---|
773 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
774 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
775 | | -// oe.aConstraints.weightx = 1; |
---|
776 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
777 | | - oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 758 | + panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
778 | 759 | cb.addItemListener(this); |
---|
779 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
780 | | - oe.aConstraints.gridwidth = 1; |
---|
781 | | - oe.aConstraints.gridx += 1; |
---|
782 | 760 | |
---|
783 | 761 | return cb; |
---|
784 | 762 | } |
---|
785 | 763 | |
---|
786 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 764 | + cButton AddButton(cGridBag panel, String label) |
---|
787 | 765 | { |
---|
788 | 766 | cButton cb; |
---|
789 | 767 | |
---|
790 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
791 | | - oe.aConstraints.gridwidth = 1; |
---|
792 | | -// oe.aConstraints.weightx = 1; |
---|
793 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
794 | | - oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
| 768 | + panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
795 | 769 | cb.addActionListener(this); |
---|
796 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
797 | | - oe.aConstraints.gridwidth = 1; |
---|
798 | | - oe.aConstraints.gridx += 1; |
---|
799 | 770 | |
---|
800 | 771 | return cb; |
---|
801 | 772 | } |
---|
802 | 773 | |
---|
803 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 774 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
804 | 775 | { |
---|
805 | 776 | JComboBox combo; |
---|
806 | 777 | |
---|
807 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
808 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
809 | | - oe.aConstraints.gridx += 1; |
---|
| 778 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
810 | 779 | combo.addActionListener(this); |
---|
811 | 780 | |
---|
812 | 781 | return combo; |
---|
813 | 782 | } |
---|
814 | 783 | |
---|
815 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow) |
---|
| 784 | + cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow) |
---|
816 | 785 | { |
---|
817 | | - NumberSlider combo; |
---|
| 786 | + cGridBag control = new cGridBag(); |
---|
| 787 | + |
---|
| 788 | + cNumberSlider combo; |
---|
818 | 789 | |
---|
819 | 790 | JLabel jlabel = new JLabel(label); |
---|
820 | | - |
---|
821 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
822 | 791 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
823 | | - aConstraints.gridwidth = 1; |
---|
824 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
825 | | - aConstraints.gridx += 1; |
---|
826 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
827 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
828 | | - ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
829 | | - aConstraints.gridx += 1; |
---|
830 | | - aConstraints.gridwidth = 1; |
---|
831 | | - |
---|
| 792 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 793 | + control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
832 | 794 | combo.setFloat(current); |
---|
833 | | - |
---|
834 | | - combo.label = jlabel; |
---|
835 | | - |
---|
836 | | - combo.addChangeListener(this); |
---|
837 | | - |
---|
838 | | - return combo; |
---|
| 795 | + |
---|
| 796 | + panel.add(control); |
---|
| 797 | + |
---|
| 798 | + return control; |
---|
839 | 799 | } |
---|
840 | 800 | |
---|
841 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current) |
---|
| 801 | + cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current) |
---|
842 | 802 | { |
---|
843 | | - NumberSlider combo; |
---|
| 803 | + cGridBag control = new cGridBag(); |
---|
| 804 | + |
---|
| 805 | + cNumberSlider combo; |
---|
844 | 806 | |
---|
845 | 807 | JLabel jlabel = new JLabel(label); |
---|
846 | | - |
---|
847 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
848 | 808 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
849 | | - aConstraints.gridwidth = 2; |
---|
850 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
851 | | - aConstraints.gridx += 1; |
---|
852 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
853 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
854 | | - ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
855 | | - aConstraints.gridx += 1; |
---|
856 | | - aConstraints.gridwidth = 1; |
---|
857 | | - |
---|
| 809 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 810 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
858 | 811 | combo.setInteger(current); |
---|
859 | 812 | |
---|
860 | | - combo.label = jlabel; |
---|
861 | | - |
---|
862 | | - combo.addChangeListener(this); |
---|
863 | | - |
---|
864 | | - return combo; |
---|
| 813 | + panel.add(control); |
---|
| 814 | + |
---|
| 815 | + return control; |
---|
865 | 816 | } |
---|
866 | 817 | |
---|
867 | | - JTextArea AddText(JPanel ctrlPanel, String name) |
---|
| 818 | + JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
868 | 819 | { |
---|
869 | 820 | JTextArea text; |
---|
870 | 821 | |
---|
871 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
872 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
873 | | - ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 822 | + ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
874 | 823 | text.addCaretListener(this); |
---|
875 | | - aConstraints.gridx += 1; |
---|
876 | | - aConstraints.gridwidth = 1; |
---|
877 | 824 | |
---|
878 | 825 | return text; |
---|
879 | 826 | } |
---|
.. | .. |
---|
903 | 850 | objEditor.ctrlPanel.remove(j); |
---|
904 | 851 | } |
---|
905 | 852 | |
---|
| 853 | + void Remove(cNumberSlider j) |
---|
| 854 | + { |
---|
| 855 | + j.removeChangeListener(this); |
---|
| 856 | + //objEditor.ctrlPanel.remove(j.label); |
---|
| 857 | + objEditor.ctrlPanel.remove(j); |
---|
| 858 | + } |
---|
| 859 | + |
---|
906 | 860 | /* |
---|
907 | 861 | */ |
---|
908 | | - void Return() // ObjEditor oe) |
---|
| 862 | + void Return0() // ObjEditor oe) |
---|
909 | 863 | { |
---|
910 | 864 | aConstraints.gridy += 1; |
---|
911 | 865 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
960 | 914 | |
---|
961 | 915 | void SetupUI2(ObjEditor oe) |
---|
962 | 916 | { |
---|
963 | | -// oe.aConstraints.weightx = 0; |
---|
964 | | -// oe.aConstraints.weighty = 0; |
---|
965 | | -// oe.aConstraints.gridx = 0; |
---|
966 | | -// oe.aConstraints.gridy = 0; |
---|
967 | | - SetupName(oe); |
---|
| 917 | + //SetupName(oe); |
---|
| 918 | + |
---|
| 919 | + namePanel = new cGridBag(); |
---|
| 920 | + |
---|
| 921 | + nameField = AddText(namePanel, copy.GetName()); |
---|
| 922 | + namePanel.add(nameField); |
---|
| 923 | + oe.ctrlPanel.add(namePanel); |
---|
| 924 | + |
---|
| 925 | + oe.ctrlPanel.Return(); |
---|
968 | 926 | |
---|
969 | 927 | if (!GroupEditor.allparams) |
---|
970 | 928 | return; |
---|
971 | 929 | |
---|
972 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
973 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
974 | | - hideCB = AddCheckBox(oe, "Hide", copy.hide); |
---|
| 930 | + setupPanel = new cGridBag().setVertical(false); |
---|
| 931 | + |
---|
| 932 | + liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
| 933 | + liveCB.setToolTipText("Animate object"); |
---|
| 934 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 935 | + selectCB.setToolTipText("Make object selectable"); |
---|
975 | 936 | // Return(); |
---|
976 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
977 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
978 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
979 | | - Return(); |
---|
980 | | - resetButton = AddButton(oe, "Reset"); |
---|
981 | | - stepButton = AddButton(oe, "Step"); |
---|
| 937 | + hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 938 | + hideCB.setToolTipText("Hide object"); |
---|
| 939 | + markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
| 940 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 941 | + |
---|
| 942 | + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 943 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 944 | + |
---|
| 945 | + randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
| 946 | + randomCB.setToolTipText("Option for switch node"); |
---|
| 947 | + |
---|
| 948 | + if (Globals.ADVANCED) |
---|
| 949 | + { |
---|
| 950 | + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 951 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 952 | + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 953 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 954 | + } |
---|
| 955 | + |
---|
| 956 | + oe.ctrlPanel.add(setupPanel); |
---|
| 957 | + oe.ctrlPanel.Return(); |
---|
| 958 | + |
---|
| 959 | + commandsPanel = new cGridBag().setVertical(false); |
---|
| 960 | + |
---|
| 961 | + resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 962 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
| 963 | + stepButton = AddButton(commandsPanel, "Step"); |
---|
| 964 | + stepButton.setToolTipText("Step one frame"); |
---|
982 | 965 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
983 | 966 | // stepAllButton = AddButton(oe, "Step All"); |
---|
984 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
985 | 967 | // Return(); |
---|
986 | | - slowerButton = AddButton(oe, "Slow"); |
---|
987 | | - fasterButton = AddButton(oe, "Fast"); |
---|
988 | | - remarkButton = AddButton(oe, "Rem"); |
---|
| 968 | + slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 969 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
| 970 | + fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 971 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
| 972 | + remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 973 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
989 | 974 | |
---|
990 | | - Return(); |
---|
| 975 | + oe.ctrlPanel.add(commandsPanel); |
---|
| 976 | + oe.ctrlPanel.Return(); |
---|
991 | 977 | |
---|
992 | | - normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
---|
993 | | - Return(); |
---|
| 978 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
| 979 | + normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
| 980 | + //Return(); |
---|
| 981 | + |
---|
| 982 | + oe.ctrlPanel.Return(); |
---|
994 | 983 | |
---|
995 | 984 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
996 | 985 | // ObjEditor.aConstraints.gridx += 1; |
---|
.. | .. |
---|
1085 | 1074 | oe.aConstraints.gridwidth = 1; |
---|
1086 | 1075 | /**/ |
---|
1087 | 1076 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1088 | | - Return(); |
---|
| 1077 | + oe.ctrlPanel.Return(); |
---|
1089 | 1078 | |
---|
1090 | 1079 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1091 | 1080 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1187 | 1176 | //JPanel worldPanel = |
---|
1188 | 1177 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1189 | 1178 | //worldPanel.setName("World"); |
---|
1190 | | - centralPanel = new JPanel(new BorderLayout()); |
---|
| 1179 | + centralPanel = new cGridBag(); |
---|
| 1180 | + centralPanel.preferredWidth = 20; |
---|
1191 | 1181 | timelinePanel = new JPanel(new BorderLayout()); |
---|
1192 | 1182 | timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1193 | 1183 | |
---|
.. | .. |
---|
1217 | 1207 | //frontView.object = copy; |
---|
1218 | 1208 | //sideView.object = copy; |
---|
1219 | 1209 | |
---|
1220 | | - XYZPanel = new JPanel(); |
---|
1221 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1210 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1211 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1222 | 1212 | |
---|
1223 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1224 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1225 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1213 | + XYZPanel.preferredWidth = 5; |
---|
| 1214 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
| 1215 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
| 1216 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1226 | 1217 | |
---|
1227 | 1218 | /* |
---|
1228 | 1219 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1260 | 1251 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1261 | 1252 | //tmp.setName("Edit"); |
---|
1262 | 1253 | objectPanel.add(materialPanel); |
---|
1263 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1264 | | - north.setName("Edit"); |
---|
1265 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1266 | | - objectPanel.add(north); |
---|
| 1254 | +// JPanel north = new JPanel(new BorderLayout()); |
---|
| 1255 | +// north.setName("Edit"); |
---|
| 1256 | +// north.add(ctrlPanel, BorderLayout.NORTH); |
---|
| 1257 | +// objectPanel.add(north); |
---|
| 1258 | + objectPanel.add(ctrlPanel); |
---|
1267 | 1259 | objectPanel.add(infoPanel); |
---|
1268 | 1260 | |
---|
1269 | 1261 | /* |
---|
.. | .. |
---|
1284 | 1276 | scrollpane.setWheelScrollingEnabled(true); |
---|
1285 | 1277 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1286 | 1278 | |
---|
1287 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
1288 | | - scenePanel.add(scrollpane); |
---|
| 1279 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1280 | + scenePanel.preferredWidth = 6; |
---|
| 1281 | + |
---|
| 1282 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1283 | + tabbedPane.add(scrollpane); |
---|
1289 | 1284 | |
---|
1290 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
| 1285 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1291 | 1286 | |
---|
1292 | | - optionsPanel = new JPanel(new GridBagLayout()); |
---|
| 1287 | + optionsPanel = new cGridBag().setVertical(true); |
---|
1293 | 1288 | |
---|
1294 | 1289 | optionsPanel.setName("Options"); |
---|
1295 | | - scenePanel.add(optionsPanel); |
---|
1296 | | - |
---|
| 1290 | + |
---|
| 1291 | + AddOptions(optionsPanel); //, aConstraints); |
---|
| 1292 | + |
---|
| 1293 | + tabbedPane.add(optionsPanel); |
---|
| 1294 | + |
---|
| 1295 | + scenePanel.add(tabbedPane); |
---|
1297 | 1296 | |
---|
1298 | 1297 | /* |
---|
1299 | 1298 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1327 | 1326 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1328 | 1327 | //bigPanel.add(ctrlPanel); |
---|
1329 | 1328 | //bigPanel.add(gridPanel); |
---|
| 1329 | + /** |
---|
1330 | 1330 | bigThree = new JPanel(); |
---|
1331 | 1331 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1332 | 1332 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1350 | 1350 | // aConstraints.gridheight = 3; |
---|
1351 | 1351 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1352 | 1352 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1353 | + /**/ |
---|
1353 | 1354 | |
---|
| 1355 | + bigThree = new cGridBag(); |
---|
| 1356 | + bigThree.addComponent(scenePanel); |
---|
| 1357 | + bigThree.addComponent(centralPanel); |
---|
| 1358 | + bigThree.addComponent(XYZPanel); |
---|
| 1359 | + |
---|
1354 | 1360 | // // SIDE EFFECT!!! |
---|
1355 | 1361 | // aConstraints.gridx = 0; |
---|
1356 | 1362 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1377 | 1383 | |
---|
1378 | 1384 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1379 | 1385 | |
---|
1380 | | - frame.setSize(1024, 768); |
---|
1381 | | - frame.show(); |
---|
| 1386 | + frame.setSize(1280, 860); |
---|
| 1387 | + frame.setVisible(true); |
---|
1382 | 1388 | |
---|
1383 | 1389 | gridPanel.setDividerLocation(1.0); |
---|
1384 | 1390 | |
---|
.. | .. |
---|
1393 | 1399 | }); |
---|
1394 | 1400 | } |
---|
1395 | 1401 | |
---|
| 1402 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 1403 | + { |
---|
| 1404 | + } |
---|
| 1405 | + |
---|
1396 | 1406 | JTree GetTree() |
---|
1397 | 1407 | { |
---|
1398 | 1408 | return objEditor.jTree; |
---|
.. | .. |
---|
1404 | 1414 | ctrlPanel.removeAll(); |
---|
1405 | 1415 | } |
---|
1406 | 1416 | |
---|
1407 | | - void SetupMaterial(JPanel ctrlPanel) |
---|
| 1417 | + void SetupMaterial(cGridBag panel) |
---|
1408 | 1418 | { |
---|
1409 | | - aConstraints.weighty = 0; |
---|
1410 | | - //aConstraints.weightx = 1; |
---|
1411 | | - /* |
---|
| 1419 | + /* |
---|
1412 | 1420 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1413 | 1421 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1414 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1415 | | - aConstraints.gridx += 1; |
---|
1416 | 1422 | */ |
---|
1417 | 1423 | |
---|
1418 | | - aConstraints.gridwidth = 1; |
---|
1419 | | - ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints); |
---|
1420 | | - aConstraints.gridx += 1; |
---|
1421 | | - aConstraints.weighty = 0; |
---|
1422 | | - aConstraints.gridwidth = 1; |
---|
| 1424 | + cGridBag editBar = new cGridBag().setVertical(false); |
---|
| 1425 | + |
---|
| 1426 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1427 | + createMaterialButton.setToolTipText("Create material"); |
---|
1423 | 1428 | |
---|
1424 | 1429 | /* |
---|
1425 | 1430 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1426 | | - aConstraints.gridx += 1; |
---|
1427 | | - aConstraints.weighty = 0; |
---|
1428 | | - aConstraints.gridwidth = 1; |
---|
1429 | 1431 | */ |
---|
1430 | 1432 | |
---|
1431 | | - ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints); |
---|
1432 | | - aConstraints.gridx += 1; |
---|
| 1433 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1434 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1435 | + |
---|
| 1436 | + if (Globals.ADVANCED) |
---|
| 1437 | + { |
---|
| 1438 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1439 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
| 1440 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1441 | + } |
---|
1433 | 1442 | |
---|
1434 | | - ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints); |
---|
1435 | | - |
---|
1436 | | - aConstraints.gridx += 1; |
---|
1437 | | - |
---|
1438 | | - ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints); |
---|
1439 | | - |
---|
1440 | | - aConstraints.gridx += 1; |
---|
1441 | | - |
---|
1442 | | - ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints); |
---|
1443 | | - |
---|
1444 | | - aConstraints.gridx = 0; |
---|
1445 | | - aConstraints.gridy += 1; |
---|
1446 | | - aConstraints.weighty = 0; |
---|
1447 | | - aConstraints.gridwidth = 1; |
---|
| 1443 | + editBar.preferredHeight = 15; |
---|
| 1444 | + |
---|
| 1445 | + panel.add(editBar); |
---|
| 1446 | + |
---|
1448 | 1447 | /**/ |
---|
1449 | 1448 | //aConstraints.weighty = 0; |
---|
1450 | 1449 | ////aConstraints.weightx = 1; |
---|
1451 | 1450 | //aConstraints.weighty = 1; |
---|
1452 | 1451 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1453 | 1452 | //aConstraints.gridx += 1; |
---|
1454 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1455 | | - aConstraints.weighty = 0; |
---|
1456 | | - aConstraints.gridx = 0; |
---|
1457 | | - aConstraints.gridy += 1; |
---|
1458 | | - aConstraints.gridwidth = 1; |
---|
| 1453 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1459 | 1454 | |
---|
1460 | | - ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints); |
---|
1461 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1462 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1463 | | - aConstraints.gridx += 1; |
---|
1464 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1465 | | - //aConstraints.weightx = 0; |
---|
1466 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1467 | | - aConstraints.gridx = 0; |
---|
1468 | | - aConstraints.gridy += 1; |
---|
1469 | | - aConstraints.gridwidth = 1; |
---|
| 1455 | + cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 1456 | + |
---|
| 1457 | + cGridBag color = new cGridBag(); |
---|
| 1458 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 1459 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1460 | + color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1461 | + //colorField.preferredWidth = 200; |
---|
| 1462 | + colorSection.add(color); |
---|
1470 | 1463 | |
---|
1471 | | - ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints); |
---|
1472 | | - modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1474 | | - aConstraints.gridx += 1; |
---|
1475 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1476 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1477 | | - aConstraints.gridx = 0; |
---|
1478 | | - aConstraints.gridy += 1; |
---|
1479 | | - aConstraints.gridwidth = 1; |
---|
| 1464 | + cGridBag modulation = new cGridBag(); |
---|
| 1465 | + modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
| 1466 | + modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1467 | + modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1468 | + colorSection.add(modulation); |
---|
1480 | 1469 | |
---|
1481 | | - ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints); |
---|
1482 | | - textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1483 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1484 | | - aConstraints.gridx += 1; |
---|
1485 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1486 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1487 | | - aConstraints.gridx = 0; |
---|
1488 | | - aConstraints.gridy += 1; |
---|
1489 | | - aConstraints.gridwidth = 1; |
---|
| 1470 | + cGridBag texture = new cGridBag(); |
---|
| 1471 | + texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
| 1472 | + textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1473 | + texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1474 | + colorSection.add(texture); |
---|
1490 | 1475 | |
---|
1491 | | - ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints); |
---|
1492 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1493 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1494 | | - aConstraints.gridx += 1; |
---|
1495 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1496 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1497 | | - aConstraints.gridx = 0; |
---|
1498 | | - aConstraints.gridy += 1; |
---|
1499 | | - aConstraints.gridwidth = 1; |
---|
| 1476 | + cGridBag anisoU = new cGridBag(); |
---|
| 1477 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1478 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1479 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1480 | + colorSection.add(anisoU); |
---|
1500 | 1481 | |
---|
1501 | | - ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints); |
---|
1502 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1503 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1504 | | - aConstraints.gridx += 1; |
---|
1505 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1506 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1507 | | - aConstraints.gridx = 0; |
---|
1508 | | - aConstraints.gridy += 1; |
---|
1509 | | - aConstraints.gridwidth = 1; |
---|
| 1482 | + cGridBag anisoV = new cGridBag(); |
---|
| 1483 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1484 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1485 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1486 | + colorSection.add(anisoV); |
---|
1510 | 1487 | |
---|
1511 | | - ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints); |
---|
1512 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1513 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1514 | | - aConstraints.gridx += 1; |
---|
1515 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1516 | | - ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1517 | | - aConstraints.gridx = 0; |
---|
1518 | | - aConstraints.gridy += 1; |
---|
1519 | | - aConstraints.gridwidth = 1; |
---|
| 1488 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1489 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1490 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1491 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1492 | + colorSection.add(shadowbias); |
---|
1520 | 1493 | |
---|
1521 | | - //aConstraints.weighty = 1; |
---|
1522 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1523 | | - //aConstraints.gridx += 1; |
---|
1524 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1525 | | - aConstraints.weighty = 0; |
---|
1526 | | - aConstraints.gridx = 0; |
---|
1527 | | - aConstraints.gridy += 1; |
---|
1528 | | - aConstraints.gridwidth = 1; |
---|
| 1494 | + panel.add(new JSeparator()); |
---|
| 1495 | + |
---|
| 1496 | + panel.add(colorSection); |
---|
| 1497 | + |
---|
| 1498 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1499 | + |
---|
| 1500 | + cGridBag diffuseSection = new cGridBag().setVertical(true); |
---|
| 1501 | + |
---|
| 1502 | + cGridBag diffuse = new cGridBag(); |
---|
| 1503 | + diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints); |
---|
| 1504 | + diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1505 | + diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1506 | + diffuseSection.add(diffuse); |
---|
1529 | 1507 | |
---|
1530 | | - ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints); |
---|
1531 | | - diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1532 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1533 | | - aConstraints.gridx += 1; |
---|
1534 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1535 | | - ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1536 | | - aConstraints.gridx = 0; |
---|
1537 | | - aConstraints.gridy += 1; |
---|
1538 | | - aConstraints.gridwidth = 1; |
---|
| 1508 | + cGridBag diffuseness = new cGridBag(); |
---|
| 1509 | + diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints); |
---|
| 1510 | + diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1511 | + diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1512 | + diffuseSection.add(diffuseness); |
---|
1539 | 1513 | |
---|
1540 | | - ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints); |
---|
1541 | | - diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1542 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1543 | | - aConstraints.gridx += 1; |
---|
1544 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1545 | | - ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1546 | | - aConstraints.gridx = 0; |
---|
1547 | | - aConstraints.gridy += 1; |
---|
1548 | | - aConstraints.gridwidth = 1; |
---|
| 1514 | + cGridBag selfshadow = new cGridBag(); |
---|
| 1515 | + selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints); |
---|
| 1516 | + selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1517 | + selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1518 | + diffuseSection.add(selfshadow); |
---|
1549 | 1519 | |
---|
1550 | | - ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints); |
---|
1551 | | - selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1552 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1553 | | - aConstraints.gridx += 1; |
---|
1554 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1555 | | - ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1556 | | - aConstraints.gridx = 0; |
---|
1557 | | - aConstraints.gridy += 1; |
---|
1558 | | - aConstraints.gridwidth = 1; |
---|
| 1520 | + cGridBag sheen = new cGridBag(); |
---|
| 1521 | + sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints); |
---|
| 1522 | + sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1523 | + sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1524 | + diffuseSection.add(sheen); |
---|
1559 | 1525 | |
---|
1560 | | - ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints); |
---|
1561 | | - sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1562 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1563 | | - aConstraints.gridx += 1; |
---|
1564 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1565 | | - ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1566 | | - aConstraints.gridx = 0; |
---|
1567 | | - aConstraints.gridy += 1; |
---|
1568 | | - aConstraints.gridwidth = 1; |
---|
| 1526 | + cGridBag subsurface = new cGridBag(); |
---|
| 1527 | + subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints); |
---|
| 1528 | + subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1529 | + subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1530 | + diffuseSection.add(subsurface); |
---|
1569 | 1531 | |
---|
1570 | | - ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints); |
---|
1571 | | - subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1572 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1573 | | - aConstraints.gridx += 1; |
---|
1574 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1575 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1576 | | - aConstraints.gridx = 0; |
---|
1577 | | - aConstraints.gridy += 1; |
---|
1578 | | - aConstraints.gridwidth = 1; |
---|
| 1532 | + cGridBag shadow = new cGridBag(); |
---|
| 1533 | + shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints); |
---|
| 1534 | + shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1535 | + shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1536 | + diffuseSection.add(shadow); |
---|
1579 | 1537 | |
---|
1580 | | - ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints); |
---|
1581 | | - shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1582 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1583 | | - aConstraints.gridx += 1; |
---|
1584 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1585 | | - ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1586 | | - aConstraints.gridx = 0; |
---|
1587 | | - aConstraints.gridy += 1; |
---|
1588 | | - aConstraints.gridwidth = 1; |
---|
| 1538 | + cGridBag fakedepth = new cGridBag(); |
---|
| 1539 | + fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints); |
---|
| 1540 | + fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1541 | + fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1542 | + diffuseSection.add(fakedepth); |
---|
1589 | 1543 | |
---|
1590 | | - ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints); |
---|
1591 | | - fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1592 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1593 | | - aConstraints.gridx += 1; |
---|
1594 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1595 | | - ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1596 | | - aConstraints.gridx = 0; |
---|
1597 | | - aConstraints.gridy += 1; |
---|
1598 | | - aConstraints.gridwidth = 1; |
---|
| 1544 | + panel.add(new JSeparator()); |
---|
| 1545 | + |
---|
| 1546 | + panel.add(diffuseSection); |
---|
| 1547 | + |
---|
| 1548 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1549 | + |
---|
| 1550 | + cGridBag specularSection = new cGridBag().setVertical(true); |
---|
1599 | 1551 | |
---|
1600 | | - //aConstraints.weighty = 1; |
---|
1601 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1602 | | - //aConstraints.gridx += 1; |
---|
1603 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1604 | | - aConstraints.weighty = 0; |
---|
1605 | | - aConstraints.gridx = 0; |
---|
1606 | | - aConstraints.gridy += 1; |
---|
1607 | | - aConstraints.gridwidth = 1; |
---|
| 1552 | + cGridBag specular = new cGridBag(); |
---|
| 1553 | + specular.add(specularLabel = new JLabel("Specular")); // , aConstraints); |
---|
| 1554 | + specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1555 | + specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1556 | + specularSection.add(specular); |
---|
1608 | 1557 | |
---|
1609 | | - ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints); |
---|
1610 | | - specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1611 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1612 | | - aConstraints.gridx += 1; |
---|
1613 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1614 | | - ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1615 | | - aConstraints.gridx = 0; |
---|
1616 | | - aConstraints.gridy += 1; |
---|
1617 | | - aConstraints.gridwidth = 1; |
---|
| 1558 | + cGridBag lightarea = new cGridBag(); |
---|
| 1559 | + lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints); |
---|
| 1560 | + lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1561 | + lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1562 | + specularSection.add(lightarea); |
---|
1618 | 1563 | |
---|
1619 | | - ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints); |
---|
1620 | | - lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1621 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1622 | | - aConstraints.gridx += 1; |
---|
1623 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1624 | | - ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1625 | | - aConstraints.gridx = 0; |
---|
1626 | | - aConstraints.gridy += 1; |
---|
1627 | | - aConstraints.gridwidth = 1; |
---|
| 1564 | + cGridBag shininess = new cGridBag(); |
---|
| 1565 | + shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints); |
---|
| 1566 | + shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1567 | + shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1568 | + specularSection.add(shininess); |
---|
1628 | 1569 | |
---|
1629 | | - ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints); |
---|
1630 | | - shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1631 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1632 | | - aConstraints.gridx += 1; |
---|
1633 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1634 | | - ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1635 | | - aConstraints.gridx = 0; |
---|
1636 | | - aConstraints.gridy += 1; |
---|
1637 | | - aConstraints.gridwidth = 1; |
---|
| 1570 | + cGridBag metalness = new cGridBag(); |
---|
| 1571 | + metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints); |
---|
| 1572 | + metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1573 | + metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1574 | + specularSection.add(metalness); |
---|
1638 | 1575 | |
---|
1639 | | - ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints); |
---|
1640 | | - metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1641 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1642 | | - aConstraints.gridx += 1; |
---|
1643 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1644 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1645 | | - aConstraints.gridx = 0; |
---|
1646 | | - aConstraints.gridy += 1; |
---|
1647 | | - aConstraints.gridwidth = 1; |
---|
| 1576 | + cGridBag velvet = new cGridBag(); |
---|
| 1577 | + velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints); |
---|
| 1578 | + velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1579 | + velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1580 | + specularSection.add(velvet); |
---|
1648 | 1581 | |
---|
1649 | | - ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints); |
---|
1650 | | - velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1651 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1652 | | - aConstraints.gridx += 1; |
---|
1653 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1654 | | - ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1655 | | - aConstraints.gridx = 0; |
---|
1656 | | - aConstraints.gridy += 1; |
---|
1657 | | - aConstraints.gridwidth = 1; |
---|
1658 | | - |
---|
1659 | | - shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
1660 | | - Return(); |
---|
| 1582 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
| 1583 | + //Return(); |
---|
1661 | 1584 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1662 | 1585 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1663 | 1586 | // aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
1668 | 1591 | // aConstraints.gridy += 1; |
---|
1669 | 1592 | // aConstraints.gridwidth = 1; |
---|
1670 | 1593 | |
---|
1671 | | - //aConstraints.weighty = 1; |
---|
1672 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1673 | | - //aConstraints.gridx += 1; |
---|
1674 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1675 | | - aConstraints.weighty = 0; |
---|
1676 | | - aConstraints.gridx = 0; |
---|
1677 | | - aConstraints.gridy += 1; |
---|
1678 | | - aConstraints.gridwidth = 1; |
---|
1679 | 1594 | |
---|
1680 | | - ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints); |
---|
1681 | | - cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1682 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1683 | | - aConstraints.gridx += 1; |
---|
1684 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1685 | | - ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1686 | | - aConstraints.gridx = 0; |
---|
1687 | | - aConstraints.gridy += 1; |
---|
1688 | | - aConstraints.gridwidth = 1; |
---|
| 1595 | + panel.add(new JSeparator()); |
---|
| 1596 | + |
---|
| 1597 | + panel.add(specularSection); |
---|
| 1598 | + |
---|
| 1599 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1600 | + |
---|
| 1601 | + cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1689 | 1602 | |
---|
1690 | | - ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints); |
---|
1691 | | - ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1692 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1693 | | - aConstraints.gridx += 1; |
---|
1694 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1695 | | - ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1696 | | - aConstraints.gridx = 0; |
---|
1697 | | - aConstraints.gridy += 1; |
---|
1698 | | - aConstraints.gridwidth = 1; |
---|
| 1603 | + cGridBag camera = new cGridBag(); |
---|
| 1604 | + camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
| 1605 | + cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1606 | + camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1607 | + globalSection.add(camera); |
---|
1699 | 1608 | |
---|
1700 | | - ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints); |
---|
1701 | | - backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1702 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1703 | | - aConstraints.gridx += 1; |
---|
1704 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1705 | | - ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1706 | | - aConstraints.gridx = 0; |
---|
1707 | | - aConstraints.gridy += 1; |
---|
1708 | | - aConstraints.gridwidth = 1; |
---|
| 1609 | + cGridBag ambient = new cGridBag(); |
---|
| 1610 | + ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
| 1611 | + ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1612 | + ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1613 | + globalSection.add(ambient); |
---|
1709 | 1614 | |
---|
1710 | | - ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints); |
---|
1711 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1712 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1713 | | - aConstraints.gridx += 1; |
---|
1714 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1715 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1716 | | - aConstraints.gridx = 0; |
---|
1717 | | - aConstraints.gridy += 1; |
---|
1718 | | - aConstraints.gridwidth = 1; |
---|
1719 | | - aConstraints.weighty = 0; |
---|
| 1615 | + cGridBag backlit = new cGridBag(); |
---|
| 1616 | + backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
| 1617 | + backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1618 | + backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1619 | + globalSection.add(backlit); |
---|
1720 | 1620 | |
---|
1721 | | - ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints); |
---|
1722 | | - bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1723 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1724 | | - aConstraints.gridx += 1; |
---|
1725 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1726 | | - ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints); |
---|
1727 | | - aConstraints.gridx = 0; |
---|
1728 | | - aConstraints.gridy += 1; |
---|
1729 | | - aConstraints.gridwidth = 1; |
---|
| 1621 | + cGridBag opacity = new cGridBag(); |
---|
| 1622 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 1623 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1624 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1625 | + globalSection.add(opacity); |
---|
1730 | 1626 | |
---|
1731 | | - ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints); |
---|
1732 | | - noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1733 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1734 | | - aConstraints.gridx += 1; |
---|
1735 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1736 | | - ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints); |
---|
1737 | | - aConstraints.gridx = 0; |
---|
1738 | | - aConstraints.gridy += 1; |
---|
1739 | | - aConstraints.gridwidth = 1; |
---|
| 1627 | + panel.add(new JSeparator()); |
---|
| 1628 | + |
---|
| 1629 | + panel.add(globalSection); |
---|
| 1630 | + |
---|
| 1631 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1632 | + |
---|
| 1633 | + cGridBag textureSection = new cGridBag().setVertical(true); |
---|
1740 | 1634 | |
---|
1741 | | - ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints); |
---|
1742 | | - powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1743 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1744 | | - aConstraints.gridx += 1; |
---|
1745 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1746 | | - ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints); |
---|
1747 | | - aConstraints.gridx = 0; |
---|
1748 | | - aConstraints.gridy += 1; |
---|
1749 | | - aConstraints.gridwidth = 1; |
---|
| 1635 | + cGridBag bump = new cGridBag(); |
---|
| 1636 | + bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints); |
---|
| 1637 | + bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1638 | + bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
---|
| 1639 | + textureSection.add(bump); |
---|
1750 | 1640 | |
---|
1751 | | - ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints); |
---|
1752 | | - borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1753 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1754 | | - aConstraints.gridx += 1; |
---|
1755 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1756 | | - ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints); |
---|
1757 | | - aConstraints.gridx = 0; |
---|
1758 | | - aConstraints.gridy += 1; |
---|
1759 | | - aConstraints.gridwidth = 1; |
---|
| 1641 | + cGridBag noise = new cGridBag(); |
---|
| 1642 | + noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints); |
---|
| 1643 | + noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1644 | + noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints); |
---|
| 1645 | + textureSection.add(noise); |
---|
1760 | 1646 | |
---|
1761 | | - ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints); |
---|
1762 | | - fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1763 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1764 | | - aConstraints.gridx += 1; |
---|
1765 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1766 | | - ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints); |
---|
1767 | | - aConstraints.gridx = 0; |
---|
1768 | | - aConstraints.gridy += 1; |
---|
1769 | | - aConstraints.gridwidth = 1; |
---|
| 1647 | + cGridBag power = new cGridBag(); |
---|
| 1648 | + power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints); |
---|
| 1649 | + powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1650 | + power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints); |
---|
| 1651 | + textureSection.add(power); |
---|
1770 | 1652 | |
---|
1771 | | - ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints); |
---|
1772 | | - opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1773 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1774 | | - aConstraints.gridx += 1; |
---|
1775 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1776 | | - ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints); |
---|
1777 | | - aConstraints.gridx = 0; |
---|
1778 | | - aConstraints.gridy += 1; |
---|
1779 | | - aConstraints.gridwidth = 1; |
---|
| 1653 | + cGridBag borderfade = new cGridBag(); |
---|
| 1654 | + borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints); |
---|
| 1655 | + borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1656 | + borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
---|
| 1657 | + textureSection.add(borderfade); |
---|
1780 | 1658 | |
---|
1781 | | - //aConstraints.weighty = 1; |
---|
1782 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1783 | | - //aConstraints.gridx += 1; |
---|
1784 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1785 | | - aConstraints.weighty = 0; |
---|
| 1659 | + cGridBag fog = new cGridBag(); |
---|
| 1660 | + fog.add(fogLabel = new JLabel("Punch")); // , aConstraints); |
---|
| 1661 | + fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1662 | + fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints); |
---|
| 1663 | + textureSection.add(fog); |
---|
1786 | 1664 | |
---|
1787 | | - aConstraints.gridx = 0; |
---|
1788 | | - aConstraints.gridy = 0; |
---|
1789 | | - aConstraints.gridwidth = 1; |
---|
| 1665 | + cGridBag opacityPower = new cGridBag(); |
---|
| 1666 | + opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints); |
---|
| 1667 | + opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1668 | + opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
| 1669 | + textureSection.add(opacityPower); |
---|
| 1670 | + |
---|
| 1671 | + panel.add(new JSeparator()); |
---|
| 1672 | + |
---|
| 1673 | + panel.add(textureSection); |
---|
| 1674 | + |
---|
| 1675 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1790 | 1676 | |
---|
1791 | 1677 | SetMaterial(copy); // .GetMaterial()); |
---|
1792 | 1678 | |
---|
1793 | | - colorField.addChangeListener(this); |
---|
1794 | | - modulationField.addChangeListener(this); |
---|
| 1679 | + //colorField.addChangeListener(this); |
---|
| 1680 | +// modulationField.addChangeListener(this); |
---|
1795 | 1681 | metalnessField.addChangeListener(this); |
---|
1796 | 1682 | diffuseField.addChangeListener(this); |
---|
1797 | 1683 | specularField.addChangeListener(this); |
---|
.. | .. |
---|
1821 | 1707 | opacityPowerField.addChangeListener(this); |
---|
1822 | 1708 | /**/ |
---|
1823 | 1709 | |
---|
1824 | | - resetSlidersButton.addActionListener(this); |
---|
1825 | 1710 | clearMaterialButton.addActionListener(this); |
---|
1826 | 1711 | createMaterialButton.addActionListener(this); |
---|
1827 | | - |
---|
1828 | | - propagateToggle.addItemListener(this); |
---|
1829 | | - multiplyToggle.addItemListener(this); |
---|
| 1712 | + |
---|
| 1713 | + if (Globals.ADVANCED) |
---|
| 1714 | + { |
---|
| 1715 | + resetSlidersButton.addActionListener(this); |
---|
| 1716 | + propagateToggle.addItemListener(this); |
---|
| 1717 | + multiplyToggle.addItemListener(this); |
---|
| 1718 | + } |
---|
1830 | 1719 | } |
---|
1831 | 1720 | |
---|
1832 | 1721 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
1997 | 1886 | |
---|
1998 | 1887 | //? flashIt = false; |
---|
1999 | 1888 | CameraPane pane = (CameraPane) cameraView; |
---|
2000 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1889 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
2001 | 1890 | pane.clickEnd(location.x, location.y, 0, true); |
---|
2002 | 1891 | |
---|
2003 | 1892 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2046 | 1935 | e2.printStackTrace(); |
---|
2047 | 1936 | } |
---|
2048 | 1937 | } |
---|
| 1938 | + |
---|
2049 | 1939 | LoadJMEThread loadThread; |
---|
2050 | 1940 | |
---|
2051 | 1941 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
2103 | 1993 | //LoadFile0(filename, converter); |
---|
2104 | 1994 | } |
---|
2105 | 1995 | } |
---|
| 1996 | + |
---|
2106 | 1997 | LoadOBJThread loadObjThread; |
---|
2107 | 1998 | |
---|
2108 | 1999 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2454 | 2345 | |
---|
2455 | 2346 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2456 | 2347 | { |
---|
2457 | | - if (GrafreeD.standAlone) |
---|
| 2348 | + if (Grafreed.standAlone) |
---|
2458 | 2349 | { |
---|
2459 | 2350 | /**/ |
---|
2460 | 2351 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2461 | | - browser.show(); |
---|
| 2352 | + browser.setVisible(true); |
---|
2462 | 2353 | String filename = browser.getFile(); |
---|
2463 | 2354 | if (filename != null && filename.length() > 0) |
---|
2464 | 2355 | { |
---|
.. | .. |
---|
2603 | 2494 | } |
---|
2604 | 2495 | if (input == null) |
---|
2605 | 2496 | { |
---|
| 2497 | + new Exception().printStackTrace(); |
---|
2606 | 2498 | System.exit(0); |
---|
2607 | 2499 | } |
---|
2608 | 2500 | |
---|
.. | .. |
---|
2817 | 2709 | return; |
---|
2818 | 2710 | } |
---|
2819 | 2711 | |
---|
2820 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2712 | + if (multiplyToggle != null) |
---|
| 2713 | + multiplyToggle.setSelected(mat.multiply); |
---|
2821 | 2714 | |
---|
2822 | 2715 | assert (object.projectedVertices != null); |
---|
2823 | 2716 | |
---|
.. | .. |
---|
3032 | 2925 | frame.validate(); |
---|
3033 | 2926 | |
---|
3034 | 2927 | return; |
---|
3035 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 2928 | + } else if (event.getSource() == toggleSwitchItem) |
---|
3036 | 2929 | { |
---|
3037 | | - cameraView.ToggleRandom(); |
---|
| 2930 | + cameraView.ToggleSwitch(); |
---|
3038 | 2931 | cameraView.repaint(); |
---|
3039 | 2932 | return; |
---|
3040 | 2933 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
3063 | 2956 | { |
---|
3064 | 2957 | copy.live ^= true; |
---|
3065 | 2958 | return; |
---|
| 2959 | + } else if (event.getSource() == selectCB) |
---|
| 2960 | + { |
---|
| 2961 | + copy.dontselect ^= true; |
---|
| 2962 | + return; |
---|
3066 | 2963 | } else if (event.getSource() == hideCB) |
---|
3067 | 2964 | { |
---|
3068 | 2965 | copy.hide ^= true; |
---|
.. | .. |
---|
3077 | 2974 | if (event.getSource() == randomCB) |
---|
3078 | 2975 | { |
---|
3079 | 2976 | copy.random ^= true; |
---|
| 2977 | + objEditor.refreshContents(); |
---|
3080 | 2978 | return; |
---|
3081 | 2979 | } |
---|
3082 | 2980 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3100 | 2998 | |
---|
3101 | 2999 | public void actionPerformed(ActionEvent event) |
---|
3102 | 3000 | { |
---|
| 3001 | + Object source = event.getSource(); |
---|
3103 | 3002 | // SCRIPT DIALOG |
---|
3104 | | - if (event.getSource() == okbutton) |
---|
| 3003 | + if (source == okbutton) |
---|
3105 | 3004 | { |
---|
3106 | 3005 | textpanel.setVisible(false); |
---|
3107 | 3006 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3113 | 3012 | textarea = null; |
---|
3114 | 3013 | textpanel = null; |
---|
3115 | 3014 | } |
---|
3116 | | - if (event.getSource() == cancelbutton) |
---|
| 3015 | + if (source == cancelbutton) |
---|
3117 | 3016 | { |
---|
3118 | 3017 | textpanel.setVisible(false); |
---|
3119 | 3018 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3125 | 3024 | //applySelf(); |
---|
3126 | 3025 | //client.refreshEditWindow(); |
---|
3127 | 3026 | //refreshContents(); |
---|
3128 | | - if (event.getSource() == nameField) |
---|
| 3027 | + if (source == nameField) |
---|
3129 | 3028 | { |
---|
3130 | 3029 | //System.out.println("ObjEditor " + event); |
---|
3131 | 3030 | applySelf0(true); |
---|
3132 | 3031 | //parent.applySelf(); |
---|
3133 | 3032 | objEditor.refreshContents(); |
---|
3134 | | - } else if (event.getSource() == resetButton) |
---|
| 3033 | + } else if (source == resetButton) |
---|
3135 | 3034 | { |
---|
3136 | 3035 | CameraPane.fullreset = true; |
---|
3137 | 3036 | copy.Reset(); // ResetMeshes(); |
---|
3138 | 3037 | copy.Touch(); |
---|
3139 | 3038 | objEditor.refreshContents(); |
---|
3140 | | - } else if (event.getSource() == stepItem) |
---|
| 3039 | + } else if (source == stepItem) |
---|
3141 | 3040 | { |
---|
3142 | | - cameraView.ONESTEP = true; |
---|
| 3041 | + //cameraView.ONESTEP = true; |
---|
| 3042 | + Globals.ONESTEP = true; |
---|
3143 | 3043 | cameraView.repaint(); |
---|
3144 | 3044 | return; |
---|
3145 | | - } else if (event.getSource() == stepButton) |
---|
| 3045 | + } else if (source == stepButton) |
---|
3146 | 3046 | { |
---|
3147 | 3047 | copy.Step(); |
---|
3148 | 3048 | copy.Touch(); |
---|
3149 | 3049 | objEditor.refreshContents(); |
---|
3150 | | - } else if (event.getSource() == slowerButton) |
---|
| 3050 | + } else if (source == slowerButton) |
---|
3151 | 3051 | { |
---|
3152 | 3052 | copy.Slower(); |
---|
3153 | 3053 | copy.Touch(); |
---|
3154 | 3054 | objEditor.refreshContents(); |
---|
3155 | | - } else if (event.getSource() == fasterButton) |
---|
| 3055 | + } else if (source == fasterButton) |
---|
3156 | 3056 | { |
---|
3157 | 3057 | copy.Faster(); |
---|
3158 | 3058 | copy.Touch(); |
---|
3159 | 3059 | objEditor.refreshContents(); |
---|
3160 | | - } else if (event.getSource() == remarkButton) |
---|
| 3060 | + } else if (source == remarkButton) |
---|
3161 | 3061 | { |
---|
3162 | 3062 | copy.Remark(); |
---|
3163 | 3063 | copy.Touch(); |
---|
3164 | 3064 | objEditor.refreshContents(); |
---|
3165 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3065 | + } else if (source == stepAllButton) |
---|
3166 | 3066 | { |
---|
3167 | 3067 | copy.StepAll(); |
---|
3168 | 3068 | copy.Touch(); |
---|
3169 | 3069 | objEditor.refreshContents(); |
---|
3170 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3070 | + } else if (source == resetAllButton) |
---|
3171 | 3071 | { |
---|
3172 | 3072 | //CameraPane.fullreset = true; |
---|
3173 | 3073 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3200 | 3100 | // Close(); |
---|
3201 | 3101 | // } |
---|
3202 | 3102 | // else |
---|
3203 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3103 | + if (source == resetSlidersButton) |
---|
3204 | 3104 | { |
---|
3205 | 3105 | ResetSliders(); |
---|
3206 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3106 | + } else if (source == clearMaterialButton) |
---|
3207 | 3107 | { |
---|
3208 | 3108 | ClearMaterial(); |
---|
3209 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3109 | + } else if (source == createMaterialButton) |
---|
3210 | 3110 | { |
---|
3211 | 3111 | CreateMaterial(); |
---|
3212 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3112 | + } else if (source == clearPanelButton) |
---|
3213 | 3113 | { |
---|
3214 | 3114 | copy.ClearUI(); |
---|
3215 | 3115 | refreshContents(true); |
---|
3216 | | - } /* |
---|
3217 | | - } |
---|
3218 | | - |
---|
3219 | | - public boolean action(Event event, Object arg) |
---|
3220 | | - { |
---|
3221 | | - */ else if (event.getSource() == closeItem) |
---|
| 3116 | + } else if (source == importGFDItem) |
---|
| 3117 | + { |
---|
| 3118 | + ImportGFD(); |
---|
| 3119 | + } else |
---|
| 3120 | + if (source == importVRMLX3DItem) |
---|
| 3121 | + { |
---|
| 3122 | + ImportVRMLX3D(); |
---|
| 3123 | + } else |
---|
| 3124 | + if (source == import3DSItem) |
---|
| 3125 | + { |
---|
| 3126 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3127 | + } else |
---|
| 3128 | + if (source == importOBJItem) |
---|
| 3129 | + { |
---|
| 3130 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3131 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3132 | + browser.setVisible(true); |
---|
| 3133 | + String filename = browser.getFile(); |
---|
| 3134 | + if (filename != null && filename.length() > 0) |
---|
| 3135 | + { |
---|
| 3136 | + String fullname = browser.getDirectory() + filename; |
---|
| 3137 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3138 | + } |
---|
| 3139 | + } else |
---|
| 3140 | + if (source == closeItem) |
---|
3222 | 3141 | { |
---|
3223 | 3142 | Close(); |
---|
3224 | 3143 | //return true; |
---|
3225 | | - } else if (event.getSource() == loadItem) |
---|
| 3144 | + } else if (source == loadItem) |
---|
3226 | 3145 | { |
---|
3227 | 3146 | load(); |
---|
3228 | 3147 | //return true; |
---|
3229 | | - } else if (event.getSource() == saveItem) |
---|
| 3148 | + } else if (source == newItem) |
---|
| 3149 | + { |
---|
| 3150 | + New(); |
---|
| 3151 | + } else if (source == saveItem) |
---|
3230 | 3152 | { |
---|
3231 | 3153 | save(); |
---|
3232 | 3154 | //return true; |
---|
3233 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3155 | + } else if (source == saveAsItem) |
---|
3234 | 3156 | { |
---|
3235 | 3157 | saveAs(); |
---|
3236 | 3158 | //return true; |
---|
3237 | | - } else if (event.getSource() == reexportItem) |
---|
| 3159 | + } else if (source == reexportItem) |
---|
3238 | 3160 | { |
---|
3239 | 3161 | reexport(); |
---|
3240 | 3162 | //return true; |
---|
3241 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3163 | + } else if (source == exportAsItem) |
---|
3242 | 3164 | { |
---|
3243 | 3165 | export(); |
---|
3244 | 3166 | //return true; |
---|
3245 | | - } else if (event.getSource() == povItem) |
---|
| 3167 | + } else if (source == povItem) |
---|
3246 | 3168 | { |
---|
3247 | 3169 | generatePOV(); |
---|
3248 | 3170 | //return true; |
---|
3249 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3171 | + } else if (source == zBufferItem) |
---|
3250 | 3172 | { |
---|
3251 | 3173 | try |
---|
3252 | 3174 | { |
---|
.. | .. |
---|
3268 | 3190 | cameraView.repaint(); |
---|
3269 | 3191 | //return true; |
---|
3270 | 3192 | } |
---|
3271 | | - */ else if (event.getSource() == editCameraItem) |
---|
3272 | | - { |
---|
3273 | | - cameraView.ProtectCamera(); |
---|
3274 | | - cameraView.repaint(); |
---|
3275 | | - return; |
---|
3276 | | - } else if (event.getSource() == revertCameraItem) |
---|
3277 | | - { |
---|
3278 | | - cameraView.RevertCamera(); |
---|
3279 | | - cameraView.repaint(); |
---|
3280 | | - return; |
---|
3281 | | -// } else if (event.getSource() == textureButton) |
---|
3282 | | -// { |
---|
3283 | | -// return; // true; |
---|
3284 | | - } else // combos... |
---|
3285 | | - if (event.getSource() == texresMenu) |
---|
| 3193 | + */ else // combos... |
---|
| 3194 | + if (source == texresMenu) |
---|
3286 | 3195 | { |
---|
3287 | 3196 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3288 | 3197 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3294 | 3203 | } |
---|
3295 | 3204 | } |
---|
3296 | 3205 | |
---|
3297 | | - void ToggleAnimation() |
---|
| 3206 | + void New() |
---|
3298 | 3207 | { |
---|
3299 | | - if (!CameraPane.ANIMATION) |
---|
| 3208 | + while (copy.Size() > 1) |
---|
3300 | 3209 | { |
---|
3301 | | - FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3210 | + copy.remove(1); |
---|
| 3211 | + } |
---|
| 3212 | + |
---|
| 3213 | + ResetModel(); |
---|
| 3214 | + objEditor.refreshContents(); |
---|
| 3215 | + } |
---|
| 3216 | + |
---|
| 3217 | + static public byte[] Compress(Object o) |
---|
| 3218 | + { |
---|
| 3219 | + try |
---|
| 3220 | + { |
---|
| 3221 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3222 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 3223 | + ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 3224 | + |
---|
| 3225 | + out.writeObject(o); |
---|
| 3226 | + |
---|
| 3227 | + out.flush(); |
---|
| 3228 | + |
---|
| 3229 | + zstream.close(); |
---|
| 3230 | + out.close(); |
---|
| 3231 | + |
---|
| 3232 | + return baos.toByteArray(); |
---|
| 3233 | + } catch (Exception e) |
---|
| 3234 | + { |
---|
| 3235 | + System.err.println(e); |
---|
| 3236 | + return null; |
---|
| 3237 | + } |
---|
| 3238 | + } |
---|
| 3239 | + |
---|
| 3240 | + static public Object Uncompress(byte[] bytes) |
---|
| 3241 | + { |
---|
| 3242 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3243 | + try |
---|
| 3244 | + { |
---|
| 3245 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3246 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3247 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3248 | + Object obj = in.readObject(); |
---|
| 3249 | + in.close(); |
---|
| 3250 | + |
---|
| 3251 | + return obj; |
---|
| 3252 | + } catch (Exception e) |
---|
| 3253 | + { |
---|
| 3254 | + System.err.println(e); |
---|
| 3255 | + return null; |
---|
| 3256 | + } |
---|
| 3257 | + } |
---|
| 3258 | + |
---|
| 3259 | + static public Object clone(Object o) |
---|
| 3260 | + { |
---|
| 3261 | + try |
---|
| 3262 | + { |
---|
| 3263 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3264 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3265 | + |
---|
| 3266 | + out.writeObject(o); |
---|
| 3267 | + |
---|
| 3268 | + out.flush(); |
---|
| 3269 | + out.close(); |
---|
| 3270 | + |
---|
| 3271 | + byte[] bytes = baos.toByteArray(); |
---|
| 3272 | + |
---|
| 3273 | + System.out.println("clone = " + bytes.length); |
---|
| 3274 | + |
---|
| 3275 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3276 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3277 | + Object obj = in.readObject(); |
---|
| 3278 | + in.close(); |
---|
| 3279 | + |
---|
| 3280 | + return obj; |
---|
| 3281 | + } catch (Exception e) |
---|
| 3282 | + { |
---|
| 3283 | + System.err.println(e); |
---|
| 3284 | + return null; |
---|
| 3285 | + } |
---|
| 3286 | + } |
---|
| 3287 | + |
---|
| 3288 | + cRadio GetCurrentTab() |
---|
| 3289 | + { |
---|
| 3290 | + cRadio ab; |
---|
| 3291 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3292 | + { |
---|
| 3293 | + ab = (cRadio)e.nextElement(); |
---|
| 3294 | + if(ab.GetObject() == copy) |
---|
| 3295 | + { |
---|
| 3296 | + return ab; |
---|
| 3297 | + } |
---|
| 3298 | + } |
---|
| 3299 | + |
---|
| 3300 | + return null; |
---|
| 3301 | + } |
---|
| 3302 | + |
---|
| 3303 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3304 | + |
---|
| 3305 | + public void Save() |
---|
| 3306 | + { |
---|
| 3307 | + cRadio tab = GetCurrentTab(); |
---|
| 3308 | + |
---|
| 3309 | + copy.ExtractBigData(hashtable); |
---|
| 3310 | + |
---|
| 3311 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3312 | + tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3313 | + |
---|
| 3314 | + copy.RestoreBigData(hashtable); |
---|
| 3315 | + |
---|
| 3316 | + //assert(hashtable.isEmpty()); |
---|
| 3317 | + |
---|
| 3318 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3319 | + { |
---|
| 3320 | + tab.graphs[i] = null; |
---|
| 3321 | + } |
---|
| 3322 | + |
---|
| 3323 | + // test save |
---|
| 3324 | + if (false) |
---|
| 3325 | + { |
---|
| 3326 | + try |
---|
| 3327 | + { |
---|
| 3328 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3329 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3330 | + |
---|
| 3331 | + p.writeObject(copy); |
---|
| 3332 | + |
---|
| 3333 | + p.flush(); |
---|
| 3334 | + |
---|
| 3335 | + ostream.close(); |
---|
| 3336 | + } catch (Exception e) |
---|
| 3337 | + { |
---|
| 3338 | + e.printStackTrace(); |
---|
| 3339 | + } |
---|
| 3340 | + } |
---|
| 3341 | + } |
---|
| 3342 | + |
---|
| 3343 | + void CopyChanged(Object3D obj) |
---|
| 3344 | + { |
---|
| 3345 | + copy.ExtractBigData(hashtable); |
---|
| 3346 | + |
---|
| 3347 | + copy.clear(); |
---|
| 3348 | + |
---|
| 3349 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3350 | + { |
---|
| 3351 | + copy.add(obj.get(i)); |
---|
| 3352 | + } |
---|
| 3353 | + |
---|
| 3354 | + copy.RestoreBigData(hashtable); |
---|
| 3355 | + |
---|
| 3356 | + //assert(hashtable.isEmpty()); |
---|
| 3357 | + |
---|
| 3358 | + copy.Touch(); |
---|
| 3359 | + |
---|
| 3360 | + ResetModel(); |
---|
| 3361 | + copy.HardTouch(); // recompile? |
---|
| 3362 | + |
---|
| 3363 | + cRadio ab; |
---|
| 3364 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3365 | + { |
---|
| 3366 | + ab = (cRadio)e.nextElement(); |
---|
| 3367 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3368 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3369 | + if (test != null) |
---|
| 3370 | + { |
---|
| 3371 | + test.editWindow = ab.object.editWindow; |
---|
| 3372 | + ab.object = test; |
---|
| 3373 | + } |
---|
| 3374 | + } |
---|
| 3375 | + |
---|
| 3376 | + refreshContents(); |
---|
| 3377 | + } |
---|
| 3378 | + |
---|
| 3379 | + public void Undo() |
---|
| 3380 | + { |
---|
| 3381 | + cRadio tab = GetCurrentTab(); |
---|
| 3382 | + |
---|
| 3383 | + if (tab.undoindex == 0) |
---|
| 3384 | + { |
---|
| 3385 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3386 | + return; |
---|
| 3387 | + } |
---|
| 3388 | + |
---|
| 3389 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3390 | + { |
---|
| 3391 | + Save(); |
---|
| 3392 | + tab.undoindex -= 1; |
---|
| 3393 | + } |
---|
| 3394 | + |
---|
| 3395 | + tab.undoindex -= 1; |
---|
| 3396 | + |
---|
| 3397 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3398 | + } |
---|
| 3399 | + |
---|
| 3400 | + public void Redo() |
---|
| 3401 | + { |
---|
| 3402 | + cRadio tab = GetCurrentTab(); |
---|
| 3403 | + |
---|
| 3404 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3405 | + { |
---|
| 3406 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3407 | + return; |
---|
| 3408 | + } |
---|
| 3409 | + |
---|
| 3410 | + tab.undoindex += 1; |
---|
| 3411 | + |
---|
| 3412 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3413 | + } |
---|
| 3414 | + |
---|
| 3415 | + void ImportGFD() |
---|
| 3416 | + { |
---|
| 3417 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
3302 | 3418 | browser.show(); |
---|
3303 | 3419 | String filename = browser.getFile(); |
---|
3304 | 3420 | if (filename != null && filename.length() > 0) |
---|
3305 | 3421 | { |
---|
3306 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3422 | + String fullname = browser.getDirectory() + filename; |
---|
| 3423 | + |
---|
| 3424 | + //Object3D readobj = |
---|
| 3425 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3426 | + //makeSomething(readobj); |
---|
| 3427 | + } |
---|
| 3428 | + } |
---|
| 3429 | + |
---|
| 3430 | + void ImportVRMLX3D() |
---|
| 3431 | + { |
---|
| 3432 | + if (Grafreed.standAlone) |
---|
| 3433 | + { |
---|
| 3434 | + /**/ |
---|
| 3435 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3436 | + browser.show(); |
---|
| 3437 | + String filename = browser.getFile(); |
---|
| 3438 | + if (filename != null && filename.length() > 0) |
---|
| 3439 | + { |
---|
| 3440 | + String fullname = browser.getDirectory() + filename; |
---|
| 3441 | + LoadVRMLX3D(fullname); |
---|
| 3442 | + } |
---|
| 3443 | + /**/ |
---|
| 3444 | + } |
---|
| 3445 | + } |
---|
| 3446 | + |
---|
| 3447 | + void ToggleAnimation() |
---|
| 3448 | + { |
---|
| 3449 | + if (!Globals.ANIMATION) |
---|
| 3450 | + { |
---|
| 3451 | + FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3452 | + browser.setVisible(true); |
---|
| 3453 | + String filename = browser.getFile(); |
---|
| 3454 | + if (filename != null && filename.length() > 0) |
---|
| 3455 | + { |
---|
| 3456 | + Globals.filename = browser.getDirectory() + filename; |
---|
3307 | 3457 | //CameraPane.framecount = 0; |
---|
3308 | | - CameraPane.imagecount = 0; |
---|
| 3458 | + Globals.imagecount = 0; |
---|
3309 | 3459 | |
---|
3310 | | - CameraPane.ANIMATION ^= true; |
---|
| 3460 | + Globals.ANIMATION ^= true; |
---|
3311 | 3461 | |
---|
3312 | | - GrafreeD.wav.cursor = 0; |
---|
3313 | | - GrafreeD.wav.loop = 0; |
---|
| 3462 | + Grafreed.wav.cursor = 0; |
---|
| 3463 | + Grafreed.wav.loop = 0; |
---|
3314 | 3464 | } |
---|
3315 | 3465 | } else |
---|
3316 | 3466 | { |
---|
3317 | | - CameraPane.ANIMATION ^= true; |
---|
| 3467 | + Globals.ANIMATION ^= true; |
---|
3318 | 3468 | } |
---|
3319 | 3469 | } |
---|
3320 | 3470 | |
---|
.. | .. |
---|
3360 | 3510 | void CreateMaterial() |
---|
3361 | 3511 | { |
---|
3362 | 3512 | //copy.ClearMaterial(); // PATCH |
---|
3363 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3513 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3364 | 3514 | if (copy.selection.size() > 0) |
---|
3365 | 3515 | //SetMaterial(copy); |
---|
3366 | 3516 | { |
---|
.. | .. |
---|
3419 | 3569 | { |
---|
3420 | 3570 | copy.ResetBlockLoop(); // temporary problem |
---|
3421 | 3571 | |
---|
3422 | | - boolean random = CameraPane.RANDOM; |
---|
3423 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3572 | + boolean random = CameraPane.SWITCH; |
---|
| 3573 | + CameraPane.SWITCH = false; // parse everything |
---|
3424 | 3574 | copy.ResetDisplayList(); |
---|
3425 | 3575 | copy.HardTouch(); |
---|
3426 | | - CameraPane.RANDOM = random; |
---|
| 3576 | + CameraPane.SWITCH = random; |
---|
3427 | 3577 | } |
---|
3428 | 3578 | |
---|
3429 | 3579 | // public void applySelf() |
---|
.. | .. |
---|
3493 | 3643 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
3494 | 3644 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
3495 | 3645 | |
---|
3496 | | - if (!NumberSlider.frozen) |
---|
| 3646 | + if (!cNumberSlider.frozen) |
---|
3497 | 3647 | { |
---|
3498 | 3648 | //System.out.println("Propagate = " + propagate); |
---|
3499 | 3649 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3650 | + |
---|
| 3651 | + if (copy.material != null) |
---|
| 3652 | + { |
---|
| 3653 | + cMaterial mat = copy.material; |
---|
| 3654 | + |
---|
| 3655 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3656 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3657 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3658 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3659 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3660 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3661 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3662 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3663 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3664 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3665 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3666 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3667 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3668 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3669 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3670 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3671 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3672 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3673 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3674 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3675 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3676 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3677 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3678 | + } |
---|
| 3679 | + |
---|
3500 | 3680 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3501 | 3681 | { |
---|
3502 | 3682 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3541 | 3721 | || e.getSource() == apertureField |
---|
3542 | 3722 | || e.getSource() == shadowblurField) |
---|
3543 | 3723 | { |
---|
| 3724 | + new Exception().printStackTrace(); |
---|
3544 | 3725 | System.exit(0); |
---|
3545 | 3726 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3546 | 3727 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
3611 | 3792 | } |
---|
3612 | 3793 | |
---|
3613 | 3794 | if (normalpushField != null) |
---|
3614 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3795 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3615 | 3796 | } |
---|
3616 | 3797 | |
---|
3617 | 3798 | void SnapObject() |
---|
.. | .. |
---|
3866 | 4047 | |
---|
3867 | 4048 | radioPanel.revalidate(); |
---|
3868 | 4049 | radioPanel.repaint(); |
---|
3869 | | - ctrlPanel.revalidate(); // ? new |
---|
| 4050 | + ctrlPanel.validate(); // ? new |
---|
3870 | 4051 | ctrlPanel.repaint(); |
---|
3871 | 4052 | } |
---|
3872 | 4053 | } |
---|
.. | .. |
---|
3875 | 4056 | |
---|
3876 | 4057 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3877 | 4058 | { |
---|
| 4059 | + Save(); |
---|
3878 | 4060 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3879 | 4061 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3880 | 4062 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4078 | 4260 | } |
---|
4079 | 4261 | } |
---|
4080 | 4262 | } |
---|
| 4263 | + |
---|
4081 | 4264 | LoadGFDThread loadGFDThread; |
---|
4082 | 4265 | |
---|
4083 | 4266 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4098 | 4281 | try |
---|
4099 | 4282 | { |
---|
4100 | 4283 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4101 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4284 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4285 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4102 | 4286 | |
---|
4103 | 4287 | readobj = (Object3D) p.readObject(); |
---|
4104 | 4288 | istream.close(); |
---|
.. | .. |
---|
4106 | 4290 | readobj.ResetDisplayList(); |
---|
4107 | 4291 | } catch (Exception e) |
---|
4108 | 4292 | { |
---|
4109 | | - e.printStackTrace(); |
---|
| 4293 | + //e.printStackTrace(); |
---|
| 4294 | + try |
---|
| 4295 | + { |
---|
| 4296 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4297 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4298 | + |
---|
| 4299 | + readobj = (Object3D) p.readObject(); |
---|
| 4300 | + istream.close(); |
---|
| 4301 | + |
---|
| 4302 | + readobj.ResetDisplayList(); |
---|
| 4303 | + } catch (Exception e2) |
---|
| 4304 | + { |
---|
| 4305 | + e2.printStackTrace(); |
---|
| 4306 | + } |
---|
4110 | 4307 | } |
---|
4111 | 4308 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4112 | 4309 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4161 | 4358 | |
---|
4162 | 4359 | if (readobj != null) |
---|
4163 | 4360 | { |
---|
| 4361 | + Save(); |
---|
4164 | 4362 | try |
---|
4165 | 4363 | { |
---|
4166 | 4364 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4223 | 4421 | |
---|
4224 | 4422 | void load() // throws ClassNotFoundException |
---|
4225 | 4423 | { |
---|
4226 | | - if (GrafreeD.standAlone) |
---|
| 4424 | + if (Grafreed.standAlone) |
---|
4227 | 4425 | { |
---|
4228 | 4426 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4229 | 4427 | browser.show(); |
---|
.. | .. |
---|
4310 | 4508 | try |
---|
4311 | 4509 | { |
---|
4312 | 4510 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4313 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4511 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4512 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4314 | 4513 | |
---|
4315 | 4514 | p.writeObject(copy); |
---|
4316 | 4515 | p.flush(); |
---|
4317 | 4516 | |
---|
| 4517 | + zstream.close(); |
---|
4318 | 4518 | ostream.close(); |
---|
4319 | 4519 | |
---|
4320 | 4520 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4324 | 4524 | { |
---|
4325 | 4525 | } |
---|
4326 | 4526 | } |
---|
| 4527 | + |
---|
4327 | 4528 | String lastname; |
---|
4328 | 4529 | |
---|
4329 | 4530 | void saveAs() |
---|
4330 | 4531 | { |
---|
4331 | | - if (GrafreeD.standAlone) |
---|
| 4532 | + if (Grafreed.standAlone) |
---|
4332 | 4533 | { |
---|
4333 | 4534 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4334 | 4535 | browser.setVisible(true); |
---|
.. | .. |
---|
4433 | 4634 | try |
---|
4434 | 4635 | { |
---|
4435 | 4636 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4436 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4437 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4637 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4638 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4438 | 4639 | |
---|
4439 | 4640 | Object3D objectparent = obj.parent; |
---|
4440 | 4641 | obj.parent = null; |
---|
4441 | 4642 | |
---|
4442 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4643 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4443 | 4644 | |
---|
4444 | 4645 | obj.parent = objectparent; |
---|
4445 | 4646 | |
---|
.. | .. |
---|
4451 | 4652 | p.writeObject(object); |
---|
4452 | 4653 | p.flush(); |
---|
4453 | 4654 | |
---|
| 4655 | + zstream.close(); |
---|
4454 | 4656 | ostream.close(); |
---|
4455 | | - // zstream.close(); |
---|
4456 | 4657 | |
---|
4457 | 4658 | // group.selection.get(0).parent = parent; |
---|
4458 | 4659 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4473 | 4674 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4474 | 4675 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4475 | 4676 | copy.generatePOV(buffer); |
---|
4476 | | - if (GrafreeD.standAlone) |
---|
| 4677 | + if (Grafreed.standAlone) |
---|
4477 | 4678 | { |
---|
4478 | 4679 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4479 | 4680 | browser.show(); |
---|
.. | .. |
---|
4499 | 4700 | Object3D client; |
---|
4500 | 4701 | Object3D copy; |
---|
4501 | 4702 | MenuBar menuBar; |
---|
4502 | | - Menu windowMenu; |
---|
| 4703 | + Menu fileMenu; |
---|
| 4704 | + MenuItem newItem; |
---|
4503 | 4705 | MenuItem loadItem; |
---|
4504 | 4706 | MenuItem saveItem; |
---|
4505 | 4707 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4507 | 4709 | MenuItem reexportItem; |
---|
4508 | 4710 | MenuItem povItem; |
---|
4509 | 4711 | MenuItem closeItem; |
---|
4510 | | - Menu cameraMenu; |
---|
| 4712 | + |
---|
4511 | 4713 | CheckboxMenuItem zBufferItem; |
---|
4512 | 4714 | //MenuItem normalLensItem; |
---|
4513 | | - MenuItem editCameraItem; |
---|
4514 | | - MenuItem revertCameraItem; |
---|
4515 | | - CheckboxMenuItem toggleLiveItem; |
---|
4516 | 4715 | MenuItem stepItem; |
---|
| 4716 | + CheckboxMenuItem toggleLiveItem; |
---|
4517 | 4717 | CheckboxMenuItem toggleFullScreenItem; |
---|
4518 | 4718 | CheckboxMenuItem toggleTimelineItem; |
---|
4519 | 4719 | CheckboxMenuItem toggleRenderItem; |
---|
.. | .. |
---|
4522 | 4722 | CheckboxMenuItem toggleFootContactItem; |
---|
4523 | 4723 | CheckboxMenuItem toggleDLItem; |
---|
4524 | 4724 | CheckboxMenuItem toggleTextureItem; |
---|
4525 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4725 | + CheckboxMenuItem toggleSwitchItem; |
---|
4526 | 4726 | CheckboxMenuItem toggleRootItem; |
---|
4527 | 4727 | CheckboxMenuItem animationItem; |
---|
4528 | 4728 | CheckboxMenuItem toggleHandleItem; |
---|
.. | .. |
---|
4530 | 4730 | JSplitPane mainPanel; |
---|
4531 | 4731 | JScrollPane scrollpane; |
---|
4532 | 4732 | JPanel toolbarPanel; |
---|
4533 | | - JPanel treePanel; |
---|
| 4733 | + cGridBag treePanel; |
---|
4534 | 4734 | JPanel radioPanel; |
---|
4535 | 4735 | ButtonGroup buttonGroup; |
---|
4536 | | - JPanel ctrlPanel; |
---|
4537 | | - JPanel materialPanel; |
---|
| 4736 | + cGridBag ctrlPanel; |
---|
| 4737 | + cGridBag materialPanel; |
---|
4538 | 4738 | JScrollPane infoPanel; |
---|
4539 | | - JPanel optionsPanel; |
---|
| 4739 | + cGridBag optionsPanel; |
---|
4540 | 4740 | JTabbedPane objectPanel; |
---|
4541 | | - JPanel XYZPanel; |
---|
| 4741 | + cGridBag XYZPanel; |
---|
4542 | 4742 | JSplitPane gridPanel; |
---|
4543 | 4743 | JSplitPane bigPanel; |
---|
4544 | | - JPanel bigThree; |
---|
4545 | | - JTabbedPane scenePanel; |
---|
4546 | | - JPanel centralPanel; |
---|
| 4744 | + cGridBag bigThree; |
---|
| 4745 | + cGridBag scenePanel; |
---|
| 4746 | + cGridBag centralPanel; |
---|
4547 | 4747 | JSplitPane cameraPanel; |
---|
4548 | 4748 | JPanel timelinePanel; |
---|
4549 | 4749 | JMenuBar timelineMenubar; |
---|
.. | .. |
---|
4596 | 4796 | // MATERIAL |
---|
4597 | 4797 | JLabel materialLabel; |
---|
4598 | 4798 | JLabel colorLabel; |
---|
4599 | | - NumberSlider colorField; |
---|
| 4799 | + cNumberSlider colorField; |
---|
4600 | 4800 | JLabel modulationLabel; |
---|
4601 | | - NumberSlider modulationField; |
---|
| 4801 | + cNumberSlider modulationField; |
---|
4602 | 4802 | JLabel metalnessLabel; |
---|
4603 | | - NumberSlider metalnessField; |
---|
| 4803 | + cNumberSlider metalnessField; |
---|
4604 | 4804 | JLabel diffuseLabel; |
---|
4605 | | - NumberSlider diffuseField; |
---|
| 4805 | + cNumberSlider diffuseField; |
---|
4606 | 4806 | JLabel specularLabel; |
---|
4607 | | - NumberSlider specularField; |
---|
| 4807 | + cNumberSlider specularField; |
---|
4608 | 4808 | JLabel shininessLabel; |
---|
4609 | | - NumberSlider shininessField; |
---|
| 4809 | + cNumberSlider shininessField; |
---|
4610 | 4810 | JLabel shiftLabel; |
---|
4611 | | - NumberSlider shiftField; |
---|
| 4811 | + cNumberSlider shiftField; |
---|
4612 | 4812 | JLabel ambientLabel; |
---|
4613 | | - NumberSlider ambientField; |
---|
| 4813 | + cNumberSlider ambientField; |
---|
4614 | 4814 | JLabel lightareaLabel; |
---|
4615 | | - NumberSlider lightareaField; |
---|
| 4815 | + cNumberSlider lightareaField; |
---|
4616 | 4816 | JLabel diffusenessLabel; |
---|
4617 | | - NumberSlider diffusenessField; |
---|
| 4817 | + cNumberSlider diffusenessField; |
---|
4618 | 4818 | JLabel velvetLabel; |
---|
4619 | | - NumberSlider velvetField; |
---|
| 4819 | + cNumberSlider velvetField; |
---|
4620 | 4820 | JLabel sheenLabel; |
---|
4621 | | - NumberSlider sheenField; |
---|
| 4821 | + cNumberSlider sheenField; |
---|
4622 | 4822 | JLabel subsurfaceLabel; |
---|
4623 | | - NumberSlider subsurfaceField; |
---|
| 4823 | + cNumberSlider subsurfaceField; |
---|
4624 | 4824 | //JLabel bumpLabel; |
---|
4625 | 4825 | //NumberSlider bumpField; |
---|
4626 | 4826 | JLabel backlitLabel; |
---|
4627 | | - NumberSlider backlitField; |
---|
| 4827 | + cNumberSlider backlitField; |
---|
4628 | 4828 | JLabel anisoLabel; |
---|
4629 | | - NumberSlider anisoField; |
---|
| 4829 | + cNumberSlider anisoField; |
---|
4630 | 4830 | JLabel anisoVLabel; |
---|
4631 | | - NumberSlider anisoVField; |
---|
| 4831 | + cNumberSlider anisoVField; |
---|
4632 | 4832 | JLabel cameraLabel; |
---|
4633 | | - NumberSlider cameraField; |
---|
| 4833 | + cNumberSlider cameraField; |
---|
4634 | 4834 | JLabel selfshadowLabel; |
---|
4635 | | - NumberSlider selfshadowField; |
---|
| 4835 | + cNumberSlider selfshadowField; |
---|
4636 | 4836 | JLabel shadowLabel; |
---|
4637 | | - NumberSlider shadowField; |
---|
| 4837 | + cNumberSlider shadowField; |
---|
4638 | 4838 | JLabel textureLabel; |
---|
4639 | | - NumberSlider textureField; |
---|
| 4839 | + cNumberSlider textureField; |
---|
4640 | 4840 | JLabel opacityLabel; |
---|
4641 | | - NumberSlider opacityField; |
---|
| 4841 | + cNumberSlider opacityField; |
---|
4642 | 4842 | JLabel fakedepthLabel; |
---|
4643 | | - NumberSlider fakedepthField; |
---|
| 4843 | + cNumberSlider fakedepthField; |
---|
4644 | 4844 | JLabel shadowbiasLabel; |
---|
4645 | | - NumberSlider shadowbiasField; |
---|
| 4845 | + cNumberSlider shadowbiasField; |
---|
4646 | 4846 | JLabel bumpLabel; |
---|
4647 | | - NumberSlider bumpField; |
---|
| 4847 | + cNumberSlider bumpField; |
---|
4648 | 4848 | JLabel noiseLabel; |
---|
4649 | | - NumberSlider noiseField; |
---|
| 4849 | + cNumberSlider noiseField; |
---|
4650 | 4850 | JLabel powerLabel; |
---|
4651 | | - NumberSlider powerField; |
---|
| 4851 | + cNumberSlider powerField; |
---|
4652 | 4852 | JLabel borderfadeLabel; |
---|
4653 | | - NumberSlider borderfadeField; |
---|
| 4853 | + cNumberSlider borderfadeField; |
---|
4654 | 4854 | JLabel fogLabel; |
---|
4655 | | - NumberSlider fogField; |
---|
| 4855 | + cNumberSlider fogField; |
---|
4656 | 4856 | JLabel opacityPowerLabel; |
---|
4657 | | - NumberSlider opacityPowerField; |
---|
| 4857 | + cNumberSlider opacityPowerField; |
---|
4658 | 4858 | JTree jTree; |
---|
4659 | 4859 | //ObjectUI parent; |
---|
4660 | 4860 | |
---|
4661 | | - NumberSlider normalpushField; |
---|
| 4861 | + cNumberSlider normalpushField; |
---|
| 4862 | + |
---|
| 4863 | + private MenuItem importGFDItem; |
---|
| 4864 | + private MenuItem importVRMLX3DItem; |
---|
| 4865 | + private MenuItem import3DSItem; |
---|
| 4866 | + private MenuItem importOBJItem; |
---|
4662 | 4867 | } |
---|