| .. | .. |
|---|
| 19 | 19 | import //weka.core. |
|---|
| 20 | 20 | matrix.Matrix; |
|---|
| 21 | 21 | |
|---|
| 22 | +import grafeme.ui.*; |
|---|
| 23 | + |
|---|
| 22 | 24 | class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI, |
|---|
| 23 | 25 | ActionListener, ChangeListener, |
|---|
| 24 | 26 | InputMethodListener, |
|---|
| .. | .. |
|---|
| 31 | 33 | boolean timeline; |
|---|
| 32 | 34 | boolean wasFullScreen; |
|---|
| 33 | 35 | |
|---|
| 36 | + GroupEditor callee; |
|---|
| 37 | + JFrame frame; |
|---|
| 38 | + |
|---|
| 34 | 39 | // SCRIPT |
|---|
| 35 | 40 | |
|---|
| 36 | 41 | transient JFrame textpanel = null; |
|---|
| .. | .. |
|---|
| 121 | 126 | void keyPressed(int key, int modifiers) |
|---|
| 122 | 127 | { |
|---|
| 123 | 128 | System.out.println("KEY PRESSED"); |
|---|
| 124 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
|---|
| 129 | + Globals.theRenderer.keyPressed(key, modifiers); |
|---|
| 125 | 130 | } |
|---|
| 126 | 131 | */ |
|---|
| 127 | 132 | |
|---|
| 128 | 133 | static GridBagConstraints aConstraints; |
|---|
| 129 | 134 | static GridBagConstraints aWindowConstraints; |
|---|
| 130 | | - GroupEditor callee; |
|---|
| 131 | | - JFrame frame; |
|---|
| 135 | + |
|---|
| 132 | 136 | static int GRIDWIDTH = 100; // 4; |
|---|
| 133 | 137 | |
|---|
| 134 | 138 | public void closeUI() |
|---|
| 135 | 139 | { |
|---|
| 136 | 140 | //new Exception().printStackTrace(); |
|---|
| 137 | | - System.out.println("this = " + this); |
|---|
| 138 | | - System.out.println("objEditor = " + objEditor); |
|---|
| 141 | +// System.out.println("this = " + this); |
|---|
| 142 | +// System.out.println("objEditor = " + objEditor); |
|---|
| 139 | 143 | //nameField.removeActionListener(this); |
|---|
| 140 | | - objEditor.ctrlPanel.remove(nameField); |
|---|
| 144 | +// objEditor.ctrlPanel.remove(nameField); |
|---|
| 145 | + |
|---|
| 146 | + objEditor.ctrlPanel.remove(namePanel); |
|---|
| 141 | 147 | |
|---|
| 142 | 148 | if (!GroupEditor.allparams) |
|---|
| 143 | 149 | return; |
|---|
| 144 | 150 | |
|---|
| 145 | | - objEditor.ctrlPanel.remove(liveCB); |
|---|
| 146 | | - objEditor.ctrlPanel.remove(hideCB); |
|---|
| 147 | | - objEditor.ctrlPanel.remove(markCB); |
|---|
| 148 | | - |
|---|
| 149 | | - objEditor.ctrlPanel.remove(randomCB); |
|---|
| 150 | | - objEditor.ctrlPanel.remove(speedupCB); |
|---|
| 151 | | - objEditor.ctrlPanel.remove(rewindCB); |
|---|
| 152 | | - |
|---|
| 153 | | - objEditor.ctrlPanel.remove(resetButton); |
|---|
| 154 | | - objEditor.ctrlPanel.remove(stepButton); |
|---|
| 155 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
|---|
| 156 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
|---|
| 157 | | - objEditor.ctrlPanel.remove(link2masterCB); |
|---|
| 158 | | - //objEditor.ctrlPanel.remove(flipVCB); |
|---|
| 159 | | - //objEditor.ctrlPanel.remove(texresMenu); |
|---|
| 160 | | - objEditor.ctrlPanel.remove(slowerButton); |
|---|
| 161 | | - objEditor.ctrlPanel.remove(fasterButton); |
|---|
| 162 | | - objEditor.ctrlPanel.remove(remarkButton); |
|---|
| 151 | +// objEditor.ctrlPanel.remove(liveCB); |
|---|
| 152 | +// objEditor.ctrlPanel.remove(hideCB); |
|---|
| 153 | +// objEditor.ctrlPanel.remove(markCB); |
|---|
| 154 | +// |
|---|
| 155 | +// objEditor.ctrlPanel.remove(randomCB); |
|---|
| 156 | +// objEditor.ctrlPanel.remove(speedupCB); |
|---|
| 157 | +// objEditor.ctrlPanel.remove(rewindCB); |
|---|
| 158 | +// |
|---|
| 159 | +// objEditor.ctrlPanel.remove(resetButton); |
|---|
| 160 | +// objEditor.ctrlPanel.remove(stepButton); |
|---|
| 161 | +//// objEditor.ctrlPanel.remove(stepAllButton); |
|---|
| 162 | +//// objEditor.ctrlPanel.remove(resetAllButton); |
|---|
| 163 | +// objEditor.ctrlPanel.remove(link2masterCB); |
|---|
| 164 | +// //objEditor.ctrlPanel.remove(flipVCB); |
|---|
| 165 | +// //objEditor.ctrlPanel.remove(texresMenu); |
|---|
| 166 | +// objEditor.ctrlPanel.remove(slowerButton); |
|---|
| 167 | +// objEditor.ctrlPanel.remove(fasterButton); |
|---|
| 168 | +// objEditor.ctrlPanel.remove(remarkButton); |
|---|
| 163 | 169 | |
|---|
| 164 | | - Remove(normalpushField); |
|---|
| 170 | + objEditor.ctrlPanel.remove(setupPanel); |
|---|
| 171 | + objEditor.ctrlPanel.remove(commandsPanel); |
|---|
| 172 | + objEditor.ctrlPanel.remove(pushPanel); |
|---|
| 173 | + //objEditor.ctrlPanel.remove(fillPanel); |
|---|
| 174 | + |
|---|
| 175 | + //Remove(normalpushField); |
|---|
| 165 | 176 | } |
|---|
| 166 | 177 | |
|---|
| 167 | 178 | public ObjEditor GetEditor() |
|---|
| .. | .. |
|---|
| 265 | 276 | void SetupMenu() |
|---|
| 266 | 277 | { |
|---|
| 267 | 278 | frame.setMenuBar(menuBar = new MenuBar()); |
|---|
| 268 | | - menuBar.add(windowMenu = new Menu("File")); |
|---|
| 269 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
|---|
| 270 | | - windowMenu.add("-"); |
|---|
| 271 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
|---|
| 272 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
|---|
| 279 | + menuBar.add(fileMenu = new Menu("File")); |
|---|
| 280 | + fileMenu.add(newItem = new MenuItem("New")); |
|---|
| 281 | + fileMenu.add(loadItem = new MenuItem("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...")); |
|---|
| 273 | 299 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
|---|
| 274 | | - windowMenu.add("-"); |
|---|
| 275 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
|---|
| 276 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
|---|
| 277 | | - windowMenu.add("-"); |
|---|
| 300 | + fileMenu.add("-"); |
|---|
| 301 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
|---|
| 302 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
|---|
| 303 | + fileMenu.add("-"); |
|---|
| 278 | 304 | if (client.parent != null) |
|---|
| 279 | 305 | { |
|---|
| 280 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
|---|
| 306 | + fileMenu.add(closeItem = new MenuItem("Close")); |
|---|
| 281 | 307 | } else |
|---|
| 282 | 308 | { |
|---|
| 283 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
|---|
| 309 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
|---|
| 284 | 310 | } |
|---|
| 285 | 311 | |
|---|
| 312 | + newItem.addActionListener(this); |
|---|
| 286 | 313 | loadItem.addActionListener(this); |
|---|
| 287 | 314 | saveItem.addActionListener(this); |
|---|
| 288 | 315 | saveAsItem.addActionListener(this); |
|---|
| .. | .. |
|---|
| 291 | 318 | //povItem.addActionListener(this); |
|---|
| 292 | 319 | closeItem.addActionListener(this); |
|---|
| 293 | 320 | |
|---|
| 294 | | - menuBar.add(cameraMenu = new Menu("View")); |
|---|
| 295 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
|---|
| 296 | | - //zBufferItem.addActionListener(this); |
|---|
| 297 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
|---|
| 298 | | - //normalLensItem.addActionListener(this); |
|---|
| 299 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
|---|
| 300 | | - revertCameraItem.addActionListener(this); |
|---|
| 301 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
|---|
| 302 | | - toggleTimelineItem.addItemListener(this); |
|---|
| 303 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
|---|
| 304 | | - toggleFullScreenItem.addItemListener(this); |
|---|
| 305 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
|---|
| 306 | | - cameraMenu.add("-"); |
|---|
| 307 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
|---|
| 308 | | - toggleTextureItem.addItemListener(this); |
|---|
| 309 | | - toggleTextureItem.setState(CameraPane.textureon); |
|---|
| 310 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
|---|
| 311 | | - toggleLiveItem.addItemListener(this); |
|---|
| 312 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
|---|
| 313 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
|---|
| 314 | | - stepItem.addActionListener(this); |
|---|
| 315 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
|---|
| 316 | | -// toggleDLItem.addItemListener(this); |
|---|
| 317 | | -// toggleDLItem.setState(false); |
|---|
| 318 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
|---|
| 319 | | - toggleRenderItem.addItemListener(this); |
|---|
| 320 | | - toggleRenderItem.setState(!CameraPane.frozen); |
|---|
| 321 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
|---|
| 322 | | - toggleDebugItem.addItemListener(this); |
|---|
| 323 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
|---|
| 324 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
|---|
| 325 | | - toggleFrustumItem.addItemListener(this); |
|---|
| 326 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
|---|
| 327 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
|---|
| 328 | | - toggleFootContactItem.addItemListener(this); |
|---|
| 329 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
|---|
| 330 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
|---|
| 331 | | - toggleRandomItem.addItemListener(this); |
|---|
| 332 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
|---|
| 333 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
|---|
| 334 | | - toggleHandleItem.addItemListener(this); |
|---|
| 335 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
|---|
| 336 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
|---|
| 337 | | - togglePaintItem.addItemListener(this); |
|---|
| 338 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
|---|
| 339 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
|---|
| 340 | | -// toggleRootItem.addItemListener(this); |
|---|
| 341 | | -// toggleRootItem.setState(false); |
|---|
| 342 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
|---|
| 343 | | -// animationItem.addItemListener(this); |
|---|
| 344 | | -// animationItem.setState(CameraPane.ANIMATION); |
|---|
| 345 | | - cameraMenu.add("-"); |
|---|
| 346 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
|---|
| 347 | | - editCameraItem.addActionListener(this); |
|---|
| 348 | | - |
|---|
| 349 | 321 | objectPanel = new JTabbedPane(); |
|---|
| 350 | 322 | toolbarPanel = new JPanel(); |
|---|
| 351 | 323 | toolbarPanel.setName("Toolbar"); |
|---|
| 352 | | - treePanel = new JPanel(); |
|---|
| 324 | + treePanel = new cGridBag(); |
|---|
| 353 | 325 | treePanel.setName("Tree"); |
|---|
| 354 | | - ctrlPanel = new JPanel(); // new GridBagLayout()); |
|---|
| 326 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
|---|
| 355 | 327 | ctrlPanel.setName("Edit"); |
|---|
| 356 | | - materialPanel = new JPanel(); |
|---|
| 328 | + materialPanel = new cGridBag().setVertical(true); |
|---|
| 357 | 329 | materialPanel.setName("Material"); |
|---|
| 358 | 330 | /*JTextPane*/ |
|---|
| 359 | 331 | infoarea = createTextPane(); |
|---|
| 332 | + doc = infoarea.getStyledDocument(); |
|---|
| 333 | + |
|---|
| 360 | 334 | infoarea.setEditable(true); |
|---|
| 361 | 335 | SetText(); |
|---|
| 362 | 336 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
|---|
| 363 | 337 | // infoarea.setOpaque(false); |
|---|
| 364 | 338 | // //infoarea.setForeground(textcolor); |
|---|
| 365 | | - infoarea.setLineWrap(true); |
|---|
| 366 | | - infoarea.setWrapStyleWord(true); |
|---|
| 339 | +// TEXTAREA infoarea.setLineWrap(true); |
|---|
| 340 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
|---|
| 367 | 341 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
|---|
| 368 | 342 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
|---|
| 369 | 343 | infoPanel.setName("Info"); |
|---|
| .. | .. |
|---|
| 374 | 348 | mainPanel.setName("Main"); |
|---|
| 375 | 349 | mainPanel.setContinuousLayout(true); |
|---|
| 376 | 350 | mainPanel.setOneTouchExpandable(true); |
|---|
| 377 | | - mainPanel.setDividerLocation(1.0); |
|---|
| 378 | 351 | mainPanel.setDividerSize(9); |
|---|
| 379 | | - mainPanel.setResizeWeight(0); |
|---|
| 352 | + mainPanel.setDividerLocation(0.5); //1.0); |
|---|
| 353 | + mainPanel.setResizeWeight(0.5); |
|---|
| 380 | 354 | |
|---|
| 381 | 355 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
|---|
| 382 | 356 | //mainPanel.setLayout(new GridBagLayout()); |
|---|
| 383 | 357 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
|---|
| 384 | | - treePanel.setLayout(new GridBagLayout()); |
|---|
| 385 | | - ctrlPanel.setLayout(new GridBagLayout()); |
|---|
| 386 | | - materialPanel.setLayout(new GridBagLayout()); |
|---|
| 358 | +// treePanel.setLayout(new GridBagLayout()); |
|---|
| 359 | + //ctrlPanel.setLayout(new GridBagLayout()); |
|---|
| 360 | + //materialPanel.setLayout(new GridBagLayout()); |
|---|
| 387 | 361 | |
|---|
| 388 | 362 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
|---|
| 389 | 363 | GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0); |
|---|
| .. | .. |
|---|
| 422 | 396 | static String newline = "\n"; |
|---|
| 423 | 397 | protected static final String buttonString = "JButton"; |
|---|
| 424 | 398 | StyledDocument doc; |
|---|
| 425 | | - JTextArea infoarea; |
|---|
| 399 | + JTextPane infoarea; |
|---|
| 426 | 400 | |
|---|
| 427 | 401 | void ClearInfo() |
|---|
| 428 | 402 | { |
|---|
| .. | .. |
|---|
| 471 | 445 | //SendInfo("Name:", "bold"); |
|---|
| 472 | 446 | if (sel.GetTextures() != null || debug) |
|---|
| 473 | 447 | { |
|---|
| 474 | | - si.SendInfo(sel.toString(), "bold"); |
|---|
| 448 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
|---|
| 475 | 449 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
|---|
| 476 | 450 | if (sel.Size() > 0) |
|---|
| 477 | 451 | { |
|---|
| 478 | 452 | si.SendInfo("#children = " + sel.Size(), "regular"); |
|---|
| 479 | 453 | } |
|---|
| 480 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
|---|
| 454 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
|---|
| 481 | 455 | if (debug) |
|---|
| 482 | 456 | { |
|---|
| 483 | 457 | try |
|---|
| .. | .. |
|---|
| 489 | 463 | } |
|---|
| 490 | 464 | |
|---|
| 491 | 465 | if (full) |
|---|
| 492 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
|---|
| 466 | + { |
|---|
| 467 | + si.SendInfo(" BBox min: " + minima, "regular"); |
|---|
| 468 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
|---|
| 469 | + } |
|---|
| 493 | 470 | |
|---|
| 494 | 471 | if (sel.bRep != null) |
|---|
| 495 | 472 | { |
|---|
| .. | .. |
|---|
| 516 | 493 | } |
|---|
| 517 | 494 | if (sel.support != null) |
|---|
| 518 | 495 | { |
|---|
| 519 | | - si.SendInfo(" support: " + sel.support, "regular"); |
|---|
| 496 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
|---|
| 520 | 497 | } |
|---|
| 521 | 498 | if (sel.scriptnode != null) |
|---|
| 522 | 499 | { |
|---|
| .. | .. |
|---|
| 587 | 564 | { |
|---|
| 588 | 565 | CameraPane.pointflow = (PointFlow) sel; |
|---|
| 589 | 566 | } |
|---|
| 567 | + |
|---|
| 568 | + si.SendInfo("_____________________", "regular"); |
|---|
| 569 | + si.SendInfo("", "regular"); |
|---|
| 590 | 570 | } |
|---|
| 591 | 571 | } |
|---|
| 592 | 572 | |
|---|
| .. | .. |
|---|
| 618 | 598 | cameraView.ToggleFullScreen(); |
|---|
| 619 | 599 | } |
|---|
| 620 | 600 | |
|---|
| 621 | | - private JTextArea createTextPane() |
|---|
| 601 | + private JTextPane createTextPane() |
|---|
| 622 | 602 | { |
|---|
| 623 | | - String[] initString = |
|---|
| 624 | | - { |
|---|
| 625 | | - "This is an editable JTextPane, ", //regular |
|---|
| 626 | | - "another ", //italic |
|---|
| 627 | | - "styled ", //bold |
|---|
| 628 | | - "text ", //small |
|---|
| 629 | | - "component, ", //large |
|---|
| 630 | | - "which supports embedded components..." + newline,//regular |
|---|
| 631 | | - " " + newline, //button |
|---|
| 632 | | - "...and embedded icons..." + newline, //regular |
|---|
| 633 | | - " ", //icon |
|---|
| 634 | | - newline + "JTextPane is a subclass of JEditorPane that " |
|---|
| 635 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
|---|
| 636 | | - + "cover methods for interacting with those objects." |
|---|
| 637 | | - }; |
|---|
| 603 | +// TEXTAREA String[] initString = |
|---|
| 604 | +// { |
|---|
| 605 | +// "This is an editable JTextPane, ", //regular |
|---|
| 606 | +// "another ", //italic |
|---|
| 607 | +// "styled ", //bold |
|---|
| 608 | +// "text ", //small |
|---|
| 609 | +// "component, ", //large |
|---|
| 610 | +// "which supports embedded components..." + newline,//regular |
|---|
| 611 | +// " " + newline, //button |
|---|
| 612 | +// "...and embedded icons..." + newline, //regular |
|---|
| 613 | +// " ", //icon |
|---|
| 614 | +// newline + "JTextPane is a subclass of JEditorPane that " |
|---|
| 615 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
|---|
| 616 | +// + "cover methods for interacting with those objects." |
|---|
| 617 | +// }; |
|---|
| 618 | +// |
|---|
| 619 | +// String[] initStyles = |
|---|
| 620 | +// { |
|---|
| 621 | +// "regular", "italic", "bold", "small", "large", |
|---|
| 622 | +// "regular", "button", "regular", "icon", |
|---|
| 623 | +// "regular" |
|---|
| 624 | +// }; |
|---|
| 625 | +// |
|---|
| 626 | +// JTextPane textPane = new JTextPane(); |
|---|
| 627 | +// textPane.setEditable(true); |
|---|
| 628 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
|---|
| 629 | +// addStylesToDocument(doc); |
|---|
| 630 | +// |
|---|
| 631 | +// try |
|---|
| 632 | +// { |
|---|
| 633 | +// for (int j = 0; j < 2; j++) |
|---|
| 634 | +// { |
|---|
| 635 | +// for (int i = 0; i < initString.length; i++) |
|---|
| 636 | +// { |
|---|
| 637 | +// doc.insertString(doc.getLength(), initString[i], |
|---|
| 638 | +// doc.getStyle(initStyles[i])); |
|---|
| 639 | +// } |
|---|
| 640 | +// } |
|---|
| 641 | +// } catch (BadLocationException ble) |
|---|
| 642 | +// { |
|---|
| 643 | +// System.err.println("Couldn't insert initial text into text pane."); |
|---|
| 644 | +// } |
|---|
| 638 | 645 | |
|---|
| 639 | | - String[] initStyles = |
|---|
| 640 | | - { |
|---|
| 641 | | - "regular", "italic", "bold", "small", "large", |
|---|
| 642 | | - "regular", "button", "regular", "icon", |
|---|
| 643 | | - "regular" |
|---|
| 644 | | - }; |
|---|
| 645 | | - |
|---|
| 646 | | - JTextPane textPane = new JTextPane(); |
|---|
| 647 | | - textPane.setEditable(true); |
|---|
| 648 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
|---|
| 649 | | - addStylesToDocument(doc); |
|---|
| 650 | | - |
|---|
| 651 | | - try |
|---|
| 652 | | - { |
|---|
| 653 | | - for (int j = 0; j < 2; j++) |
|---|
| 654 | | - { |
|---|
| 655 | | - for (int i = 0; i < initString.length; i++) |
|---|
| 656 | | - { |
|---|
| 657 | | - doc.insertString(doc.getLength(), initString[i], |
|---|
| 658 | | - doc.getStyle(initStyles[i])); |
|---|
| 659 | | - } |
|---|
| 660 | | - } |
|---|
| 661 | | - } catch (BadLocationException ble) |
|---|
| 662 | | - { |
|---|
| 663 | | - System.err.println("Couldn't insert initial text into text pane."); |
|---|
| 664 | | - } |
|---|
| 665 | | - |
|---|
| 666 | | - return new JTextArea(); // textPane; |
|---|
| 646 | + return new JTextPane(); // textPane; |
|---|
| 667 | 647 | } |
|---|
| 668 | 648 | |
|---|
| 669 | 649 | protected void addStylesToDocument(StyledDocument doc) |
|---|
| .. | .. |
|---|
| 716 | 696 | protected static ImageIcon createImageIcon(String path, |
|---|
| 717 | 697 | String description) |
|---|
| 718 | 698 | { |
|---|
| 719 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
|---|
| 699 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
|---|
| 720 | 700 | if (imgURL != null) |
|---|
| 721 | 701 | { |
|---|
| 722 | 702 | return new ImageIcon(imgURL, description); |
|---|
| .. | .. |
|---|
| 748 | 728 | // NumberSlider vDivsField; |
|---|
| 749 | 729 | // JCheckBox endcaps; |
|---|
| 750 | 730 | JCheckBox liveCB; |
|---|
| 731 | + JCheckBox selectCB; |
|---|
| 751 | 732 | JCheckBox hideCB; |
|---|
| 752 | 733 | JCheckBox link2masterCB; |
|---|
| 753 | 734 | JCheckBox markCB; |
|---|
| .. | .. |
|---|
| 763 | 744 | JButton slowerButton; |
|---|
| 764 | 745 | JButton fasterButton; |
|---|
| 765 | 746 | JButton remarkButton; |
|---|
| 747 | + |
|---|
| 748 | + cGridBag namePanel; |
|---|
| 749 | + cGridBag setupPanel; |
|---|
| 750 | + cGridBag commandsPanel; |
|---|
| 751 | + cGridBag pushPanel; |
|---|
| 752 | + cGridBag fillPanel; |
|---|
| 766 | 753 | |
|---|
| 767 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
|---|
| 754 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
|---|
| 768 | 755 | { |
|---|
| 769 | 756 | JCheckBox cb; |
|---|
| 770 | 757 | |
|---|
| 771 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 772 | | - oe.aConstraints.gridwidth = 1; // 3; |
|---|
| 773 | | -// oe.aConstraints.weightx = 1; |
|---|
| 774 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
|---|
| 775 | | - oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 758 | + panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 776 | 759 | cb.addItemListener(this); |
|---|
| 777 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
|---|
| 778 | | - oe.aConstraints.gridwidth = 1; |
|---|
| 779 | | - oe.aConstraints.gridx += 1; |
|---|
| 780 | 760 | |
|---|
| 781 | 761 | return cb; |
|---|
| 782 | 762 | } |
|---|
| 783 | 763 | |
|---|
| 784 | | - cButton AddButton(ObjEditor oe, String label) |
|---|
| 764 | + cButton AddButton(cGridBag panel, String label) |
|---|
| 785 | 765 | { |
|---|
| 786 | 766 | cButton cb; |
|---|
| 787 | 767 | |
|---|
| 788 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 789 | | - oe.aConstraints.gridwidth = 1; |
|---|
| 790 | | -// oe.aConstraints.weightx = 1; |
|---|
| 791 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
|---|
| 792 | | - oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
|---|
| 768 | + panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
|---|
| 793 | 769 | cb.addActionListener(this); |
|---|
| 794 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
|---|
| 795 | | - oe.aConstraints.gridwidth = 1; |
|---|
| 796 | | - oe.aConstraints.gridx += 1; |
|---|
| 797 | 770 | |
|---|
| 798 | 771 | return cb; |
|---|
| 799 | 772 | } |
|---|
| 800 | 773 | |
|---|
| 801 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
|---|
| 774 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
|---|
| 802 | 775 | { |
|---|
| 803 | 776 | JComboBox combo; |
|---|
| 804 | 777 | |
|---|
| 805 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 806 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 807 | | - oe.aConstraints.gridx += 1; |
|---|
| 778 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 808 | 779 | combo.addActionListener(this); |
|---|
| 809 | 780 | |
|---|
| 810 | 781 | return combo; |
|---|
| 811 | 782 | } |
|---|
| 812 | 783 | |
|---|
| 813 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow) |
|---|
| 784 | + cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow) |
|---|
| 814 | 785 | { |
|---|
| 815 | | - NumberSlider combo; |
|---|
| 786 | + cGridBag control = new cGridBag(); |
|---|
| 787 | + |
|---|
| 788 | + cNumberSlider combo; |
|---|
| 816 | 789 | |
|---|
| 817 | 790 | JLabel jlabel = new JLabel(label); |
|---|
| 818 | | - |
|---|
| 819 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
|---|
| 820 | 791 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 821 | | - aConstraints.gridwidth = 1; |
|---|
| 822 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 823 | | - aConstraints.gridx += 1; |
|---|
| 824 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 825 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 826 | | - ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 827 | | - aConstraints.gridx += 1; |
|---|
| 828 | | - aConstraints.gridwidth = 1; |
|---|
| 829 | | - |
|---|
| 792 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 793 | + control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 830 | 794 | combo.setFloat(current); |
|---|
| 831 | | - |
|---|
| 832 | | - combo.label = jlabel; |
|---|
| 833 | | - |
|---|
| 834 | | - combo.addChangeListener(this); |
|---|
| 835 | | - |
|---|
| 836 | | - return combo; |
|---|
| 795 | + |
|---|
| 796 | + panel.add(control); |
|---|
| 797 | + |
|---|
| 798 | + return control; |
|---|
| 837 | 799 | } |
|---|
| 838 | 800 | |
|---|
| 839 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current) |
|---|
| 801 | + cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current) |
|---|
| 840 | 802 | { |
|---|
| 841 | | - NumberSlider combo; |
|---|
| 803 | + cGridBag control = new cGridBag(); |
|---|
| 804 | + |
|---|
| 805 | + cNumberSlider combo; |
|---|
| 842 | 806 | |
|---|
| 843 | 807 | JLabel jlabel = new JLabel(label); |
|---|
| 844 | | - |
|---|
| 845 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
|---|
| 846 | 808 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 847 | | - aConstraints.gridwidth = 2; |
|---|
| 848 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 849 | | - aConstraints.gridx += 1; |
|---|
| 850 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 851 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 852 | | - ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 853 | | - aConstraints.gridx += 1; |
|---|
| 854 | | - aConstraints.gridwidth = 1; |
|---|
| 855 | | - |
|---|
| 809 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 810 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 856 | 811 | combo.setInteger(current); |
|---|
| 857 | 812 | |
|---|
| 858 | | - combo.label = jlabel; |
|---|
| 859 | | - |
|---|
| 860 | | - combo.addChangeListener(this); |
|---|
| 861 | | - |
|---|
| 862 | | - return combo; |
|---|
| 813 | + panel.add(control); |
|---|
| 814 | + |
|---|
| 815 | + return control; |
|---|
| 863 | 816 | } |
|---|
| 864 | 817 | |
|---|
| 865 | | - JTextArea AddText(JPanel ctrlPanel, String name) |
|---|
| 818 | + JTextArea AddText(cGridBag ctrlPanel, String name) |
|---|
| 866 | 819 | { |
|---|
| 867 | 820 | JTextArea text; |
|---|
| 868 | 821 | |
|---|
| 869 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 870 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 871 | | - ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 822 | + ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
|---|
| 872 | 823 | text.addCaretListener(this); |
|---|
| 873 | | - aConstraints.gridx += 1; |
|---|
| 874 | | - aConstraints.gridwidth = 1; |
|---|
| 875 | 824 | |
|---|
| 876 | 825 | return text; |
|---|
| 877 | 826 | } |
|---|
| .. | .. |
|---|
| 901 | 850 | objEditor.ctrlPanel.remove(j); |
|---|
| 902 | 851 | } |
|---|
| 903 | 852 | |
|---|
| 853 | + void Remove(cNumberSlider j) |
|---|
| 854 | + { |
|---|
| 855 | + j.removeChangeListener(this); |
|---|
| 856 | + //objEditor.ctrlPanel.remove(j.label); |
|---|
| 857 | + objEditor.ctrlPanel.remove(j); |
|---|
| 858 | + } |
|---|
| 859 | + |
|---|
| 904 | 860 | /* |
|---|
| 905 | 861 | */ |
|---|
| 906 | | - void Return() // ObjEditor oe) |
|---|
| 862 | + void Return0() // ObjEditor oe) |
|---|
| 907 | 863 | { |
|---|
| 908 | 864 | aConstraints.gridy += 1; |
|---|
| 909 | 865 | aConstraints.gridx = 0; |
|---|
| .. | .. |
|---|
| 958 | 914 | |
|---|
| 959 | 915 | void SetupUI2(ObjEditor oe) |
|---|
| 960 | 916 | { |
|---|
| 961 | | -// oe.aConstraints.weightx = 0; |
|---|
| 962 | | -// oe.aConstraints.weighty = 0; |
|---|
| 963 | | -// oe.aConstraints.gridx = 0; |
|---|
| 964 | | -// oe.aConstraints.gridy = 0; |
|---|
| 965 | | - SetupName(oe); |
|---|
| 917 | + //SetupName(oe); |
|---|
| 918 | + |
|---|
| 919 | + namePanel = new cGridBag(); |
|---|
| 920 | + |
|---|
| 921 | + nameField = AddText(namePanel, copy.GetName()); |
|---|
| 922 | + namePanel.add(nameField); |
|---|
| 923 | + oe.ctrlPanel.add(namePanel); |
|---|
| 924 | + |
|---|
| 925 | + oe.ctrlPanel.Return(); |
|---|
| 966 | 926 | |
|---|
| 967 | 927 | if (!GroupEditor.allparams) |
|---|
| 968 | 928 | return; |
|---|
| 969 | 929 | |
|---|
| 970 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
|---|
| 971 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
|---|
| 972 | | - hideCB = AddCheckBox(oe, "Hide", copy.hide); |
|---|
| 930 | + setupPanel = new cGridBag().setVertical(false); |
|---|
| 931 | + |
|---|
| 932 | + liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
|---|
| 933 | + liveCB.setToolTipText("Animate object"); |
|---|
| 934 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
|---|
| 935 | + selectCB.setToolTipText("Make object selectable"); |
|---|
| 973 | 936 | // Return(); |
|---|
| 974 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
|---|
| 975 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
|---|
| 976 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
|---|
| 977 | | - Return(); |
|---|
| 978 | | - resetButton = AddButton(oe, "Reset"); |
|---|
| 979 | | - stepButton = AddButton(oe, "Step"); |
|---|
| 937 | + hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
|---|
| 938 | + hideCB.setToolTipText("Hide object"); |
|---|
| 939 | + markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
|---|
| 940 | + markCB.setToolTipText("Set the animation target transform"); |
|---|
| 941 | + |
|---|
| 942 | + rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
|---|
| 943 | + rewindCB.setToolTipText("Rewind animation"); |
|---|
| 944 | + |
|---|
| 945 | + randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
|---|
| 946 | + randomCB.setToolTipText("Option for switch node"); |
|---|
| 947 | + |
|---|
| 948 | + if (Globals.ADVANCED) |
|---|
| 949 | + { |
|---|
| 950 | + link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
|---|
| 951 | + link2masterCB.setToolTipText("Attach to support"); |
|---|
| 952 | + speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
|---|
| 953 | + speedupCB.setToolTipText("Option motion capture"); |
|---|
| 954 | + } |
|---|
| 955 | + |
|---|
| 956 | + oe.ctrlPanel.add(setupPanel); |
|---|
| 957 | + oe.ctrlPanel.Return(); |
|---|
| 958 | + |
|---|
| 959 | + commandsPanel = new cGridBag().setVertical(false); |
|---|
| 960 | + |
|---|
| 961 | + resetButton = AddButton(commandsPanel, "Reset"); |
|---|
| 962 | + resetButton.setToolTipText("Jump to frame zero"); |
|---|
| 963 | + stepButton = AddButton(commandsPanel, "Step"); |
|---|
| 964 | + stepButton.setToolTipText("Step one frame"); |
|---|
| 980 | 965 | // resetAllButton = AddButton(oe, "Reset All"); |
|---|
| 981 | 966 | // stepAllButton = AddButton(oe, "Step All"); |
|---|
| 982 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
|---|
| 983 | 967 | // Return(); |
|---|
| 984 | | - slowerButton = AddButton(oe, "Slow"); |
|---|
| 985 | | - fasterButton = AddButton(oe, "Fast"); |
|---|
| 986 | | - remarkButton = AddButton(oe, "Rem"); |
|---|
| 968 | + slowerButton = AddButton(commandsPanel, "Slow"); |
|---|
| 969 | + slowerButton.setToolTipText("Decrease animation speed"); |
|---|
| 970 | + fasterButton = AddButton(commandsPanel, "Fast"); |
|---|
| 971 | + fasterButton.setToolTipText("Increase animation speed"); |
|---|
| 972 | + remarkButton = AddButton(commandsPanel, "Remark"); |
|---|
| 973 | + remarkButton.setToolTipText("Set the current transform as the target"); |
|---|
| 987 | 974 | |
|---|
| 988 | | - Return(); |
|---|
| 975 | + oe.ctrlPanel.add(commandsPanel); |
|---|
| 976 | + oe.ctrlPanel.Return(); |
|---|
| 989 | 977 | |
|---|
| 990 | | - normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
|---|
| 991 | | - Return(); |
|---|
| 978 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
|---|
| 979 | + normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
|---|
| 980 | + //Return(); |
|---|
| 981 | + |
|---|
| 982 | + oe.ctrlPanel.Return(); |
|---|
| 992 | 983 | |
|---|
| 993 | 984 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
|---|
| 994 | 985 | // ObjEditor.aConstraints.gridx += 1; |
|---|
| .. | .. |
|---|
| 1083 | 1074 | oe.aConstraints.gridwidth = 1; |
|---|
| 1084 | 1075 | /**/ |
|---|
| 1085 | 1076 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
|---|
| 1086 | | - Return(); |
|---|
| 1077 | + oe.ctrlPanel.Return(); |
|---|
| 1087 | 1078 | |
|---|
| 1088 | 1079 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
|---|
| 1089 | 1080 | //textureButton.setEnabled(false); |
|---|
| .. | .. |
|---|
| 1185 | 1176 | //JPanel worldPanel = |
|---|
| 1186 | 1177 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
|---|
| 1187 | 1178 | //worldPanel.setName("World"); |
|---|
| 1188 | | - centralPanel = new JPanel(new BorderLayout()); |
|---|
| 1179 | + centralPanel = new cGridBag(); |
|---|
| 1180 | + centralPanel.preferredWidth = 20; |
|---|
| 1189 | 1181 | timelinePanel = new JPanel(new BorderLayout()); |
|---|
| 1190 | 1182 | timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
|---|
| 1191 | 1183 | |
|---|
| 1184 | + cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
|---|
| 1185 | + cameraPanel.setContinuousLayout(true); |
|---|
| 1186 | + cameraPanel.setOneTouchExpandable(true); |
|---|
| 1187 | +// cameraPanel.setDividerLocation(0.9); |
|---|
| 1188 | +// cameraPanel.setDividerSize(9); |
|---|
| 1189 | + cameraPanel.setResizeWeight(1.0); |
|---|
| 1190 | + |
|---|
| 1192 | 1191 | centralPanel.add(cameraView); |
|---|
| 1193 | 1192 | //frame.setJMenuBar(timelineMenubar); |
|---|
| 1194 | 1193 | //centralPanel.add(timelinePanel); |
|---|
| .. | .. |
|---|
| 1208 | 1207 | //frontView.object = copy; |
|---|
| 1209 | 1208 | //sideView.object = copy; |
|---|
| 1210 | 1209 | |
|---|
| 1211 | | - XYZPanel = new JPanel(); |
|---|
| 1212 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
|---|
| 1210 | + XYZPanel = new cGridBag().setVertical(true); |
|---|
| 1211 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
|---|
| 1213 | 1212 | |
|---|
| 1214 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
|---|
| 1215 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
|---|
| 1216 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
|---|
| 1213 | + XYZPanel.preferredWidth = 5; |
|---|
| 1214 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
|---|
| 1215 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
|---|
| 1216 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
|---|
| 1217 | 1217 | |
|---|
| 1218 | 1218 | /* |
|---|
| 1219 | 1219 | gridPanel = new JPanel(); //new BorderLayout()); |
|---|
| .. | .. |
|---|
| 1251 | 1251 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
|---|
| 1252 | 1252 | //tmp.setName("Edit"); |
|---|
| 1253 | 1253 | objectPanel.add(materialPanel); |
|---|
| 1254 | | - JPanel north = new JPanel(new BorderLayout()); |
|---|
| 1255 | | - north.setName("Edit"); |
|---|
| 1256 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
|---|
| 1257 | | - objectPanel.add(north); |
|---|
| 1254 | +// JPanel north = new JPanel(new BorderLayout()); |
|---|
| 1255 | +// north.setName("Edit"); |
|---|
| 1256 | +// north.add(ctrlPanel, BorderLayout.NORTH); |
|---|
| 1257 | +// objectPanel.add(north); |
|---|
| 1258 | + objectPanel.add(ctrlPanel); |
|---|
| 1258 | 1259 | objectPanel.add(infoPanel); |
|---|
| 1259 | 1260 | |
|---|
| 1260 | 1261 | /* |
|---|
| .. | .. |
|---|
| 1275 | 1276 | scrollpane.setWheelScrollingEnabled(true); |
|---|
| 1276 | 1277 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
|---|
| 1277 | 1278 | |
|---|
| 1278 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
|---|
| 1279 | | - scenePanel.add(scrollpane); |
|---|
| 1279 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
|---|
| 1280 | + scenePanel.preferredWidth = 6; |
|---|
| 1281 | + |
|---|
| 1282 | + JTabbedPane tabbedPane = new JTabbedPane(); |
|---|
| 1283 | + tabbedPane.add(scrollpane); |
|---|
| 1280 | 1284 | |
|---|
| 1281 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
|---|
| 1285 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
|---|
| 1282 | 1286 | |
|---|
| 1283 | | - optionsPanel = new JPanel(new GridBagLayout()); |
|---|
| 1287 | + optionsPanel = new cGridBag().setVertical(true); |
|---|
| 1284 | 1288 | |
|---|
| 1285 | 1289 | optionsPanel.setName("Options"); |
|---|
| 1286 | | - scenePanel.add(optionsPanel); |
|---|
| 1287 | | - |
|---|
| 1290 | + |
|---|
| 1291 | + AddOptions(optionsPanel); //, aConstraints); |
|---|
| 1292 | + |
|---|
| 1293 | + tabbedPane.add(optionsPanel); |
|---|
| 1294 | + |
|---|
| 1295 | + scenePanel.add(tabbedPane); |
|---|
| 1288 | 1296 | |
|---|
| 1289 | 1297 | /* |
|---|
| 1290 | 1298 | cTree jTree = new cTree(null); |
|---|
| .. | .. |
|---|
| 1318 | 1326 | //bigPanel.setSize(new Dimension(10,10)); |
|---|
| 1319 | 1327 | //bigPanel.add(ctrlPanel); |
|---|
| 1320 | 1328 | //bigPanel.add(gridPanel); |
|---|
| 1329 | + /** |
|---|
| 1321 | 1330 | bigThree = new JPanel(); |
|---|
| 1322 | 1331 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
|---|
| 1323 | 1332 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
|---|
| .. | .. |
|---|
| 1341 | 1350 | // aConstraints.gridheight = 3; |
|---|
| 1342 | 1351 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
|---|
| 1343 | 1352 | bigThree.add(XYZPanel, aWindowConstraints); |
|---|
| 1353 | + /**/ |
|---|
| 1344 | 1354 | |
|---|
| 1355 | + bigThree = new cGridBag(); |
|---|
| 1356 | + bigThree.addComponent(scenePanel); |
|---|
| 1357 | + bigThree.addComponent(centralPanel); |
|---|
| 1358 | + bigThree.addComponent(XYZPanel); |
|---|
| 1359 | + |
|---|
| 1345 | 1360 | // // SIDE EFFECT!!! |
|---|
| 1346 | 1361 | // aConstraints.gridx = 0; |
|---|
| 1347 | 1362 | // aConstraints.gridy = 0; |
|---|
| .. | .. |
|---|
| 1362 | 1377 | //worldPane.add(bigPanel); |
|---|
| 1363 | 1378 | //worldPane.add(worldPanel); |
|---|
| 1364 | 1379 | /**/ |
|---|
| 1365 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
|---|
| 1380 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
|---|
| 1381 | + frame.add(/*"Center",*/framePanel); |
|---|
| 1366 | 1382 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
|---|
| 1367 | 1383 | |
|---|
| 1368 | 1384 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
|---|
| 1369 | 1385 | |
|---|
| 1370 | | - frame.setSize(1024, 768); |
|---|
| 1371 | | - frame.show(); |
|---|
| 1386 | + frame.setSize(1280, 860); |
|---|
| 1387 | + frame.setVisible(true); |
|---|
| 1372 | 1388 | |
|---|
| 1373 | 1389 | gridPanel.setDividerLocation(1.0); |
|---|
| 1374 | 1390 | |
|---|
| .. | .. |
|---|
| 1383 | 1399 | }); |
|---|
| 1384 | 1400 | } |
|---|
| 1385 | 1401 | |
|---|
| 1402 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
|---|
| 1403 | + { |
|---|
| 1404 | + } |
|---|
| 1405 | + |
|---|
| 1386 | 1406 | JTree GetTree() |
|---|
| 1387 | 1407 | { |
|---|
| 1388 | 1408 | return objEditor.jTree; |
|---|
| .. | .. |
|---|
| 1394 | 1414 | ctrlPanel.removeAll(); |
|---|
| 1395 | 1415 | } |
|---|
| 1396 | 1416 | |
|---|
| 1397 | | - void SetupMaterial(JPanel ctrlPanel) |
|---|
| 1417 | + void SetupMaterial(cGridBag panel) |
|---|
| 1398 | 1418 | { |
|---|
| 1399 | | - aConstraints.weighty = 0; |
|---|
| 1400 | | - //aConstraints.weightx = 1; |
|---|
| 1401 | | - /* |
|---|
| 1419 | + /* |
|---|
| 1402 | 1420 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
|---|
| 1403 | 1421 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1404 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1405 | | - aConstraints.gridx += 1; |
|---|
| 1406 | 1422 | */ |
|---|
| 1407 | 1423 | |
|---|
| 1408 | | - aConstraints.gridwidth = 1; |
|---|
| 1409 | | - ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints); |
|---|
| 1410 | | - aConstraints.gridx += 1; |
|---|
| 1411 | | - aConstraints.weighty = 0; |
|---|
| 1412 | | - aConstraints.gridwidth = 1; |
|---|
| 1424 | + cGridBag editBar = new cGridBag().setVertical(false); |
|---|
| 1425 | + |
|---|
| 1426 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
|---|
| 1427 | + createMaterialButton.setToolTipText("Create material"); |
|---|
| 1413 | 1428 | |
|---|
| 1414 | 1429 | /* |
|---|
| 1415 | 1430 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
|---|
| 1416 | | - aConstraints.gridx += 1; |
|---|
| 1417 | | - aConstraints.weighty = 0; |
|---|
| 1418 | | - aConstraints.gridwidth = 1; |
|---|
| 1419 | 1431 | */ |
|---|
| 1420 | 1432 | |
|---|
| 1421 | | - ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints); |
|---|
| 1422 | | - aConstraints.gridx += 1; |
|---|
| 1433 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
|---|
| 1434 | + clearMaterialButton.setToolTipText("Clear material"); |
|---|
| 1435 | + |
|---|
| 1436 | + if (Globals.ADVANCED) |
|---|
| 1437 | + { |
|---|
| 1438 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
|---|
| 1439 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
|---|
| 1440 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
|---|
| 1441 | + } |
|---|
| 1423 | 1442 | |
|---|
| 1424 | | - ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints); |
|---|
| 1425 | | - |
|---|
| 1426 | | - aConstraints.gridx += 1; |
|---|
| 1427 | | - |
|---|
| 1428 | | - ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints); |
|---|
| 1429 | | - |
|---|
| 1430 | | - aConstraints.gridx += 1; |
|---|
| 1431 | | - |
|---|
| 1432 | | - ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints); |
|---|
| 1433 | | - |
|---|
| 1434 | | - aConstraints.gridx = 0; |
|---|
| 1435 | | - aConstraints.gridy += 1; |
|---|
| 1436 | | - aConstraints.weighty = 0; |
|---|
| 1437 | | - aConstraints.gridwidth = 1; |
|---|
| 1443 | + editBar.preferredHeight = 15; |
|---|
| 1444 | + |
|---|
| 1445 | + panel.add(editBar); |
|---|
| 1446 | + |
|---|
| 1438 | 1447 | /**/ |
|---|
| 1439 | 1448 | //aConstraints.weighty = 0; |
|---|
| 1440 | 1449 | ////aConstraints.weightx = 1; |
|---|
| 1441 | 1450 | //aConstraints.weighty = 1; |
|---|
| 1442 | 1451 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
|---|
| 1443 | 1452 | //aConstraints.gridx += 1; |
|---|
| 1444 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
|---|
| 1445 | | - aConstraints.weighty = 0; |
|---|
| 1446 | | - aConstraints.gridx = 0; |
|---|
| 1447 | | - aConstraints.gridy += 1; |
|---|
| 1448 | | - aConstraints.gridwidth = 1; |
|---|
| 1453 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
|---|
| 1449 | 1454 | |
|---|
| 1450 | | - ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints); |
|---|
| 1451 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1452 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1453 | | - aConstraints.gridx += 1; |
|---|
| 1454 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1455 | | - //aConstraints.weightx = 0; |
|---|
| 1456 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1457 | | - aConstraints.gridx = 0; |
|---|
| 1458 | | - aConstraints.gridy += 1; |
|---|
| 1459 | | - aConstraints.gridwidth = 1; |
|---|
| 1455 | + cGridBag colorSection = new cGridBag().setVertical(true); |
|---|
| 1456 | + |
|---|
| 1457 | + cGridBag color = new cGridBag(); |
|---|
| 1458 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
|---|
| 1459 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1460 | + color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1461 | + //colorField.preferredWidth = 200; |
|---|
| 1462 | + colorSection.add(color); |
|---|
| 1460 | 1463 | |
|---|
| 1461 | | - ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints); |
|---|
| 1462 | | - modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1463 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1464 | | - aConstraints.gridx += 1; |
|---|
| 1465 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1466 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1467 | | - aConstraints.gridx = 0; |
|---|
| 1468 | | - aConstraints.gridy += 1; |
|---|
| 1469 | | - aConstraints.gridwidth = 1; |
|---|
| 1464 | + cGridBag modulation = new cGridBag(); |
|---|
| 1465 | + modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
|---|
| 1466 | + modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1467 | + modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1468 | + colorSection.add(modulation); |
|---|
| 1470 | 1469 | |
|---|
| 1471 | | - ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints); |
|---|
| 1472 | | - textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1473 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1474 | | - aConstraints.gridx += 1; |
|---|
| 1475 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1476 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1477 | | - aConstraints.gridx = 0; |
|---|
| 1478 | | - aConstraints.gridy += 1; |
|---|
| 1479 | | - aConstraints.gridwidth = 1; |
|---|
| 1470 | + cGridBag texture = new cGridBag(); |
|---|
| 1471 | + texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
|---|
| 1472 | + textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1473 | + texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1474 | + colorSection.add(texture); |
|---|
| 1480 | 1475 | |
|---|
| 1481 | | - ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints); |
|---|
| 1482 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1483 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1484 | | - aConstraints.gridx += 1; |
|---|
| 1485 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1486 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1487 | | - aConstraints.gridx = 0; |
|---|
| 1488 | | - aConstraints.gridy += 1; |
|---|
| 1489 | | - aConstraints.gridwidth = 1; |
|---|
| 1476 | + cGridBag anisoU = new cGridBag(); |
|---|
| 1477 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
|---|
| 1478 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1479 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1480 | + colorSection.add(anisoU); |
|---|
| 1490 | 1481 | |
|---|
| 1491 | | - ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints); |
|---|
| 1492 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1493 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1494 | | - aConstraints.gridx += 1; |
|---|
| 1495 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1496 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1497 | | - aConstraints.gridx = 0; |
|---|
| 1498 | | - aConstraints.gridy += 1; |
|---|
| 1499 | | - aConstraints.gridwidth = 1; |
|---|
| 1482 | + cGridBag anisoV = new cGridBag(); |
|---|
| 1483 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
|---|
| 1484 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1485 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1486 | + colorSection.add(anisoV); |
|---|
| 1500 | 1487 | |
|---|
| 1501 | | - ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints); |
|---|
| 1502 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1503 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1504 | | - aConstraints.gridx += 1; |
|---|
| 1505 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1506 | | - ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1507 | | - aConstraints.gridx = 0; |
|---|
| 1508 | | - aConstraints.gridy += 1; |
|---|
| 1509 | | - aConstraints.gridwidth = 1; |
|---|
| 1488 | + cGridBag shadowbias = new cGridBag(); |
|---|
| 1489 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
|---|
| 1490 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1491 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1492 | + colorSection.add(shadowbias); |
|---|
| 1510 | 1493 | |
|---|
| 1511 | | - //aConstraints.weighty = 1; |
|---|
| 1512 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
|---|
| 1513 | | - //aConstraints.gridx += 1; |
|---|
| 1514 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
|---|
| 1515 | | - aConstraints.weighty = 0; |
|---|
| 1516 | | - aConstraints.gridx = 0; |
|---|
| 1517 | | - aConstraints.gridy += 1; |
|---|
| 1518 | | - aConstraints.gridwidth = 1; |
|---|
| 1494 | + panel.add(new JSeparator()); |
|---|
| 1495 | + |
|---|
| 1496 | + panel.add(colorSection); |
|---|
| 1497 | + |
|---|
| 1498 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
|---|
| 1499 | + |
|---|
| 1500 | + cGridBag diffuseSection = new cGridBag().setVertical(true); |
|---|
| 1501 | + |
|---|
| 1502 | + cGridBag diffuse = new cGridBag(); |
|---|
| 1503 | + diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints); |
|---|
| 1504 | + diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1505 | + diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1506 | + diffuseSection.add(diffuse); |
|---|
| 1519 | 1507 | |
|---|
| 1520 | | - ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints); |
|---|
| 1521 | | - diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1522 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1523 | | - aConstraints.gridx += 1; |
|---|
| 1524 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1525 | | - ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1526 | | - aConstraints.gridx = 0; |
|---|
| 1527 | | - aConstraints.gridy += 1; |
|---|
| 1528 | | - aConstraints.gridwidth = 1; |
|---|
| 1508 | + cGridBag diffuseness = new cGridBag(); |
|---|
| 1509 | + diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints); |
|---|
| 1510 | + diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1511 | + diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1512 | + diffuseSection.add(diffuseness); |
|---|
| 1529 | 1513 | |
|---|
| 1530 | | - ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints); |
|---|
| 1531 | | - diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1532 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1533 | | - aConstraints.gridx += 1; |
|---|
| 1534 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1535 | | - ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1536 | | - aConstraints.gridx = 0; |
|---|
| 1537 | | - aConstraints.gridy += 1; |
|---|
| 1538 | | - aConstraints.gridwidth = 1; |
|---|
| 1514 | + cGridBag selfshadow = new cGridBag(); |
|---|
| 1515 | + selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints); |
|---|
| 1516 | + selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1517 | + selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1518 | + diffuseSection.add(selfshadow); |
|---|
| 1539 | 1519 | |
|---|
| 1540 | | - ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints); |
|---|
| 1541 | | - selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1542 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1543 | | - aConstraints.gridx += 1; |
|---|
| 1544 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1545 | | - ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1546 | | - aConstraints.gridx = 0; |
|---|
| 1547 | | - aConstraints.gridy += 1; |
|---|
| 1548 | | - aConstraints.gridwidth = 1; |
|---|
| 1520 | + cGridBag sheen = new cGridBag(); |
|---|
| 1521 | + sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints); |
|---|
| 1522 | + sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1523 | + sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1524 | + diffuseSection.add(sheen); |
|---|
| 1549 | 1525 | |
|---|
| 1550 | | - ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints); |
|---|
| 1551 | | - sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1552 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1553 | | - aConstraints.gridx += 1; |
|---|
| 1554 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1555 | | - ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1556 | | - aConstraints.gridx = 0; |
|---|
| 1557 | | - aConstraints.gridy += 1; |
|---|
| 1558 | | - aConstraints.gridwidth = 1; |
|---|
| 1526 | + cGridBag subsurface = new cGridBag(); |
|---|
| 1527 | + subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints); |
|---|
| 1528 | + subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1529 | + subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1530 | + diffuseSection.add(subsurface); |
|---|
| 1559 | 1531 | |
|---|
| 1560 | | - ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints); |
|---|
| 1561 | | - subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1562 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1563 | | - aConstraints.gridx += 1; |
|---|
| 1564 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1565 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1566 | | - aConstraints.gridx = 0; |
|---|
| 1567 | | - aConstraints.gridy += 1; |
|---|
| 1568 | | - aConstraints.gridwidth = 1; |
|---|
| 1532 | + cGridBag shadow = new cGridBag(); |
|---|
| 1533 | + shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints); |
|---|
| 1534 | + shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1535 | + shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1536 | + diffuseSection.add(shadow); |
|---|
| 1569 | 1537 | |
|---|
| 1570 | | - ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints); |
|---|
| 1571 | | - shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1572 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1573 | | - aConstraints.gridx += 1; |
|---|
| 1574 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1575 | | - ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1576 | | - aConstraints.gridx = 0; |
|---|
| 1577 | | - aConstraints.gridy += 1; |
|---|
| 1578 | | - aConstraints.gridwidth = 1; |
|---|
| 1538 | + cGridBag fakedepth = new cGridBag(); |
|---|
| 1539 | + fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints); |
|---|
| 1540 | + fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1541 | + fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1542 | + diffuseSection.add(fakedepth); |
|---|
| 1579 | 1543 | |
|---|
| 1580 | | - ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints); |
|---|
| 1581 | | - fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1582 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1583 | | - aConstraints.gridx += 1; |
|---|
| 1584 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1585 | | - ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1586 | | - aConstraints.gridx = 0; |
|---|
| 1587 | | - aConstraints.gridy += 1; |
|---|
| 1588 | | - aConstraints.gridwidth = 1; |
|---|
| 1544 | + panel.add(new JSeparator()); |
|---|
| 1545 | + |
|---|
| 1546 | + panel.add(diffuseSection); |
|---|
| 1547 | + |
|---|
| 1548 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
|---|
| 1549 | + |
|---|
| 1550 | + cGridBag specularSection = new cGridBag().setVertical(true); |
|---|
| 1589 | 1551 | |
|---|
| 1590 | | - //aConstraints.weighty = 1; |
|---|
| 1591 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
|---|
| 1592 | | - //aConstraints.gridx += 1; |
|---|
| 1593 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
|---|
| 1594 | | - aConstraints.weighty = 0; |
|---|
| 1595 | | - aConstraints.gridx = 0; |
|---|
| 1596 | | - aConstraints.gridy += 1; |
|---|
| 1597 | | - aConstraints.gridwidth = 1; |
|---|
| 1552 | + cGridBag specular = new cGridBag(); |
|---|
| 1553 | + specular.add(specularLabel = new JLabel("Specular")); // , aConstraints); |
|---|
| 1554 | + specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1555 | + specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1556 | + specularSection.add(specular); |
|---|
| 1598 | 1557 | |
|---|
| 1599 | | - ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints); |
|---|
| 1600 | | - specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1601 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1602 | | - aConstraints.gridx += 1; |
|---|
| 1603 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1604 | | - ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1605 | | - aConstraints.gridx = 0; |
|---|
| 1606 | | - aConstraints.gridy += 1; |
|---|
| 1607 | | - aConstraints.gridwidth = 1; |
|---|
| 1558 | + cGridBag lightarea = new cGridBag(); |
|---|
| 1559 | + lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints); |
|---|
| 1560 | + lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1561 | + lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1562 | + specularSection.add(lightarea); |
|---|
| 1608 | 1563 | |
|---|
| 1609 | | - ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints); |
|---|
| 1610 | | - lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1611 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1612 | | - aConstraints.gridx += 1; |
|---|
| 1613 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1614 | | - ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1615 | | - aConstraints.gridx = 0; |
|---|
| 1616 | | - aConstraints.gridy += 1; |
|---|
| 1617 | | - aConstraints.gridwidth = 1; |
|---|
| 1564 | + cGridBag shininess = new cGridBag(); |
|---|
| 1565 | + shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints); |
|---|
| 1566 | + shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1567 | + shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1568 | + specularSection.add(shininess); |
|---|
| 1618 | 1569 | |
|---|
| 1619 | | - ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints); |
|---|
| 1620 | | - shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1621 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1622 | | - aConstraints.gridx += 1; |
|---|
| 1623 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1624 | | - ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1625 | | - aConstraints.gridx = 0; |
|---|
| 1626 | | - aConstraints.gridy += 1; |
|---|
| 1627 | | - aConstraints.gridwidth = 1; |
|---|
| 1570 | + cGridBag metalness = new cGridBag(); |
|---|
| 1571 | + metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints); |
|---|
| 1572 | + metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1573 | + metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1574 | + specularSection.add(metalness); |
|---|
| 1628 | 1575 | |
|---|
| 1629 | | - ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints); |
|---|
| 1630 | | - metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1631 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1632 | | - aConstraints.gridx += 1; |
|---|
| 1633 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1634 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1635 | | - aConstraints.gridx = 0; |
|---|
| 1636 | | - aConstraints.gridy += 1; |
|---|
| 1637 | | - aConstraints.gridwidth = 1; |
|---|
| 1576 | + cGridBag velvet = new cGridBag(); |
|---|
| 1577 | + velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints); |
|---|
| 1578 | + velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1579 | + velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1580 | + specularSection.add(velvet); |
|---|
| 1638 | 1581 | |
|---|
| 1639 | | - ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints); |
|---|
| 1640 | | - velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1641 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1642 | | - aConstraints.gridx += 1; |
|---|
| 1643 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1644 | | - ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1645 | | - aConstraints.gridx = 0; |
|---|
| 1646 | | - aConstraints.gridy += 1; |
|---|
| 1647 | | - aConstraints.gridwidth = 1; |
|---|
| 1648 | | - |
|---|
| 1649 | | - shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1); |
|---|
| 1650 | | - Return(); |
|---|
| 1582 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
|---|
| 1583 | + //Return(); |
|---|
| 1651 | 1584 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
|---|
| 1652 | 1585 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1653 | 1586 | // aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| .. | .. |
|---|
| 1658 | 1591 | // aConstraints.gridy += 1; |
|---|
| 1659 | 1592 | // aConstraints.gridwidth = 1; |
|---|
| 1660 | 1593 | |
|---|
| 1661 | | - //aConstraints.weighty = 1; |
|---|
| 1662 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
|---|
| 1663 | | - //aConstraints.gridx += 1; |
|---|
| 1664 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
|---|
| 1665 | | - aConstraints.weighty = 0; |
|---|
| 1666 | | - aConstraints.gridx = 0; |
|---|
| 1667 | | - aConstraints.gridy += 1; |
|---|
| 1668 | | - aConstraints.gridwidth = 1; |
|---|
| 1669 | 1594 | |
|---|
| 1670 | | - ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints); |
|---|
| 1671 | | - cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1672 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1673 | | - aConstraints.gridx += 1; |
|---|
| 1674 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1675 | | - ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1676 | | - aConstraints.gridx = 0; |
|---|
| 1677 | | - aConstraints.gridy += 1; |
|---|
| 1678 | | - aConstraints.gridwidth = 1; |
|---|
| 1595 | + panel.add(new JSeparator()); |
|---|
| 1596 | + |
|---|
| 1597 | + panel.add(specularSection); |
|---|
| 1598 | + |
|---|
| 1599 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
|---|
| 1600 | + |
|---|
| 1601 | + cGridBag globalSection = new cGridBag().setVertical(true); |
|---|
| 1679 | 1602 | |
|---|
| 1680 | | - ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints); |
|---|
| 1681 | | - ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1682 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1683 | | - aConstraints.gridx += 1; |
|---|
| 1684 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1685 | | - ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1686 | | - aConstraints.gridx = 0; |
|---|
| 1687 | | - aConstraints.gridy += 1; |
|---|
| 1688 | | - aConstraints.gridwidth = 1; |
|---|
| 1603 | + cGridBag camera = new cGridBag(); |
|---|
| 1604 | + camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
|---|
| 1605 | + cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1606 | + camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1607 | + globalSection.add(camera); |
|---|
| 1689 | 1608 | |
|---|
| 1690 | | - ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints); |
|---|
| 1691 | | - backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1692 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1693 | | - aConstraints.gridx += 1; |
|---|
| 1694 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1695 | | - ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints); |
|---|
| 1696 | | - aConstraints.gridx = 0; |
|---|
| 1697 | | - aConstraints.gridy += 1; |
|---|
| 1698 | | - aConstraints.gridwidth = 1; |
|---|
| 1609 | + cGridBag ambient = new cGridBag(); |
|---|
| 1610 | + ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
|---|
| 1611 | + ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1612 | + ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1613 | + globalSection.add(ambient); |
|---|
| 1699 | 1614 | |
|---|
| 1700 | | - ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints); |
|---|
| 1701 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1702 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1703 | | - aConstraints.gridx += 1; |
|---|
| 1704 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1705 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
|---|
| 1706 | | - aConstraints.gridx = 0; |
|---|
| 1707 | | - aConstraints.gridy += 1; |
|---|
| 1708 | | - aConstraints.gridwidth = 1; |
|---|
| 1709 | | - aConstraints.weighty = 0; |
|---|
| 1615 | + cGridBag backlit = new cGridBag(); |
|---|
| 1616 | + backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
|---|
| 1617 | + backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1618 | + backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
|---|
| 1619 | + globalSection.add(backlit); |
|---|
| 1710 | 1620 | |
|---|
| 1711 | | - ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints); |
|---|
| 1712 | | - bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1713 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1714 | | - aConstraints.gridx += 1; |
|---|
| 1715 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1716 | | - ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints); |
|---|
| 1717 | | - aConstraints.gridx = 0; |
|---|
| 1718 | | - aConstraints.gridy += 1; |
|---|
| 1719 | | - aConstraints.gridwidth = 1; |
|---|
| 1621 | + cGridBag opacity = new cGridBag(); |
|---|
| 1622 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
|---|
| 1623 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1624 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
|---|
| 1625 | + globalSection.add(opacity); |
|---|
| 1720 | 1626 | |
|---|
| 1721 | | - ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints); |
|---|
| 1722 | | - noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1723 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1724 | | - aConstraints.gridx += 1; |
|---|
| 1725 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1726 | | - ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints); |
|---|
| 1727 | | - aConstraints.gridx = 0; |
|---|
| 1728 | | - aConstraints.gridy += 1; |
|---|
| 1729 | | - aConstraints.gridwidth = 1; |
|---|
| 1627 | + panel.add(new JSeparator()); |
|---|
| 1628 | + |
|---|
| 1629 | + panel.add(globalSection); |
|---|
| 1630 | + |
|---|
| 1631 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
|---|
| 1632 | + |
|---|
| 1633 | + cGridBag textureSection = new cGridBag().setVertical(true); |
|---|
| 1730 | 1634 | |
|---|
| 1731 | | - ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints); |
|---|
| 1732 | | - powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1733 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1734 | | - aConstraints.gridx += 1; |
|---|
| 1735 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1736 | | - ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints); |
|---|
| 1737 | | - aConstraints.gridx = 0; |
|---|
| 1738 | | - aConstraints.gridy += 1; |
|---|
| 1739 | | - aConstraints.gridwidth = 1; |
|---|
| 1635 | + cGridBag bump = new cGridBag(); |
|---|
| 1636 | + bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints); |
|---|
| 1637 | + bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1638 | + bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
|---|
| 1639 | + textureSection.add(bump); |
|---|
| 1740 | 1640 | |
|---|
| 1741 | | - ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints); |
|---|
| 1742 | | - borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1743 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1744 | | - aConstraints.gridx += 1; |
|---|
| 1745 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1746 | | - ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints); |
|---|
| 1747 | | - aConstraints.gridx = 0; |
|---|
| 1748 | | - aConstraints.gridy += 1; |
|---|
| 1749 | | - aConstraints.gridwidth = 1; |
|---|
| 1641 | + cGridBag noise = new cGridBag(); |
|---|
| 1642 | + noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints); |
|---|
| 1643 | + noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1644 | + noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints); |
|---|
| 1645 | + textureSection.add(noise); |
|---|
| 1750 | 1646 | |
|---|
| 1751 | | - ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints); |
|---|
| 1752 | | - fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1753 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1754 | | - aConstraints.gridx += 1; |
|---|
| 1755 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1756 | | - ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints); |
|---|
| 1757 | | - aConstraints.gridx = 0; |
|---|
| 1758 | | - aConstraints.gridy += 1; |
|---|
| 1759 | | - aConstraints.gridwidth = 1; |
|---|
| 1647 | + cGridBag power = new cGridBag(); |
|---|
| 1648 | + power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints); |
|---|
| 1649 | + powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1650 | + power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints); |
|---|
| 1651 | + textureSection.add(power); |
|---|
| 1760 | 1652 | |
|---|
| 1761 | | - ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints); |
|---|
| 1762 | | - opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1763 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
|---|
| 1764 | | - aConstraints.gridx += 1; |
|---|
| 1765 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
|---|
| 1766 | | - ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints); |
|---|
| 1767 | | - aConstraints.gridx = 0; |
|---|
| 1768 | | - aConstraints.gridy += 1; |
|---|
| 1769 | | - aConstraints.gridwidth = 1; |
|---|
| 1653 | + cGridBag borderfade = new cGridBag(); |
|---|
| 1654 | + borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints); |
|---|
| 1655 | + borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1656 | + borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
|---|
| 1657 | + textureSection.add(borderfade); |
|---|
| 1770 | 1658 | |
|---|
| 1771 | | - //aConstraints.weighty = 1; |
|---|
| 1772 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
|---|
| 1773 | | - //aConstraints.gridx += 1; |
|---|
| 1774 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
|---|
| 1775 | | - aConstraints.weighty = 0; |
|---|
| 1659 | + cGridBag fog = new cGridBag(); |
|---|
| 1660 | + fog.add(fogLabel = new JLabel("Punch")); // , aConstraints); |
|---|
| 1661 | + fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1662 | + fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints); |
|---|
| 1663 | + textureSection.add(fog); |
|---|
| 1776 | 1664 | |
|---|
| 1777 | | - aConstraints.gridx = 0; |
|---|
| 1778 | | - aConstraints.gridy = 0; |
|---|
| 1779 | | - aConstraints.gridwidth = 1; |
|---|
| 1665 | + cGridBag opacityPower = new cGridBag(); |
|---|
| 1666 | + opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints); |
|---|
| 1667 | + opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
|---|
| 1668 | + opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
|---|
| 1669 | + textureSection.add(opacityPower); |
|---|
| 1670 | + |
|---|
| 1671 | + panel.add(new JSeparator()); |
|---|
| 1672 | + |
|---|
| 1673 | + panel.add(textureSection); |
|---|
| 1674 | + |
|---|
| 1675 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
|---|
| 1780 | 1676 | |
|---|
| 1781 | 1677 | SetMaterial(copy); // .GetMaterial()); |
|---|
| 1782 | 1678 | |
|---|
| 1783 | | - colorField.addChangeListener(this); |
|---|
| 1784 | | - modulationField.addChangeListener(this); |
|---|
| 1679 | + //colorField.addChangeListener(this); |
|---|
| 1680 | +// modulationField.addChangeListener(this); |
|---|
| 1785 | 1681 | metalnessField.addChangeListener(this); |
|---|
| 1786 | 1682 | diffuseField.addChangeListener(this); |
|---|
| 1787 | 1683 | specularField.addChangeListener(this); |
|---|
| .. | .. |
|---|
| 1811 | 1707 | opacityPowerField.addChangeListener(this); |
|---|
| 1812 | 1708 | /**/ |
|---|
| 1813 | 1709 | |
|---|
| 1814 | | - resetSlidersButton.addActionListener(this); |
|---|
| 1815 | 1710 | clearMaterialButton.addActionListener(this); |
|---|
| 1816 | 1711 | createMaterialButton.addActionListener(this); |
|---|
| 1817 | | - |
|---|
| 1818 | | - propagateToggle.addItemListener(this); |
|---|
| 1819 | | - multiplyToggle.addItemListener(this); |
|---|
| 1712 | + |
|---|
| 1713 | + if (Globals.ADVANCED) |
|---|
| 1714 | + { |
|---|
| 1715 | + resetSlidersButton.addActionListener(this); |
|---|
| 1716 | + propagateToggle.addItemListener(this); |
|---|
| 1717 | + multiplyToggle.addItemListener(this); |
|---|
| 1718 | + } |
|---|
| 1820 | 1719 | } |
|---|
| 1821 | 1720 | |
|---|
| 1822 | 1721 | void DropFile(java.io.File[] files, boolean textures) |
|---|
| .. | .. |
|---|
| 1987 | 1886 | |
|---|
| 1988 | 1887 | //? flashIt = false; |
|---|
| 1989 | 1888 | CameraPane pane = (CameraPane) cameraView; |
|---|
| 1990 | | - pane.clickStart(location.x, location.y, 0); |
|---|
| 1889 | + pane.clickStart(location.x, location.y, 0, 0); |
|---|
| 1991 | 1890 | pane.clickEnd(location.x, location.y, 0, true); |
|---|
| 1992 | 1891 | |
|---|
| 1993 | 1892 | if (group.selection.size() == 1) |
|---|
| .. | .. |
|---|
| 2444 | 2343 | |
|---|
| 2445 | 2344 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
|---|
| 2446 | 2345 | { |
|---|
| 2447 | | - if (GrafreeD.standAlone) |
|---|
| 2346 | + if (Grafreed.standAlone) |
|---|
| 2448 | 2347 | { |
|---|
| 2449 | 2348 | /**/ |
|---|
| 2450 | 2349 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
|---|
| 2451 | | - browser.show(); |
|---|
| 2350 | + browser.setVisible(true); |
|---|
| 2452 | 2351 | String filename = browser.getFile(); |
|---|
| 2453 | 2352 | if (filename != null && filename.length() > 0) |
|---|
| 2454 | 2353 | { |
|---|
| .. | .. |
|---|
| 2593 | 2492 | } |
|---|
| 2594 | 2493 | if (input == null) |
|---|
| 2595 | 2494 | { |
|---|
| 2495 | + new Exception().printStackTrace(); |
|---|
| 2596 | 2496 | System.exit(0); |
|---|
| 2597 | 2497 | } |
|---|
| 2598 | 2498 | |
|---|
| .. | .. |
|---|
| 2807 | 2707 | return; |
|---|
| 2808 | 2708 | } |
|---|
| 2809 | 2709 | |
|---|
| 2810 | | - multiplyToggle.setSelected(mat.multiply); |
|---|
| 2710 | + if (multiplyToggle != null) |
|---|
| 2711 | + multiplyToggle.setSelected(mat.multiply); |
|---|
| 2811 | 2712 | |
|---|
| 2812 | 2713 | assert (object.projectedVertices != null); |
|---|
| 2813 | 2714 | |
|---|
| .. | .. |
|---|
| 2996 | 2897 | if (timeline) |
|---|
| 2997 | 2898 | { |
|---|
| 2998 | 2899 | centralPanel.remove(cameraView); |
|---|
| 2999 | | - centralPanel.add(timelinePanel); |
|---|
| 2900 | + cameraPanel.add(cameraView); |
|---|
| 2901 | + centralPanel.add(cameraPanel); |
|---|
| 3000 | 2902 | frame.setJMenuBar(timelineMenubar); |
|---|
| 3001 | 2903 | wasFullScreen = CameraPane.FULLSCREEN; |
|---|
| 3002 | 2904 | if (!CameraPane.FULLSCREEN) |
|---|
| .. | .. |
|---|
| 3005 | 2907 | } |
|---|
| 3006 | 2908 | else |
|---|
| 3007 | 2909 | { |
|---|
| 3008 | | - centralPanel.remove(timelinePanel); |
|---|
| 2910 | + centralPanel.remove(cameraPanel); |
|---|
| 3009 | 2911 | centralPanel.add(cameraView); |
|---|
| 3010 | 2912 | frame.setJMenuBar(null); |
|---|
| 3011 | 2913 | if (!wasFullScreen) |
|---|
| .. | .. |
|---|
| 3021 | 2923 | frame.validate(); |
|---|
| 3022 | 2924 | |
|---|
| 3023 | 2925 | return; |
|---|
| 3024 | | - } else if (event.getSource() == toggleRandomItem) |
|---|
| 2926 | + } else if (event.getSource() == toggleSwitchItem) |
|---|
| 3025 | 2927 | { |
|---|
| 3026 | 2928 | cameraView.ToggleRandom(); |
|---|
| 3027 | 2929 | cameraView.repaint(); |
|---|
| .. | .. |
|---|
| 3052 | 2954 | { |
|---|
| 3053 | 2955 | copy.live ^= true; |
|---|
| 3054 | 2956 | return; |
|---|
| 2957 | + } else if (event.getSource() == selectCB) |
|---|
| 2958 | + { |
|---|
| 2959 | + copy.dontselect ^= true; |
|---|
| 2960 | + return; |
|---|
| 3055 | 2961 | } else if (event.getSource() == hideCB) |
|---|
| 3056 | 2962 | { |
|---|
| 3057 | 2963 | copy.hide ^= true; |
|---|
| .. | .. |
|---|
| 3066 | 2972 | if (event.getSource() == randomCB) |
|---|
| 3067 | 2973 | { |
|---|
| 3068 | 2974 | copy.random ^= true; |
|---|
| 2975 | + objEditor.refreshContents(); |
|---|
| 3069 | 2976 | return; |
|---|
| 3070 | 2977 | } |
|---|
| 3071 | 2978 | if (event.getSource() == speedupCB) |
|---|
| .. | .. |
|---|
| 3089 | 2996 | |
|---|
| 3090 | 2997 | public void actionPerformed(ActionEvent event) |
|---|
| 3091 | 2998 | { |
|---|
| 2999 | + Object source = event.getSource(); |
|---|
| 3092 | 3000 | // SCRIPT DIALOG |
|---|
| 3093 | | - if (event.getSource() == okbutton) |
|---|
| 3001 | + if (source == okbutton) |
|---|
| 3094 | 3002 | { |
|---|
| 3095 | 3003 | textpanel.setVisible(false); |
|---|
| 3096 | 3004 | textpanel.remove(textarea); |
|---|
| .. | .. |
|---|
| 3102 | 3010 | textarea = null; |
|---|
| 3103 | 3011 | textpanel = null; |
|---|
| 3104 | 3012 | } |
|---|
| 3105 | | - if (event.getSource() == cancelbutton) |
|---|
| 3013 | + if (source == cancelbutton) |
|---|
| 3106 | 3014 | { |
|---|
| 3107 | 3015 | textpanel.setVisible(false); |
|---|
| 3108 | 3016 | textpanel.remove(textarea); |
|---|
| .. | .. |
|---|
| 3114 | 3022 | //applySelf(); |
|---|
| 3115 | 3023 | //client.refreshEditWindow(); |
|---|
| 3116 | 3024 | //refreshContents(); |
|---|
| 3117 | | - if (event.getSource() == nameField) |
|---|
| 3025 | + if (source == nameField) |
|---|
| 3118 | 3026 | { |
|---|
| 3119 | 3027 | //System.out.println("ObjEditor " + event); |
|---|
| 3120 | 3028 | applySelf0(true); |
|---|
| 3121 | 3029 | //parent.applySelf(); |
|---|
| 3122 | 3030 | objEditor.refreshContents(); |
|---|
| 3123 | | - } else if (event.getSource() == resetButton) |
|---|
| 3031 | + } else if (source == resetButton) |
|---|
| 3124 | 3032 | { |
|---|
| 3125 | 3033 | CameraPane.fullreset = true; |
|---|
| 3126 | 3034 | copy.Reset(); // ResetMeshes(); |
|---|
| 3127 | 3035 | copy.Touch(); |
|---|
| 3128 | 3036 | objEditor.refreshContents(); |
|---|
| 3129 | | - } else if (event.getSource() == stepItem) |
|---|
| 3037 | + } else if (source == stepItem) |
|---|
| 3130 | 3038 | { |
|---|
| 3131 | | - cameraView.ONESTEP = true; |
|---|
| 3039 | + //cameraView.ONESTEP = true; |
|---|
| 3040 | + Globals.ONESTEP = true; |
|---|
| 3132 | 3041 | cameraView.repaint(); |
|---|
| 3133 | 3042 | return; |
|---|
| 3134 | | - } else if (event.getSource() == stepButton) |
|---|
| 3043 | + } else if (source == stepButton) |
|---|
| 3135 | 3044 | { |
|---|
| 3136 | 3045 | copy.Step(); |
|---|
| 3137 | 3046 | copy.Touch(); |
|---|
| 3138 | 3047 | objEditor.refreshContents(); |
|---|
| 3139 | | - } else if (event.getSource() == slowerButton) |
|---|
| 3048 | + } else if (source == slowerButton) |
|---|
| 3140 | 3049 | { |
|---|
| 3141 | 3050 | copy.Slower(); |
|---|
| 3142 | 3051 | copy.Touch(); |
|---|
| 3143 | 3052 | objEditor.refreshContents(); |
|---|
| 3144 | | - } else if (event.getSource() == fasterButton) |
|---|
| 3053 | + } else if (source == fasterButton) |
|---|
| 3145 | 3054 | { |
|---|
| 3146 | 3055 | copy.Faster(); |
|---|
| 3147 | 3056 | copy.Touch(); |
|---|
| 3148 | 3057 | objEditor.refreshContents(); |
|---|
| 3149 | | - } else if (event.getSource() == remarkButton) |
|---|
| 3058 | + } else if (source == remarkButton) |
|---|
| 3150 | 3059 | { |
|---|
| 3151 | 3060 | copy.Remark(); |
|---|
| 3152 | 3061 | copy.Touch(); |
|---|
| 3153 | 3062 | objEditor.refreshContents(); |
|---|
| 3154 | | - } else if (event.getSource() == stepAllButton) |
|---|
| 3063 | + } else if (source == stepAllButton) |
|---|
| 3155 | 3064 | { |
|---|
| 3156 | 3065 | copy.StepAll(); |
|---|
| 3157 | 3066 | copy.Touch(); |
|---|
| 3158 | 3067 | objEditor.refreshContents(); |
|---|
| 3159 | | - } else if (event.getSource() == resetAllButton) |
|---|
| 3068 | + } else if (source == resetAllButton) |
|---|
| 3160 | 3069 | { |
|---|
| 3161 | 3070 | //CameraPane.fullreset = true; |
|---|
| 3162 | 3071 | copy.ResetAll(); // ResetMeshes(); |
|---|
| .. | .. |
|---|
| 3189 | 3098 | // Close(); |
|---|
| 3190 | 3099 | // } |
|---|
| 3191 | 3100 | // else |
|---|
| 3192 | | - if (event.getSource() == resetSlidersButton) |
|---|
| 3101 | + if (source == resetSlidersButton) |
|---|
| 3193 | 3102 | { |
|---|
| 3194 | 3103 | ResetSliders(); |
|---|
| 3195 | | - } else if (event.getSource() == clearMaterialButton) |
|---|
| 3104 | + } else if (source == clearMaterialButton) |
|---|
| 3196 | 3105 | { |
|---|
| 3197 | 3106 | ClearMaterial(); |
|---|
| 3198 | | - } else if (event.getSource() == createMaterialButton) |
|---|
| 3107 | + } else if (source == createMaterialButton) |
|---|
| 3199 | 3108 | { |
|---|
| 3200 | 3109 | CreateMaterial(); |
|---|
| 3201 | | - } else if (event.getSource() == clearPanelButton) |
|---|
| 3110 | + } else if (source == clearPanelButton) |
|---|
| 3202 | 3111 | { |
|---|
| 3203 | 3112 | copy.ClearUI(); |
|---|
| 3204 | 3113 | refreshContents(true); |
|---|
| 3205 | | - } /* |
|---|
| 3206 | | - } |
|---|
| 3207 | | - |
|---|
| 3208 | | - public boolean action(Event event, Object arg) |
|---|
| 3209 | | - { |
|---|
| 3210 | | - */ 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) |
|---|
| 3211 | 3139 | { |
|---|
| 3212 | 3140 | Close(); |
|---|
| 3213 | 3141 | //return true; |
|---|
| 3214 | | - } else if (event.getSource() == loadItem) |
|---|
| 3142 | + } else if (source == loadItem) |
|---|
| 3215 | 3143 | { |
|---|
| 3216 | 3144 | load(); |
|---|
| 3217 | 3145 | //return true; |
|---|
| 3218 | | - } else if (event.getSource() == saveItem) |
|---|
| 3146 | + } else if (source == newItem) |
|---|
| 3147 | + { |
|---|
| 3148 | + New(); |
|---|
| 3149 | + } else if (source == saveItem) |
|---|
| 3219 | 3150 | { |
|---|
| 3220 | 3151 | save(); |
|---|
| 3221 | 3152 | //return true; |
|---|
| 3222 | | - } else if (event.getSource() == saveAsItem) |
|---|
| 3153 | + } else if (source == saveAsItem) |
|---|
| 3223 | 3154 | { |
|---|
| 3224 | 3155 | saveAs(); |
|---|
| 3225 | 3156 | //return true; |
|---|
| 3226 | | - } else if (event.getSource() == reexportItem) |
|---|
| 3157 | + } else if (source == reexportItem) |
|---|
| 3227 | 3158 | { |
|---|
| 3228 | 3159 | reexport(); |
|---|
| 3229 | 3160 | //return true; |
|---|
| 3230 | | - } else if (event.getSource() == exportAsItem) |
|---|
| 3161 | + } else if (source == exportAsItem) |
|---|
| 3231 | 3162 | { |
|---|
| 3232 | 3163 | export(); |
|---|
| 3233 | 3164 | //return true; |
|---|
| 3234 | | - } else if (event.getSource() == povItem) |
|---|
| 3165 | + } else if (source == povItem) |
|---|
| 3235 | 3166 | { |
|---|
| 3236 | 3167 | generatePOV(); |
|---|
| 3237 | 3168 | //return true; |
|---|
| 3238 | | - } else if (event.getSource() == zBufferItem) |
|---|
| 3169 | + } else if (source == zBufferItem) |
|---|
| 3239 | 3170 | { |
|---|
| 3240 | 3171 | try |
|---|
| 3241 | 3172 | { |
|---|
| .. | .. |
|---|
| 3257 | 3188 | cameraView.repaint(); |
|---|
| 3258 | 3189 | //return true; |
|---|
| 3259 | 3190 | } |
|---|
| 3260 | | - */ else if (event.getSource() == editCameraItem) |
|---|
| 3261 | | - { |
|---|
| 3262 | | - cameraView.ProtectCamera(); |
|---|
| 3263 | | - cameraView.repaint(); |
|---|
| 3264 | | - return; |
|---|
| 3265 | | - } else if (event.getSource() == revertCameraItem) |
|---|
| 3266 | | - { |
|---|
| 3267 | | - cameraView.RevertCamera(); |
|---|
| 3268 | | - cameraView.repaint(); |
|---|
| 3269 | | - return; |
|---|
| 3270 | | -// } else if (event.getSource() == textureButton) |
|---|
| 3271 | | -// { |
|---|
| 3272 | | -// return; // true; |
|---|
| 3273 | | - } else // combos... |
|---|
| 3274 | | - if (event.getSource() == texresMenu) |
|---|
| 3191 | + */ else // combos... |
|---|
| 3192 | + if (source == texresMenu) |
|---|
| 3275 | 3193 | { |
|---|
| 3276 | 3194 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
|---|
| 3277 | 3195 | copy.texres = texresMenu.getSelectedIndex(); |
|---|
| .. | .. |
|---|
| 3283 | 3201 | } |
|---|
| 3284 | 3202 | } |
|---|
| 3285 | 3203 | |
|---|
| 3286 | | - void ToggleAnimation() |
|---|
| 3204 | + void New() |
|---|
| 3287 | 3205 | { |
|---|
| 3288 | | - if (!CameraPane.ANIMATION) |
|---|
| 3206 | + while (copy.Size() > 1) |
|---|
| 3289 | 3207 | { |
|---|
| 3290 | | - FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
|---|
| 3208 | + copy.remove(1); |
|---|
| 3209 | + } |
|---|
| 3210 | + ResetModel(); |
|---|
| 3211 | + objEditor.refreshContents(); |
|---|
| 3212 | + } |
|---|
| 3213 | + |
|---|
| 3214 | + void ImportGFD() |
|---|
| 3215 | + { |
|---|
| 3216 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
|---|
| 3291 | 3217 | browser.show(); |
|---|
| 3292 | 3218 | String filename = browser.getFile(); |
|---|
| 3293 | 3219 | if (filename != null && filename.length() > 0) |
|---|
| 3294 | 3220 | { |
|---|
| 3295 | | - CameraPane.filename = browser.getDirectory() + filename; |
|---|
| 3221 | + String fullname = browser.getDirectory() + filename; |
|---|
| 3222 | + |
|---|
| 3223 | + //Object3D readobj = |
|---|
| 3224 | + objEditor.ReadGFD(fullname, objEditor); |
|---|
| 3225 | + //makeSomething(readobj); |
|---|
| 3226 | + } |
|---|
| 3227 | + } |
|---|
| 3228 | + |
|---|
| 3229 | + void ImportVRMLX3D() |
|---|
| 3230 | + { |
|---|
| 3231 | + if (Grafreed.standAlone) |
|---|
| 3232 | + { |
|---|
| 3233 | + /**/ |
|---|
| 3234 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
|---|
| 3235 | + browser.show(); |
|---|
| 3236 | + String filename = browser.getFile(); |
|---|
| 3237 | + if (filename != null && filename.length() > 0) |
|---|
| 3238 | + { |
|---|
| 3239 | + String fullname = browser.getDirectory() + filename; |
|---|
| 3240 | + LoadVRMLX3D(fullname); |
|---|
| 3241 | + } |
|---|
| 3242 | + /**/ |
|---|
| 3243 | + } |
|---|
| 3244 | + } |
|---|
| 3245 | + |
|---|
| 3246 | + void ToggleAnimation() |
|---|
| 3247 | + { |
|---|
| 3248 | + if (!Globals.ANIMATION) |
|---|
| 3249 | + { |
|---|
| 3250 | + FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
|---|
| 3251 | + browser.setVisible(true); |
|---|
| 3252 | + String filename = browser.getFile(); |
|---|
| 3253 | + if (filename != null && filename.length() > 0) |
|---|
| 3254 | + { |
|---|
| 3255 | + Globals.filename = browser.getDirectory() + filename; |
|---|
| 3296 | 3256 | //CameraPane.framecount = 0; |
|---|
| 3297 | | - CameraPane.imagecount = 0; |
|---|
| 3257 | + Globals.imagecount = 0; |
|---|
| 3298 | 3258 | |
|---|
| 3299 | | - CameraPane.ANIMATION ^= true; |
|---|
| 3259 | + Globals.ANIMATION ^= true; |
|---|
| 3300 | 3260 | |
|---|
| 3301 | | - GrafreeD.wav.cursor = 0; |
|---|
| 3302 | | - GrafreeD.wav.loop = 0; |
|---|
| 3261 | + Grafreed.wav.cursor = 0; |
|---|
| 3262 | + Grafreed.wav.loop = 0; |
|---|
| 3303 | 3263 | } |
|---|
| 3304 | 3264 | } else |
|---|
| 3305 | 3265 | { |
|---|
| 3306 | | - CameraPane.ANIMATION ^= true; |
|---|
| 3266 | + Globals.ANIMATION ^= true; |
|---|
| 3307 | 3267 | } |
|---|
| 3308 | 3268 | } |
|---|
| 3309 | 3269 | |
|---|
| .. | .. |
|---|
| 3349 | 3309 | void CreateMaterial() |
|---|
| 3350 | 3310 | { |
|---|
| 3351 | 3311 | //copy.ClearMaterial(); // PATCH |
|---|
| 3352 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
|---|
| 3312 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
|---|
| 3353 | 3313 | if (copy.selection.size() > 0) |
|---|
| 3354 | 3314 | //SetMaterial(copy); |
|---|
| 3355 | 3315 | { |
|---|
| .. | .. |
|---|
| 3408 | 3368 | { |
|---|
| 3409 | 3369 | copy.ResetBlockLoop(); // temporary problem |
|---|
| 3410 | 3370 | |
|---|
| 3411 | | - boolean random = CameraPane.RANDOM; |
|---|
| 3412 | | - CameraPane.RANDOM = false; // parse everything |
|---|
| 3371 | + boolean random = CameraPane.SWITCH; |
|---|
| 3372 | + CameraPane.SWITCH = false; // parse everything |
|---|
| 3413 | 3373 | copy.ResetDisplayList(); |
|---|
| 3414 | 3374 | copy.HardTouch(); |
|---|
| 3415 | | - CameraPane.RANDOM = random; |
|---|
| 3375 | + CameraPane.SWITCH = random; |
|---|
| 3416 | 3376 | } |
|---|
| 3417 | 3377 | |
|---|
| 3418 | 3378 | // public void applySelf() |
|---|
| .. | .. |
|---|
| 3482 | 3442 | current.fakedepth = (float) fakedepthField.getFloat(); |
|---|
| 3483 | 3443 | current.shadowbias = (float) shadowbiasField.getFloat(); |
|---|
| 3484 | 3444 | |
|---|
| 3485 | | - if (!NumberSlider.frozen) |
|---|
| 3445 | + if (!cNumberSlider.frozen) |
|---|
| 3486 | 3446 | { |
|---|
| 3487 | 3447 | //System.out.println("Propagate = " + propagate); |
|---|
| 3488 | 3448 | copy.UpdateMaterial(anchor, current, propagate); |
|---|
| 3449 | + |
|---|
| 3450 | + if (copy.material != null) |
|---|
| 3451 | + { |
|---|
| 3452 | + cMaterial mat = copy.material; |
|---|
| 3453 | + |
|---|
| 3454 | + colorField.SetToolTipValue((mat.color)); |
|---|
| 3455 | + modulationField.SetToolTipValue((mat.modulation)); |
|---|
| 3456 | + metalnessField.SetToolTipValue((mat.metalness)); |
|---|
| 3457 | + diffuseField.SetToolTipValue((mat.diffuse)); |
|---|
| 3458 | + specularField.SetToolTipValue((mat.specular)); |
|---|
| 3459 | + shininessField.SetToolTipValue((mat.shininess)); |
|---|
| 3460 | + shiftField.SetToolTipValue((mat.shift)); |
|---|
| 3461 | + ambientField.SetToolTipValue((mat.ambient)); |
|---|
| 3462 | + lightareaField.SetToolTipValue((mat.lightarea)); |
|---|
| 3463 | + diffusenessField.SetToolTipValue((mat.factor)); |
|---|
| 3464 | + velvetField.SetToolTipValue((mat.velvet)); |
|---|
| 3465 | + sheenField.SetToolTipValue((mat.sheen)); |
|---|
| 3466 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
|---|
| 3467 | + backlitField.SetToolTipValue((mat.bump)); |
|---|
| 3468 | + anisoField.SetToolTipValue((mat.aniso)); |
|---|
| 3469 | + anisoVField.SetToolTipValue((mat.anisoV)); |
|---|
| 3470 | + cameraField.SetToolTipValue((mat.cameralight)); |
|---|
| 3471 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
|---|
| 3472 | + shadowField.SetToolTipValue((mat.shadow)); |
|---|
| 3473 | + textureField.SetToolTipValue((mat.texture)); |
|---|
| 3474 | + opacityField.SetToolTipValue((mat.opacity)); |
|---|
| 3475 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
|---|
| 3476 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
|---|
| 3477 | + } |
|---|
| 3478 | + |
|---|
| 3489 | 3479 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
|---|
| 3490 | 3480 | { |
|---|
| 3491 | 3481 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
|---|
| .. | .. |
|---|
| 3530 | 3520 | || e.getSource() == apertureField |
|---|
| 3531 | 3521 | || e.getSource() == shadowblurField) |
|---|
| 3532 | 3522 | { |
|---|
| 3523 | + new Exception().printStackTrace(); |
|---|
| 3533 | 3524 | System.exit(0); |
|---|
| 3534 | 3525 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
|---|
| 3535 | 3526 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
|---|
| .. | .. |
|---|
| 3600 | 3591 | } |
|---|
| 3601 | 3592 | |
|---|
| 3602 | 3593 | if (normalpushField != null) |
|---|
| 3603 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
|---|
| 3594 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
|---|
| 3604 | 3595 | } |
|---|
| 3605 | 3596 | |
|---|
| 3606 | 3597 | void SnapObject() |
|---|
| .. | .. |
|---|
| 3855 | 3846 | |
|---|
| 3856 | 3847 | radioPanel.revalidate(); |
|---|
| 3857 | 3848 | radioPanel.repaint(); |
|---|
| 3858 | | - ctrlPanel.revalidate(); // ? new |
|---|
| 3849 | + ctrlPanel.validate(); // ? new |
|---|
| 3859 | 3850 | ctrlPanel.repaint(); |
|---|
| 3860 | 3851 | } |
|---|
| 3861 | 3852 | } |
|---|
| .. | .. |
|---|
| 4067 | 4058 | } |
|---|
| 4068 | 4059 | } |
|---|
| 4069 | 4060 | } |
|---|
| 4061 | + |
|---|
| 4070 | 4062 | LoadGFDThread loadGFDThread; |
|---|
| 4071 | 4063 | |
|---|
| 4072 | 4064 | void ReadGFD(String fullname, iCallBack cb) |
|---|
| .. | .. |
|---|
| 4087 | 4079 | try |
|---|
| 4088 | 4080 | { |
|---|
| 4089 | 4081 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
|---|
| 4090 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
|---|
| 4082 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
|---|
| 4083 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
|---|
| 4091 | 4084 | |
|---|
| 4092 | 4085 | readobj = (Object3D) p.readObject(); |
|---|
| 4093 | 4086 | istream.close(); |
|---|
| .. | .. |
|---|
| 4095 | 4088 | readobj.ResetDisplayList(); |
|---|
| 4096 | 4089 | } catch (Exception e) |
|---|
| 4097 | 4090 | { |
|---|
| 4098 | | - e.printStackTrace(); |
|---|
| 4091 | + //e.printStackTrace(); |
|---|
| 4092 | + try |
|---|
| 4093 | + { |
|---|
| 4094 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
|---|
| 4095 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
|---|
| 4096 | + |
|---|
| 4097 | + readobj = (Object3D) p.readObject(); |
|---|
| 4098 | + istream.close(); |
|---|
| 4099 | + |
|---|
| 4100 | + readobj.ResetDisplayList(); |
|---|
| 4101 | + } catch (Exception e2) |
|---|
| 4102 | + { |
|---|
| 4103 | + e2.printStackTrace(); |
|---|
| 4104 | + } |
|---|
| 4099 | 4105 | } |
|---|
| 4100 | 4106 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
|---|
| 4101 | 4107 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
|---|
| .. | .. |
|---|
| 4212 | 4218 | |
|---|
| 4213 | 4219 | void load() // throws ClassNotFoundException |
|---|
| 4214 | 4220 | { |
|---|
| 4215 | | - if (GrafreeD.standAlone) |
|---|
| 4221 | + if (Grafreed.standAlone) |
|---|
| 4216 | 4222 | { |
|---|
| 4217 | 4223 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
|---|
| 4218 | 4224 | browser.show(); |
|---|
| .. | .. |
|---|
| 4299 | 4305 | try |
|---|
| 4300 | 4306 | { |
|---|
| 4301 | 4307 | FileOutputStream ostream = new FileOutputStream(lastname); |
|---|
| 4302 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
|---|
| 4308 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
|---|
| 4309 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
|---|
| 4303 | 4310 | |
|---|
| 4304 | 4311 | p.writeObject(copy); |
|---|
| 4305 | 4312 | p.flush(); |
|---|
| 4306 | 4313 | |
|---|
| 4314 | + zstream.close(); |
|---|
| 4307 | 4315 | ostream.close(); |
|---|
| 4308 | 4316 | |
|---|
| 4309 | 4317 | //FileOutputStream fos = new FileOutputStream(fullname); |
|---|
| .. | .. |
|---|
| 4313 | 4321 | { |
|---|
| 4314 | 4322 | } |
|---|
| 4315 | 4323 | } |
|---|
| 4324 | + |
|---|
| 4316 | 4325 | String lastname; |
|---|
| 4317 | 4326 | |
|---|
| 4318 | 4327 | void saveAs() |
|---|
| 4319 | 4328 | { |
|---|
| 4320 | | - if (GrafreeD.standAlone) |
|---|
| 4329 | + if (Grafreed.standAlone) |
|---|
| 4321 | 4330 | { |
|---|
| 4322 | 4331 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
|---|
| 4323 | 4332 | browser.setVisible(true); |
|---|
| .. | .. |
|---|
| 4422 | 4431 | try |
|---|
| 4423 | 4432 | { |
|---|
| 4424 | 4433 | FileOutputStream ostream = new FileOutputStream(filename); |
|---|
| 4425 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
|---|
| 4426 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
|---|
| 4434 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
|---|
| 4435 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
|---|
| 4427 | 4436 | |
|---|
| 4428 | 4437 | Object3D objectparent = obj.parent; |
|---|
| 4429 | 4438 | obj.parent = null; |
|---|
| 4430 | 4439 | |
|---|
| 4431 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
|---|
| 4440 | + Object3D object = (Object3D) Grafreed.clone(obj); |
|---|
| 4432 | 4441 | |
|---|
| 4433 | 4442 | obj.parent = objectparent; |
|---|
| 4434 | 4443 | |
|---|
| .. | .. |
|---|
| 4440 | 4449 | p.writeObject(object); |
|---|
| 4441 | 4450 | p.flush(); |
|---|
| 4442 | 4451 | |
|---|
| 4452 | + zstream.close(); |
|---|
| 4443 | 4453 | ostream.close(); |
|---|
| 4444 | | - // zstream.close(); |
|---|
| 4445 | 4454 | |
|---|
| 4446 | 4455 | // group.selection.get(0).parent = parent; |
|---|
| 4447 | 4456 | //FileOutputStream fos = new FileOutputStream(fullname); |
|---|
| .. | .. |
|---|
| 4462 | 4471 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
|---|
| 4463 | 4472 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
|---|
| 4464 | 4473 | copy.generatePOV(buffer); |
|---|
| 4465 | | - if (GrafreeD.standAlone) |
|---|
| 4474 | + if (Grafreed.standAlone) |
|---|
| 4466 | 4475 | { |
|---|
| 4467 | 4476 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
|---|
| 4468 | 4477 | browser.show(); |
|---|
| .. | .. |
|---|
| 4488 | 4497 | Object3D client; |
|---|
| 4489 | 4498 | Object3D copy; |
|---|
| 4490 | 4499 | MenuBar menuBar; |
|---|
| 4491 | | - Menu windowMenu; |
|---|
| 4500 | + Menu fileMenu; |
|---|
| 4501 | + MenuItem newItem; |
|---|
| 4492 | 4502 | MenuItem loadItem; |
|---|
| 4493 | 4503 | MenuItem saveItem; |
|---|
| 4494 | 4504 | MenuItem saveAsItem; |
|---|
| .. | .. |
|---|
| 4496 | 4506 | MenuItem reexportItem; |
|---|
| 4497 | 4507 | MenuItem povItem; |
|---|
| 4498 | 4508 | MenuItem closeItem; |
|---|
| 4499 | | - Menu cameraMenu; |
|---|
| 4509 | + |
|---|
| 4500 | 4510 | CheckboxMenuItem zBufferItem; |
|---|
| 4501 | 4511 | //MenuItem normalLensItem; |
|---|
| 4502 | | - MenuItem editCameraItem; |
|---|
| 4503 | | - MenuItem revertCameraItem; |
|---|
| 4504 | | - CheckboxMenuItem toggleLiveItem; |
|---|
| 4505 | 4512 | MenuItem stepItem; |
|---|
| 4513 | + CheckboxMenuItem toggleLiveItem; |
|---|
| 4506 | 4514 | CheckboxMenuItem toggleFullScreenItem; |
|---|
| 4507 | 4515 | CheckboxMenuItem toggleTimelineItem; |
|---|
| 4508 | 4516 | CheckboxMenuItem toggleRenderItem; |
|---|
| .. | .. |
|---|
| 4511 | 4519 | CheckboxMenuItem toggleFootContactItem; |
|---|
| 4512 | 4520 | CheckboxMenuItem toggleDLItem; |
|---|
| 4513 | 4521 | CheckboxMenuItem toggleTextureItem; |
|---|
| 4514 | | - CheckboxMenuItem toggleRandomItem; |
|---|
| 4522 | + CheckboxMenuItem toggleSwitchItem; |
|---|
| 4515 | 4523 | CheckboxMenuItem toggleRootItem; |
|---|
| 4516 | 4524 | CheckboxMenuItem animationItem; |
|---|
| 4517 | 4525 | CheckboxMenuItem toggleHandleItem; |
|---|
| .. | .. |
|---|
| 4519 | 4527 | JSplitPane mainPanel; |
|---|
| 4520 | 4528 | JScrollPane scrollpane; |
|---|
| 4521 | 4529 | JPanel toolbarPanel; |
|---|
| 4522 | | - JPanel treePanel; |
|---|
| 4530 | + cGridBag treePanel; |
|---|
| 4523 | 4531 | JPanel radioPanel; |
|---|
| 4524 | 4532 | ButtonGroup buttonGroup; |
|---|
| 4525 | | - JPanel ctrlPanel; |
|---|
| 4526 | | - JPanel materialPanel; |
|---|
| 4533 | + cGridBag ctrlPanel; |
|---|
| 4534 | + cGridBag materialPanel; |
|---|
| 4527 | 4535 | JScrollPane infoPanel; |
|---|
| 4528 | | - JPanel optionsPanel; |
|---|
| 4536 | + cGridBag optionsPanel; |
|---|
| 4529 | 4537 | JTabbedPane objectPanel; |
|---|
| 4530 | | - JPanel XYZPanel; |
|---|
| 4538 | + cGridBag XYZPanel; |
|---|
| 4531 | 4539 | JSplitPane gridPanel; |
|---|
| 4532 | 4540 | JSplitPane bigPanel; |
|---|
| 4533 | | - JPanel bigThree; |
|---|
| 4534 | | - JTabbedPane scenePanel; |
|---|
| 4535 | | - JPanel centralPanel; |
|---|
| 4541 | + cGridBag bigThree; |
|---|
| 4542 | + cGridBag scenePanel; |
|---|
| 4543 | + cGridBag centralPanel; |
|---|
| 4544 | + JSplitPane cameraPanel; |
|---|
| 4536 | 4545 | JPanel timelinePanel; |
|---|
| 4537 | 4546 | JMenuBar timelineMenubar; |
|---|
| 4538 | 4547 | JSplitPane framePanel; |
|---|
| .. | .. |
|---|
| 4584 | 4593 | // MATERIAL |
|---|
| 4585 | 4594 | JLabel materialLabel; |
|---|
| 4586 | 4595 | JLabel colorLabel; |
|---|
| 4587 | | - NumberSlider colorField; |
|---|
| 4596 | + cNumberSlider colorField; |
|---|
| 4588 | 4597 | JLabel modulationLabel; |
|---|
| 4589 | | - NumberSlider modulationField; |
|---|
| 4598 | + cNumberSlider modulationField; |
|---|
| 4590 | 4599 | JLabel metalnessLabel; |
|---|
| 4591 | | - NumberSlider metalnessField; |
|---|
| 4600 | + cNumberSlider metalnessField; |
|---|
| 4592 | 4601 | JLabel diffuseLabel; |
|---|
| 4593 | | - NumberSlider diffuseField; |
|---|
| 4602 | + cNumberSlider diffuseField; |
|---|
| 4594 | 4603 | JLabel specularLabel; |
|---|
| 4595 | | - NumberSlider specularField; |
|---|
| 4604 | + cNumberSlider specularField; |
|---|
| 4596 | 4605 | JLabel shininessLabel; |
|---|
| 4597 | | - NumberSlider shininessField; |
|---|
| 4606 | + cNumberSlider shininessField; |
|---|
| 4598 | 4607 | JLabel shiftLabel; |
|---|
| 4599 | | - NumberSlider shiftField; |
|---|
| 4608 | + cNumberSlider shiftField; |
|---|
| 4600 | 4609 | JLabel ambientLabel; |
|---|
| 4601 | | - NumberSlider ambientField; |
|---|
| 4610 | + cNumberSlider ambientField; |
|---|
| 4602 | 4611 | JLabel lightareaLabel; |
|---|
| 4603 | | - NumberSlider lightareaField; |
|---|
| 4612 | + cNumberSlider lightareaField; |
|---|
| 4604 | 4613 | JLabel diffusenessLabel; |
|---|
| 4605 | | - NumberSlider diffusenessField; |
|---|
| 4614 | + cNumberSlider diffusenessField; |
|---|
| 4606 | 4615 | JLabel velvetLabel; |
|---|
| 4607 | | - NumberSlider velvetField; |
|---|
| 4616 | + cNumberSlider velvetField; |
|---|
| 4608 | 4617 | JLabel sheenLabel; |
|---|
| 4609 | | - NumberSlider sheenField; |
|---|
| 4618 | + cNumberSlider sheenField; |
|---|
| 4610 | 4619 | JLabel subsurfaceLabel; |
|---|
| 4611 | | - NumberSlider subsurfaceField; |
|---|
| 4620 | + cNumberSlider subsurfaceField; |
|---|
| 4612 | 4621 | //JLabel bumpLabel; |
|---|
| 4613 | 4622 | //NumberSlider bumpField; |
|---|
| 4614 | 4623 | JLabel backlitLabel; |
|---|
| 4615 | | - NumberSlider backlitField; |
|---|
| 4624 | + cNumberSlider backlitField; |
|---|
| 4616 | 4625 | JLabel anisoLabel; |
|---|
| 4617 | | - NumberSlider anisoField; |
|---|
| 4626 | + cNumberSlider anisoField; |
|---|
| 4618 | 4627 | JLabel anisoVLabel; |
|---|
| 4619 | | - NumberSlider anisoVField; |
|---|
| 4628 | + cNumberSlider anisoVField; |
|---|
| 4620 | 4629 | JLabel cameraLabel; |
|---|
| 4621 | | - NumberSlider cameraField; |
|---|
| 4630 | + cNumberSlider cameraField; |
|---|
| 4622 | 4631 | JLabel selfshadowLabel; |
|---|
| 4623 | | - NumberSlider selfshadowField; |
|---|
| 4632 | + cNumberSlider selfshadowField; |
|---|
| 4624 | 4633 | JLabel shadowLabel; |
|---|
| 4625 | | - NumberSlider shadowField; |
|---|
| 4634 | + cNumberSlider shadowField; |
|---|
| 4626 | 4635 | JLabel textureLabel; |
|---|
| 4627 | | - NumberSlider textureField; |
|---|
| 4636 | + cNumberSlider textureField; |
|---|
| 4628 | 4637 | JLabel opacityLabel; |
|---|
| 4629 | | - NumberSlider opacityField; |
|---|
| 4638 | + cNumberSlider opacityField; |
|---|
| 4630 | 4639 | JLabel fakedepthLabel; |
|---|
| 4631 | | - NumberSlider fakedepthField; |
|---|
| 4640 | + cNumberSlider fakedepthField; |
|---|
| 4632 | 4641 | JLabel shadowbiasLabel; |
|---|
| 4633 | | - NumberSlider shadowbiasField; |
|---|
| 4642 | + cNumberSlider shadowbiasField; |
|---|
| 4634 | 4643 | JLabel bumpLabel; |
|---|
| 4635 | | - NumberSlider bumpField; |
|---|
| 4644 | + cNumberSlider bumpField; |
|---|
| 4636 | 4645 | JLabel noiseLabel; |
|---|
| 4637 | | - NumberSlider noiseField; |
|---|
| 4646 | + cNumberSlider noiseField; |
|---|
| 4638 | 4647 | JLabel powerLabel; |
|---|
| 4639 | | - NumberSlider powerField; |
|---|
| 4648 | + cNumberSlider powerField; |
|---|
| 4640 | 4649 | JLabel borderfadeLabel; |
|---|
| 4641 | | - NumberSlider borderfadeField; |
|---|
| 4650 | + cNumberSlider borderfadeField; |
|---|
| 4642 | 4651 | JLabel fogLabel; |
|---|
| 4643 | | - NumberSlider fogField; |
|---|
| 4652 | + cNumberSlider fogField; |
|---|
| 4644 | 4653 | JLabel opacityPowerLabel; |
|---|
| 4645 | | - NumberSlider opacityPowerField; |
|---|
| 4654 | + cNumberSlider opacityPowerField; |
|---|
| 4646 | 4655 | JTree jTree; |
|---|
| 4647 | 4656 | //ObjectUI parent; |
|---|
| 4648 | 4657 | |
|---|
| 4649 | | - NumberSlider normalpushField; |
|---|
| 4658 | + cNumberSlider normalpushField; |
|---|
| 4659 | + |
|---|
| 4660 | + private MenuItem importGFDItem; |
|---|
| 4661 | + private MenuItem importVRMLX3DItem; |
|---|
| 4662 | + private MenuItem import3DSItem; |
|---|
| 4663 | + private MenuItem importOBJItem; |
|---|
| 4650 | 4664 | } |
|---|