.. | .. |
---|
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, |
---|
.. | .. |
---|
31 | 33 | boolean timeline; |
---|
32 | 34 | boolean wasFullScreen; |
---|
33 | 35 | |
---|
| 36 | + GroupEditor callee; |
---|
| 37 | + JFrame frame; |
---|
| 38 | + |
---|
34 | 39 | // SCRIPT |
---|
35 | 40 | |
---|
36 | 41 | transient JFrame textpanel = null; |
---|
.. | .. |
---|
121 | 126 | void keyPressed(int key, int modifiers) |
---|
122 | 127 | { |
---|
123 | 128 | System.out.println("KEY PRESSED"); |
---|
124 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
125 | 130 | } |
---|
126 | 131 | */ |
---|
127 | 132 | |
---|
128 | 133 | static GridBagConstraints aConstraints; |
---|
129 | 134 | static GridBagConstraints aWindowConstraints; |
---|
130 | | - GroupEditor callee; |
---|
131 | | - JFrame frame; |
---|
| 135 | + |
---|
132 | 136 | static int GRIDWIDTH = 100; // 4; |
---|
133 | 137 | |
---|
134 | 138 | public void closeUI() |
---|
135 | 139 | { |
---|
136 | 140 | //new Exception().printStackTrace(); |
---|
137 | | - System.out.println("this = " + this); |
---|
138 | | - System.out.println("objEditor = " + objEditor); |
---|
| 141 | +// System.out.println("this = " + this); |
---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
---|
139 | 143 | //nameField.removeActionListener(this); |
---|
140 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
---|
| 145 | + |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
141 | 147 | |
---|
142 | 148 | if (!GroupEditor.allparams) |
---|
143 | 149 | return; |
---|
144 | 150 | |
---|
145 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
146 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
147 | | - objEditor.ctrlPanel.remove(markCB); |
---|
148 | | - |
---|
149 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
150 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
151 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
152 | | - |
---|
153 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
154 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
155 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
156 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
157 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
158 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
159 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
160 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
161 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
162 | | - 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); |
---|
163 | 169 | |
---|
164 | | - 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); |
---|
165 | 176 | } |
---|
166 | 177 | |
---|
167 | 178 | public ObjEditor GetEditor() |
---|
.. | .. |
---|
265 | 276 | void SetupMenu() |
---|
266 | 277 | { |
---|
267 | 278 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
268 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
269 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
270 | | - windowMenu.add("-"); |
---|
271 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
272 | | - 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("Open...")); |
---|
| 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...")); |
---|
273 | 299 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
274 | | - windowMenu.add("-"); |
---|
275 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
276 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
277 | | - windowMenu.add("-"); |
---|
| 300 | + fileMenu.add("-"); |
---|
| 301 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 302 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 303 | + fileMenu.add("-"); |
---|
278 | 304 | if (client.parent != null) |
---|
279 | 305 | { |
---|
280 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 306 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
281 | 307 | } else |
---|
282 | 308 | { |
---|
283 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 309 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
284 | 310 | } |
---|
285 | 311 | |
---|
| 312 | + newItem.addActionListener(this); |
---|
286 | 313 | loadItem.addActionListener(this); |
---|
287 | 314 | saveItem.addActionListener(this); |
---|
288 | 315 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
291 | 318 | //povItem.addActionListener(this); |
---|
292 | 319 | closeItem.addActionListener(this); |
---|
293 | 320 | |
---|
294 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
295 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
296 | | - //zBufferItem.addActionListener(this); |
---|
297 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
298 | | - //normalLensItem.addActionListener(this); |
---|
299 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
300 | | - revertCameraItem.addActionListener(this); |
---|
301 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
302 | | - toggleTimelineItem.addItemListener(this); |
---|
303 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
304 | | - toggleFullScreenItem.addItemListener(this); |
---|
305 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
306 | | - cameraMenu.add("-"); |
---|
307 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
308 | | - toggleTextureItem.addItemListener(this); |
---|
309 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
310 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
311 | | - toggleLiveItem.addItemListener(this); |
---|
312 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
313 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
314 | | - stepItem.addActionListener(this); |
---|
315 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
316 | | -// toggleDLItem.addItemListener(this); |
---|
317 | | -// toggleDLItem.setState(false); |
---|
318 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
319 | | - toggleRenderItem.addItemListener(this); |
---|
320 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
321 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
322 | | - toggleDebugItem.addItemListener(this); |
---|
323 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
324 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
325 | | - toggleFrustumItem.addItemListener(this); |
---|
326 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
327 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
328 | | - toggleFootContactItem.addItemListener(this); |
---|
329 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
330 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
331 | | - toggleRandomItem.addItemListener(this); |
---|
332 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
333 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
334 | | - toggleHandleItem.addItemListener(this); |
---|
335 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
336 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
337 | | - togglePaintItem.addItemListener(this); |
---|
338 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
339 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
340 | | -// toggleRootItem.addItemListener(this); |
---|
341 | | -// toggleRootItem.setState(false); |
---|
342 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
343 | | -// animationItem.addItemListener(this); |
---|
344 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
345 | | - cameraMenu.add("-"); |
---|
346 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
347 | | - editCameraItem.addActionListener(this); |
---|
348 | | - |
---|
349 | 321 | objectPanel = new JTabbedPane(); |
---|
350 | 322 | toolbarPanel = new JPanel(); |
---|
351 | 323 | toolbarPanel.setName("Toolbar"); |
---|
352 | | - treePanel = new JPanel(); |
---|
| 324 | + treePanel = new cGridBag(); |
---|
353 | 325 | treePanel.setName("Tree"); |
---|
354 | | - ctrlPanel = new JPanel(); // new GridBagLayout()); |
---|
| 326 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
355 | 327 | ctrlPanel.setName("Edit"); |
---|
356 | | - materialPanel = new JPanel(); |
---|
| 328 | + materialPanel = new cGridBag().setVertical(true); |
---|
357 | 329 | materialPanel.setName("Material"); |
---|
358 | 330 | /*JTextPane*/ |
---|
359 | 331 | infoarea = createTextPane(); |
---|
| 332 | + doc = infoarea.getStyledDocument(); |
---|
| 333 | + |
---|
360 | 334 | infoarea.setEditable(true); |
---|
361 | 335 | SetText(); |
---|
362 | 336 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
363 | 337 | // infoarea.setOpaque(false); |
---|
364 | 338 | // //infoarea.setForeground(textcolor); |
---|
365 | | - infoarea.setLineWrap(true); |
---|
366 | | - infoarea.setWrapStyleWord(true); |
---|
| 339 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 340 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
367 | 341 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
368 | 342 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
369 | 343 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
374 | 348 | mainPanel.setName("Main"); |
---|
375 | 349 | mainPanel.setContinuousLayout(true); |
---|
376 | 350 | mainPanel.setOneTouchExpandable(true); |
---|
377 | | - mainPanel.setDividerLocation(1.0); |
---|
378 | 351 | mainPanel.setDividerSize(9); |
---|
379 | | - mainPanel.setResizeWeight(0); |
---|
| 352 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 353 | + mainPanel.setResizeWeight(0.5); |
---|
380 | 354 | |
---|
381 | 355 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
382 | 356 | //mainPanel.setLayout(new GridBagLayout()); |
---|
383 | 357 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
384 | | - treePanel.setLayout(new GridBagLayout()); |
---|
385 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
386 | | - materialPanel.setLayout(new GridBagLayout()); |
---|
| 358 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 359 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 360 | + //materialPanel.setLayout(new GridBagLayout()); |
---|
387 | 361 | |
---|
388 | 362 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
389 | 363 | GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0); |
---|
.. | .. |
---|
422 | 396 | static String newline = "\n"; |
---|
423 | 397 | protected static final String buttonString = "JButton"; |
---|
424 | 398 | StyledDocument doc; |
---|
425 | | - JTextArea infoarea; |
---|
| 399 | + JTextPane infoarea; |
---|
426 | 400 | |
---|
427 | 401 | void ClearInfo() |
---|
428 | 402 | { |
---|
.. | .. |
---|
445 | 419 | e.printStackTrace(); |
---|
446 | 420 | } |
---|
447 | 421 | |
---|
448 | | - String selection = infoarea.getText(); |
---|
449 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
450 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
451 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 422 | +// String selection = infoarea.getText(); |
---|
| 423 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 424 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 425 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
452 | 426 | //clipboard.setContents(data, data); |
---|
453 | 427 | } |
---|
454 | 428 | |
---|
.. | .. |
---|
471 | 445 | //SendInfo("Name:", "bold"); |
---|
472 | 446 | if (sel.GetTextures() != null || debug) |
---|
473 | 447 | { |
---|
474 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 448 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
475 | 449 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
476 | 450 | if (sel.Size() > 0) |
---|
477 | 451 | { |
---|
478 | 452 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
479 | 453 | } |
---|
480 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 454 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
481 | 455 | if (debug) |
---|
482 | 456 | { |
---|
483 | 457 | try |
---|
.. | .. |
---|
489 | 463 | } |
---|
490 | 464 | |
---|
491 | 465 | if (full) |
---|
492 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 466 | + { |
---|
| 467 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 468 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 469 | + } |
---|
493 | 470 | |
---|
494 | 471 | if (sel.bRep != null) |
---|
495 | 472 | { |
---|
.. | .. |
---|
516 | 493 | } |
---|
517 | 494 | if (sel.support != null) |
---|
518 | 495 | { |
---|
519 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 496 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
520 | 497 | } |
---|
521 | 498 | if (sel.scriptnode != null) |
---|
522 | 499 | { |
---|
.. | .. |
---|
587 | 564 | { |
---|
588 | 565 | CameraPane.pointflow = (PointFlow) sel; |
---|
589 | 566 | } |
---|
| 567 | + |
---|
| 568 | + si.SendInfo("_____________________", "regular"); |
---|
| 569 | + si.SendInfo("", "regular"); |
---|
590 | 570 | } |
---|
591 | 571 | } |
---|
592 | 572 | |
---|
.. | .. |
---|
618 | 598 | cameraView.ToggleFullScreen(); |
---|
619 | 599 | } |
---|
620 | 600 | |
---|
621 | | - private JTextArea createTextPane() |
---|
| 601 | + private JTextPane createTextPane() |
---|
622 | 602 | { |
---|
623 | | - String[] initString = |
---|
624 | | - { |
---|
625 | | - "This is an editable JTextPane, ", //regular |
---|
626 | | - "another ", //italic |
---|
627 | | - "styled ", //bold |
---|
628 | | - "text ", //small |
---|
629 | | - "component, ", //large |
---|
630 | | - "which supports embedded components..." + newline,//regular |
---|
631 | | - " " + newline, //button |
---|
632 | | - "...and embedded icons..." + newline, //regular |
---|
633 | | - " ", //icon |
---|
634 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
635 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
636 | | - + "cover methods for interacting with those objects." |
---|
637 | | - }; |
---|
| 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 | +// } |
---|
638 | 645 | |
---|
639 | | - String[] initStyles = |
---|
640 | | - { |
---|
641 | | - "regular", "italic", "bold", "small", "large", |
---|
642 | | - "regular", "button", "regular", "icon", |
---|
643 | | - "regular" |
---|
644 | | - }; |
---|
645 | | - |
---|
646 | | - JTextPane textPane = new JTextPane(); |
---|
647 | | - textPane.setEditable(true); |
---|
648 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
649 | | - addStylesToDocument(doc); |
---|
650 | | - |
---|
651 | | - try |
---|
652 | | - { |
---|
653 | | - for (int j = 0; j < 2; j++) |
---|
654 | | - { |
---|
655 | | - for (int i = 0; i < initString.length; i++) |
---|
656 | | - { |
---|
657 | | - doc.insertString(doc.getLength(), initString[i], |
---|
658 | | - doc.getStyle(initStyles[i])); |
---|
659 | | - } |
---|
660 | | - } |
---|
661 | | - } catch (BadLocationException ble) |
---|
662 | | - { |
---|
663 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
664 | | - } |
---|
665 | | - |
---|
666 | | - return new JTextArea(); // textPane; |
---|
| 646 | + return new JTextPane(); // textPane; |
---|
667 | 647 | } |
---|
668 | 648 | |
---|
669 | 649 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
716 | 696 | protected static ImageIcon createImageIcon(String path, |
---|
717 | 697 | String description) |
---|
718 | 698 | { |
---|
719 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 699 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
720 | 700 | if (imgURL != null) |
---|
721 | 701 | { |
---|
722 | 702 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
748 | 728 | // NumberSlider vDivsField; |
---|
749 | 729 | // JCheckBox endcaps; |
---|
750 | 730 | JCheckBox liveCB; |
---|
| 731 | + JCheckBox selectCB; |
---|
751 | 732 | JCheckBox hideCB; |
---|
752 | 733 | JCheckBox link2masterCB; |
---|
753 | 734 | JCheckBox markCB; |
---|
.. | .. |
---|
763 | 744 | JButton slowerButton; |
---|
764 | 745 | JButton fasterButton; |
---|
765 | 746 | JButton remarkButton; |
---|
| 747 | + |
---|
| 748 | + cGridBag namePanel; |
---|
| 749 | + cGridBag setupPanel; |
---|
| 750 | + cGridBag commandsPanel; |
---|
| 751 | + cGridBag pushPanel; |
---|
| 752 | + cGridBag fillPanel; |
---|
766 | 753 | |
---|
767 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 754 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
768 | 755 | { |
---|
769 | 756 | JCheckBox cb; |
---|
770 | 757 | |
---|
771 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
772 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
773 | | -// oe.aConstraints.weightx = 1; |
---|
774 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
775 | | - 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); |
---|
776 | 759 | cb.addItemListener(this); |
---|
777 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
778 | | - oe.aConstraints.gridwidth = 1; |
---|
779 | | - oe.aConstraints.gridx += 1; |
---|
780 | 760 | |
---|
781 | 761 | return cb; |
---|
782 | 762 | } |
---|
783 | 763 | |
---|
784 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 764 | + cButton AddButton(cGridBag panel, String label) |
---|
785 | 765 | { |
---|
786 | 766 | cButton cb; |
---|
787 | 767 | |
---|
788 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
789 | | - oe.aConstraints.gridwidth = 1; |
---|
790 | | -// oe.aConstraints.weightx = 1; |
---|
791 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
792 | | - 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); |
---|
793 | 769 | cb.addActionListener(this); |
---|
794 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
795 | | - oe.aConstraints.gridwidth = 1; |
---|
796 | | - oe.aConstraints.gridx += 1; |
---|
797 | 770 | |
---|
798 | 771 | return cb; |
---|
799 | 772 | } |
---|
800 | 773 | |
---|
801 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 774 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
802 | 775 | { |
---|
803 | 776 | JComboBox combo; |
---|
804 | 777 | |
---|
805 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
806 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
807 | | - oe.aConstraints.gridx += 1; |
---|
| 778 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
808 | 779 | combo.addActionListener(this); |
---|
809 | 780 | |
---|
810 | 781 | return combo; |
---|
811 | 782 | } |
---|
812 | 783 | |
---|
813 | | - 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) |
---|
814 | 785 | { |
---|
815 | | - NumberSlider combo; |
---|
| 786 | + cGridBag control = new cGridBag(); |
---|
| 787 | + |
---|
| 788 | + cNumberSlider combo; |
---|
816 | 789 | |
---|
817 | 790 | JLabel jlabel = new JLabel(label); |
---|
818 | | - |
---|
819 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
820 | 791 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
821 | | - aConstraints.gridwidth = 1; |
---|
822 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
823 | | - aConstraints.gridx += 1; |
---|
824 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
825 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
826 | | - ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
827 | | - aConstraints.gridx += 1; |
---|
828 | | - aConstraints.gridwidth = 1; |
---|
829 | | - |
---|
| 792 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 793 | + control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
830 | 794 | combo.setFloat(current); |
---|
831 | | - |
---|
832 | | - combo.label = jlabel; |
---|
833 | | - |
---|
834 | | - combo.addChangeListener(this); |
---|
835 | | - |
---|
836 | | - return combo; |
---|
| 795 | + |
---|
| 796 | + panel.add(control); |
---|
| 797 | + |
---|
| 798 | + return control; |
---|
837 | 799 | } |
---|
838 | 800 | |
---|
839 | | - 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) |
---|
840 | 802 | { |
---|
841 | | - NumberSlider combo; |
---|
| 803 | + cGridBag control = new cGridBag(); |
---|
| 804 | + |
---|
| 805 | + cNumberSlider combo; |
---|
842 | 806 | |
---|
843 | 807 | JLabel jlabel = new JLabel(label); |
---|
844 | | - |
---|
845 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
846 | 808 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
847 | | - aConstraints.gridwidth = 2; |
---|
848 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
849 | | - aConstraints.gridx += 1; |
---|
850 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
851 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
852 | | - ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
853 | | - aConstraints.gridx += 1; |
---|
854 | | - aConstraints.gridwidth = 1; |
---|
855 | | - |
---|
| 809 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 810 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
856 | 811 | combo.setInteger(current); |
---|
857 | 812 | |
---|
858 | | - combo.label = jlabel; |
---|
859 | | - |
---|
860 | | - combo.addChangeListener(this); |
---|
861 | | - |
---|
862 | | - return combo; |
---|
| 813 | + panel.add(control); |
---|
| 814 | + |
---|
| 815 | + return control; |
---|
863 | 816 | } |
---|
864 | 817 | |
---|
865 | | - JTextArea AddText(JPanel ctrlPanel, String name) |
---|
| 818 | + JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
866 | 819 | { |
---|
867 | 820 | JTextArea text; |
---|
868 | 821 | |
---|
869 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
870 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
871 | | - ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 822 | + ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
872 | 823 | text.addCaretListener(this); |
---|
873 | | - aConstraints.gridx += 1; |
---|
874 | | - aConstraints.gridwidth = 1; |
---|
875 | 824 | |
---|
876 | 825 | return text; |
---|
877 | 826 | } |
---|
.. | .. |
---|
901 | 850 | objEditor.ctrlPanel.remove(j); |
---|
902 | 851 | } |
---|
903 | 852 | |
---|
| 853 | + void Remove(cNumberSlider j) |
---|
| 854 | + { |
---|
| 855 | + j.removeChangeListener(this); |
---|
| 856 | + //objEditor.ctrlPanel.remove(j.label); |
---|
| 857 | + objEditor.ctrlPanel.remove(j); |
---|
| 858 | + } |
---|
| 859 | + |
---|
904 | 860 | /* |
---|
905 | 861 | */ |
---|
906 | | - void Return() // ObjEditor oe) |
---|
| 862 | + void Return0() // ObjEditor oe) |
---|
907 | 863 | { |
---|
908 | 864 | aConstraints.gridy += 1; |
---|
909 | 865 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
958 | 914 | |
---|
959 | 915 | void SetupUI2(ObjEditor oe) |
---|
960 | 916 | { |
---|
961 | | -// oe.aConstraints.weightx = 0; |
---|
962 | | -// oe.aConstraints.weighty = 0; |
---|
963 | | -// oe.aConstraints.gridx = 0; |
---|
964 | | -// oe.aConstraints.gridy = 0; |
---|
965 | | - 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(); |
---|
966 | 926 | |
---|
967 | 927 | if (!GroupEditor.allparams) |
---|
968 | 928 | return; |
---|
969 | 929 | |
---|
970 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
971 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
972 | | - 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"); |
---|
973 | 936 | // Return(); |
---|
974 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
975 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
976 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
977 | | - Return(); |
---|
978 | | - resetButton = AddButton(oe, "Reset"); |
---|
979 | | - 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"); |
---|
980 | 965 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
981 | 966 | // stepAllButton = AddButton(oe, "Step All"); |
---|
982 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
983 | 967 | // Return(); |
---|
984 | | - slowerButton = AddButton(oe, "Slow"); |
---|
985 | | - fasterButton = AddButton(oe, "Fast"); |
---|
986 | | - 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"); |
---|
987 | 974 | |
---|
988 | | - Return(); |
---|
| 975 | + oe.ctrlPanel.add(commandsPanel); |
---|
| 976 | + oe.ctrlPanel.Return(); |
---|
989 | 977 | |
---|
990 | | - normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
---|
991 | | - 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(); |
---|
992 | 983 | |
---|
993 | 984 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
994 | 985 | // ObjEditor.aConstraints.gridx += 1; |
---|
.. | .. |
---|
1083 | 1074 | oe.aConstraints.gridwidth = 1; |
---|
1084 | 1075 | /**/ |
---|
1085 | 1076 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1086 | | - Return(); |
---|
| 1077 | + oe.ctrlPanel.Return(); |
---|
1087 | 1078 | |
---|
1088 | 1079 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1089 | 1080 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1185 | 1176 | //JPanel worldPanel = |
---|
1186 | 1177 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1187 | 1178 | //worldPanel.setName("World"); |
---|
1188 | | - centralPanel = new JPanel(new BorderLayout()); |
---|
| 1179 | + centralPanel = new cGridBag(); |
---|
| 1180 | + centralPanel.preferredWidth = 20; |
---|
1189 | 1181 | timelinePanel = new JPanel(new BorderLayout()); |
---|
1190 | 1182 | timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1191 | 1183 | |
---|
| 1184 | + cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
| 1185 | + cameraPanel.setContinuousLayout(true); |
---|
| 1186 | + cameraPanel.setOneTouchExpandable(true); |
---|
| 1187 | +// cameraPanel.setDividerLocation(0.9); |
---|
| 1188 | +// cameraPanel.setDividerSize(9); |
---|
| 1189 | + cameraPanel.setResizeWeight(1.0); |
---|
| 1190 | + |
---|
1192 | 1191 | centralPanel.add(cameraView); |
---|
1193 | 1192 | //frame.setJMenuBar(timelineMenubar); |
---|
1194 | 1193 | //centralPanel.add(timelinePanel); |
---|
.. | .. |
---|
1208 | 1207 | //frontView.object = copy; |
---|
1209 | 1208 | //sideView.object = copy; |
---|
1210 | 1209 | |
---|
1211 | | - XYZPanel = new JPanel(); |
---|
1212 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1210 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1211 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1213 | 1212 | |
---|
1214 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1215 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1216 | | - 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); |
---|
1217 | 1217 | |
---|
1218 | 1218 | /* |
---|
1219 | 1219 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1251 | 1251 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1252 | 1252 | //tmp.setName("Edit"); |
---|
1253 | 1253 | objectPanel.add(materialPanel); |
---|
1254 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1255 | | - north.setName("Edit"); |
---|
1256 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1257 | | - 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); |
---|
1258 | 1259 | objectPanel.add(infoPanel); |
---|
1259 | 1260 | |
---|
1260 | 1261 | /* |
---|
.. | .. |
---|
1275 | 1276 | scrollpane.setWheelScrollingEnabled(true); |
---|
1276 | 1277 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1277 | 1278 | |
---|
1278 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
1279 | | - scenePanel.add(scrollpane); |
---|
| 1279 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1280 | + scenePanel.preferredWidth = 6; |
---|
| 1281 | + |
---|
| 1282 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1283 | + tabbedPane.add(scrollpane); |
---|
1280 | 1284 | |
---|
1281 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
| 1285 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1282 | 1286 | |
---|
1283 | | - optionsPanel = new JPanel(new GridBagLayout()); |
---|
| 1287 | + optionsPanel = new cGridBag().setVertical(true); |
---|
1284 | 1288 | |
---|
1285 | 1289 | optionsPanel.setName("Options"); |
---|
1286 | | - scenePanel.add(optionsPanel); |
---|
1287 | | - |
---|
| 1290 | + |
---|
| 1291 | + AddOptions(optionsPanel); //, aConstraints); |
---|
| 1292 | + |
---|
| 1293 | + tabbedPane.add(optionsPanel); |
---|
| 1294 | + |
---|
| 1295 | + scenePanel.add(tabbedPane); |
---|
1288 | 1296 | |
---|
1289 | 1297 | /* |
---|
1290 | 1298 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1318 | 1326 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1319 | 1327 | //bigPanel.add(ctrlPanel); |
---|
1320 | 1328 | //bigPanel.add(gridPanel); |
---|
| 1329 | + /** |
---|
1321 | 1330 | bigThree = new JPanel(); |
---|
1322 | 1331 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1323 | 1332 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1341 | 1350 | // aConstraints.gridheight = 3; |
---|
1342 | 1351 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1343 | 1352 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1353 | + /**/ |
---|
1344 | 1354 | |
---|
| 1355 | + bigThree = new cGridBag(); |
---|
| 1356 | + bigThree.addComponent(scenePanel); |
---|
| 1357 | + bigThree.addComponent(centralPanel); |
---|
| 1358 | + bigThree.addComponent(XYZPanel); |
---|
| 1359 | + |
---|
1345 | 1360 | // // SIDE EFFECT!!! |
---|
1346 | 1361 | // aConstraints.gridx = 0; |
---|
1347 | 1362 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1362 | 1377 | //worldPane.add(bigPanel); |
---|
1363 | 1378 | //worldPane.add(worldPanel); |
---|
1364 | 1379 | /**/ |
---|
1365 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1380 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1381 | + frame.add(/*"Center",*/framePanel); |
---|
1366 | 1382 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
---|
1367 | 1383 | |
---|
1368 | 1384 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1369 | 1385 | |
---|
1370 | | - frame.setSize(1024, 768); |
---|
1371 | | - frame.show(); |
---|
| 1386 | + frame.setSize(1280, 860); |
---|
| 1387 | + frame.setVisible(true); |
---|
1372 | 1388 | |
---|
1373 | 1389 | gridPanel.setDividerLocation(1.0); |
---|
1374 | 1390 | |
---|
.. | .. |
---|
1383 | 1399 | }); |
---|
1384 | 1400 | } |
---|
1385 | 1401 | |
---|
| 1402 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 1403 | + { |
---|
| 1404 | + } |
---|
| 1405 | + |
---|
1386 | 1406 | JTree GetTree() |
---|
1387 | 1407 | { |
---|
1388 | 1408 | return objEditor.jTree; |
---|
.. | .. |
---|
1394 | 1414 | ctrlPanel.removeAll(); |
---|
1395 | 1415 | } |
---|
1396 | 1416 | |
---|
1397 | | - void SetupMaterial(JPanel ctrlPanel) |
---|
| 1417 | + void SetupMaterial(cGridBag panel) |
---|
1398 | 1418 | { |
---|
1399 | | - aConstraints.weighty = 0; |
---|
1400 | | - //aConstraints.weightx = 1; |
---|
1401 | | - /* |
---|
| 1419 | + /* |
---|
1402 | 1420 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1403 | 1421 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1404 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1405 | | - aConstraints.gridx += 1; |
---|
1406 | 1422 | */ |
---|
1407 | 1423 | |
---|
1408 | | - aConstraints.gridwidth = 1; |
---|
1409 | | - ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints); |
---|
1410 | | - aConstraints.gridx += 1; |
---|
1411 | | - aConstraints.weighty = 0; |
---|
1412 | | - 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"); |
---|
1413 | 1428 | |
---|
1414 | 1429 | /* |
---|
1415 | 1430 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1416 | | - aConstraints.gridx += 1; |
---|
1417 | | - aConstraints.weighty = 0; |
---|
1418 | | - aConstraints.gridwidth = 1; |
---|
1419 | 1431 | */ |
---|
1420 | 1432 | |
---|
1421 | | - ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints); |
---|
1422 | | - 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 | + } |
---|
1423 | 1442 | |
---|
1424 | | - ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints); |
---|
1425 | | - |
---|
1426 | | - aConstraints.gridx += 1; |
---|
1427 | | - |
---|
1428 | | - ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints); |
---|
1429 | | - |
---|
1430 | | - aConstraints.gridx += 1; |
---|
1431 | | - |
---|
1432 | | - ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints); |
---|
1433 | | - |
---|
1434 | | - aConstraints.gridx = 0; |
---|
1435 | | - aConstraints.gridy += 1; |
---|
1436 | | - aConstraints.weighty = 0; |
---|
1437 | | - aConstraints.gridwidth = 1; |
---|
| 1443 | + editBar.preferredHeight = 15; |
---|
| 1444 | + |
---|
| 1445 | + panel.add(editBar); |
---|
| 1446 | + |
---|
1438 | 1447 | /**/ |
---|
1439 | 1448 | //aConstraints.weighty = 0; |
---|
1440 | 1449 | ////aConstraints.weightx = 1; |
---|
1441 | 1450 | //aConstraints.weighty = 1; |
---|
1442 | 1451 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1443 | 1452 | //aConstraints.gridx += 1; |
---|
1444 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1445 | | - aConstraints.weighty = 0; |
---|
1446 | | - aConstraints.gridx = 0; |
---|
1447 | | - aConstraints.gridy += 1; |
---|
1448 | | - aConstraints.gridwidth = 1; |
---|
| 1453 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1449 | 1454 | |
---|
1450 | | - ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints); |
---|
1451 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1452 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1453 | | - aConstraints.gridx += 1; |
---|
1454 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1455 | | - //aConstraints.weightx = 0; |
---|
1456 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1457 | | - aConstraints.gridx = 0; |
---|
1458 | | - aConstraints.gridy += 1; |
---|
1459 | | - 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); |
---|
1460 | 1463 | |
---|
1461 | | - ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints); |
---|
1462 | | - modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1463 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1464 | | - aConstraints.gridx += 1; |
---|
1465 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1466 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1467 | | - aConstraints.gridx = 0; |
---|
1468 | | - aConstraints.gridy += 1; |
---|
1469 | | - 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); |
---|
1470 | 1469 | |
---|
1471 | | - ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints); |
---|
1472 | | - textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1474 | | - aConstraints.gridx += 1; |
---|
1475 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1476 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1477 | | - aConstraints.gridx = 0; |
---|
1478 | | - aConstraints.gridy += 1; |
---|
1479 | | - 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); |
---|
1480 | 1475 | |
---|
1481 | | - ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints); |
---|
1482 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1483 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1484 | | - aConstraints.gridx += 1; |
---|
1485 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1486 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1487 | | - aConstraints.gridx = 0; |
---|
1488 | | - aConstraints.gridy += 1; |
---|
1489 | | - 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); |
---|
1490 | 1481 | |
---|
1491 | | - ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints); |
---|
1492 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1493 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1494 | | - aConstraints.gridx += 1; |
---|
1495 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1496 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1497 | | - aConstraints.gridx = 0; |
---|
1498 | | - aConstraints.gridy += 1; |
---|
1499 | | - 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); |
---|
1500 | 1487 | |
---|
1501 | | - ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints); |
---|
1502 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1503 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1504 | | - aConstraints.gridx += 1; |
---|
1505 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1506 | | - ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1507 | | - aConstraints.gridx = 0; |
---|
1508 | | - aConstraints.gridy += 1; |
---|
1509 | | - 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); |
---|
1510 | 1493 | |
---|
1511 | | - //aConstraints.weighty = 1; |
---|
1512 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1513 | | - //aConstraints.gridx += 1; |
---|
1514 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1515 | | - aConstraints.weighty = 0; |
---|
1516 | | - aConstraints.gridx = 0; |
---|
1517 | | - aConstraints.gridy += 1; |
---|
1518 | | - 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); |
---|
1519 | 1507 | |
---|
1520 | | - ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints); |
---|
1521 | | - diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1522 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1523 | | - aConstraints.gridx += 1; |
---|
1524 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1525 | | - ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1526 | | - aConstraints.gridx = 0; |
---|
1527 | | - aConstraints.gridy += 1; |
---|
1528 | | - 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); |
---|
1529 | 1513 | |
---|
1530 | | - ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints); |
---|
1531 | | - diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1532 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1533 | | - aConstraints.gridx += 1; |
---|
1534 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1535 | | - ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1536 | | - aConstraints.gridx = 0; |
---|
1537 | | - aConstraints.gridy += 1; |
---|
1538 | | - 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); |
---|
1539 | 1519 | |
---|
1540 | | - ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints); |
---|
1541 | | - selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1542 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1543 | | - aConstraints.gridx += 1; |
---|
1544 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1545 | | - ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1546 | | - aConstraints.gridx = 0; |
---|
1547 | | - aConstraints.gridy += 1; |
---|
1548 | | - 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); |
---|
1549 | 1525 | |
---|
1550 | | - ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints); |
---|
1551 | | - sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1552 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1553 | | - aConstraints.gridx += 1; |
---|
1554 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1555 | | - ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1556 | | - aConstraints.gridx = 0; |
---|
1557 | | - aConstraints.gridy += 1; |
---|
1558 | | - 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); |
---|
1559 | 1531 | |
---|
1560 | | - ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints); |
---|
1561 | | - subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1562 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1563 | | - aConstraints.gridx += 1; |
---|
1564 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1565 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1566 | | - aConstraints.gridx = 0; |
---|
1567 | | - aConstraints.gridy += 1; |
---|
1568 | | - 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); |
---|
1569 | 1537 | |
---|
1570 | | - ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints); |
---|
1571 | | - shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1572 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1573 | | - aConstraints.gridx += 1; |
---|
1574 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1575 | | - ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1576 | | - aConstraints.gridx = 0; |
---|
1577 | | - aConstraints.gridy += 1; |
---|
1578 | | - 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); |
---|
1579 | 1543 | |
---|
1580 | | - ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints); |
---|
1581 | | - fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1582 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1583 | | - aConstraints.gridx += 1; |
---|
1584 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1585 | | - ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1586 | | - aConstraints.gridx = 0; |
---|
1587 | | - aConstraints.gridy += 1; |
---|
1588 | | - 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); |
---|
1589 | 1551 | |
---|
1590 | | - //aConstraints.weighty = 1; |
---|
1591 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1592 | | - //aConstraints.gridx += 1; |
---|
1593 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1594 | | - aConstraints.weighty = 0; |
---|
1595 | | - aConstraints.gridx = 0; |
---|
1596 | | - aConstraints.gridy += 1; |
---|
1597 | | - 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); |
---|
1598 | 1557 | |
---|
1599 | | - ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints); |
---|
1600 | | - specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1601 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1602 | | - aConstraints.gridx += 1; |
---|
1603 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1604 | | - ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1605 | | - aConstraints.gridx = 0; |
---|
1606 | | - aConstraints.gridy += 1; |
---|
1607 | | - 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); |
---|
1608 | 1563 | |
---|
1609 | | - ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints); |
---|
1610 | | - lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1611 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1612 | | - aConstraints.gridx += 1; |
---|
1613 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1614 | | - ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1615 | | - aConstraints.gridx = 0; |
---|
1616 | | - aConstraints.gridy += 1; |
---|
1617 | | - 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); |
---|
1618 | 1569 | |
---|
1619 | | - ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints); |
---|
1620 | | - shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1621 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1622 | | - aConstraints.gridx += 1; |
---|
1623 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1624 | | - ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1625 | | - aConstraints.gridx = 0; |
---|
1626 | | - aConstraints.gridy += 1; |
---|
1627 | | - 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); |
---|
1628 | 1575 | |
---|
1629 | | - ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints); |
---|
1630 | | - metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1631 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1632 | | - aConstraints.gridx += 1; |
---|
1633 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1634 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1635 | | - aConstraints.gridx = 0; |
---|
1636 | | - aConstraints.gridy += 1; |
---|
1637 | | - 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); |
---|
1638 | 1581 | |
---|
1639 | | - ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints); |
---|
1640 | | - velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1641 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1642 | | - aConstraints.gridx += 1; |
---|
1643 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1644 | | - ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1645 | | - aConstraints.gridx = 0; |
---|
1646 | | - aConstraints.gridy += 1; |
---|
1647 | | - aConstraints.gridwidth = 1; |
---|
1648 | | - |
---|
1649 | | - shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
1650 | | - Return(); |
---|
| 1582 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
| 1583 | + //Return(); |
---|
1651 | 1584 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1652 | 1585 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1653 | 1586 | // aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
1658 | 1591 | // aConstraints.gridy += 1; |
---|
1659 | 1592 | // aConstraints.gridwidth = 1; |
---|
1660 | 1593 | |
---|
1661 | | - //aConstraints.weighty = 1; |
---|
1662 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1663 | | - //aConstraints.gridx += 1; |
---|
1664 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1665 | | - aConstraints.weighty = 0; |
---|
1666 | | - aConstraints.gridx = 0; |
---|
1667 | | - aConstraints.gridy += 1; |
---|
1668 | | - aConstraints.gridwidth = 1; |
---|
1669 | 1594 | |
---|
1670 | | - ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints); |
---|
1671 | | - cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1672 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1673 | | - aConstraints.gridx += 1; |
---|
1674 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1675 | | - ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1676 | | - aConstraints.gridx = 0; |
---|
1677 | | - aConstraints.gridy += 1; |
---|
1678 | | - 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); |
---|
1679 | 1602 | |
---|
1680 | | - ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints); |
---|
1681 | | - ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1682 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1683 | | - aConstraints.gridx += 1; |
---|
1684 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1685 | | - ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1686 | | - aConstraints.gridx = 0; |
---|
1687 | | - aConstraints.gridy += 1; |
---|
1688 | | - 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); |
---|
1689 | 1608 | |
---|
1690 | | - ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints); |
---|
1691 | | - backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1692 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1693 | | - aConstraints.gridx += 1; |
---|
1694 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1695 | | - ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1696 | | - aConstraints.gridx = 0; |
---|
1697 | | - aConstraints.gridy += 1; |
---|
1698 | | - 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); |
---|
1699 | 1614 | |
---|
1700 | | - ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints); |
---|
1701 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1702 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1703 | | - aConstraints.gridx += 1; |
---|
1704 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1705 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1706 | | - aConstraints.gridx = 0; |
---|
1707 | | - aConstraints.gridy += 1; |
---|
1708 | | - aConstraints.gridwidth = 1; |
---|
1709 | | - 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); |
---|
1710 | 1620 | |
---|
1711 | | - ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints); |
---|
1712 | | - bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1713 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1714 | | - aConstraints.gridx += 1; |
---|
1715 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1716 | | - ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints); |
---|
1717 | | - aConstraints.gridx = 0; |
---|
1718 | | - aConstraints.gridy += 1; |
---|
1719 | | - 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); |
---|
1720 | 1626 | |
---|
1721 | | - ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints); |
---|
1722 | | - noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1723 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1724 | | - aConstraints.gridx += 1; |
---|
1725 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1726 | | - ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints); |
---|
1727 | | - aConstraints.gridx = 0; |
---|
1728 | | - aConstraints.gridy += 1; |
---|
1729 | | - 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); |
---|
1730 | 1634 | |
---|
1731 | | - ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints); |
---|
1732 | | - powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1733 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1734 | | - aConstraints.gridx += 1; |
---|
1735 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1736 | | - ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints); |
---|
1737 | | - aConstraints.gridx = 0; |
---|
1738 | | - aConstraints.gridy += 1; |
---|
1739 | | - 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); |
---|
1740 | 1640 | |
---|
1741 | | - ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints); |
---|
1742 | | - borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1743 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1744 | | - aConstraints.gridx += 1; |
---|
1745 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1746 | | - ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints); |
---|
1747 | | - aConstraints.gridx = 0; |
---|
1748 | | - aConstraints.gridy += 1; |
---|
1749 | | - 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); |
---|
1750 | 1646 | |
---|
1751 | | - ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints); |
---|
1752 | | - fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1753 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1754 | | - aConstraints.gridx += 1; |
---|
1755 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1756 | | - ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints); |
---|
1757 | | - aConstraints.gridx = 0; |
---|
1758 | | - aConstraints.gridy += 1; |
---|
1759 | | - 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); |
---|
1760 | 1652 | |
---|
1761 | | - ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints); |
---|
1762 | | - opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1763 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1764 | | - aConstraints.gridx += 1; |
---|
1765 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1766 | | - ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints); |
---|
1767 | | - aConstraints.gridx = 0; |
---|
1768 | | - aConstraints.gridy += 1; |
---|
1769 | | - 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); |
---|
1770 | 1658 | |
---|
1771 | | - //aConstraints.weighty = 1; |
---|
1772 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1773 | | - //aConstraints.gridx += 1; |
---|
1774 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1775 | | - 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); |
---|
1776 | 1664 | |
---|
1777 | | - aConstraints.gridx = 0; |
---|
1778 | | - aConstraints.gridy = 0; |
---|
1779 | | - 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); |
---|
1780 | 1676 | |
---|
1781 | 1677 | SetMaterial(copy); // .GetMaterial()); |
---|
1782 | 1678 | |
---|
1783 | | - colorField.addChangeListener(this); |
---|
1784 | | - modulationField.addChangeListener(this); |
---|
| 1679 | + //colorField.addChangeListener(this); |
---|
| 1680 | +// modulationField.addChangeListener(this); |
---|
1785 | 1681 | metalnessField.addChangeListener(this); |
---|
1786 | 1682 | diffuseField.addChangeListener(this); |
---|
1787 | 1683 | specularField.addChangeListener(this); |
---|
.. | .. |
---|
1811 | 1707 | opacityPowerField.addChangeListener(this); |
---|
1812 | 1708 | /**/ |
---|
1813 | 1709 | |
---|
1814 | | - resetSlidersButton.addActionListener(this); |
---|
1815 | 1710 | clearMaterialButton.addActionListener(this); |
---|
1816 | 1711 | createMaterialButton.addActionListener(this); |
---|
1817 | | - |
---|
1818 | | - propagateToggle.addItemListener(this); |
---|
1819 | | - multiplyToggle.addItemListener(this); |
---|
| 1712 | + |
---|
| 1713 | + if (Globals.ADVANCED) |
---|
| 1714 | + { |
---|
| 1715 | + resetSlidersButton.addActionListener(this); |
---|
| 1716 | + propagateToggle.addItemListener(this); |
---|
| 1717 | + multiplyToggle.addItemListener(this); |
---|
| 1718 | + } |
---|
1820 | 1719 | } |
---|
1821 | 1720 | |
---|
1822 | 1721 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
1987 | 1886 | |
---|
1988 | 1887 | //? flashIt = false; |
---|
1989 | 1888 | CameraPane pane = (CameraPane) cameraView; |
---|
1990 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1889 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1991 | 1890 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1992 | 1891 | |
---|
1993 | 1892 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2036 | 1935 | e2.printStackTrace(); |
---|
2037 | 1936 | } |
---|
2038 | 1937 | } |
---|
| 1938 | + |
---|
2039 | 1939 | LoadJMEThread loadThread; |
---|
2040 | 1940 | |
---|
2041 | 1941 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
2093 | 1993 | //LoadFile0(filename, converter); |
---|
2094 | 1994 | } |
---|
2095 | 1995 | } |
---|
| 1996 | + |
---|
2096 | 1997 | LoadOBJThread loadObjThread; |
---|
2097 | 1998 | |
---|
2098 | 1999 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2171 | 2072 | |
---|
2172 | 2073 | void LoadObjFile(String fullname) |
---|
2173 | 2074 | { |
---|
2174 | | - /* |
---|
| 2075 | + System.out.println("Loading " + fullname); |
---|
| 2076 | + /**/ |
---|
2175 | 2077 | //lastFilename = fullname; |
---|
2176 | 2078 | if(loadObjThread == null) |
---|
2177 | 2079 | { |
---|
2178 | | - loadObjThread = new LoadOBJThread(); |
---|
2179 | | - loadObjThread.start(); |
---|
| 2080 | + loadObjThread = new LoadOBJThread(); |
---|
| 2081 | + loadObjThread.start(); |
---|
2180 | 2082 | } |
---|
2181 | 2083 | |
---|
2182 | 2084 | loadObjThread.add(fullname); |
---|
2183 | | - */ |
---|
| 2085 | + /**/ |
---|
2184 | 2086 | |
---|
2185 | | - System.out.println("Loading " + fullname); |
---|
2186 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2087 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2187 | 2088 | } |
---|
2188 | 2089 | |
---|
2189 | 2090 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2444 | 2345 | |
---|
2445 | 2346 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2446 | 2347 | { |
---|
2447 | | - if (GrafreeD.standAlone) |
---|
| 2348 | + if (Grafreed.standAlone) |
---|
2448 | 2349 | { |
---|
2449 | 2350 | /**/ |
---|
2450 | 2351 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2451 | | - browser.show(); |
---|
| 2352 | + browser.setVisible(true); |
---|
2452 | 2353 | String filename = browser.getFile(); |
---|
2453 | 2354 | if (filename != null && filename.length() > 0) |
---|
2454 | 2355 | { |
---|
.. | .. |
---|
2593 | 2494 | } |
---|
2594 | 2495 | if (input == null) |
---|
2595 | 2496 | { |
---|
| 2497 | + new Exception().printStackTrace(); |
---|
2596 | 2498 | System.exit(0); |
---|
2597 | 2499 | } |
---|
2598 | 2500 | |
---|
.. | .. |
---|
2807 | 2709 | return; |
---|
2808 | 2710 | } |
---|
2809 | 2711 | |
---|
2810 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2712 | + if (multiplyToggle != null) |
---|
| 2713 | + multiplyToggle.setSelected(mat.multiply); |
---|
2811 | 2714 | |
---|
2812 | 2715 | assert (object.projectedVertices != null); |
---|
2813 | 2716 | |
---|
.. | .. |
---|
2996 | 2899 | if (timeline) |
---|
2997 | 2900 | { |
---|
2998 | 2901 | centralPanel.remove(cameraView); |
---|
2999 | | - centralPanel.add(timelinePanel); |
---|
| 2902 | + cameraPanel.add(cameraView); |
---|
| 2903 | + centralPanel.add(cameraPanel); |
---|
3000 | 2904 | frame.setJMenuBar(timelineMenubar); |
---|
3001 | 2905 | wasFullScreen = CameraPane.FULLSCREEN; |
---|
3002 | 2906 | if (!CameraPane.FULLSCREEN) |
---|
.. | .. |
---|
3005 | 2909 | } |
---|
3006 | 2910 | else |
---|
3007 | 2911 | { |
---|
3008 | | - centralPanel.remove(timelinePanel); |
---|
| 2912 | + centralPanel.remove(cameraPanel); |
---|
3009 | 2913 | centralPanel.add(cameraView); |
---|
3010 | 2914 | frame.setJMenuBar(null); |
---|
3011 | 2915 | if (!wasFullScreen) |
---|
.. | .. |
---|
3021 | 2925 | frame.validate(); |
---|
3022 | 2926 | |
---|
3023 | 2927 | return; |
---|
3024 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 2928 | + } else if (event.getSource() == toggleSwitchItem) |
---|
3025 | 2929 | { |
---|
3026 | | - cameraView.ToggleRandom(); |
---|
| 2930 | + cameraView.ToggleSwitch(); |
---|
3027 | 2931 | cameraView.repaint(); |
---|
3028 | 2932 | return; |
---|
3029 | 2933 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
3052 | 2956 | { |
---|
3053 | 2957 | copy.live ^= true; |
---|
3054 | 2958 | return; |
---|
| 2959 | + } else if (event.getSource() == selectCB) |
---|
| 2960 | + { |
---|
| 2961 | + copy.dontselect ^= true; |
---|
| 2962 | + return; |
---|
3055 | 2963 | } else if (event.getSource() == hideCB) |
---|
3056 | 2964 | { |
---|
3057 | 2965 | copy.hide ^= true; |
---|
.. | .. |
---|
3066 | 2974 | if (event.getSource() == randomCB) |
---|
3067 | 2975 | { |
---|
3068 | 2976 | copy.random ^= true; |
---|
| 2977 | + objEditor.refreshContents(); |
---|
3069 | 2978 | return; |
---|
3070 | 2979 | } |
---|
3071 | 2980 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3089 | 2998 | |
---|
3090 | 2999 | public void actionPerformed(ActionEvent event) |
---|
3091 | 3000 | { |
---|
| 3001 | + Object source = event.getSource(); |
---|
3092 | 3002 | // SCRIPT DIALOG |
---|
3093 | | - if (event.getSource() == okbutton) |
---|
| 3003 | + if (source == okbutton) |
---|
3094 | 3004 | { |
---|
3095 | 3005 | textpanel.setVisible(false); |
---|
3096 | 3006 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3102 | 3012 | textarea = null; |
---|
3103 | 3013 | textpanel = null; |
---|
3104 | 3014 | } |
---|
3105 | | - if (event.getSource() == cancelbutton) |
---|
| 3015 | + if (source == cancelbutton) |
---|
3106 | 3016 | { |
---|
3107 | 3017 | textpanel.setVisible(false); |
---|
3108 | 3018 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3114 | 3024 | //applySelf(); |
---|
3115 | 3025 | //client.refreshEditWindow(); |
---|
3116 | 3026 | //refreshContents(); |
---|
3117 | | - if (event.getSource() == nameField) |
---|
| 3027 | + if (source == nameField) |
---|
3118 | 3028 | { |
---|
3119 | 3029 | //System.out.println("ObjEditor " + event); |
---|
3120 | 3030 | applySelf0(true); |
---|
3121 | 3031 | //parent.applySelf(); |
---|
3122 | 3032 | objEditor.refreshContents(); |
---|
3123 | | - } else if (event.getSource() == resetButton) |
---|
| 3033 | + } else if (source == resetButton) |
---|
3124 | 3034 | { |
---|
3125 | 3035 | CameraPane.fullreset = true; |
---|
3126 | 3036 | copy.Reset(); // ResetMeshes(); |
---|
3127 | 3037 | copy.Touch(); |
---|
3128 | 3038 | objEditor.refreshContents(); |
---|
3129 | | - } else if (event.getSource() == stepItem) |
---|
| 3039 | + } else if (source == stepItem) |
---|
3130 | 3040 | { |
---|
3131 | | - cameraView.ONESTEP = true; |
---|
| 3041 | + //cameraView.ONESTEP = true; |
---|
| 3042 | + Globals.ONESTEP = true; |
---|
3132 | 3043 | cameraView.repaint(); |
---|
3133 | 3044 | return; |
---|
3134 | | - } else if (event.getSource() == stepButton) |
---|
| 3045 | + } else if (source == stepButton) |
---|
3135 | 3046 | { |
---|
3136 | 3047 | copy.Step(); |
---|
3137 | 3048 | copy.Touch(); |
---|
3138 | 3049 | objEditor.refreshContents(); |
---|
3139 | | - } else if (event.getSource() == slowerButton) |
---|
| 3050 | + } else if (source == slowerButton) |
---|
3140 | 3051 | { |
---|
3141 | 3052 | copy.Slower(); |
---|
3142 | 3053 | copy.Touch(); |
---|
3143 | 3054 | objEditor.refreshContents(); |
---|
3144 | | - } else if (event.getSource() == fasterButton) |
---|
| 3055 | + } else if (source == fasterButton) |
---|
3145 | 3056 | { |
---|
3146 | 3057 | copy.Faster(); |
---|
3147 | 3058 | copy.Touch(); |
---|
3148 | 3059 | objEditor.refreshContents(); |
---|
3149 | | - } else if (event.getSource() == remarkButton) |
---|
| 3060 | + } else if (source == remarkButton) |
---|
3150 | 3061 | { |
---|
3151 | 3062 | copy.Remark(); |
---|
3152 | 3063 | copy.Touch(); |
---|
3153 | 3064 | objEditor.refreshContents(); |
---|
3154 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3065 | + } else if (source == stepAllButton) |
---|
3155 | 3066 | { |
---|
3156 | 3067 | copy.StepAll(); |
---|
3157 | 3068 | copy.Touch(); |
---|
3158 | 3069 | objEditor.refreshContents(); |
---|
3159 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3070 | + } else if (source == resetAllButton) |
---|
3160 | 3071 | { |
---|
3161 | 3072 | //CameraPane.fullreset = true; |
---|
3162 | 3073 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3189 | 3100 | // Close(); |
---|
3190 | 3101 | // } |
---|
3191 | 3102 | // else |
---|
3192 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3103 | + if (source == resetSlidersButton) |
---|
3193 | 3104 | { |
---|
3194 | 3105 | ResetSliders(); |
---|
3195 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3106 | + } else if (source == clearMaterialButton) |
---|
3196 | 3107 | { |
---|
3197 | 3108 | ClearMaterial(); |
---|
3198 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3109 | + } else if (source == createMaterialButton) |
---|
3199 | 3110 | { |
---|
3200 | 3111 | CreateMaterial(); |
---|
3201 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3112 | + } else if (source == clearPanelButton) |
---|
3202 | 3113 | { |
---|
3203 | 3114 | copy.ClearUI(); |
---|
3204 | 3115 | refreshContents(true); |
---|
3205 | | - } /* |
---|
3206 | | - } |
---|
3207 | | - |
---|
3208 | | - public boolean action(Event event, Object arg) |
---|
3209 | | - { |
---|
3210 | | - */ 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) |
---|
3211 | 3141 | { |
---|
3212 | 3142 | Close(); |
---|
3213 | 3143 | //return true; |
---|
3214 | | - } else if (event.getSource() == loadItem) |
---|
| 3144 | + } else if (source == loadItem) |
---|
3215 | 3145 | { |
---|
3216 | 3146 | load(); |
---|
3217 | 3147 | //return true; |
---|
3218 | | - } else if (event.getSource() == saveItem) |
---|
| 3148 | + } else if (source == newItem) |
---|
| 3149 | + { |
---|
| 3150 | + New(); |
---|
| 3151 | + } else if (source == saveItem) |
---|
3219 | 3152 | { |
---|
3220 | 3153 | save(); |
---|
3221 | 3154 | //return true; |
---|
3222 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3155 | + } else if (source == saveAsItem) |
---|
3223 | 3156 | { |
---|
3224 | 3157 | saveAs(); |
---|
3225 | 3158 | //return true; |
---|
3226 | | - } else if (event.getSource() == reexportItem) |
---|
| 3159 | + } else if (source == reexportItem) |
---|
3227 | 3160 | { |
---|
3228 | 3161 | reexport(); |
---|
3229 | 3162 | //return true; |
---|
3230 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3163 | + } else if (source == exportAsItem) |
---|
3231 | 3164 | { |
---|
3232 | 3165 | export(); |
---|
3233 | 3166 | //return true; |
---|
3234 | | - } else if (event.getSource() == povItem) |
---|
| 3167 | + } else if (source == povItem) |
---|
3235 | 3168 | { |
---|
3236 | 3169 | generatePOV(); |
---|
3237 | 3170 | //return true; |
---|
3238 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3171 | + } else if (source == zBufferItem) |
---|
3239 | 3172 | { |
---|
3240 | 3173 | try |
---|
3241 | 3174 | { |
---|
.. | .. |
---|
3257 | 3190 | cameraView.repaint(); |
---|
3258 | 3191 | //return true; |
---|
3259 | 3192 | } |
---|
3260 | | - */ else if (event.getSource() == editCameraItem) |
---|
3261 | | - { |
---|
3262 | | - cameraView.ProtectCamera(); |
---|
3263 | | - cameraView.repaint(); |
---|
3264 | | - return; |
---|
3265 | | - } else if (event.getSource() == revertCameraItem) |
---|
3266 | | - { |
---|
3267 | | - cameraView.RevertCamera(); |
---|
3268 | | - cameraView.repaint(); |
---|
3269 | | - return; |
---|
3270 | | -// } else if (event.getSource() == textureButton) |
---|
3271 | | -// { |
---|
3272 | | -// return; // true; |
---|
3273 | | - } else // combos... |
---|
3274 | | - if (event.getSource() == texresMenu) |
---|
| 3193 | + */ else // combos... |
---|
| 3194 | + if (source == texresMenu) |
---|
3275 | 3195 | { |
---|
3276 | 3196 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3277 | 3197 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3283 | 3203 | } |
---|
3284 | 3204 | } |
---|
3285 | 3205 | |
---|
3286 | | - void ToggleAnimation() |
---|
| 3206 | + void New() |
---|
3287 | 3207 | { |
---|
3288 | | - if (!CameraPane.ANIMATION) |
---|
| 3208 | + while (copy.Size() > 1) |
---|
3289 | 3209 | { |
---|
3290 | | - 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(Object3D 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 | + Object3D parent = o.parent; |
---|
| 3226 | + o.parent = null; |
---|
| 3227 | + |
---|
| 3228 | + out.writeObject(o); |
---|
| 3229 | + |
---|
| 3230 | + o.parent = parent; |
---|
| 3231 | + |
---|
| 3232 | + out.flush(); |
---|
| 3233 | + |
---|
| 3234 | + zstream.close(); |
---|
| 3235 | + out.close(); |
---|
| 3236 | + |
---|
| 3237 | + return baos.toByteArray(); |
---|
| 3238 | + } catch (Exception e) |
---|
| 3239 | + { |
---|
| 3240 | + System.err.println(e); |
---|
| 3241 | + return null; |
---|
| 3242 | + } |
---|
| 3243 | + } |
---|
| 3244 | + |
---|
| 3245 | + static public Object Uncompress(byte[] bytes) |
---|
| 3246 | + { |
---|
| 3247 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3248 | + try |
---|
| 3249 | + { |
---|
| 3250 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3251 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3252 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3253 | + Object obj = in.readObject(); |
---|
| 3254 | + in.close(); |
---|
| 3255 | + |
---|
| 3256 | + return obj; |
---|
| 3257 | + } catch (Exception e) |
---|
| 3258 | + { |
---|
| 3259 | + System.err.println(e); |
---|
| 3260 | + return null; |
---|
| 3261 | + } |
---|
| 3262 | + } |
---|
| 3263 | + |
---|
| 3264 | + static public Object clone(Object o) |
---|
| 3265 | + { |
---|
| 3266 | + try |
---|
| 3267 | + { |
---|
| 3268 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3269 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3270 | + |
---|
| 3271 | + out.writeObject(o); |
---|
| 3272 | + |
---|
| 3273 | + out.flush(); |
---|
| 3274 | + out.close(); |
---|
| 3275 | + |
---|
| 3276 | + byte[] bytes = baos.toByteArray(); |
---|
| 3277 | + |
---|
| 3278 | + System.out.println("clone = " + bytes.length); |
---|
| 3279 | + |
---|
| 3280 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3281 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3282 | + Object obj = in.readObject(); |
---|
| 3283 | + in.close(); |
---|
| 3284 | + |
---|
| 3285 | + return obj; |
---|
| 3286 | + } catch (Exception e) |
---|
| 3287 | + { |
---|
| 3288 | + System.err.println(e); |
---|
| 3289 | + return null; |
---|
| 3290 | + } |
---|
| 3291 | + } |
---|
| 3292 | + |
---|
| 3293 | + cRadio GetCurrentTab() |
---|
| 3294 | + { |
---|
| 3295 | + cRadio ab; |
---|
| 3296 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3297 | + { |
---|
| 3298 | + ab = (cRadio)e.nextElement(); |
---|
| 3299 | + if(ab.GetObject() == copy) |
---|
| 3300 | + { |
---|
| 3301 | + return ab; |
---|
| 3302 | + } |
---|
| 3303 | + } |
---|
| 3304 | + |
---|
| 3305 | + return null; |
---|
| 3306 | + } |
---|
| 3307 | + |
---|
| 3308 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3309 | + |
---|
| 3310 | + public void Save() |
---|
| 3311 | + { |
---|
| 3312 | + cRadio tab = GetCurrentTab(); |
---|
| 3313 | + |
---|
| 3314 | + boolean temp = CameraPane.SWITCH; |
---|
| 3315 | + CameraPane.SWITCH = false; |
---|
| 3316 | + |
---|
| 3317 | + copy.ExtractBigData(hashtable); |
---|
| 3318 | + |
---|
| 3319 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3320 | + tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3321 | + |
---|
| 3322 | + copy.RestoreBigData(hashtable); |
---|
| 3323 | + |
---|
| 3324 | + CameraPane.SWITCH = temp; |
---|
| 3325 | + |
---|
| 3326 | + //assert(hashtable.isEmpty()); |
---|
| 3327 | + |
---|
| 3328 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3329 | + { |
---|
| 3330 | + tab.graphs[i] = null; |
---|
| 3331 | + } |
---|
| 3332 | + |
---|
| 3333 | + // test save |
---|
| 3334 | + if (false) |
---|
| 3335 | + { |
---|
| 3336 | + try |
---|
| 3337 | + { |
---|
| 3338 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3339 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3340 | + |
---|
| 3341 | + p.writeObject(copy); |
---|
| 3342 | + |
---|
| 3343 | + p.flush(); |
---|
| 3344 | + |
---|
| 3345 | + ostream.close(); |
---|
| 3346 | + } catch (Exception e) |
---|
| 3347 | + { |
---|
| 3348 | + e.printStackTrace(); |
---|
| 3349 | + } |
---|
| 3350 | + } |
---|
| 3351 | + } |
---|
| 3352 | + |
---|
| 3353 | + void CopyChanged(Object3D obj) |
---|
| 3354 | + { |
---|
| 3355 | + boolean temp = CameraPane.SWITCH; |
---|
| 3356 | + CameraPane.SWITCH = false; |
---|
| 3357 | + |
---|
| 3358 | + copy.ExtractBigData(hashtable); |
---|
| 3359 | + |
---|
| 3360 | + copy.clear(); |
---|
| 3361 | + |
---|
| 3362 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3363 | + { |
---|
| 3364 | + copy.add(obj.get(i)); |
---|
| 3365 | + } |
---|
| 3366 | + |
---|
| 3367 | + copy.RestoreBigData(hashtable); |
---|
| 3368 | + |
---|
| 3369 | + CameraPane.SWITCH = temp; |
---|
| 3370 | + |
---|
| 3371 | + //assert(hashtable.isEmpty()); |
---|
| 3372 | + |
---|
| 3373 | + copy.Touch(); |
---|
| 3374 | + |
---|
| 3375 | + ResetModel(); |
---|
| 3376 | + copy.HardTouch(); // recompile? |
---|
| 3377 | + |
---|
| 3378 | + cRadio ab; |
---|
| 3379 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3380 | + { |
---|
| 3381 | + ab = (cRadio)e.nextElement(); |
---|
| 3382 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3383 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3384 | + if (test != null) |
---|
| 3385 | + { |
---|
| 3386 | + test.editWindow = ab.object.editWindow; |
---|
| 3387 | + ab.object = test; |
---|
| 3388 | + } |
---|
| 3389 | + } |
---|
| 3390 | + |
---|
| 3391 | + refreshContents(); |
---|
| 3392 | + } |
---|
| 3393 | + |
---|
| 3394 | + public void Undo() |
---|
| 3395 | + { |
---|
| 3396 | + cRadio tab = GetCurrentTab(); |
---|
| 3397 | + |
---|
| 3398 | + if (tab.undoindex == 0) |
---|
| 3399 | + { |
---|
| 3400 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3401 | + return; |
---|
| 3402 | + } |
---|
| 3403 | + |
---|
| 3404 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3405 | + { |
---|
| 3406 | + Save(); |
---|
| 3407 | + tab.undoindex -= 1; |
---|
| 3408 | + } |
---|
| 3409 | + |
---|
| 3410 | + tab.undoindex -= 1; |
---|
| 3411 | + |
---|
| 3412 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3413 | + } |
---|
| 3414 | + |
---|
| 3415 | + public void Redo() |
---|
| 3416 | + { |
---|
| 3417 | + cRadio tab = GetCurrentTab(); |
---|
| 3418 | + |
---|
| 3419 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3420 | + { |
---|
| 3421 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3422 | + return; |
---|
| 3423 | + } |
---|
| 3424 | + |
---|
| 3425 | + tab.undoindex += 1; |
---|
| 3426 | + |
---|
| 3427 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3428 | + } |
---|
| 3429 | + |
---|
| 3430 | + void ImportGFD() |
---|
| 3431 | + { |
---|
| 3432 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
3291 | 3433 | browser.show(); |
---|
3292 | 3434 | String filename = browser.getFile(); |
---|
3293 | 3435 | if (filename != null && filename.length() > 0) |
---|
3294 | 3436 | { |
---|
3295 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3437 | + String fullname = browser.getDirectory() + filename; |
---|
| 3438 | + |
---|
| 3439 | + //Object3D readobj = |
---|
| 3440 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3441 | + //makeSomething(readobj); |
---|
| 3442 | + } |
---|
| 3443 | + } |
---|
| 3444 | + |
---|
| 3445 | + void ImportVRMLX3D() |
---|
| 3446 | + { |
---|
| 3447 | + if (Grafreed.standAlone) |
---|
| 3448 | + { |
---|
| 3449 | + /**/ |
---|
| 3450 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3451 | + browser.show(); |
---|
| 3452 | + String filename = browser.getFile(); |
---|
| 3453 | + if (filename != null && filename.length() > 0) |
---|
| 3454 | + { |
---|
| 3455 | + String fullname = browser.getDirectory() + filename; |
---|
| 3456 | + LoadVRMLX3D(fullname); |
---|
| 3457 | + } |
---|
| 3458 | + /**/ |
---|
| 3459 | + } |
---|
| 3460 | + } |
---|
| 3461 | + |
---|
| 3462 | + void ToggleAnimation() |
---|
| 3463 | + { |
---|
| 3464 | + if (!Globals.ANIMATION) |
---|
| 3465 | + { |
---|
| 3466 | + FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3467 | + browser.setVisible(true); |
---|
| 3468 | + String filename = browser.getFile(); |
---|
| 3469 | + if (filename != null && filename.length() > 0) |
---|
| 3470 | + { |
---|
| 3471 | + Globals.filename = browser.getDirectory() + filename; |
---|
3296 | 3472 | //CameraPane.framecount = 0; |
---|
3297 | | - CameraPane.imagecount = 0; |
---|
| 3473 | + Globals.imagecount = 0; |
---|
3298 | 3474 | |
---|
3299 | | - CameraPane.ANIMATION ^= true; |
---|
| 3475 | + Globals.ANIMATION ^= true; |
---|
3300 | 3476 | |
---|
3301 | | - GrafreeD.wav.cursor = 0; |
---|
3302 | | - GrafreeD.wav.loop = 0; |
---|
| 3477 | + Grafreed.wav.cursor = 0; |
---|
| 3478 | + Grafreed.wav.loop = 0; |
---|
3303 | 3479 | } |
---|
3304 | 3480 | } else |
---|
3305 | 3481 | { |
---|
3306 | | - CameraPane.ANIMATION ^= true; |
---|
| 3482 | + Globals.ANIMATION ^= true; |
---|
3307 | 3483 | } |
---|
3308 | 3484 | } |
---|
3309 | 3485 | |
---|
.. | .. |
---|
3349 | 3525 | void CreateMaterial() |
---|
3350 | 3526 | { |
---|
3351 | 3527 | //copy.ClearMaterial(); // PATCH |
---|
3352 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3528 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3353 | 3529 | if (copy.selection.size() > 0) |
---|
3354 | 3530 | //SetMaterial(copy); |
---|
3355 | 3531 | { |
---|
.. | .. |
---|
3408 | 3584 | { |
---|
3409 | 3585 | copy.ResetBlockLoop(); // temporary problem |
---|
3410 | 3586 | |
---|
3411 | | - boolean random = CameraPane.RANDOM; |
---|
3412 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3587 | + boolean random = CameraPane.SWITCH; |
---|
| 3588 | + CameraPane.SWITCH = false; // parse everything |
---|
3413 | 3589 | copy.ResetDisplayList(); |
---|
3414 | 3590 | copy.HardTouch(); |
---|
3415 | | - CameraPane.RANDOM = random; |
---|
| 3591 | + CameraPane.SWITCH = random; |
---|
3416 | 3592 | } |
---|
3417 | 3593 | |
---|
3418 | 3594 | // public void applySelf() |
---|
.. | .. |
---|
3482 | 3658 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
3483 | 3659 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
3484 | 3660 | |
---|
3485 | | - if (!NumberSlider.frozen) |
---|
| 3661 | + if (!cNumberSlider.frozen) |
---|
3486 | 3662 | { |
---|
3487 | 3663 | //System.out.println("Propagate = " + propagate); |
---|
3488 | 3664 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3665 | + |
---|
| 3666 | + if (copy.material != null) |
---|
| 3667 | + { |
---|
| 3668 | + cMaterial mat = copy.material; |
---|
| 3669 | + |
---|
| 3670 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3671 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3672 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3673 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3674 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3675 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3676 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3677 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3678 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3679 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3680 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3681 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3682 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3683 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3684 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3685 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3686 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3687 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3688 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3689 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3690 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3691 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3692 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3693 | + } |
---|
| 3694 | + |
---|
3489 | 3695 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3490 | 3696 | { |
---|
3491 | 3697 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3530 | 3736 | || e.getSource() == apertureField |
---|
3531 | 3737 | || e.getSource() == shadowblurField) |
---|
3532 | 3738 | { |
---|
| 3739 | + new Exception().printStackTrace(); |
---|
3533 | 3740 | System.exit(0); |
---|
3534 | 3741 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3535 | 3742 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
3600 | 3807 | } |
---|
3601 | 3808 | |
---|
3602 | 3809 | if (normalpushField != null) |
---|
3603 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3810 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3604 | 3811 | } |
---|
3605 | 3812 | |
---|
3606 | 3813 | void SnapObject() |
---|
.. | .. |
---|
3855 | 4062 | |
---|
3856 | 4063 | radioPanel.revalidate(); |
---|
3857 | 4064 | radioPanel.repaint(); |
---|
3858 | | - ctrlPanel.revalidate(); // ? new |
---|
| 4065 | + ctrlPanel.validate(); // ? new |
---|
3859 | 4066 | ctrlPanel.repaint(); |
---|
3860 | 4067 | } |
---|
3861 | 4068 | } |
---|
.. | .. |
---|
3864 | 4071 | |
---|
3865 | 4072 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3866 | 4073 | { |
---|
| 4074 | + Save(); |
---|
3867 | 4075 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3868 | 4076 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3869 | 4077 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4067 | 4275 | } |
---|
4068 | 4276 | } |
---|
4069 | 4277 | } |
---|
| 4278 | + |
---|
4070 | 4279 | LoadGFDThread loadGFDThread; |
---|
4071 | 4280 | |
---|
4072 | 4281 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4086 | 4295 | |
---|
4087 | 4296 | try |
---|
4088 | 4297 | { |
---|
| 4298 | + // Try compressed version first. |
---|
4089 | 4299 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4090 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4300 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4301 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4091 | 4302 | |
---|
4092 | 4303 | readobj = (Object3D) p.readObject(); |
---|
4093 | 4304 | istream.close(); |
---|
.. | .. |
---|
4095 | 4306 | readobj.ResetDisplayList(); |
---|
4096 | 4307 | } catch (Exception e) |
---|
4097 | 4308 | { |
---|
4098 | | - e.printStackTrace(); |
---|
| 4309 | + //e.printStackTrace(); |
---|
| 4310 | + try |
---|
| 4311 | + { |
---|
| 4312 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4313 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4314 | + |
---|
| 4315 | + readobj = (Object3D) p.readObject(); |
---|
| 4316 | + istream.close(); |
---|
| 4317 | + |
---|
| 4318 | + readobj.ResetDisplayList(); |
---|
| 4319 | + } catch (Exception e2) |
---|
| 4320 | + { |
---|
| 4321 | + e2.printStackTrace(); |
---|
| 4322 | + } |
---|
4099 | 4323 | } |
---|
4100 | 4324 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4101 | 4325 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4141 | 4365 | |
---|
4142 | 4366 | void LoadIt(Object obj) |
---|
4143 | 4367 | { |
---|
| 4368 | + if (obj == null) |
---|
| 4369 | + { |
---|
| 4370 | + // Invalid file |
---|
| 4371 | + return; |
---|
| 4372 | + } |
---|
| 4373 | + |
---|
4144 | 4374 | System.out.println("Loaded " + obj); |
---|
4145 | 4375 | //new Exception().printStackTrace(); |
---|
4146 | 4376 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4150 | 4380 | |
---|
4151 | 4381 | if (readobj != null) |
---|
4152 | 4382 | { |
---|
| 4383 | + Save(); |
---|
4153 | 4384 | try |
---|
4154 | 4385 | { |
---|
4155 | 4386 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4212 | 4443 | |
---|
4213 | 4444 | void load() // throws ClassNotFoundException |
---|
4214 | 4445 | { |
---|
4215 | | - if (GrafreeD.standAlone) |
---|
| 4446 | + if (Grafreed.standAlone) |
---|
4216 | 4447 | { |
---|
4217 | 4448 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4218 | 4449 | browser.show(); |
---|
.. | .. |
---|
4299 | 4530 | try |
---|
4300 | 4531 | { |
---|
4301 | 4532 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4302 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4533 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4534 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4303 | 4535 | |
---|
4304 | 4536 | p.writeObject(copy); |
---|
4305 | 4537 | p.flush(); |
---|
4306 | 4538 | |
---|
| 4539 | + zstream.close(); |
---|
4307 | 4540 | ostream.close(); |
---|
4308 | 4541 | |
---|
4309 | 4542 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4313 | 4546 | { |
---|
4314 | 4547 | } |
---|
4315 | 4548 | } |
---|
| 4549 | + |
---|
4316 | 4550 | String lastname; |
---|
4317 | 4551 | |
---|
4318 | 4552 | void saveAs() |
---|
4319 | 4553 | { |
---|
4320 | | - if (GrafreeD.standAlone) |
---|
| 4554 | + if (Grafreed.standAlone) |
---|
4321 | 4555 | { |
---|
4322 | 4556 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4323 | 4557 | browser.setVisible(true); |
---|
.. | .. |
---|
4422 | 4656 | try |
---|
4423 | 4657 | { |
---|
4424 | 4658 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4425 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4426 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4659 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4660 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4427 | 4661 | |
---|
4428 | 4662 | Object3D objectparent = obj.parent; |
---|
4429 | 4663 | obj.parent = null; |
---|
4430 | 4664 | |
---|
4431 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4665 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4432 | 4666 | |
---|
4433 | 4667 | obj.parent = objectparent; |
---|
4434 | 4668 | |
---|
.. | .. |
---|
4440 | 4674 | p.writeObject(object); |
---|
4441 | 4675 | p.flush(); |
---|
4442 | 4676 | |
---|
| 4677 | + zstream.close(); |
---|
4443 | 4678 | ostream.close(); |
---|
4444 | | - // zstream.close(); |
---|
4445 | 4679 | |
---|
4446 | 4680 | // group.selection.get(0).parent = parent; |
---|
4447 | 4681 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4462 | 4696 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4463 | 4697 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4464 | 4698 | copy.generatePOV(buffer); |
---|
4465 | | - if (GrafreeD.standAlone) |
---|
| 4699 | + if (Grafreed.standAlone) |
---|
4466 | 4700 | { |
---|
4467 | 4701 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4468 | 4702 | browser.show(); |
---|
.. | .. |
---|
4488 | 4722 | Object3D client; |
---|
4489 | 4723 | Object3D copy; |
---|
4490 | 4724 | MenuBar menuBar; |
---|
4491 | | - Menu windowMenu; |
---|
| 4725 | + Menu fileMenu; |
---|
| 4726 | + MenuItem newItem; |
---|
4492 | 4727 | MenuItem loadItem; |
---|
4493 | 4728 | MenuItem saveItem; |
---|
4494 | 4729 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4496 | 4731 | MenuItem reexportItem; |
---|
4497 | 4732 | MenuItem povItem; |
---|
4498 | 4733 | MenuItem closeItem; |
---|
4499 | | - Menu cameraMenu; |
---|
| 4734 | + |
---|
4500 | 4735 | CheckboxMenuItem zBufferItem; |
---|
4501 | 4736 | //MenuItem normalLensItem; |
---|
4502 | | - MenuItem editCameraItem; |
---|
4503 | | - MenuItem revertCameraItem; |
---|
4504 | | - CheckboxMenuItem toggleLiveItem; |
---|
4505 | 4737 | MenuItem stepItem; |
---|
| 4738 | + CheckboxMenuItem toggleLiveItem; |
---|
4506 | 4739 | CheckboxMenuItem toggleFullScreenItem; |
---|
4507 | 4740 | CheckboxMenuItem toggleTimelineItem; |
---|
4508 | 4741 | CheckboxMenuItem toggleRenderItem; |
---|
.. | .. |
---|
4511 | 4744 | CheckboxMenuItem toggleFootContactItem; |
---|
4512 | 4745 | CheckboxMenuItem toggleDLItem; |
---|
4513 | 4746 | CheckboxMenuItem toggleTextureItem; |
---|
4514 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4747 | + CheckboxMenuItem toggleSwitchItem; |
---|
4515 | 4748 | CheckboxMenuItem toggleRootItem; |
---|
4516 | 4749 | CheckboxMenuItem animationItem; |
---|
4517 | 4750 | CheckboxMenuItem toggleHandleItem; |
---|
.. | .. |
---|
4519 | 4752 | JSplitPane mainPanel; |
---|
4520 | 4753 | JScrollPane scrollpane; |
---|
4521 | 4754 | JPanel toolbarPanel; |
---|
4522 | | - JPanel treePanel; |
---|
| 4755 | + cGridBag treePanel; |
---|
4523 | 4756 | JPanel radioPanel; |
---|
4524 | 4757 | ButtonGroup buttonGroup; |
---|
4525 | | - JPanel ctrlPanel; |
---|
4526 | | - JPanel materialPanel; |
---|
| 4758 | + cGridBag ctrlPanel; |
---|
| 4759 | + cGridBag materialPanel; |
---|
4527 | 4760 | JScrollPane infoPanel; |
---|
4528 | | - JPanel optionsPanel; |
---|
| 4761 | + cGridBag optionsPanel; |
---|
4529 | 4762 | JTabbedPane objectPanel; |
---|
4530 | | - JPanel XYZPanel; |
---|
| 4763 | + cGridBag XYZPanel; |
---|
4531 | 4764 | JSplitPane gridPanel; |
---|
4532 | 4765 | JSplitPane bigPanel; |
---|
4533 | | - JPanel bigThree; |
---|
4534 | | - JTabbedPane scenePanel; |
---|
4535 | | - JPanel centralPanel; |
---|
| 4766 | + cGridBag bigThree; |
---|
| 4767 | + cGridBag scenePanel; |
---|
| 4768 | + cGridBag centralPanel; |
---|
| 4769 | + JSplitPane cameraPanel; |
---|
4536 | 4770 | JPanel timelinePanel; |
---|
4537 | 4771 | JMenuBar timelineMenubar; |
---|
4538 | 4772 | JSplitPane framePanel; |
---|
.. | .. |
---|
4584 | 4818 | // MATERIAL |
---|
4585 | 4819 | JLabel materialLabel; |
---|
4586 | 4820 | JLabel colorLabel; |
---|
4587 | | - NumberSlider colorField; |
---|
| 4821 | + cNumberSlider colorField; |
---|
4588 | 4822 | JLabel modulationLabel; |
---|
4589 | | - NumberSlider modulationField; |
---|
| 4823 | + cNumberSlider modulationField; |
---|
4590 | 4824 | JLabel metalnessLabel; |
---|
4591 | | - NumberSlider metalnessField; |
---|
| 4825 | + cNumberSlider metalnessField; |
---|
4592 | 4826 | JLabel diffuseLabel; |
---|
4593 | | - NumberSlider diffuseField; |
---|
| 4827 | + cNumberSlider diffuseField; |
---|
4594 | 4828 | JLabel specularLabel; |
---|
4595 | | - NumberSlider specularField; |
---|
| 4829 | + cNumberSlider specularField; |
---|
4596 | 4830 | JLabel shininessLabel; |
---|
4597 | | - NumberSlider shininessField; |
---|
| 4831 | + cNumberSlider shininessField; |
---|
4598 | 4832 | JLabel shiftLabel; |
---|
4599 | | - NumberSlider shiftField; |
---|
| 4833 | + cNumberSlider shiftField; |
---|
4600 | 4834 | JLabel ambientLabel; |
---|
4601 | | - NumberSlider ambientField; |
---|
| 4835 | + cNumberSlider ambientField; |
---|
4602 | 4836 | JLabel lightareaLabel; |
---|
4603 | | - NumberSlider lightareaField; |
---|
| 4837 | + cNumberSlider lightareaField; |
---|
4604 | 4838 | JLabel diffusenessLabel; |
---|
4605 | | - NumberSlider diffusenessField; |
---|
| 4839 | + cNumberSlider diffusenessField; |
---|
4606 | 4840 | JLabel velvetLabel; |
---|
4607 | | - NumberSlider velvetField; |
---|
| 4841 | + cNumberSlider velvetField; |
---|
4608 | 4842 | JLabel sheenLabel; |
---|
4609 | | - NumberSlider sheenField; |
---|
| 4843 | + cNumberSlider sheenField; |
---|
4610 | 4844 | JLabel subsurfaceLabel; |
---|
4611 | | - NumberSlider subsurfaceField; |
---|
| 4845 | + cNumberSlider subsurfaceField; |
---|
4612 | 4846 | //JLabel bumpLabel; |
---|
4613 | 4847 | //NumberSlider bumpField; |
---|
4614 | 4848 | JLabel backlitLabel; |
---|
4615 | | - NumberSlider backlitField; |
---|
| 4849 | + cNumberSlider backlitField; |
---|
4616 | 4850 | JLabel anisoLabel; |
---|
4617 | | - NumberSlider anisoField; |
---|
| 4851 | + cNumberSlider anisoField; |
---|
4618 | 4852 | JLabel anisoVLabel; |
---|
4619 | | - NumberSlider anisoVField; |
---|
| 4853 | + cNumberSlider anisoVField; |
---|
4620 | 4854 | JLabel cameraLabel; |
---|
4621 | | - NumberSlider cameraField; |
---|
| 4855 | + cNumberSlider cameraField; |
---|
4622 | 4856 | JLabel selfshadowLabel; |
---|
4623 | | - NumberSlider selfshadowField; |
---|
| 4857 | + cNumberSlider selfshadowField; |
---|
4624 | 4858 | JLabel shadowLabel; |
---|
4625 | | - NumberSlider shadowField; |
---|
| 4859 | + cNumberSlider shadowField; |
---|
4626 | 4860 | JLabel textureLabel; |
---|
4627 | | - NumberSlider textureField; |
---|
| 4861 | + cNumberSlider textureField; |
---|
4628 | 4862 | JLabel opacityLabel; |
---|
4629 | | - NumberSlider opacityField; |
---|
| 4863 | + cNumberSlider opacityField; |
---|
4630 | 4864 | JLabel fakedepthLabel; |
---|
4631 | | - NumberSlider fakedepthField; |
---|
| 4865 | + cNumberSlider fakedepthField; |
---|
4632 | 4866 | JLabel shadowbiasLabel; |
---|
4633 | | - NumberSlider shadowbiasField; |
---|
| 4867 | + cNumberSlider shadowbiasField; |
---|
4634 | 4868 | JLabel bumpLabel; |
---|
4635 | | - NumberSlider bumpField; |
---|
| 4869 | + cNumberSlider bumpField; |
---|
4636 | 4870 | JLabel noiseLabel; |
---|
4637 | | - NumberSlider noiseField; |
---|
| 4871 | + cNumberSlider noiseField; |
---|
4638 | 4872 | JLabel powerLabel; |
---|
4639 | | - NumberSlider powerField; |
---|
| 4873 | + cNumberSlider powerField; |
---|
4640 | 4874 | JLabel borderfadeLabel; |
---|
4641 | | - NumberSlider borderfadeField; |
---|
| 4875 | + cNumberSlider borderfadeField; |
---|
4642 | 4876 | JLabel fogLabel; |
---|
4643 | | - NumberSlider fogField; |
---|
| 4877 | + cNumberSlider fogField; |
---|
4644 | 4878 | JLabel opacityPowerLabel; |
---|
4645 | | - NumberSlider opacityPowerField; |
---|
| 4879 | + cNumberSlider opacityPowerField; |
---|
4646 | 4880 | JTree jTree; |
---|
4647 | 4881 | //ObjectUI parent; |
---|
4648 | 4882 | |
---|
4649 | | - NumberSlider normalpushField; |
---|
| 4883 | + cNumberSlider normalpushField; |
---|
| 4884 | + |
---|
| 4885 | + private MenuItem importGFDItem; |
---|
| 4886 | + private MenuItem importVRMLX3DItem; |
---|
| 4887 | + private MenuItem import3DSItem; |
---|
| 4888 | + private MenuItem importOBJItem; |
---|
4650 | 4889 | } |
---|