.. | .. |
---|
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, |
---|
.. | .. |
---|
28 | 30 | iSendInfo |
---|
29 | 31 | //KeyListener |
---|
30 | 32 | { |
---|
| 33 | + boolean timeline; |
---|
| 34 | + boolean wasFullScreen; |
---|
31 | 35 | |
---|
| 36 | + GroupEditor callee; |
---|
| 37 | + JFrame frame; |
---|
| 38 | + |
---|
32 | 39 | // SCRIPT |
---|
33 | 40 | |
---|
34 | 41 | transient JFrame textpanel = null; |
---|
.. | .. |
---|
119 | 126 | void keyPressed(int key, int modifiers) |
---|
120 | 127 | { |
---|
121 | 128 | System.out.println("KEY PRESSED"); |
---|
122 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
123 | 130 | } |
---|
124 | 131 | */ |
---|
125 | 132 | |
---|
126 | 133 | static GridBagConstraints aConstraints; |
---|
127 | 134 | static GridBagConstraints aWindowConstraints; |
---|
128 | | - GroupEditor callee; |
---|
129 | | - JFrame frame; |
---|
| 135 | + |
---|
130 | 136 | static int GRIDWIDTH = 100; // 4; |
---|
131 | 137 | |
---|
132 | 138 | public void closeUI() |
---|
133 | 139 | { |
---|
134 | 140 | //new Exception().printStackTrace(); |
---|
135 | | - System.out.println("this = " + this); |
---|
136 | | - System.out.println("objEditor = " + objEditor); |
---|
| 141 | +// System.out.println("this = " + this); |
---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
---|
137 | 143 | //nameField.removeActionListener(this); |
---|
138 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
---|
| 145 | + |
---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
---|
139 | 147 | |
---|
140 | 148 | if (!GroupEditor.allparams) |
---|
141 | 149 | return; |
---|
142 | 150 | |
---|
143 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
144 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
145 | | - objEditor.ctrlPanel.remove(markCB); |
---|
146 | | - |
---|
147 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
148 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
149 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
150 | | - |
---|
151 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
152 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
153 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
154 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
155 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
156 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
157 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
158 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
159 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
160 | | - 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); |
---|
| 169 | + |
---|
| 170 | + objEditor.ctrlPanel.remove(setupPanel); |
---|
| 171 | + objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 172 | + objEditor.ctrlPanel.remove(pushPanel); |
---|
| 173 | + //objEditor.ctrlPanel.remove(fillPanel); |
---|
| 174 | + |
---|
| 175 | + //Remove(normalpushField); |
---|
161 | 176 | } |
---|
162 | 177 | |
---|
163 | 178 | public ObjEditor GetEditor() |
---|
164 | 179 | { |
---|
165 | 180 | return objEditor; //.GetEditor(); |
---|
166 | 181 | } |
---|
| 182 | + |
---|
| 183 | + // Sometimes myself, sometimes my callee's. |
---|
167 | 184 | ObjEditor objEditor; |
---|
168 | 185 | |
---|
169 | 186 | /* |
---|
.. | .. |
---|
238 | 255 | //if (!isDisplayable()) |
---|
239 | 256 | //setUndecorated(true); |
---|
240 | 257 | |
---|
241 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 258 | + //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
242 | 259 | client = inClient; |
---|
243 | 260 | copy = localCopy; |
---|
244 | 261 | copy.editWindow = this; |
---|
.. | .. |
---|
259 | 276 | void SetupMenu() |
---|
260 | 277 | { |
---|
261 | 278 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
262 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
263 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
264 | | - windowMenu.add("-"); |
---|
265 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
266 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
| 279 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 280 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 281 | + fileMenu.add(loadItem = new MenuItem("Load...")); |
---|
| 282 | + |
---|
| 283 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 284 | + Menu menu = new Menu("Import"); |
---|
| 285 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 286 | + importOBJItem.addActionListener(this); |
---|
| 287 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 288 | + import3DSItem.addActionListener(this); |
---|
| 289 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 290 | + importVRMLX3DItem.addActionListener(this); |
---|
| 291 | + menu.add("-"); |
---|
| 292 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 293 | + importGFDItem.addActionListener(this); |
---|
| 294 | + fileMenu.add(menu); |
---|
| 295 | + fileMenu.add("-"); |
---|
| 296 | + |
---|
| 297 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 298 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
267 | 299 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
268 | | - windowMenu.add("-"); |
---|
269 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
270 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
271 | | - windowMenu.add("-"); |
---|
| 300 | + fileMenu.add("-"); |
---|
| 301 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 302 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 303 | + fileMenu.add("-"); |
---|
272 | 304 | if (client.parent != null) |
---|
273 | 305 | { |
---|
274 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 306 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
275 | 307 | } else |
---|
276 | 308 | { |
---|
277 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 309 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
278 | 310 | } |
---|
279 | 311 | |
---|
| 312 | + newItem.addActionListener(this); |
---|
280 | 313 | loadItem.addActionListener(this); |
---|
281 | 314 | saveItem.addActionListener(this); |
---|
282 | 315 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
285 | 318 | //povItem.addActionListener(this); |
---|
286 | 319 | closeItem.addActionListener(this); |
---|
287 | 320 | |
---|
288 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
289 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
290 | | - //zBufferItem.addActionListener(this); |
---|
291 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
292 | | - //normalLensItem.addActionListener(this); |
---|
293 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
294 | | - revertCameraItem.addActionListener(this); |
---|
295 | | - cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen")); |
---|
296 | | - toggleFullItem.addItemListener(this); |
---|
297 | | - toggleFullItem.setState(CameraPane.FULLSCREEN); |
---|
298 | | - cameraMenu.add("-"); |
---|
299 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
300 | | - toggleTextureItem.addItemListener(this); |
---|
301 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
302 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
303 | | - toggleLiveItem.addItemListener(this); |
---|
304 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
305 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
306 | | - stepItem.addActionListener(this); |
---|
307 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
308 | | -// toggleDLItem.addItemListener(this); |
---|
309 | | -// toggleDLItem.setState(false); |
---|
310 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
311 | | - toggleRenderItem.addItemListener(this); |
---|
312 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
313 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
314 | | - toggleDebugItem.addItemListener(this); |
---|
315 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
316 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
317 | | - toggleFrustumItem.addItemListener(this); |
---|
318 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
319 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
320 | | - toggleFootContactItem.addItemListener(this); |
---|
321 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
322 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
323 | | - toggleRandomItem.addItemListener(this); |
---|
324 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
325 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
326 | | - toggleHandleItem.addItemListener(this); |
---|
327 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
328 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
329 | | - togglePaintItem.addItemListener(this); |
---|
330 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
331 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
332 | | -// toggleRootItem.addItemListener(this); |
---|
333 | | -// toggleRootItem.setState(false); |
---|
334 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
335 | | -// animationItem.addItemListener(this); |
---|
336 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
337 | | - cameraMenu.add("-"); |
---|
338 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
339 | | - editCameraItem.addActionListener(this); |
---|
340 | | - |
---|
341 | 321 | objectPanel = new JTabbedPane(); |
---|
342 | 322 | toolbarPanel = new JPanel(); |
---|
343 | 323 | toolbarPanel.setName("Toolbar"); |
---|
344 | | - treePanel = new JPanel(); |
---|
| 324 | + treePanel = new cGridBag(); |
---|
345 | 325 | treePanel.setName("Tree"); |
---|
346 | | - ctrlPanel = new JPanel(); // new GridBagLayout()); |
---|
| 326 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
347 | 327 | ctrlPanel.setName("Edit"); |
---|
348 | | - materialPanel = new JPanel(); |
---|
| 328 | + materialPanel = new cGridBag().setVertical(true); |
---|
349 | 329 | materialPanel.setName("Material"); |
---|
350 | 330 | /*JTextPane*/ |
---|
351 | 331 | infoarea = createTextPane(); |
---|
| 332 | + doc = infoarea.getStyledDocument(); |
---|
| 333 | + |
---|
352 | 334 | infoarea.setEditable(true); |
---|
353 | 335 | SetText(); |
---|
354 | 336 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
355 | 337 | // infoarea.setOpaque(false); |
---|
356 | 338 | // //infoarea.setForeground(textcolor); |
---|
357 | | - infoarea.setLineWrap(true); |
---|
358 | | - infoarea.setWrapStyleWord(true); |
---|
| 339 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 340 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
359 | 341 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
360 | 342 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
361 | 343 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
366 | 348 | mainPanel.setName("Main"); |
---|
367 | 349 | mainPanel.setContinuousLayout(true); |
---|
368 | 350 | mainPanel.setOneTouchExpandable(true); |
---|
369 | | - mainPanel.setDividerLocation(1.0); |
---|
370 | 351 | mainPanel.setDividerSize(9); |
---|
371 | | - mainPanel.setResizeWeight(0); |
---|
| 352 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 353 | + mainPanel.setResizeWeight(0.5); |
---|
372 | 354 | |
---|
373 | 355 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
374 | 356 | //mainPanel.setLayout(new GridBagLayout()); |
---|
375 | 357 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
376 | | - treePanel.setLayout(new GridBagLayout()); |
---|
377 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
378 | | - materialPanel.setLayout(new GridBagLayout()); |
---|
| 358 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 359 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 360 | + //materialPanel.setLayout(new GridBagLayout()); |
---|
379 | 361 | |
---|
380 | 362 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
381 | 363 | GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0); |
---|
.. | .. |
---|
414 | 396 | static String newline = "\n"; |
---|
415 | 397 | protected static final String buttonString = "JButton"; |
---|
416 | 398 | StyledDocument doc; |
---|
417 | | - JTextArea infoarea; |
---|
| 399 | + JTextPane infoarea; |
---|
418 | 400 | |
---|
419 | 401 | void ClearInfo() |
---|
420 | 402 | { |
---|
.. | .. |
---|
463 | 445 | //SendInfo("Name:", "bold"); |
---|
464 | 446 | if (sel.GetTextures() != null || debug) |
---|
465 | 447 | { |
---|
466 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 448 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
467 | 449 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
468 | 450 | if (sel.Size() > 0) |
---|
469 | 451 | { |
---|
470 | 452 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
471 | 453 | } |
---|
472 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 454 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
473 | 455 | if (debug) |
---|
474 | 456 | { |
---|
475 | 457 | try |
---|
.. | .. |
---|
481 | 463 | } |
---|
482 | 464 | |
---|
483 | 465 | if (full) |
---|
484 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 466 | + { |
---|
| 467 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 468 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 469 | + } |
---|
485 | 470 | |
---|
486 | 471 | if (sel.bRep != null) |
---|
487 | 472 | { |
---|
.. | .. |
---|
508 | 493 | } |
---|
509 | 494 | if (sel.support != null) |
---|
510 | 495 | { |
---|
511 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 496 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
512 | 497 | } |
---|
513 | 498 | if (sel.scriptnode != null) |
---|
514 | 499 | { |
---|
.. | .. |
---|
579 | 564 | { |
---|
580 | 565 | CameraPane.pointflow = (PointFlow) sel; |
---|
581 | 566 | } |
---|
| 567 | + |
---|
| 568 | + si.SendInfo("_____________________", "regular"); |
---|
| 569 | + si.SendInfo("", "regular"); |
---|
582 | 570 | } |
---|
583 | 571 | } |
---|
584 | 572 | |
---|
.. | .. |
---|
594 | 582 | } |
---|
595 | 583 | } |
---|
596 | 584 | |
---|
597 | | - private JTextArea createTextPane() |
---|
598 | | - { |
---|
599 | | - String[] initString = |
---|
| 585 | + void ToggleFullScreen() |
---|
600 | 586 | { |
---|
601 | | - "This is an editable JTextPane, ", //regular |
---|
602 | | - "another ", //italic |
---|
603 | | - "styled ", //bold |
---|
604 | | - "text ", //small |
---|
605 | | - "component, ", //large |
---|
606 | | - "which supports embedded components..." + newline,//regular |
---|
607 | | - " " + newline, //button |
---|
608 | | - "...and embedded icons..." + newline, //regular |
---|
609 | | - " ", //icon |
---|
610 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
611 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
612 | | - + "cover methods for interacting with those objects." |
---|
613 | | - }; |
---|
614 | | - |
---|
615 | | - String[] initStyles = |
---|
616 | | - { |
---|
617 | | - "regular", "italic", "bold", "small", "large", |
---|
618 | | - "regular", "button", "regular", "icon", |
---|
619 | | - "regular" |
---|
620 | | - }; |
---|
621 | | - |
---|
622 | | - JTextPane textPane = new JTextPane(); |
---|
623 | | - textPane.setEditable(true); |
---|
624 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
625 | | - addStylesToDocument(doc); |
---|
626 | | - |
---|
627 | | - try |
---|
628 | | - { |
---|
629 | | - for (int j = 0; j < 2; j++) |
---|
630 | | - { |
---|
631 | | - for (int i = 0; i < initString.length; i++) |
---|
| 587 | + if (CameraPane.FULLSCREEN) |
---|
632 | 588 | { |
---|
633 | | - doc.insertString(doc.getLength(), initString[i], |
---|
634 | | - doc.getStyle(initStyles[i])); |
---|
| 589 | + frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 590 | + framePanel.add(bigThree); |
---|
| 591 | + frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 592 | + } else |
---|
| 593 | + { |
---|
| 594 | + frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 595 | + framePanel.remove(bigThree); |
---|
| 596 | + frame.getContentPane().add(/*"Center",*/bigThree); |
---|
635 | 597 | } |
---|
636 | | - } |
---|
637 | | - } catch (BadLocationException ble) |
---|
638 | | - { |
---|
639 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
| 598 | + cameraView.ToggleFullScreen(); |
---|
640 | 599 | } |
---|
641 | 600 | |
---|
642 | | - return new JTextArea(); // textPane; |
---|
| 601 | + private JTextPane createTextPane() |
---|
| 602 | + { |
---|
| 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 | +// } |
---|
| 645 | + |
---|
| 646 | + return new JTextPane(); // textPane; |
---|
643 | 647 | } |
---|
644 | 648 | |
---|
645 | 649 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
692 | 696 | protected static ImageIcon createImageIcon(String path, |
---|
693 | 697 | String description) |
---|
694 | 698 | { |
---|
695 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 699 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
696 | 700 | if (imgURL != null) |
---|
697 | 701 | { |
---|
698 | 702 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
724 | 728 | // NumberSlider vDivsField; |
---|
725 | 729 | // JCheckBox endcaps; |
---|
726 | 730 | JCheckBox liveCB; |
---|
| 731 | + JCheckBox selectCB; |
---|
727 | 732 | JCheckBox hideCB; |
---|
728 | 733 | JCheckBox link2masterCB; |
---|
729 | 734 | JCheckBox markCB; |
---|
.. | .. |
---|
739 | 744 | JButton slowerButton; |
---|
740 | 745 | JButton fasterButton; |
---|
741 | 746 | JButton remarkButton; |
---|
| 747 | + |
---|
| 748 | + cGridBag namePanel; |
---|
| 749 | + cGridBag setupPanel; |
---|
| 750 | + cGridBag commandsPanel; |
---|
| 751 | + cGridBag pushPanel; |
---|
| 752 | + cGridBag fillPanel; |
---|
742 | 753 | |
---|
743 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 754 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
744 | 755 | { |
---|
745 | 756 | JCheckBox cb; |
---|
746 | 757 | |
---|
747 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
748 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
749 | | -// oe.aConstraints.weightx = 1; |
---|
750 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
751 | | - 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); |
---|
752 | 759 | cb.addItemListener(this); |
---|
753 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
754 | | - oe.aConstraints.gridwidth = 1; |
---|
755 | | - oe.aConstraints.gridx += 1; |
---|
756 | 760 | |
---|
757 | 761 | return cb; |
---|
758 | 762 | } |
---|
759 | 763 | |
---|
760 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 764 | + cButton AddButton(cGridBag panel, String label) |
---|
761 | 765 | { |
---|
762 | 766 | cButton cb; |
---|
763 | 767 | |
---|
764 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
765 | | - oe.aConstraints.gridwidth = 1; |
---|
766 | | -// oe.aConstraints.weightx = 1; |
---|
767 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
768 | | - 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); |
---|
769 | 769 | cb.addActionListener(this); |
---|
770 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
771 | | - oe.aConstraints.gridwidth = 1; |
---|
772 | | - oe.aConstraints.gridx += 1; |
---|
773 | 770 | |
---|
774 | 771 | return cb; |
---|
775 | 772 | } |
---|
776 | 773 | |
---|
777 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 774 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
778 | 775 | { |
---|
779 | 776 | JComboBox combo; |
---|
780 | 777 | |
---|
781 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
782 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
783 | | - oe.aConstraints.gridx += 1; |
---|
| 778 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
784 | 779 | combo.addActionListener(this); |
---|
785 | 780 | |
---|
786 | 781 | return combo; |
---|
787 | 782 | } |
---|
788 | 783 | |
---|
789 | | - 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) |
---|
790 | 785 | { |
---|
791 | | - NumberSlider combo; |
---|
| 786 | + cGridBag control = new cGridBag(); |
---|
| 787 | + |
---|
| 788 | + cNumberSlider combo; |
---|
792 | 789 | |
---|
793 | 790 | JLabel jlabel = new JLabel(label); |
---|
794 | | - |
---|
795 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
796 | 791 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
797 | | - aConstraints.gridwidth = 2; |
---|
798 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
799 | | - aConstraints.gridx += 1; |
---|
800 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
801 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
802 | | - ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
803 | | - aConstraints.gridx += 1; |
---|
804 | | - aConstraints.gridwidth = 1; |
---|
805 | | - |
---|
| 792 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 793 | + control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
806 | 794 | combo.setFloat(current); |
---|
807 | | - |
---|
808 | | - combo.label = jlabel; |
---|
809 | | - |
---|
810 | | - combo.addChangeListener(this); |
---|
811 | | - |
---|
812 | | - return combo; |
---|
| 795 | + |
---|
| 796 | + panel.add(control); |
---|
| 797 | + |
---|
| 798 | + return control; |
---|
813 | 799 | } |
---|
814 | 800 | |
---|
815 | | - 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) |
---|
816 | 802 | { |
---|
817 | | - NumberSlider combo; |
---|
| 803 | + cGridBag control = new cGridBag(); |
---|
| 804 | + |
---|
| 805 | + cNumberSlider combo; |
---|
818 | 806 | |
---|
819 | 807 | JLabel jlabel = new JLabel(label); |
---|
820 | | - |
---|
821 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
822 | 808 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
823 | | - aConstraints.gridwidth = 2; |
---|
824 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
825 | | - aConstraints.gridx += 1; |
---|
826 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
827 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
828 | | - ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
829 | | - aConstraints.gridx += 1; |
---|
830 | | - aConstraints.gridwidth = 1; |
---|
831 | | - |
---|
| 809 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 810 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
832 | 811 | combo.setInteger(current); |
---|
833 | 812 | |
---|
834 | | - combo.label = jlabel; |
---|
835 | | - |
---|
836 | | - combo.addChangeListener(this); |
---|
837 | | - |
---|
838 | | - return combo; |
---|
| 813 | + panel.add(control); |
---|
| 814 | + |
---|
| 815 | + return control; |
---|
839 | 816 | } |
---|
840 | 817 | |
---|
841 | | - JTextArea AddText(JPanel ctrlPanel, String name) |
---|
| 818 | + JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
842 | 819 | { |
---|
843 | 820 | JTextArea text; |
---|
844 | 821 | |
---|
845 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
846 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
847 | | - ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 822 | + ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
848 | 823 | text.addCaretListener(this); |
---|
849 | | - aConstraints.gridx += 1; |
---|
850 | | - aConstraints.gridwidth = 1; |
---|
851 | 824 | |
---|
852 | 825 | return text; |
---|
853 | 826 | } |
---|
.. | .. |
---|
877 | 850 | objEditor.ctrlPanel.remove(j); |
---|
878 | 851 | } |
---|
879 | 852 | |
---|
| 853 | + void Remove(cNumberSlider j) |
---|
| 854 | + { |
---|
| 855 | + j.removeChangeListener(this); |
---|
| 856 | + //objEditor.ctrlPanel.remove(j.label); |
---|
| 857 | + objEditor.ctrlPanel.remove(j); |
---|
| 858 | + } |
---|
| 859 | + |
---|
880 | 860 | /* |
---|
881 | 861 | */ |
---|
882 | | - void Return() // ObjEditor oe) |
---|
| 862 | + void Return0() // ObjEditor oe) |
---|
883 | 863 | { |
---|
884 | 864 | aConstraints.gridy += 1; |
---|
885 | 865 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
934 | 914 | |
---|
935 | 915 | void SetupUI2(ObjEditor oe) |
---|
936 | 916 | { |
---|
937 | | -// oe.aConstraints.weightx = 0; |
---|
938 | | -// oe.aConstraints.weighty = 0; |
---|
939 | | -// oe.aConstraints.gridx = 0; |
---|
940 | | -// oe.aConstraints.gridy = 0; |
---|
941 | | - 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(); |
---|
942 | 926 | |
---|
943 | 927 | if (!GroupEditor.allparams) |
---|
944 | 928 | return; |
---|
945 | 929 | |
---|
946 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
947 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
948 | | - 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"); |
---|
949 | 936 | // Return(); |
---|
950 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
951 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
952 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
953 | | - Return(); |
---|
954 | | - resetButton = AddButton(oe, "Reset"); |
---|
955 | | - 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"); |
---|
956 | 965 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
957 | 966 | // stepAllButton = AddButton(oe, "Step All"); |
---|
958 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
959 | 967 | // Return(); |
---|
960 | | - slowerButton = AddButton(oe, "Slow"); |
---|
961 | | - fasterButton = AddButton(oe, "Fast"); |
---|
962 | | - 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"); |
---|
963 | 974 | |
---|
964 | | - Return(); |
---|
| 975 | + oe.ctrlPanel.add(commandsPanel); |
---|
| 976 | + oe.ctrlPanel.Return(); |
---|
965 | 977 | |
---|
| 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(); |
---|
| 983 | + |
---|
966 | 984 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
967 | 985 | // ObjEditor.aConstraints.gridx += 1; |
---|
968 | 986 | |
---|
.. | .. |
---|
1056 | 1074 | oe.aConstraints.gridwidth = 1; |
---|
1057 | 1075 | /**/ |
---|
1058 | 1076 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1059 | | - Return(); |
---|
| 1077 | + oe.ctrlPanel.Return(); |
---|
1060 | 1078 | |
---|
1061 | 1079 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1062 | 1080 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1158 | 1176 | //JPanel worldPanel = |
---|
1159 | 1177 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1160 | 1178 | //worldPanel.setName("World"); |
---|
1161 | | - /*JPanel*/ cameraPanel = |
---|
1162 | | - new JPanel(new BorderLayout()); |
---|
1163 | | - cameraPanel.add(cameraView); |
---|
1164 | | - //new timeflow.app.TimeflowApp().TimeFlowWindow(cameraPanel, frame); |
---|
| 1179 | + centralPanel = new cGridBag(); |
---|
| 1180 | + centralPanel.preferredWidth = 20; |
---|
| 1181 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1182 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1165 | 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 | + |
---|
| 1191 | + centralPanel.add(cameraView); |
---|
| 1192 | + //frame.setJMenuBar(timelineMenubar); |
---|
| 1193 | + //centralPanel.add(timelinePanel); |
---|
| 1194 | + |
---|
1166 | 1195 | //topView.camera = ; |
---|
1167 | 1196 | //frontView.camera = new Camera(2); |
---|
1168 | 1197 | //sideView.camera = new Camera(3); |
---|
.. | .. |
---|
1178 | 1207 | //frontView.object = copy; |
---|
1179 | 1208 | //sideView.object = copy; |
---|
1180 | 1209 | |
---|
1181 | | - XYZPanel = new JPanel(); |
---|
1182 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1210 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1211 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1183 | 1212 | |
---|
1184 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1185 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1186 | | - 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); |
---|
1187 | 1217 | |
---|
1188 | 1218 | /* |
---|
1189 | 1219 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1192 | 1222 | gridPanel.add(cameraView); |
---|
1193 | 1223 | gridPanel.add(XYZPanel); |
---|
1194 | 1224 | */ |
---|
1195 | | - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout()); |
---|
| 1225 | + gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
1196 | 1226 | gridPanel.setContinuousLayout(true); |
---|
1197 | 1227 | gridPanel.setOneTouchExpandable(true); |
---|
1198 | 1228 | gridPanel.setDividerLocation(1.0); |
---|
.. | .. |
---|
1221 | 1251 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1222 | 1252 | //tmp.setName("Edit"); |
---|
1223 | 1253 | objectPanel.add(materialPanel); |
---|
1224 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1225 | | - north.setName("Edit"); |
---|
1226 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1227 | | - 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); |
---|
1228 | 1259 | objectPanel.add(infoPanel); |
---|
1229 | 1260 | |
---|
1230 | 1261 | /* |
---|
.. | .. |
---|
1245 | 1276 | scrollpane.setWheelScrollingEnabled(true); |
---|
1246 | 1277 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1247 | 1278 | |
---|
1248 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
1249 | | - scenePanel.add(scrollpane); |
---|
| 1279 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1280 | + scenePanel.preferredWidth = 6; |
---|
| 1281 | + |
---|
| 1282 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1283 | + tabbedPane.add(scrollpane); |
---|
1250 | 1284 | |
---|
1251 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
| 1285 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1252 | 1286 | |
---|
1253 | | - optionsPanel = new JPanel(new GridBagLayout()); |
---|
| 1287 | + optionsPanel = new cGridBag().setVertical(true); |
---|
1254 | 1288 | |
---|
1255 | 1289 | optionsPanel.setName("Options"); |
---|
1256 | | - scenePanel.add(optionsPanel); |
---|
1257 | | - |
---|
| 1290 | + |
---|
| 1291 | + AddOptions(optionsPanel); //, aConstraints); |
---|
| 1292 | + |
---|
| 1293 | + tabbedPane.add(optionsPanel); |
---|
| 1294 | + |
---|
| 1295 | + scenePanel.add(tabbedPane); |
---|
1258 | 1296 | |
---|
1259 | 1297 | /* |
---|
1260 | 1298 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1288 | 1326 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1289 | 1327 | //bigPanel.add(ctrlPanel); |
---|
1290 | 1328 | //bigPanel.add(gridPanel); |
---|
| 1329 | + /** |
---|
1291 | 1330 | bigThree = new JPanel(); |
---|
1292 | 1331 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1293 | 1332 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1304 | 1343 | // aConstraints.gridheight = 3; |
---|
1305 | 1344 | aWindowConstraints.gridx = 1; |
---|
1306 | 1345 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
1307 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 1346 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
1308 | 1347 | aWindowConstraints.weightx = 0; |
---|
1309 | 1348 | aWindowConstraints.gridx = 4; |
---|
1310 | 1349 | aWindowConstraints.gridwidth = 1; |
---|
1311 | 1350 | // aConstraints.gridheight = 3; |
---|
1312 | 1351 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1313 | 1352 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1353 | + /**/ |
---|
1314 | 1354 | |
---|
| 1355 | + bigThree = new cGridBag(); |
---|
| 1356 | + bigThree.addComponent(scenePanel); |
---|
| 1357 | + bigThree.addComponent(centralPanel); |
---|
| 1358 | + bigThree.addComponent(XYZPanel); |
---|
| 1359 | + |
---|
1315 | 1360 | // // SIDE EFFECT!!! |
---|
1316 | 1361 | // aConstraints.gridx = 0; |
---|
1317 | 1362 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1332 | 1377 | //worldPane.add(bigPanel); |
---|
1333 | 1378 | //worldPane.add(worldPanel); |
---|
1334 | 1379 | /**/ |
---|
1335 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1380 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1381 | + frame.add(/*"Center",*/framePanel); |
---|
1336 | 1382 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
---|
1337 | 1383 | |
---|
1338 | 1384 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1339 | 1385 | |
---|
1340 | | - frame.setSize(1024, 768); |
---|
1341 | | - frame.show(); |
---|
| 1386 | + frame.setSize(1280, 860); |
---|
| 1387 | + frame.setVisible(true); |
---|
1342 | 1388 | |
---|
1343 | 1389 | gridPanel.setDividerLocation(1.0); |
---|
1344 | 1390 | |
---|
.. | .. |
---|
1353 | 1399 | }); |
---|
1354 | 1400 | } |
---|
1355 | 1401 | |
---|
| 1402 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 1403 | + { |
---|
| 1404 | + } |
---|
| 1405 | + |
---|
1356 | 1406 | JTree GetTree() |
---|
1357 | 1407 | { |
---|
1358 | 1408 | return objEditor.jTree; |
---|
.. | .. |
---|
1364 | 1414 | ctrlPanel.removeAll(); |
---|
1365 | 1415 | } |
---|
1366 | 1416 | |
---|
1367 | | - void SetupMaterial(JPanel ctrlPanel) |
---|
| 1417 | + void SetupMaterial(cGridBag panel) |
---|
1368 | 1418 | { |
---|
1369 | | - aConstraints.weighty = 0; |
---|
1370 | | - //aConstraints.weightx = 1; |
---|
1371 | | - /* |
---|
| 1419 | + /* |
---|
1372 | 1420 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1373 | 1421 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1374 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1375 | | - aConstraints.gridx += 1; |
---|
1376 | 1422 | */ |
---|
1377 | 1423 | |
---|
1378 | | - aConstraints.gridwidth = 1; |
---|
1379 | | - ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints); |
---|
1380 | | - aConstraints.gridx += 1; |
---|
1381 | | - aConstraints.weighty = 0; |
---|
1382 | | - 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"); |
---|
1383 | 1428 | |
---|
1384 | 1429 | /* |
---|
1385 | 1430 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1386 | | - aConstraints.gridx += 1; |
---|
1387 | | - aConstraints.weighty = 0; |
---|
1388 | | - aConstraints.gridwidth = 1; |
---|
1389 | 1431 | */ |
---|
1390 | 1432 | |
---|
1391 | | - ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints); |
---|
1392 | | - 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 | + } |
---|
1393 | 1442 | |
---|
1394 | | - ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints); |
---|
1395 | | - |
---|
1396 | | - aConstraints.gridx += 1; |
---|
1397 | | - |
---|
1398 | | - ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints); |
---|
1399 | | - |
---|
1400 | | - aConstraints.gridx += 1; |
---|
1401 | | - |
---|
1402 | | - ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints); |
---|
1403 | | - |
---|
1404 | | - aConstraints.gridx = 0; |
---|
1405 | | - aConstraints.gridy += 1; |
---|
1406 | | - aConstraints.weighty = 0; |
---|
1407 | | - aConstraints.gridwidth = 1; |
---|
| 1443 | + editBar.preferredHeight = 15; |
---|
| 1444 | + |
---|
| 1445 | + panel.add(editBar); |
---|
| 1446 | + |
---|
1408 | 1447 | /**/ |
---|
1409 | 1448 | //aConstraints.weighty = 0; |
---|
1410 | 1449 | ////aConstraints.weightx = 1; |
---|
1411 | 1450 | //aConstraints.weighty = 1; |
---|
1412 | 1451 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1413 | 1452 | //aConstraints.gridx += 1; |
---|
1414 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1415 | | - aConstraints.weighty = 0; |
---|
1416 | | - aConstraints.gridx = 0; |
---|
1417 | | - aConstraints.gridy += 1; |
---|
1418 | | - aConstraints.gridwidth = 1; |
---|
| 1453 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1419 | 1454 | |
---|
1420 | | - ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints); |
---|
1421 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1422 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1423 | | - aConstraints.gridx += 1; |
---|
1424 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1425 | | - //aConstraints.weightx = 0; |
---|
1426 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1427 | | - aConstraints.gridx = 0; |
---|
1428 | | - aConstraints.gridy += 1; |
---|
1429 | | - 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); |
---|
1430 | 1463 | |
---|
1431 | | - ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints); |
---|
1432 | | - modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1433 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1434 | | - aConstraints.gridx += 1; |
---|
1435 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1436 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1437 | | - aConstraints.gridx = 0; |
---|
1438 | | - aConstraints.gridy += 1; |
---|
1439 | | - 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); |
---|
1440 | 1469 | |
---|
1441 | | - ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints); |
---|
1442 | | - textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1443 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1444 | | - aConstraints.gridx += 1; |
---|
1445 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1446 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1447 | | - aConstraints.gridx = 0; |
---|
1448 | | - aConstraints.gridy += 1; |
---|
1449 | | - 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); |
---|
1450 | 1475 | |
---|
1451 | | - ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints); |
---|
1452 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1453 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1454 | | - aConstraints.gridx += 1; |
---|
1455 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1456 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1457 | | - aConstraints.gridx = 0; |
---|
1458 | | - aConstraints.gridy += 1; |
---|
1459 | | - 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); |
---|
1460 | 1481 | |
---|
1461 | | - ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints); |
---|
1462 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1463 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1464 | | - aConstraints.gridx += 1; |
---|
1465 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1466 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1467 | | - aConstraints.gridx = 0; |
---|
1468 | | - aConstraints.gridy += 1; |
---|
1469 | | - 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); |
---|
1470 | 1487 | |
---|
1471 | | - ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints); |
---|
1472 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1474 | | - aConstraints.gridx += 1; |
---|
1475 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1476 | | - ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1477 | | - aConstraints.gridx = 0; |
---|
1478 | | - aConstraints.gridy += 1; |
---|
1479 | | - 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); |
---|
1480 | 1493 | |
---|
1481 | | - //aConstraints.weighty = 1; |
---|
1482 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1483 | | - //aConstraints.gridx += 1; |
---|
1484 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1485 | | - aConstraints.weighty = 0; |
---|
1486 | | - aConstraints.gridx = 0; |
---|
1487 | | - aConstraints.gridy += 1; |
---|
1488 | | - 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); |
---|
1489 | 1507 | |
---|
1490 | | - ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints); |
---|
1491 | | - diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1492 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1493 | | - aConstraints.gridx += 1; |
---|
1494 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1495 | | - ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1496 | | - aConstraints.gridx = 0; |
---|
1497 | | - aConstraints.gridy += 1; |
---|
1498 | | - 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); |
---|
1499 | 1513 | |
---|
1500 | | - ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints); |
---|
1501 | | - diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1502 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1503 | | - aConstraints.gridx += 1; |
---|
1504 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1505 | | - ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1506 | | - aConstraints.gridx = 0; |
---|
1507 | | - aConstraints.gridy += 1; |
---|
1508 | | - 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); |
---|
1509 | 1519 | |
---|
1510 | | - ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints); |
---|
1511 | | - selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1512 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1513 | | - aConstraints.gridx += 1; |
---|
1514 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1515 | | - ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1516 | | - aConstraints.gridx = 0; |
---|
1517 | | - aConstraints.gridy += 1; |
---|
1518 | | - 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); |
---|
1519 | 1525 | |
---|
1520 | | - ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints); |
---|
1521 | | - sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1522 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1523 | | - aConstraints.gridx += 1; |
---|
1524 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1525 | | - ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1526 | | - aConstraints.gridx = 0; |
---|
1527 | | - aConstraints.gridy += 1; |
---|
1528 | | - 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); |
---|
1529 | 1531 | |
---|
1530 | | - ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints); |
---|
1531 | | - subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1532 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1533 | | - aConstraints.gridx += 1; |
---|
1534 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1535 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1536 | | - aConstraints.gridx = 0; |
---|
1537 | | - aConstraints.gridy += 1; |
---|
1538 | | - 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); |
---|
1539 | 1537 | |
---|
1540 | | - ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints); |
---|
1541 | | - shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1542 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1543 | | - aConstraints.gridx += 1; |
---|
1544 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1545 | | - ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1546 | | - aConstraints.gridx = 0; |
---|
1547 | | - aConstraints.gridy += 1; |
---|
1548 | | - 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); |
---|
1549 | 1543 | |
---|
1550 | | - ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints); |
---|
1551 | | - fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1552 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1553 | | - aConstraints.gridx += 1; |
---|
1554 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1555 | | - ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1556 | | - aConstraints.gridx = 0; |
---|
1557 | | - aConstraints.gridy += 1; |
---|
1558 | | - 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); |
---|
1559 | 1551 | |
---|
1560 | | - //aConstraints.weighty = 1; |
---|
1561 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1562 | | - //aConstraints.gridx += 1; |
---|
1563 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1564 | | - aConstraints.weighty = 0; |
---|
1565 | | - aConstraints.gridx = 0; |
---|
1566 | | - aConstraints.gridy += 1; |
---|
1567 | | - 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); |
---|
1568 | 1557 | |
---|
1569 | | - ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints); |
---|
1570 | | - specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1571 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1572 | | - aConstraints.gridx += 1; |
---|
1573 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1574 | | - ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1575 | | - aConstraints.gridx = 0; |
---|
1576 | | - aConstraints.gridy += 1; |
---|
1577 | | - 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); |
---|
1578 | 1563 | |
---|
1579 | | - ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints); |
---|
1580 | | - lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1581 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1582 | | - aConstraints.gridx += 1; |
---|
1583 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1584 | | - ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1585 | | - aConstraints.gridx = 0; |
---|
1586 | | - aConstraints.gridy += 1; |
---|
1587 | | - 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); |
---|
1588 | 1569 | |
---|
1589 | | - ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints); |
---|
1590 | | - shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1591 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1592 | | - aConstraints.gridx += 1; |
---|
1593 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1594 | | - ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1595 | | - aConstraints.gridx = 0; |
---|
1596 | | - aConstraints.gridy += 1; |
---|
1597 | | - 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); |
---|
1598 | 1575 | |
---|
1599 | | - ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints); |
---|
1600 | | - metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1601 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1602 | | - aConstraints.gridx += 1; |
---|
1603 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1604 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1605 | | - aConstraints.gridx = 0; |
---|
1606 | | - aConstraints.gridy += 1; |
---|
1607 | | - 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); |
---|
1608 | 1581 | |
---|
1609 | | - ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints); |
---|
1610 | | - velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1611 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1612 | | - aConstraints.gridx += 1; |
---|
1613 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1614 | | - ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1615 | | - aConstraints.gridx = 0; |
---|
1616 | | - aConstraints.gridy += 1; |
---|
1617 | | - aConstraints.gridwidth = 1; |
---|
1618 | | - |
---|
1619 | | - shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
1620 | | - Return(); |
---|
| 1582 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
| 1583 | + //Return(); |
---|
1621 | 1584 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1622 | 1585 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1623 | 1586 | // aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
1628 | 1591 | // aConstraints.gridy += 1; |
---|
1629 | 1592 | // aConstraints.gridwidth = 1; |
---|
1630 | 1593 | |
---|
1631 | | - //aConstraints.weighty = 1; |
---|
1632 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1633 | | - //aConstraints.gridx += 1; |
---|
1634 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1635 | | - aConstraints.weighty = 0; |
---|
1636 | | - aConstraints.gridx = 0; |
---|
1637 | | - aConstraints.gridy += 1; |
---|
1638 | | - aConstraints.gridwidth = 1; |
---|
1639 | 1594 | |
---|
1640 | | - ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints); |
---|
1641 | | - cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1642 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1643 | | - aConstraints.gridx += 1; |
---|
1644 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1645 | | - ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1646 | | - aConstraints.gridx = 0; |
---|
1647 | | - aConstraints.gridy += 1; |
---|
1648 | | - 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); |
---|
1649 | 1602 | |
---|
1650 | | - ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints); |
---|
1651 | | - ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1652 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1653 | | - aConstraints.gridx += 1; |
---|
1654 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1655 | | - ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1656 | | - aConstraints.gridx = 0; |
---|
1657 | | - aConstraints.gridy += 1; |
---|
1658 | | - 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); |
---|
1659 | 1608 | |
---|
1660 | | - ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints); |
---|
1661 | | - backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1662 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1663 | | - aConstraints.gridx += 1; |
---|
1664 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1665 | | - ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1666 | | - aConstraints.gridx = 0; |
---|
1667 | | - aConstraints.gridy += 1; |
---|
1668 | | - 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); |
---|
1669 | 1614 | |
---|
1670 | | - ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints); |
---|
1671 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1672 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1673 | | - aConstraints.gridx += 1; |
---|
1674 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1675 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1676 | | - aConstraints.gridx = 0; |
---|
1677 | | - aConstraints.gridy += 1; |
---|
1678 | | - aConstraints.gridwidth = 1; |
---|
1679 | | - 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); |
---|
1680 | 1620 | |
---|
1681 | | - ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints); |
---|
1682 | | - bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1683 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1684 | | - aConstraints.gridx += 1; |
---|
1685 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1686 | | - ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints); |
---|
1687 | | - aConstraints.gridx = 0; |
---|
1688 | | - aConstraints.gridy += 1; |
---|
1689 | | - 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); |
---|
1690 | 1626 | |
---|
1691 | | - ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints); |
---|
1692 | | - noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1693 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1694 | | - aConstraints.gridx += 1; |
---|
1695 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1696 | | - ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints); |
---|
1697 | | - aConstraints.gridx = 0; |
---|
1698 | | - aConstraints.gridy += 1; |
---|
1699 | | - 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); |
---|
1700 | 1634 | |
---|
1701 | | - ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints); |
---|
1702 | | - powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1703 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1704 | | - aConstraints.gridx += 1; |
---|
1705 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1706 | | - ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints); |
---|
1707 | | - aConstraints.gridx = 0; |
---|
1708 | | - aConstraints.gridy += 1; |
---|
1709 | | - 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); |
---|
1710 | 1640 | |
---|
1711 | | - ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints); |
---|
1712 | | - borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1713 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1714 | | - aConstraints.gridx += 1; |
---|
1715 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1716 | | - ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints); |
---|
1717 | | - aConstraints.gridx = 0; |
---|
1718 | | - aConstraints.gridy += 1; |
---|
1719 | | - 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); |
---|
1720 | 1646 | |
---|
1721 | | - ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints); |
---|
1722 | | - fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1723 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1724 | | - aConstraints.gridx += 1; |
---|
1725 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1726 | | - ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints); |
---|
1727 | | - aConstraints.gridx = 0; |
---|
1728 | | - aConstraints.gridy += 1; |
---|
1729 | | - 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); |
---|
1730 | 1652 | |
---|
1731 | | - ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints); |
---|
1732 | | - opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1733 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1734 | | - aConstraints.gridx += 1; |
---|
1735 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1736 | | - ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints); |
---|
1737 | | - aConstraints.gridx = 0; |
---|
1738 | | - aConstraints.gridy += 1; |
---|
1739 | | - 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); |
---|
1740 | 1658 | |
---|
1741 | | - //aConstraints.weighty = 1; |
---|
1742 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1743 | | - //aConstraints.gridx += 1; |
---|
1744 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1745 | | - 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); |
---|
1746 | 1664 | |
---|
1747 | | - aConstraints.gridx = 0; |
---|
1748 | | - aConstraints.gridy = 0; |
---|
1749 | | - 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); |
---|
1750 | 1676 | |
---|
1751 | 1677 | SetMaterial(copy); // .GetMaterial()); |
---|
1752 | 1678 | |
---|
1753 | | - colorField.addChangeListener(this); |
---|
1754 | | - modulationField.addChangeListener(this); |
---|
| 1679 | + //colorField.addChangeListener(this); |
---|
| 1680 | +// modulationField.addChangeListener(this); |
---|
1755 | 1681 | metalnessField.addChangeListener(this); |
---|
1756 | 1682 | diffuseField.addChangeListener(this); |
---|
1757 | 1683 | specularField.addChangeListener(this); |
---|
.. | .. |
---|
1781 | 1707 | opacityPowerField.addChangeListener(this); |
---|
1782 | 1708 | /**/ |
---|
1783 | 1709 | |
---|
1784 | | - resetSlidersButton.addActionListener(this); |
---|
1785 | 1710 | clearMaterialButton.addActionListener(this); |
---|
1786 | 1711 | createMaterialButton.addActionListener(this); |
---|
1787 | | - |
---|
1788 | | - propagateToggle.addItemListener(this); |
---|
1789 | | - multiplyToggle.addItemListener(this); |
---|
| 1712 | + |
---|
| 1713 | + if (Globals.ADVANCED) |
---|
| 1714 | + { |
---|
| 1715 | + resetSlidersButton.addActionListener(this); |
---|
| 1716 | + propagateToggle.addItemListener(this); |
---|
| 1717 | + multiplyToggle.addItemListener(this); |
---|
| 1718 | + } |
---|
1790 | 1719 | } |
---|
1791 | 1720 | |
---|
1792 | 1721 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
1957 | 1886 | |
---|
1958 | 1887 | //? flashIt = false; |
---|
1959 | 1888 | CameraPane pane = (CameraPane) cameraView; |
---|
1960 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 1889 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1961 | 1890 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1962 | 1891 | |
---|
1963 | 1892 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2414 | 2343 | |
---|
2415 | 2344 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2416 | 2345 | { |
---|
2417 | | - if (GrafreeD.standAlone) |
---|
| 2346 | + if (Grafreed.standAlone) |
---|
2418 | 2347 | { |
---|
2419 | 2348 | /**/ |
---|
2420 | 2349 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2421 | | - browser.show(); |
---|
| 2350 | + browser.setVisible(true); |
---|
2422 | 2351 | String filename = browser.getFile(); |
---|
2423 | 2352 | if (filename != null && filename.length() > 0) |
---|
2424 | 2353 | { |
---|
.. | .. |
---|
2563 | 2492 | } |
---|
2564 | 2493 | if (input == null) |
---|
2565 | 2494 | { |
---|
| 2495 | + new Exception().printStackTrace(); |
---|
2566 | 2496 | System.exit(0); |
---|
2567 | 2497 | } |
---|
2568 | 2498 | |
---|
.. | .. |
---|
2777 | 2707 | return; |
---|
2778 | 2708 | } |
---|
2779 | 2709 | |
---|
2780 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2710 | + if (multiplyToggle != null) |
---|
| 2711 | + multiplyToggle.setSelected(mat.multiply); |
---|
2781 | 2712 | |
---|
2782 | 2713 | assert (object.projectedVertices != null); |
---|
2783 | 2714 | |
---|
.. | .. |
---|
2959 | 2890 | // june 2013 copy.HardTouch(); |
---|
2960 | 2891 | cameraView.repaint(); |
---|
2961 | 2892 | return; |
---|
2962 | | - } else if (event.getSource() == toggleFullItem) |
---|
| 2893 | + } else if (event.getSource() == toggleTimelineItem) |
---|
2963 | 2894 | { |
---|
2964 | | - if (CameraPane.FULLSCREEN) |
---|
| 2895 | + timeline ^= true; |
---|
| 2896 | + |
---|
| 2897 | + if (timeline) |
---|
2965 | 2898 | { |
---|
2966 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
2967 | | - framePanel.add(bigThree); |
---|
2968 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
2969 | | - } else |
---|
2970 | | - { |
---|
2971 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
2972 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 2899 | + centralPanel.remove(cameraView); |
---|
| 2900 | + cameraPanel.add(cameraView); |
---|
| 2901 | + centralPanel.add(cameraPanel); |
---|
| 2902 | + frame.setJMenuBar(timelineMenubar); |
---|
| 2903 | + wasFullScreen = CameraPane.FULLSCREEN; |
---|
| 2904 | + if (!CameraPane.FULLSCREEN) |
---|
| 2905 | + ToggleFullScreen(); |
---|
| 2906 | + toggleFullScreenItem.setEnabled(false); |
---|
2973 | 2907 | } |
---|
| 2908 | + else |
---|
| 2909 | + { |
---|
| 2910 | + centralPanel.remove(cameraPanel); |
---|
| 2911 | + centralPanel.add(cameraView); |
---|
| 2912 | + frame.setJMenuBar(null); |
---|
| 2913 | + if (!wasFullScreen) |
---|
| 2914 | + ToggleFullScreen(); |
---|
| 2915 | + toggleFullScreenItem.setEnabled(true); |
---|
| 2916 | + } |
---|
| 2917 | + |
---|
2974 | 2918 | frame.validate(); |
---|
2975 | | - cameraView.ToggleFullScreen(); |
---|
| 2919 | + return; |
---|
| 2920 | + } else if (event.getSource() == toggleFullScreenItem) |
---|
| 2921 | + { |
---|
| 2922 | + ToggleFullScreen(); |
---|
| 2923 | + frame.validate(); |
---|
2976 | 2924 | |
---|
2977 | 2925 | return; |
---|
2978 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 2926 | + } else if (event.getSource() == toggleSwitchItem) |
---|
2979 | 2927 | { |
---|
2980 | 2928 | cameraView.ToggleRandom(); |
---|
2981 | 2929 | cameraView.repaint(); |
---|
.. | .. |
---|
3006 | 2954 | { |
---|
3007 | 2955 | copy.live ^= true; |
---|
3008 | 2956 | return; |
---|
| 2957 | + } else if (event.getSource() == selectCB) |
---|
| 2958 | + { |
---|
| 2959 | + copy.dontselect ^= true; |
---|
| 2960 | + return; |
---|
3009 | 2961 | } else if (event.getSource() == hideCB) |
---|
3010 | 2962 | { |
---|
3011 | 2963 | copy.hide ^= true; |
---|
.. | .. |
---|
3020 | 2972 | if (event.getSource() == randomCB) |
---|
3021 | 2973 | { |
---|
3022 | 2974 | copy.random ^= true; |
---|
| 2975 | + objEditor.refreshContents(); |
---|
3023 | 2976 | return; |
---|
3024 | 2977 | } |
---|
3025 | 2978 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3043 | 2996 | |
---|
3044 | 2997 | public void actionPerformed(ActionEvent event) |
---|
3045 | 2998 | { |
---|
| 2999 | + Object source = event.getSource(); |
---|
3046 | 3000 | // SCRIPT DIALOG |
---|
3047 | | - if (event.getSource() == okbutton) |
---|
| 3001 | + if (source == okbutton) |
---|
3048 | 3002 | { |
---|
3049 | 3003 | textpanel.setVisible(false); |
---|
3050 | 3004 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3056 | 3010 | textarea = null; |
---|
3057 | 3011 | textpanel = null; |
---|
3058 | 3012 | } |
---|
3059 | | - if (event.getSource() == cancelbutton) |
---|
| 3013 | + if (source == cancelbutton) |
---|
3060 | 3014 | { |
---|
3061 | 3015 | textpanel.setVisible(false); |
---|
3062 | 3016 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3068 | 3022 | //applySelf(); |
---|
3069 | 3023 | //client.refreshEditWindow(); |
---|
3070 | 3024 | //refreshContents(); |
---|
3071 | | - if (event.getSource() == nameField) |
---|
| 3025 | + if (source == nameField) |
---|
3072 | 3026 | { |
---|
3073 | 3027 | //System.out.println("ObjEditor " + event); |
---|
3074 | 3028 | applySelf0(true); |
---|
3075 | 3029 | //parent.applySelf(); |
---|
3076 | 3030 | objEditor.refreshContents(); |
---|
3077 | | - } else if (event.getSource() == resetButton) |
---|
| 3031 | + } else if (source == resetButton) |
---|
3078 | 3032 | { |
---|
3079 | 3033 | CameraPane.fullreset = true; |
---|
3080 | 3034 | copy.Reset(); // ResetMeshes(); |
---|
3081 | 3035 | copy.Touch(); |
---|
3082 | 3036 | objEditor.refreshContents(); |
---|
3083 | | - } else if (event.getSource() == stepItem) |
---|
| 3037 | + } else if (source == stepItem) |
---|
3084 | 3038 | { |
---|
3085 | | - cameraView.ONESTEP = true; |
---|
| 3039 | + //cameraView.ONESTEP = true; |
---|
| 3040 | + Globals.ONESTEP = true; |
---|
3086 | 3041 | cameraView.repaint(); |
---|
3087 | 3042 | return; |
---|
3088 | | - } else if (event.getSource() == stepButton) |
---|
| 3043 | + } else if (source == stepButton) |
---|
3089 | 3044 | { |
---|
3090 | 3045 | copy.Step(); |
---|
3091 | 3046 | copy.Touch(); |
---|
3092 | 3047 | objEditor.refreshContents(); |
---|
3093 | | - } else if (event.getSource() == slowerButton) |
---|
| 3048 | + } else if (source == slowerButton) |
---|
3094 | 3049 | { |
---|
3095 | 3050 | copy.Slower(); |
---|
3096 | 3051 | copy.Touch(); |
---|
3097 | 3052 | objEditor.refreshContents(); |
---|
3098 | | - } else if (event.getSource() == fasterButton) |
---|
| 3053 | + } else if (source == fasterButton) |
---|
3099 | 3054 | { |
---|
3100 | 3055 | copy.Faster(); |
---|
3101 | 3056 | copy.Touch(); |
---|
3102 | 3057 | objEditor.refreshContents(); |
---|
3103 | | - } else if (event.getSource() == remarkButton) |
---|
| 3058 | + } else if (source == remarkButton) |
---|
3104 | 3059 | { |
---|
3105 | 3060 | copy.Remark(); |
---|
3106 | 3061 | copy.Touch(); |
---|
3107 | 3062 | objEditor.refreshContents(); |
---|
3108 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3063 | + } else if (source == stepAllButton) |
---|
3109 | 3064 | { |
---|
3110 | 3065 | copy.StepAll(); |
---|
3111 | 3066 | copy.Touch(); |
---|
3112 | 3067 | objEditor.refreshContents(); |
---|
3113 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3068 | + } else if (source == resetAllButton) |
---|
3114 | 3069 | { |
---|
3115 | 3070 | //CameraPane.fullreset = true; |
---|
3116 | 3071 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3143 | 3098 | // Close(); |
---|
3144 | 3099 | // } |
---|
3145 | 3100 | // else |
---|
3146 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3101 | + if (source == resetSlidersButton) |
---|
3147 | 3102 | { |
---|
3148 | 3103 | ResetSliders(); |
---|
3149 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3104 | + } else if (source == clearMaterialButton) |
---|
3150 | 3105 | { |
---|
3151 | 3106 | ClearMaterial(); |
---|
3152 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3107 | + } else if (source == createMaterialButton) |
---|
3153 | 3108 | { |
---|
3154 | 3109 | CreateMaterial(); |
---|
3155 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3110 | + } else if (source == clearPanelButton) |
---|
3156 | 3111 | { |
---|
3157 | 3112 | copy.ClearUI(); |
---|
3158 | 3113 | refreshContents(true); |
---|
3159 | | - } /* |
---|
3160 | | - } |
---|
3161 | | - |
---|
3162 | | - public boolean action(Event event, Object arg) |
---|
3163 | | - { |
---|
3164 | | - */ else if (event.getSource() == closeItem) |
---|
| 3114 | + } else if (source == importGFDItem) |
---|
| 3115 | + { |
---|
| 3116 | + ImportGFD(); |
---|
| 3117 | + } else |
---|
| 3118 | + if (source == importVRMLX3DItem) |
---|
| 3119 | + { |
---|
| 3120 | + ImportVRMLX3D(); |
---|
| 3121 | + } else |
---|
| 3122 | + if (source == import3DSItem) |
---|
| 3123 | + { |
---|
| 3124 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3125 | + } else |
---|
| 3126 | + if (source == importOBJItem) |
---|
| 3127 | + { |
---|
| 3128 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3129 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3130 | + browser.setVisible(true); |
---|
| 3131 | + String filename = browser.getFile(); |
---|
| 3132 | + if (filename != null && filename.length() > 0) |
---|
| 3133 | + { |
---|
| 3134 | + String fullname = browser.getDirectory() + filename; |
---|
| 3135 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3136 | + } |
---|
| 3137 | + } else |
---|
| 3138 | + if (source == closeItem) |
---|
3165 | 3139 | { |
---|
3166 | 3140 | Close(); |
---|
3167 | 3141 | //return true; |
---|
3168 | | - } else if (event.getSource() == loadItem) |
---|
| 3142 | + } else if (source == loadItem) |
---|
3169 | 3143 | { |
---|
3170 | 3144 | load(); |
---|
3171 | 3145 | //return true; |
---|
3172 | | - } else if (event.getSource() == saveItem) |
---|
| 3146 | + } else if (source == newItem) |
---|
| 3147 | + { |
---|
| 3148 | + New(); |
---|
| 3149 | + } else if (source == saveItem) |
---|
3173 | 3150 | { |
---|
3174 | 3151 | save(); |
---|
3175 | 3152 | //return true; |
---|
3176 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3153 | + } else if (source == saveAsItem) |
---|
3177 | 3154 | { |
---|
3178 | 3155 | saveAs(); |
---|
3179 | 3156 | //return true; |
---|
3180 | | - } else if (event.getSource() == reexportItem) |
---|
| 3157 | + } else if (source == reexportItem) |
---|
3181 | 3158 | { |
---|
3182 | 3159 | reexport(); |
---|
3183 | 3160 | //return true; |
---|
3184 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3161 | + } else if (source == exportAsItem) |
---|
3185 | 3162 | { |
---|
3186 | 3163 | export(); |
---|
3187 | 3164 | //return true; |
---|
3188 | | - } else if (event.getSource() == povItem) |
---|
| 3165 | + } else if (source == povItem) |
---|
3189 | 3166 | { |
---|
3190 | 3167 | generatePOV(); |
---|
3191 | 3168 | //return true; |
---|
3192 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3169 | + } else if (source == zBufferItem) |
---|
3193 | 3170 | { |
---|
3194 | 3171 | try |
---|
3195 | 3172 | { |
---|
.. | .. |
---|
3211 | 3188 | cameraView.repaint(); |
---|
3212 | 3189 | //return true; |
---|
3213 | 3190 | } |
---|
3214 | | - */ else if (event.getSource() == editCameraItem) |
---|
3215 | | - { |
---|
3216 | | - cameraView.ProtectCamera(); |
---|
3217 | | - cameraView.repaint(); |
---|
3218 | | - return; |
---|
3219 | | - } else if (event.getSource() == revertCameraItem) |
---|
3220 | | - { |
---|
3221 | | - cameraView.RevertCamera(); |
---|
3222 | | - cameraView.repaint(); |
---|
3223 | | - return; |
---|
3224 | | - } else if (event.getSource() == textureButton) |
---|
3225 | | - { |
---|
3226 | | - return; // true; |
---|
3227 | | - } else // combos... |
---|
3228 | | - if (event.getSource() == texresMenu) |
---|
| 3191 | + */ else // combos... |
---|
| 3192 | + if (source == texresMenu) |
---|
3229 | 3193 | { |
---|
3230 | 3194 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3231 | 3195 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3237 | 3201 | } |
---|
3238 | 3202 | } |
---|
3239 | 3203 | |
---|
3240 | | - void ToggleAnimation() |
---|
| 3204 | + void New() |
---|
3241 | 3205 | { |
---|
3242 | | - if (!CameraPane.ANIMATION) |
---|
| 3206 | + while (copy.Size() > 1) |
---|
3243 | 3207 | { |
---|
3244 | | - FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3208 | + copy.remove(1); |
---|
| 3209 | + } |
---|
| 3210 | + |
---|
| 3211 | + ResetModel(); |
---|
| 3212 | + objEditor.refreshContents(); |
---|
| 3213 | + } |
---|
| 3214 | + |
---|
| 3215 | + Object3D graphs[] = new Object3D[10000]; |
---|
| 3216 | + int undoindex = 0; |
---|
| 3217 | + |
---|
| 3218 | + static public Object clone(Object o) |
---|
| 3219 | + { |
---|
| 3220 | + try |
---|
| 3221 | + { |
---|
| 3222 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3223 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3224 | + |
---|
| 3225 | + out.writeObject(o); |
---|
| 3226 | + |
---|
| 3227 | + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); |
---|
| 3228 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3229 | + Object obj = in.readObject(); |
---|
| 3230 | + in.close(); |
---|
| 3231 | + out.close(); |
---|
| 3232 | + return obj; |
---|
| 3233 | + } catch (Exception e) |
---|
| 3234 | + { |
---|
| 3235 | + System.err.println(e); |
---|
| 3236 | + return null; |
---|
| 3237 | + } |
---|
| 3238 | + } |
---|
| 3239 | + |
---|
| 3240 | + public void Save() |
---|
| 3241 | + { |
---|
| 3242 | + if (true) return; |
---|
| 3243 | + |
---|
| 3244 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3245 | + graphs[undoindex++] = (Object3D)clone(copy); |
---|
| 3246 | + |
---|
| 3247 | + for (int i = undoindex; i < graphs.length; i++) |
---|
| 3248 | + { |
---|
| 3249 | + graphs[i] = null; |
---|
| 3250 | + } |
---|
| 3251 | + |
---|
| 3252 | + // test save |
---|
| 3253 | + if (false) |
---|
| 3254 | + { |
---|
| 3255 | + try |
---|
| 3256 | + { |
---|
| 3257 | + FileOutputStream ostream = new FileOutputStream("save" + undoindex); |
---|
| 3258 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3259 | + |
---|
| 3260 | + p.writeObject(copy); |
---|
| 3261 | + |
---|
| 3262 | + p.flush(); |
---|
| 3263 | + |
---|
| 3264 | + ostream.close(); |
---|
| 3265 | + } catch (Exception e) |
---|
| 3266 | + { |
---|
| 3267 | + e.printStackTrace(); |
---|
| 3268 | + } |
---|
| 3269 | + } |
---|
| 3270 | + } |
---|
| 3271 | + |
---|
| 3272 | + public void Undo() |
---|
| 3273 | + { |
---|
| 3274 | + if (undoindex == 0) |
---|
| 3275 | + { |
---|
| 3276 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3277 | + return; |
---|
| 3278 | + } |
---|
| 3279 | + |
---|
| 3280 | + if (graphs[undoindex] == null) |
---|
| 3281 | + { |
---|
| 3282 | + Save(); |
---|
| 3283 | + undoindex -= 1; |
---|
| 3284 | + } |
---|
| 3285 | + |
---|
| 3286 | + undoindex -= 1; |
---|
| 3287 | + |
---|
| 3288 | + copy = graphs[undoindex]; |
---|
| 3289 | + |
---|
| 3290 | + cameraView.object = copy; |
---|
| 3291 | + copy.Touch(); |
---|
| 3292 | + |
---|
| 3293 | + ResetModel(); |
---|
| 3294 | + refreshContents(); |
---|
| 3295 | + } |
---|
| 3296 | + |
---|
| 3297 | + public void Redo() |
---|
| 3298 | + { |
---|
| 3299 | + if (graphs[undoindex + 1] == null) |
---|
| 3300 | + { |
---|
| 3301 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3302 | + return; |
---|
| 3303 | + } |
---|
| 3304 | + |
---|
| 3305 | + undoindex += 1; |
---|
| 3306 | + |
---|
| 3307 | + copy = graphs[undoindex]; |
---|
| 3308 | + |
---|
| 3309 | + cameraView.object = copy; |
---|
| 3310 | + copy.Touch(); |
---|
| 3311 | + |
---|
| 3312 | + ResetModel(); |
---|
| 3313 | + refreshContents(); |
---|
| 3314 | + } |
---|
| 3315 | + |
---|
| 3316 | + void ImportGFD() |
---|
| 3317 | + { |
---|
| 3318 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
3245 | 3319 | browser.show(); |
---|
3246 | 3320 | String filename = browser.getFile(); |
---|
3247 | 3321 | if (filename != null && filename.length() > 0) |
---|
3248 | 3322 | { |
---|
3249 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3323 | + String fullname = browser.getDirectory() + filename; |
---|
| 3324 | + |
---|
| 3325 | + //Object3D readobj = |
---|
| 3326 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3327 | + //makeSomething(readobj); |
---|
| 3328 | + } |
---|
| 3329 | + } |
---|
| 3330 | + |
---|
| 3331 | + void ImportVRMLX3D() |
---|
| 3332 | + { |
---|
| 3333 | + if (Grafreed.standAlone) |
---|
| 3334 | + { |
---|
| 3335 | + /**/ |
---|
| 3336 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3337 | + browser.show(); |
---|
| 3338 | + String filename = browser.getFile(); |
---|
| 3339 | + if (filename != null && filename.length() > 0) |
---|
| 3340 | + { |
---|
| 3341 | + String fullname = browser.getDirectory() + filename; |
---|
| 3342 | + LoadVRMLX3D(fullname); |
---|
| 3343 | + } |
---|
| 3344 | + /**/ |
---|
| 3345 | + } |
---|
| 3346 | + } |
---|
| 3347 | + |
---|
| 3348 | + void ToggleAnimation() |
---|
| 3349 | + { |
---|
| 3350 | + if (!Globals.ANIMATION) |
---|
| 3351 | + { |
---|
| 3352 | + FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3353 | + browser.setVisible(true); |
---|
| 3354 | + String filename = browser.getFile(); |
---|
| 3355 | + if (filename != null && filename.length() > 0) |
---|
| 3356 | + { |
---|
| 3357 | + Globals.filename = browser.getDirectory() + filename; |
---|
3250 | 3358 | //CameraPane.framecount = 0; |
---|
3251 | | - CameraPane.imagecount = 0; |
---|
| 3359 | + Globals.imagecount = 0; |
---|
3252 | 3360 | |
---|
3253 | | - CameraPane.ANIMATION ^= true; |
---|
| 3361 | + Globals.ANIMATION ^= true; |
---|
3254 | 3362 | |
---|
3255 | | - GrafreeD.wav.cursor = 0; |
---|
3256 | | - GrafreeD.wav.loop = 0; |
---|
| 3363 | + Grafreed.wav.cursor = 0; |
---|
| 3364 | + Grafreed.wav.loop = 0; |
---|
3257 | 3365 | } |
---|
3258 | 3366 | } else |
---|
3259 | 3367 | { |
---|
3260 | | - CameraPane.ANIMATION ^= true; |
---|
| 3368 | + Globals.ANIMATION ^= true; |
---|
3261 | 3369 | } |
---|
3262 | 3370 | } |
---|
3263 | 3371 | |
---|
.. | .. |
---|
3303 | 3411 | void CreateMaterial() |
---|
3304 | 3412 | { |
---|
3305 | 3413 | //copy.ClearMaterial(); // PATCH |
---|
3306 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3414 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3307 | 3415 | if (copy.selection.size() > 0) |
---|
3308 | 3416 | //SetMaterial(copy); |
---|
3309 | 3417 | { |
---|
.. | .. |
---|
3362 | 3470 | { |
---|
3363 | 3471 | copy.ResetBlockLoop(); // temporary problem |
---|
3364 | 3472 | |
---|
3365 | | - boolean random = CameraPane.RANDOM; |
---|
3366 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3473 | + boolean random = CameraPane.SWITCH; |
---|
| 3474 | + CameraPane.SWITCH = false; // parse everything |
---|
3367 | 3475 | copy.ResetDisplayList(); |
---|
3368 | 3476 | copy.HardTouch(); |
---|
3369 | | - CameraPane.RANDOM = random; |
---|
| 3477 | + CameraPane.SWITCH = random; |
---|
3370 | 3478 | } |
---|
3371 | 3479 | |
---|
3372 | 3480 | // public void applySelf() |
---|
.. | .. |
---|
3436 | 3544 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
3437 | 3545 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
3438 | 3546 | |
---|
3439 | | - if (!NumberSlider.frozen) |
---|
| 3547 | + if (!cNumberSlider.frozen) |
---|
3440 | 3548 | { |
---|
3441 | 3549 | //System.out.println("Propagate = " + propagate); |
---|
3442 | 3550 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3551 | + |
---|
| 3552 | + if (copy.material != null) |
---|
| 3553 | + { |
---|
| 3554 | + cMaterial mat = copy.material; |
---|
| 3555 | + |
---|
| 3556 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3557 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3558 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3559 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3560 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3561 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3562 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3563 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3564 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3565 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3566 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3567 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3568 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3569 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3570 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3571 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3572 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3573 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3574 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3575 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3576 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3577 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3578 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3579 | + } |
---|
| 3580 | + |
---|
3443 | 3581 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3444 | 3582 | { |
---|
3445 | 3583 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3484 | 3622 | || e.getSource() == apertureField |
---|
3485 | 3623 | || e.getSource() == shadowblurField) |
---|
3486 | 3624 | { |
---|
| 3625 | + new Exception().printStackTrace(); |
---|
3487 | 3626 | System.exit(0); |
---|
3488 | 3627 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3489 | 3628 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
3510 | 3649 | //System.out.println("PARENT = " + parent); |
---|
3511 | 3650 | //if (parent != null) |
---|
3512 | 3651 | // parent.applySelf(); |
---|
3513 | | - refreshContents(); |
---|
| 3652 | + if (e.getSource() == normalpushField) |
---|
| 3653 | + { |
---|
| 3654 | + objEditor.refreshContents(); |
---|
| 3655 | + //Refresh(); |
---|
| 3656 | + } |
---|
| 3657 | + else |
---|
| 3658 | + refreshContents(); |
---|
3514 | 3659 | // ??? client.refreshEditWindow(); |
---|
3515 | 3660 | } |
---|
3516 | 3661 | //else |
---|
.. | .. |
---|
3522 | 3667 | //group.name = nameField.getText(); |
---|
3523 | 3668 | //objEditor.applySelf(); |
---|
3524 | 3669 | |
---|
3525 | | - assert (objEditor == this); |
---|
| 3670 | + // OCT2018: assert (objEditor == this); |
---|
3526 | 3671 | if (copy.selection == null || copy.selection.size() == 0) |
---|
3527 | 3672 | //super.applySelf() |
---|
3528 | 3673 | ; else |
---|
.. | .. |
---|
3546 | 3691 | objEditor.copy = keep; |
---|
3547 | 3692 | } |
---|
3548 | 3693 | } |
---|
| 3694 | + |
---|
| 3695 | + if (normalpushField != null) |
---|
| 3696 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3549 | 3697 | } |
---|
3550 | 3698 | |
---|
3551 | 3699 | void SnapObject() |
---|
3552 | 3700 | { |
---|
3553 | | - Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
3554 | | - SnapObject(obj); |
---|
| 3701 | + if (copy.selection.size() > 0) |
---|
| 3702 | + { |
---|
| 3703 | + Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
| 3704 | + SnapObject(obj); |
---|
| 3705 | + } |
---|
3555 | 3706 | } |
---|
3556 | 3707 | |
---|
3557 | 3708 | void SnapObject(Object3D obj) |
---|
.. | .. |
---|
3797 | 3948 | |
---|
3798 | 3949 | radioPanel.revalidate(); |
---|
3799 | 3950 | radioPanel.repaint(); |
---|
3800 | | - ctrlPanel.revalidate(); // ? new |
---|
| 3951 | + ctrlPanel.validate(); // ? new |
---|
3801 | 3952 | ctrlPanel.repaint(); |
---|
3802 | 3953 | } |
---|
3803 | 3954 | } |
---|
.. | .. |
---|
3806 | 3957 | |
---|
3807 | 3958 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3808 | 3959 | { |
---|
| 3960 | + Save(); |
---|
3809 | 3961 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3810 | 3962 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3811 | 3963 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4009 | 4161 | } |
---|
4010 | 4162 | } |
---|
4011 | 4163 | } |
---|
| 4164 | + |
---|
4012 | 4165 | LoadGFDThread loadGFDThread; |
---|
4013 | 4166 | |
---|
4014 | 4167 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4029 | 4182 | try |
---|
4030 | 4183 | { |
---|
4031 | 4184 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4032 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4185 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4186 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4033 | 4187 | |
---|
4034 | 4188 | readobj = (Object3D) p.readObject(); |
---|
4035 | 4189 | istream.close(); |
---|
.. | .. |
---|
4037 | 4191 | readobj.ResetDisplayList(); |
---|
4038 | 4192 | } catch (Exception e) |
---|
4039 | 4193 | { |
---|
4040 | | - e.printStackTrace(); |
---|
| 4194 | + //e.printStackTrace(); |
---|
| 4195 | + try |
---|
| 4196 | + { |
---|
| 4197 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4198 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4199 | + |
---|
| 4200 | + readobj = (Object3D) p.readObject(); |
---|
| 4201 | + istream.close(); |
---|
| 4202 | + |
---|
| 4203 | + readobj.ResetDisplayList(); |
---|
| 4204 | + } catch (Exception e2) |
---|
| 4205 | + { |
---|
| 4206 | + e2.printStackTrace(); |
---|
| 4207 | + } |
---|
4041 | 4208 | } |
---|
4042 | 4209 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4043 | 4210 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4154 | 4321 | |
---|
4155 | 4322 | void load() // throws ClassNotFoundException |
---|
4156 | 4323 | { |
---|
4157 | | - if (GrafreeD.standAlone) |
---|
| 4324 | + if (Grafreed.standAlone) |
---|
4158 | 4325 | { |
---|
4159 | 4326 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4160 | 4327 | browser.show(); |
---|
.. | .. |
---|
4241 | 4408 | try |
---|
4242 | 4409 | { |
---|
4243 | 4410 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4244 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4411 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4412 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4245 | 4413 | |
---|
4246 | 4414 | p.writeObject(copy); |
---|
4247 | 4415 | p.flush(); |
---|
4248 | 4416 | |
---|
| 4417 | + zstream.close(); |
---|
4249 | 4418 | ostream.close(); |
---|
4250 | 4419 | |
---|
4251 | 4420 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4255 | 4424 | { |
---|
4256 | 4425 | } |
---|
4257 | 4426 | } |
---|
| 4427 | + |
---|
4258 | 4428 | String lastname; |
---|
4259 | 4429 | |
---|
4260 | 4430 | void saveAs() |
---|
4261 | 4431 | { |
---|
4262 | | - if (GrafreeD.standAlone) |
---|
| 4432 | + if (Grafreed.standAlone) |
---|
4263 | 4433 | { |
---|
4264 | 4434 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4265 | 4435 | browser.setVisible(true); |
---|
.. | .. |
---|
4364 | 4534 | try |
---|
4365 | 4535 | { |
---|
4366 | 4536 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4367 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4368 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4537 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4538 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4369 | 4539 | |
---|
4370 | 4540 | Object3D objectparent = obj.parent; |
---|
4371 | 4541 | obj.parent = null; |
---|
4372 | 4542 | |
---|
4373 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4543 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4374 | 4544 | |
---|
4375 | 4545 | obj.parent = objectparent; |
---|
4376 | 4546 | |
---|
.. | .. |
---|
4382 | 4552 | p.writeObject(object); |
---|
4383 | 4553 | p.flush(); |
---|
4384 | 4554 | |
---|
| 4555 | + zstream.close(); |
---|
4385 | 4556 | ostream.close(); |
---|
4386 | | - // zstream.close(); |
---|
4387 | 4557 | |
---|
4388 | 4558 | // group.selection.get(0).parent = parent; |
---|
4389 | 4559 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4404 | 4574 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4405 | 4575 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4406 | 4576 | copy.generatePOV(buffer); |
---|
4407 | | - if (GrafreeD.standAlone) |
---|
| 4577 | + if (Grafreed.standAlone) |
---|
4408 | 4578 | { |
---|
4409 | 4579 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4410 | 4580 | browser.show(); |
---|
.. | .. |
---|
4430 | 4600 | Object3D client; |
---|
4431 | 4601 | Object3D copy; |
---|
4432 | 4602 | MenuBar menuBar; |
---|
4433 | | - Menu windowMenu; |
---|
| 4603 | + Menu fileMenu; |
---|
| 4604 | + MenuItem newItem; |
---|
4434 | 4605 | MenuItem loadItem; |
---|
4435 | 4606 | MenuItem saveItem; |
---|
4436 | 4607 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4438 | 4609 | MenuItem reexportItem; |
---|
4439 | 4610 | MenuItem povItem; |
---|
4440 | 4611 | MenuItem closeItem; |
---|
4441 | | - Menu cameraMenu; |
---|
| 4612 | + |
---|
4442 | 4613 | CheckboxMenuItem zBufferItem; |
---|
4443 | 4614 | //MenuItem normalLensItem; |
---|
4444 | | - MenuItem editCameraItem; |
---|
4445 | | - MenuItem revertCameraItem; |
---|
4446 | | - CheckboxMenuItem toggleLiveItem; |
---|
4447 | 4615 | MenuItem stepItem; |
---|
4448 | | - CheckboxMenuItem toggleFullItem; |
---|
| 4616 | + CheckboxMenuItem toggleLiveItem; |
---|
| 4617 | + CheckboxMenuItem toggleFullScreenItem; |
---|
| 4618 | + CheckboxMenuItem toggleTimelineItem; |
---|
4449 | 4619 | CheckboxMenuItem toggleRenderItem; |
---|
4450 | 4620 | CheckboxMenuItem toggleDebugItem; |
---|
4451 | 4621 | CheckboxMenuItem toggleFrustumItem; |
---|
4452 | 4622 | CheckboxMenuItem toggleFootContactItem; |
---|
4453 | 4623 | CheckboxMenuItem toggleDLItem; |
---|
4454 | 4624 | CheckboxMenuItem toggleTextureItem; |
---|
4455 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4625 | + CheckboxMenuItem toggleSwitchItem; |
---|
4456 | 4626 | CheckboxMenuItem toggleRootItem; |
---|
4457 | 4627 | CheckboxMenuItem animationItem; |
---|
4458 | 4628 | CheckboxMenuItem toggleHandleItem; |
---|
.. | .. |
---|
4460 | 4630 | JSplitPane mainPanel; |
---|
4461 | 4631 | JScrollPane scrollpane; |
---|
4462 | 4632 | JPanel toolbarPanel; |
---|
4463 | | - JPanel treePanel; |
---|
| 4633 | + cGridBag treePanel; |
---|
4464 | 4634 | JPanel radioPanel; |
---|
4465 | 4635 | ButtonGroup buttonGroup; |
---|
4466 | | - JPanel ctrlPanel; |
---|
4467 | | - JPanel materialPanel; |
---|
| 4636 | + cGridBag ctrlPanel; |
---|
| 4637 | + cGridBag materialPanel; |
---|
4468 | 4638 | JScrollPane infoPanel; |
---|
4469 | | - JPanel optionsPanel; |
---|
| 4639 | + cGridBag optionsPanel; |
---|
4470 | 4640 | JTabbedPane objectPanel; |
---|
4471 | | - JPanel XYZPanel; |
---|
| 4641 | + cGridBag XYZPanel; |
---|
4472 | 4642 | JSplitPane gridPanel; |
---|
4473 | 4643 | JSplitPane bigPanel; |
---|
4474 | | - JPanel bigThree; |
---|
4475 | | - JTabbedPane scenePanel; |
---|
4476 | | - JPanel cameraPanel; |
---|
| 4644 | + cGridBag bigThree; |
---|
| 4645 | + cGridBag scenePanel; |
---|
| 4646 | + cGridBag centralPanel; |
---|
| 4647 | + JSplitPane cameraPanel; |
---|
| 4648 | + JPanel timelinePanel; |
---|
| 4649 | + JMenuBar timelineMenubar; |
---|
4477 | 4650 | JSplitPane framePanel; |
---|
4478 | 4651 | JTextArea/*Field*/ nameField; |
---|
4479 | | - cButton textureButton; |
---|
| 4652 | + //cButton textureButton; |
---|
4480 | 4653 | cButton okButton; |
---|
4481 | 4654 | cButton applyButton; |
---|
4482 | 4655 | cButton cancelButton; |
---|
.. | .. |
---|
4523 | 4696 | // MATERIAL |
---|
4524 | 4697 | JLabel materialLabel; |
---|
4525 | 4698 | JLabel colorLabel; |
---|
4526 | | - NumberSlider colorField; |
---|
| 4699 | + cNumberSlider colorField; |
---|
4527 | 4700 | JLabel modulationLabel; |
---|
4528 | | - NumberSlider modulationField; |
---|
| 4701 | + cNumberSlider modulationField; |
---|
4529 | 4702 | JLabel metalnessLabel; |
---|
4530 | | - NumberSlider metalnessField; |
---|
| 4703 | + cNumberSlider metalnessField; |
---|
4531 | 4704 | JLabel diffuseLabel; |
---|
4532 | | - NumberSlider diffuseField; |
---|
| 4705 | + cNumberSlider diffuseField; |
---|
4533 | 4706 | JLabel specularLabel; |
---|
4534 | | - NumberSlider specularField; |
---|
| 4707 | + cNumberSlider specularField; |
---|
4535 | 4708 | JLabel shininessLabel; |
---|
4536 | | - NumberSlider shininessField; |
---|
| 4709 | + cNumberSlider shininessField; |
---|
4537 | 4710 | JLabel shiftLabel; |
---|
4538 | | - NumberSlider shiftField; |
---|
| 4711 | + cNumberSlider shiftField; |
---|
4539 | 4712 | JLabel ambientLabel; |
---|
4540 | | - NumberSlider ambientField; |
---|
| 4713 | + cNumberSlider ambientField; |
---|
4541 | 4714 | JLabel lightareaLabel; |
---|
4542 | | - NumberSlider lightareaField; |
---|
| 4715 | + cNumberSlider lightareaField; |
---|
4543 | 4716 | JLabel diffusenessLabel; |
---|
4544 | | - NumberSlider diffusenessField; |
---|
| 4717 | + cNumberSlider diffusenessField; |
---|
4545 | 4718 | JLabel velvetLabel; |
---|
4546 | | - NumberSlider velvetField; |
---|
| 4719 | + cNumberSlider velvetField; |
---|
4547 | 4720 | JLabel sheenLabel; |
---|
4548 | | - NumberSlider sheenField; |
---|
| 4721 | + cNumberSlider sheenField; |
---|
4549 | 4722 | JLabel subsurfaceLabel; |
---|
4550 | | - NumberSlider subsurfaceField; |
---|
| 4723 | + cNumberSlider subsurfaceField; |
---|
4551 | 4724 | //JLabel bumpLabel; |
---|
4552 | 4725 | //NumberSlider bumpField; |
---|
4553 | 4726 | JLabel backlitLabel; |
---|
4554 | | - NumberSlider backlitField; |
---|
| 4727 | + cNumberSlider backlitField; |
---|
4555 | 4728 | JLabel anisoLabel; |
---|
4556 | | - NumberSlider anisoField; |
---|
| 4729 | + cNumberSlider anisoField; |
---|
4557 | 4730 | JLabel anisoVLabel; |
---|
4558 | | - NumberSlider anisoVField; |
---|
| 4731 | + cNumberSlider anisoVField; |
---|
4559 | 4732 | JLabel cameraLabel; |
---|
4560 | | - NumberSlider cameraField; |
---|
| 4733 | + cNumberSlider cameraField; |
---|
4561 | 4734 | JLabel selfshadowLabel; |
---|
4562 | | - NumberSlider selfshadowField; |
---|
| 4735 | + cNumberSlider selfshadowField; |
---|
4563 | 4736 | JLabel shadowLabel; |
---|
4564 | | - NumberSlider shadowField; |
---|
| 4737 | + cNumberSlider shadowField; |
---|
4565 | 4738 | JLabel textureLabel; |
---|
4566 | | - NumberSlider textureField; |
---|
| 4739 | + cNumberSlider textureField; |
---|
4567 | 4740 | JLabel opacityLabel; |
---|
4568 | | - NumberSlider opacityField; |
---|
| 4741 | + cNumberSlider opacityField; |
---|
4569 | 4742 | JLabel fakedepthLabel; |
---|
4570 | | - NumberSlider fakedepthField; |
---|
| 4743 | + cNumberSlider fakedepthField; |
---|
4571 | 4744 | JLabel shadowbiasLabel; |
---|
4572 | | - NumberSlider shadowbiasField; |
---|
| 4745 | + cNumberSlider shadowbiasField; |
---|
4573 | 4746 | JLabel bumpLabel; |
---|
4574 | | - NumberSlider bumpField; |
---|
| 4747 | + cNumberSlider bumpField; |
---|
4575 | 4748 | JLabel noiseLabel; |
---|
4576 | | - NumberSlider noiseField; |
---|
| 4749 | + cNumberSlider noiseField; |
---|
4577 | 4750 | JLabel powerLabel; |
---|
4578 | | - NumberSlider powerField; |
---|
| 4751 | + cNumberSlider powerField; |
---|
4579 | 4752 | JLabel borderfadeLabel; |
---|
4580 | | - NumberSlider borderfadeField; |
---|
| 4753 | + cNumberSlider borderfadeField; |
---|
4581 | 4754 | JLabel fogLabel; |
---|
4582 | | - NumberSlider fogField; |
---|
| 4755 | + cNumberSlider fogField; |
---|
4583 | 4756 | JLabel opacityPowerLabel; |
---|
4584 | | - NumberSlider opacityPowerField; |
---|
| 4757 | + cNumberSlider opacityPowerField; |
---|
4585 | 4758 | JTree jTree; |
---|
4586 | 4759 | //ObjectUI parent; |
---|
| 4760 | + |
---|
| 4761 | + cNumberSlider normalpushField; |
---|
| 4762 | + |
---|
| 4763 | + private MenuItem importGFDItem; |
---|
| 4764 | + private MenuItem importVRMLX3DItem; |
---|
| 4765 | + private MenuItem import3DSItem; |
---|
| 4766 | + private MenuItem importOBJItem; |
---|
4587 | 4767 | } |
---|