.. | .. |
---|
75 | 75 | return new cCheckBox(icon, border); |
---|
76 | 76 | } |
---|
77 | 77 | |
---|
| 78 | + static java.util.Hashtable<String, javax.swing.ImageIcon> icons = new java.util.Hashtable<String, javax.swing.ImageIcon>(); |
---|
| 79 | + |
---|
78 | 80 | ImageIcon GetIcon(String name) |
---|
79 | 81 | { |
---|
| 82 | + javax.swing.ImageIcon iconCache = icons.get(name); |
---|
| 83 | + if (iconCache != null) |
---|
| 84 | + { |
---|
| 85 | + return iconCache; |
---|
| 86 | + } |
---|
| 87 | + |
---|
80 | 88 | try |
---|
81 | 89 | { |
---|
82 | 90 | BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
.. | .. |
---|
94 | 102 | // } |
---|
95 | 103 | |
---|
96 | 104 | javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 105 | + |
---|
| 106 | + icons.put(name, icon); |
---|
| 107 | + |
---|
97 | 108 | return icon; |
---|
98 | 109 | } |
---|
99 | 110 | catch (Exception e) |
---|
100 | 111 | { |
---|
| 112 | + //icons.put(name, null); |
---|
101 | 113 | return null; |
---|
102 | 114 | } |
---|
103 | 115 | } |
---|
.. | .. |
---|
433 | 445 | |
---|
434 | 446 | ChangeListener changeListener = new ChangeListener() |
---|
435 | 447 | { |
---|
| 448 | + //String name; |
---|
| 449 | + |
---|
436 | 450 | public void stateChanged(ChangeEvent changeEvent) |
---|
437 | 451 | { |
---|
438 | 452 | // if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
.. | .. |
---|
451 | 465 | // EditSelection(false); |
---|
452 | 466 | // } |
---|
453 | 467 | |
---|
| 468 | +// if (objectPanel.getSelectedIndex() == 4) |
---|
| 469 | +// { |
---|
| 470 | +// name = copy.skyboxname; |
---|
| 471 | +// |
---|
| 472 | +// if (name == null) |
---|
| 473 | +// { |
---|
| 474 | +// name = ""; |
---|
| 475 | +// } |
---|
| 476 | +// |
---|
| 477 | +// copy.skyboxname = "cubemaps/default-skyboxes/rgb"; |
---|
| 478 | +// copy.skyboxext = "jpg"; |
---|
| 479 | +// } |
---|
| 480 | +// else |
---|
| 481 | +// { |
---|
| 482 | +// if (name != null) |
---|
| 483 | +// { |
---|
| 484 | +// if (name.equals("")) |
---|
| 485 | +// { |
---|
| 486 | +// copy.skyboxname = null; |
---|
| 487 | +// copy.skyboxext = null; |
---|
| 488 | +// } |
---|
| 489 | +// else |
---|
| 490 | +// { |
---|
| 491 | +// copy.skyboxname = name; |
---|
| 492 | +// } |
---|
| 493 | +// } |
---|
| 494 | +// } |
---|
| 495 | + cameraView.transformMode = objectPanel.getSelectedIndex() == 4; |
---|
| 496 | + |
---|
454 | 497 | // refreshContents(false); // To refresh Info tab |
---|
| 498 | + cameraView.repaint(); |
---|
455 | 499 | } |
---|
456 | 500 | }; |
---|
457 | 501 | objectPanel.addChangeListener(changeListener); |
---|
.. | .. |
---|
1645 | 1689 | scenePanel.add(tabbedPane); |
---|
1646 | 1690 | |
---|
1647 | 1691 | //if (Globals.ADVANCED) |
---|
1648 | | - tabbedPane.add(infoPanel); |
---|
1649 | | - tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
1650 | | - tabbedPane.setToolTipTextAt(3, "Information"); |
---|
| 1692 | +// tabbedPane.add(infoPanel); |
---|
| 1693 | +// tabbedPane.setIconAt(3, GetIcon("icons/info.png")); |
---|
| 1694 | +// tabbedPane.setToolTipTextAt(3, "Information"); |
---|
1651 | 1695 | |
---|
1652 | 1696 | /* |
---|
1653 | 1697 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1745 | 1789 | |
---|
1746 | 1790 | frame.getContentPane().setLayout(new BorderLayout()); |
---|
1747 | 1791 | /**/ |
---|
1748 | | - JTabbedPane worldPane = new JTabbedPane(); |
---|
| 1792 | + //JTabbedPane worldPane = new JTabbedPane(); |
---|
1749 | 1793 | //worldPane.add(bigPanel); |
---|
1750 | 1794 | //worldPane.add(worldPanel); |
---|
1751 | 1795 | /**/ |
---|
.. | .. |
---|
4750 | 4794 | if (muteSlider) |
---|
4751 | 4795 | return; |
---|
4752 | 4796 | |
---|
| 4797 | + Replace(); |
---|
| 4798 | + |
---|
4753 | 4799 | int version = versionSlider.getInteger(); |
---|
4754 | 4800 | |
---|
4755 | 4801 | if (version != -1 && copy.versionlist[version] != null) |
---|
.. | .. |
---|
5504 | 5550 | copy.versionlist = new Object3D[100]; |
---|
5505 | 5551 | copy.versionindex = -1; |
---|
5506 | 5552 | |
---|
5507 | | - Save(true); |
---|
| 5553 | + //Save(true); |
---|
5508 | 5554 | } |
---|
5509 | 5555 | |
---|
5510 | 5556 | //? SetUndoStates(); |
---|