.. | .. |
---|
4 | 4 | |
---|
5 | 5 | import java.awt.*; |
---|
6 | 6 | import java.awt.event.*; |
---|
| 7 | +import java.awt.image.BufferedImage; |
---|
7 | 8 | import javax.swing.*; |
---|
8 | 9 | import javax.swing.event.*; |
---|
9 | 10 | import javax.swing.text.*; |
---|
.. | .. |
---|
19 | 20 | import //weka.core. |
---|
20 | 21 | matrix.Matrix; |
---|
21 | 22 | |
---|
| 23 | +import grafeme.ui.*; |
---|
| 24 | + |
---|
22 | 25 | class ObjEditor /*extends JFrame*/ implements iCallBack, ObjectUI, |
---|
23 | 26 | ActionListener, ChangeListener, |
---|
24 | 27 | InputMethodListener, |
---|
.. | .. |
---|
28 | 31 | iSendInfo |
---|
29 | 32 | //KeyListener |
---|
30 | 33 | { |
---|
| 34 | + boolean timeline; |
---|
| 35 | + boolean wasFullScreen; |
---|
31 | 36 | |
---|
| 37 | + GroupEditor callee; |
---|
| 38 | + JFrame frame; |
---|
| 39 | + |
---|
| 40 | + static ObjEditor theFrame; |
---|
| 41 | + |
---|
| 42 | + cButton GetButton(String name, boolean border) |
---|
| 43 | + { |
---|
| 44 | + try |
---|
| 45 | + { |
---|
| 46 | + ImageIcon icon = GetIcon(name); |
---|
| 47 | + return new cButton(icon, border); |
---|
| 48 | + } |
---|
| 49 | + catch (Exception e) |
---|
| 50 | + { |
---|
| 51 | + return new cButton(name, border); |
---|
| 52 | + } |
---|
| 53 | + } |
---|
| 54 | + |
---|
| 55 | + cToggleButton GetToggleButton(String name, boolean border) |
---|
| 56 | + { |
---|
| 57 | + try |
---|
| 58 | + { |
---|
| 59 | + ImageIcon icon = GetIcon(name); |
---|
| 60 | + return new cToggleButton(icon, border); |
---|
| 61 | + } |
---|
| 62 | + catch (Exception e) |
---|
| 63 | + { |
---|
| 64 | + return new cToggleButton(name, border); |
---|
| 65 | + } |
---|
| 66 | + } |
---|
| 67 | + |
---|
| 68 | + cCheckBox GetCheckBox(String name, boolean border) |
---|
| 69 | + { |
---|
| 70 | + try |
---|
| 71 | + { |
---|
| 72 | + ImageIcon icon = GetIcon(name); |
---|
| 73 | + return new cCheckBox(icon, border); |
---|
| 74 | + } |
---|
| 75 | + catch (Exception e) |
---|
| 76 | + { |
---|
| 77 | + return new cCheckBox(name, border); |
---|
| 78 | + } |
---|
| 79 | + } |
---|
| 80 | + |
---|
| 81 | + private ImageIcon GetIcon(String name) throws IOException |
---|
| 82 | + { |
---|
| 83 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 84 | + |
---|
| 85 | + if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 86 | + { |
---|
| 87 | + BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
| 88 | + Graphics2D g = resized.createGraphics(); |
---|
| 89 | + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 90 | + //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 91 | + g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 92 | + g.dispose(); |
---|
| 93 | + |
---|
| 94 | + image = resized; |
---|
| 95 | + } |
---|
| 96 | + |
---|
| 97 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 98 | + return icon; |
---|
| 99 | + } |
---|
| 100 | + |
---|
32 | 101 | // SCRIPT |
---|
33 | 102 | |
---|
34 | 103 | transient JFrame textpanel = null; |
---|
.. | .. |
---|
119 | 188 | void keyPressed(int key, int modifiers) |
---|
120 | 189 | { |
---|
121 | 190 | System.out.println("KEY PRESSED"); |
---|
122 | | - CameraPane.theRenderer.keyPressed(key, modifiers); |
---|
| 191 | + Globals.theRenderer.keyPressed(key, modifiers); |
---|
123 | 192 | } |
---|
124 | 193 | */ |
---|
125 | 194 | |
---|
126 | 195 | static GridBagConstraints aConstraints; |
---|
127 | 196 | static GridBagConstraints aWindowConstraints; |
---|
128 | | - GroupEditor callee; |
---|
129 | | - JFrame frame; |
---|
| 197 | + |
---|
130 | 198 | static int GRIDWIDTH = 100; // 4; |
---|
131 | 199 | |
---|
132 | 200 | public void closeUI() |
---|
133 | 201 | { |
---|
134 | 202 | //new Exception().printStackTrace(); |
---|
135 | | - System.out.println("this = " + this); |
---|
136 | | - System.out.println("objEditor = " + objEditor); |
---|
| 203 | +// System.out.println("this = " + this); |
---|
| 204 | +// System.out.println("objEditor = " + objEditor); |
---|
137 | 205 | //nameField.removeActionListener(this); |
---|
138 | | - objEditor.ctrlPanel.remove(nameField); |
---|
| 206 | +// objEditor.ctrlPanel.remove(nameField); |
---|
139 | 207 | |
---|
140 | | - if (!GroupEditor.allparams) |
---|
| 208 | + objEditor.ctrlPanel.remove(namePanel); |
---|
| 209 | + |
---|
| 210 | + if (!allparams) |
---|
141 | 211 | return; |
---|
142 | 212 | |
---|
143 | | - objEditor.ctrlPanel.remove(liveCB); |
---|
144 | | - objEditor.ctrlPanel.remove(hideCB); |
---|
145 | | - objEditor.ctrlPanel.remove(markCB); |
---|
146 | | - |
---|
147 | | - objEditor.ctrlPanel.remove(randomCB); |
---|
148 | | - objEditor.ctrlPanel.remove(speedupCB); |
---|
149 | | - objEditor.ctrlPanel.remove(rewindCB); |
---|
150 | | - |
---|
151 | | - objEditor.ctrlPanel.remove(resetButton); |
---|
152 | | - objEditor.ctrlPanel.remove(stepButton); |
---|
153 | | -// objEditor.ctrlPanel.remove(stepAllButton); |
---|
154 | | -// objEditor.ctrlPanel.remove(resetAllButton); |
---|
155 | | - objEditor.ctrlPanel.remove(link2masterCB); |
---|
156 | | - //objEditor.ctrlPanel.remove(flipVCB); |
---|
157 | | - //objEditor.ctrlPanel.remove(texresMenu); |
---|
158 | | - objEditor.ctrlPanel.remove(slowerButton); |
---|
159 | | - objEditor.ctrlPanel.remove(fasterButton); |
---|
160 | | - objEditor.ctrlPanel.remove(remarkButton); |
---|
| 213 | +// objEditor.ctrlPanel.remove(liveCB); |
---|
| 214 | +// objEditor.ctrlPanel.remove(hideCB); |
---|
| 215 | +// objEditor.ctrlPanel.remove(markCB); |
---|
| 216 | +// |
---|
| 217 | +// objEditor.ctrlPanel.remove(randomCB); |
---|
| 218 | +// objEditor.ctrlPanel.remove(speedupCB); |
---|
| 219 | +// objEditor.ctrlPanel.remove(rewindCB); |
---|
| 220 | +// |
---|
| 221 | +// objEditor.ctrlPanel.remove(resetButton); |
---|
| 222 | +// objEditor.ctrlPanel.remove(stepButton); |
---|
| 223 | +//// objEditor.ctrlPanel.remove(stepAllButton); |
---|
| 224 | +//// objEditor.ctrlPanel.remove(resetAllButton); |
---|
| 225 | +// objEditor.ctrlPanel.remove(link2masterCB); |
---|
| 226 | +// //objEditor.ctrlPanel.remove(flipVCB); |
---|
| 227 | +// //objEditor.ctrlPanel.remove(texresMenu); |
---|
| 228 | +// objEditor.ctrlPanel.remove(slowerButton); |
---|
| 229 | +// objEditor.ctrlPanel.remove(fasterButton); |
---|
| 230 | +// objEditor.ctrlPanel.remove(remarkButton); |
---|
| 231 | + |
---|
| 232 | + objEditor.ctrlPanel.remove(setupPanel); |
---|
| 233 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
| 234 | + objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
| 235 | + objEditor.ctrlPanel.remove(pushPanel); |
---|
| 236 | + //objEditor.ctrlPanel.remove(fillPanel); |
---|
| 237 | + |
---|
| 238 | + //Remove(normalpushField); |
---|
161 | 239 | } |
---|
162 | 240 | |
---|
163 | 241 | public ObjEditor GetEditor() |
---|
164 | 242 | { |
---|
165 | 243 | return objEditor; //.GetEditor(); |
---|
166 | 244 | } |
---|
| 245 | + |
---|
| 246 | + // Sometimes myself, sometimes my callee's. |
---|
167 | 247 | ObjEditor objEditor; |
---|
168 | 248 | |
---|
169 | 249 | /* |
---|
.. | .. |
---|
226 | 306 | //localCopy.parent = null; |
---|
227 | 307 | |
---|
228 | 308 | frame = new JFrame(); |
---|
| 309 | + frame.setUndecorated(true); |
---|
229 | 310 | objEditor = this; |
---|
230 | 311 | this.callee = callee; |
---|
231 | 312 | |
---|
.. | .. |
---|
238 | 319 | //if (!isDisplayable()) |
---|
239 | 320 | //setUndecorated(true); |
---|
240 | 321 | |
---|
241 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 322 | + //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
242 | 323 | client = inClient; |
---|
243 | 324 | copy = localCopy; |
---|
244 | 325 | copy.editWindow = this; |
---|
.. | .. |
---|
256 | 337 | return frame.action(event, obj); |
---|
257 | 338 | } |
---|
258 | 339 | |
---|
| 340 | + // Cannot work without static |
---|
| 341 | + static boolean allparams = true; |
---|
| 342 | + |
---|
| 343 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 344 | + |
---|
259 | 345 | void SetupMenu() |
---|
260 | 346 | { |
---|
261 | 347 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
262 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
263 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
264 | | - windowMenu.add("-"); |
---|
265 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
266 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
| 348 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 349 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 350 | + fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 351 | + |
---|
| 352 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 353 | + Menu menu = new Menu("Import"); |
---|
| 354 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 355 | + importOBJItem.addActionListener(this); |
---|
| 356 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 357 | + import3DSItem.addActionListener(this); |
---|
| 358 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 359 | + importVRMLX3DItem.addActionListener(this); |
---|
| 360 | + menu.add("-"); |
---|
| 361 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 362 | + importGFDItem.addActionListener(this); |
---|
| 363 | + fileMenu.add(menu); |
---|
| 364 | + fileMenu.add("-"); |
---|
| 365 | + |
---|
| 366 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 367 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
267 | 368 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
268 | | - windowMenu.add("-"); |
---|
269 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
270 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
271 | | - windowMenu.add("-"); |
---|
| 369 | + fileMenu.add("-"); |
---|
| 370 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 371 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 372 | + fileMenu.add("-"); |
---|
272 | 373 | if (client.parent != null) |
---|
273 | 374 | { |
---|
274 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 375 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
275 | 376 | } else |
---|
276 | 377 | { |
---|
277 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 378 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
278 | 379 | } |
---|
279 | 380 | |
---|
| 381 | + newItem.addActionListener(this); |
---|
280 | 382 | loadItem.addActionListener(this); |
---|
281 | 383 | saveItem.addActionListener(this); |
---|
282 | 384 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
285 | 387 | //povItem.addActionListener(this); |
---|
286 | 388 | closeItem.addActionListener(this); |
---|
287 | 389 | |
---|
288 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
289 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
290 | | - //zBufferItem.addActionListener(this); |
---|
291 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
292 | | - //normalLensItem.addActionListener(this); |
---|
293 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
294 | | - revertCameraItem.addActionListener(this); |
---|
295 | | - cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen")); |
---|
296 | | - toggleFullItem.addItemListener(this); |
---|
297 | | - toggleFullItem.setState(CameraPane.FULLSCREEN); |
---|
298 | | - cameraMenu.add("-"); |
---|
299 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
300 | | - toggleTextureItem.addItemListener(this); |
---|
301 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
302 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
303 | | - toggleLiveItem.addItemListener(this); |
---|
304 | | - toggleLiveItem.setState(CameraPane.isLIVE()); |
---|
305 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
306 | | - stepItem.addActionListener(this); |
---|
307 | | -// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
308 | | -// toggleDLItem.addItemListener(this); |
---|
309 | | -// toggleDLItem.setState(false); |
---|
310 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
311 | | - toggleRenderItem.addItemListener(this); |
---|
312 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
313 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
314 | | - toggleDebugItem.addItemListener(this); |
---|
315 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
316 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
317 | | - toggleFrustumItem.addItemListener(this); |
---|
318 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
319 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
320 | | - toggleFootContactItem.addItemListener(this); |
---|
321 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
322 | | - cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random")); |
---|
323 | | - toggleRandomItem.addItemListener(this); |
---|
324 | | - toggleRandomItem.setState(CameraPane.RANDOM); |
---|
325 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
326 | | - toggleHandleItem.addItemListener(this); |
---|
327 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
328 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
329 | | - togglePaintItem.addItemListener(this); |
---|
330 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
331 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
332 | | -// toggleRootItem.addItemListener(this); |
---|
333 | | -// toggleRootItem.setState(false); |
---|
334 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
335 | | -// animationItem.addItemListener(this); |
---|
336 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
337 | | - cameraMenu.add("-"); |
---|
338 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
339 | | - editCameraItem.addActionListener(this); |
---|
340 | | - |
---|
341 | 390 | objectPanel = new JTabbedPane(); |
---|
| 391 | + |
---|
| 392 | + ChangeListener changeListener = new ChangeListener() |
---|
| 393 | + { |
---|
| 394 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 395 | + { |
---|
| 396 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 397 | +// { |
---|
| 398 | +// if (latestObject != null) |
---|
| 399 | +// { |
---|
| 400 | +// refreshContents(true); |
---|
| 401 | +// SetMaterial(latestObject); |
---|
| 402 | +// } |
---|
| 403 | +// |
---|
| 404 | +// materialFlushed = true; |
---|
| 405 | +// } |
---|
| 406 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 407 | +// { |
---|
| 408 | +// if (listUI.size() == 0) |
---|
| 409 | +// EditSelection(false); |
---|
| 410 | +// } |
---|
| 411 | + |
---|
| 412 | + refreshContents(false); // To refresh Info tab |
---|
| 413 | + } |
---|
| 414 | + }; |
---|
| 415 | + objectPanel.addChangeListener(changeListener); |
---|
| 416 | + |
---|
342 | 417 | toolbarPanel = new JPanel(); |
---|
343 | 418 | toolbarPanel.setName("Toolbar"); |
---|
344 | | - treePanel = new JPanel(); |
---|
| 419 | + treePanel = new cGridBag(); |
---|
345 | 420 | treePanel.setName("Tree"); |
---|
346 | | - ctrlPanel = new JPanel(); // new GridBagLayout()); |
---|
347 | | - ctrlPanel.setName("Edit"); |
---|
348 | | - materialPanel = new JPanel(); |
---|
| 421 | + |
---|
| 422 | + editPanel = new cGridBag().setVertical(true); |
---|
| 423 | + editPanel.setName("Edit"); |
---|
| 424 | + |
---|
| 425 | + ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
| 426 | + |
---|
| 427 | + editCommandsPanel = new cGridBag(); |
---|
| 428 | + editPanel.add(editCommandsPanel); |
---|
| 429 | + editPanel.add(ctrlPanel); |
---|
| 430 | + |
---|
| 431 | + toolboxPanel = new cGridBag().setVertical(false); |
---|
| 432 | + toolboxPanel.setName("Toolbox"); |
---|
| 433 | + |
---|
| 434 | + materialPanel = new cGridBag().setVertical(true); |
---|
349 | 435 | materialPanel.setName("Material"); |
---|
| 436 | + |
---|
350 | 437 | /*JTextPane*/ |
---|
351 | 438 | infoarea = createTextPane(); |
---|
| 439 | + doc = infoarea.getStyledDocument(); |
---|
| 440 | + |
---|
352 | 441 | infoarea.setEditable(true); |
---|
353 | 442 | SetText(); |
---|
354 | 443 | // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f)); |
---|
355 | 444 | // infoarea.setOpaque(false); |
---|
356 | 445 | // //infoarea.setForeground(textcolor); |
---|
357 | | - infoarea.setLineWrap(true); |
---|
358 | | - infoarea.setWrapStyleWord(true); |
---|
| 446 | +// TEXTAREA infoarea.setLineWrap(true); |
---|
| 447 | +// TEXTAREA infoarea.setWrapStyleWord(true); |
---|
359 | 448 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
360 | 449 | infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
361 | 450 | infoPanel.setName("Info"); |
---|
.. | .. |
---|
366 | 455 | mainPanel.setName("Main"); |
---|
367 | 456 | mainPanel.setContinuousLayout(true); |
---|
368 | 457 | mainPanel.setOneTouchExpandable(true); |
---|
369 | | - mainPanel.setDividerLocation(1.0); |
---|
370 | 458 | mainPanel.setDividerSize(9); |
---|
371 | | - mainPanel.setResizeWeight(0); |
---|
| 459 | + mainPanel.setDividerLocation(0.5); //1.0); |
---|
| 460 | + mainPanel.setResizeWeight(0.5); |
---|
372 | 461 | |
---|
373 | 462 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
374 | 463 | //mainPanel.setLayout(new GridBagLayout()); |
---|
375 | 464 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
376 | | - treePanel.setLayout(new GridBagLayout()); |
---|
377 | | - ctrlPanel.setLayout(new GridBagLayout()); |
---|
378 | | - materialPanel.setLayout(new GridBagLayout()); |
---|
| 465 | +// treePanel.setLayout(new GridBagLayout()); |
---|
| 466 | + //ctrlPanel.setLayout(new GridBagLayout()); |
---|
| 467 | + //materialPanel.setLayout(new GridBagLayout()); |
---|
379 | 468 | |
---|
380 | 469 | aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, |
---|
381 | 470 | GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new Insets(1, 1, 1, 1), 0, 0); |
---|
.. | .. |
---|
414 | 503 | static String newline = "\n"; |
---|
415 | 504 | protected static final String buttonString = "JButton"; |
---|
416 | 505 | StyledDocument doc; |
---|
417 | | - JTextArea infoarea; |
---|
| 506 | + JTextPane infoarea; |
---|
418 | 507 | |
---|
419 | 508 | void ClearInfo() |
---|
420 | 509 | { |
---|
.. | .. |
---|
437 | 526 | e.printStackTrace(); |
---|
438 | 527 | } |
---|
439 | 528 | |
---|
440 | | - String selection = infoarea.getText(); |
---|
441 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
442 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
443 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 529 | +// String selection = infoarea.getText(); |
---|
| 530 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 531 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 532 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
444 | 533 | //clipboard.setContents(data, data); |
---|
445 | 534 | } |
---|
446 | 535 | |
---|
.. | .. |
---|
463 | 552 | //SendInfo("Name:", "bold"); |
---|
464 | 553 | if (sel.GetTextures() != null || debug) |
---|
465 | 554 | { |
---|
466 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 555 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
467 | 556 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
468 | 557 | if (sel.Size() > 0) |
---|
469 | 558 | { |
---|
470 | 559 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
471 | 560 | } |
---|
472 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 561 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
473 | 562 | if (debug) |
---|
474 | 563 | { |
---|
475 | 564 | try |
---|
.. | .. |
---|
481 | 570 | } |
---|
482 | 571 | |
---|
483 | 572 | if (full) |
---|
484 | | - si.SendInfo(" BBox: " + minima + " - " + maxima, "regular"); |
---|
| 573 | + { |
---|
| 574 | + si.SendInfo(" BBox min: " + minima, "regular"); |
---|
| 575 | + si.SendInfo(" BBox max: " + maxima, "regular"); |
---|
| 576 | + } |
---|
485 | 577 | |
---|
486 | 578 | if (sel.bRep != null) |
---|
487 | 579 | { |
---|
.. | .. |
---|
508 | 600 | } |
---|
509 | 601 | if (sel.support != null) |
---|
510 | 602 | { |
---|
511 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 603 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
512 | 604 | } |
---|
513 | 605 | if (sel.scriptnode != null) |
---|
514 | 606 | { |
---|
.. | .. |
---|
579 | 671 | { |
---|
580 | 672 | CameraPane.pointflow = (PointFlow) sel; |
---|
581 | 673 | } |
---|
| 674 | + |
---|
| 675 | + si.SendInfo("_____________________", "regular"); |
---|
| 676 | + si.SendInfo("", "regular"); |
---|
582 | 677 | } |
---|
583 | 678 | } |
---|
584 | 679 | |
---|
.. | .. |
---|
594 | 689 | } |
---|
595 | 690 | } |
---|
596 | 691 | |
---|
597 | | - private JTextArea createTextPane() |
---|
598 | | - { |
---|
599 | | - String[] initString = |
---|
600 | | - { |
---|
601 | | - "This is an editable JTextPane, ", //regular |
---|
602 | | - "another ", //italic |
---|
603 | | - "styled ", //bold |
---|
604 | | - "text ", //small |
---|
605 | | - "component, ", //large |
---|
606 | | - "which supports embedded components..." + newline,//regular |
---|
607 | | - " " + newline, //button |
---|
608 | | - "...and embedded icons..." + newline, //regular |
---|
609 | | - " ", //icon |
---|
610 | | - newline + "JTextPane is a subclass of JEditorPane that " |
---|
611 | | - + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
612 | | - + "cover methods for interacting with those objects." |
---|
613 | | - }; |
---|
| 692 | +static GraphicsDevice device = GraphicsEnvironment |
---|
| 693 | + .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
614 | 694 | |
---|
615 | | - String[] initStyles = |
---|
616 | | - { |
---|
617 | | - "regular", "italic", "bold", "small", "large", |
---|
618 | | - "regular", "button", "regular", "icon", |
---|
619 | | - "regular" |
---|
620 | | - }; |
---|
| 695 | + Rectangle keeprect; |
---|
| 696 | + cRadio radio; |
---|
| 697 | + |
---|
| 698 | +cButton keepButton; |
---|
| 699 | + cButton twoButton; // Full 3D |
---|
| 700 | + cButton sixButton; |
---|
| 701 | + cButton threeButton; |
---|
| 702 | + cButton sevenButton; |
---|
| 703 | + cButton fourButton; // full panel |
---|
| 704 | + cButton oneButton; // full XYZ |
---|
| 705 | + //cButton currentLayout; |
---|
| 706 | + |
---|
| 707 | + boolean maximized; |
---|
| 708 | + |
---|
| 709 | + cButton fullscreenLayout; |
---|
621 | 710 | |
---|
622 | | - JTextPane textPane = new JTextPane(); |
---|
623 | | - textPane.setEditable(true); |
---|
624 | | - /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
625 | | - addStylesToDocument(doc); |
---|
626 | | - |
---|
627 | | - try |
---|
| 711 | + void Minimize() |
---|
628 | 712 | { |
---|
629 | | - for (int j = 0; j < 2; j++) |
---|
| 713 | + frame.setState(Frame.ICONIFIED); |
---|
| 714 | + } |
---|
| 715 | + |
---|
| 716 | + void Maximize() |
---|
| 717 | + { |
---|
| 718 | + if (maximized) |
---|
630 | 719 | { |
---|
631 | | - for (int i = 0; i < initString.length; i++) |
---|
632 | | - { |
---|
633 | | - doc.insertString(doc.getLength(), initString[i], |
---|
634 | | - doc.getStyle(initStyles[i])); |
---|
635 | | - } |
---|
| 720 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
636 | 721 | } |
---|
637 | | - } catch (BadLocationException ble) |
---|
| 722 | + else |
---|
| 723 | + { |
---|
| 724 | + keeprect = frame.getBounds(); |
---|
| 725 | + Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 726 | + Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 727 | + frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 728 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 729 | + } |
---|
| 730 | + |
---|
| 731 | + maximized ^= true; |
---|
| 732 | + } |
---|
| 733 | + |
---|
| 734 | + void ToggleFullScreen() |
---|
638 | 735 | { |
---|
639 | | - System.err.println("Couldn't insert initial text into text pane."); |
---|
| 736 | + cameraView.ToggleFullScreen(); |
---|
| 737 | + |
---|
| 738 | + if (!CameraPane.FULLSCREEN) |
---|
| 739 | + { |
---|
| 740 | + device.setFullScreenWindow(null); |
---|
| 741 | + //frame.setVisible(false); |
---|
| 742 | +// frame.removeNotify(); |
---|
| 743 | +// frame.setUndecorated(false); |
---|
| 744 | +// frame.addNotify(); |
---|
| 745 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 746 | + |
---|
| 747 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 748 | +// X framePanel.add(bigThree); |
---|
| 749 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 750 | + framePanel.setDividerLocation(1); |
---|
| 751 | + |
---|
| 752 | + //frame.setVisible(true); |
---|
| 753 | + radio.layout = keepButton; |
---|
| 754 | + //theFrame = null; |
---|
| 755 | + keepButton = null; |
---|
| 756 | + radio.layout.doClick(); |
---|
| 757 | + |
---|
| 758 | + } else |
---|
| 759 | + { |
---|
| 760 | + keepButton = radio.layout; |
---|
| 761 | + //keeprect = frame.getBounds(); |
---|
| 762 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 763 | +// frame.getToolkit().getScreenSize().height); |
---|
| 764 | + //frame.setVisible(false); |
---|
| 765 | + device.setFullScreenWindow(frame); |
---|
| 766 | +// frame.removeNotify(); |
---|
| 767 | +// frame.setUndecorated(true); |
---|
| 768 | +// frame.addNotify(); |
---|
| 769 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 770 | +// X framePanel.remove(bigThree); |
---|
| 771 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 772 | + framePanel.setDividerLocation(0); |
---|
| 773 | + |
---|
| 774 | + radio.layout = fullscreenLayout; |
---|
| 775 | + radio.layout.doClick(); |
---|
| 776 | + //frame.setVisible(true); |
---|
| 777 | + } |
---|
640 | 778 | } |
---|
641 | 779 | |
---|
642 | | - return new JTextArea(); // textPane; |
---|
| 780 | + private JTextPane createTextPane() |
---|
| 781 | + { |
---|
| 782 | +// TEXTAREA String[] initString = |
---|
| 783 | +// { |
---|
| 784 | +// "This is an editable JTextPane, ", //regular |
---|
| 785 | +// "another ", //italic |
---|
| 786 | +// "styled ", //bold |
---|
| 787 | +// "text ", //small |
---|
| 788 | +// "component, ", //large |
---|
| 789 | +// "which supports embedded components..." + newline,//regular |
---|
| 790 | +// " " + newline, //button |
---|
| 791 | +// "...and embedded icons..." + newline, //regular |
---|
| 792 | +// " ", //icon |
---|
| 793 | +// newline + "JTextPane is a subclass of JEditorPane that " |
---|
| 794 | +// + "uses a StyledEditorKit and StyledDocument, and provides " |
---|
| 795 | +// + "cover methods for interacting with those objects." |
---|
| 796 | +// }; |
---|
| 797 | +// |
---|
| 798 | +// String[] initStyles = |
---|
| 799 | +// { |
---|
| 800 | +// "regular", "italic", "bold", "small", "large", |
---|
| 801 | +// "regular", "button", "regular", "icon", |
---|
| 802 | +// "regular" |
---|
| 803 | +// }; |
---|
| 804 | +// |
---|
| 805 | +// JTextPane textPane = new JTextPane(); |
---|
| 806 | +// textPane.setEditable(true); |
---|
| 807 | +// /*StyledDocument*/ doc = textPane.getStyledDocument(); |
---|
| 808 | +// addStylesToDocument(doc); |
---|
| 809 | +// |
---|
| 810 | +// try |
---|
| 811 | +// { |
---|
| 812 | +// for (int j = 0; j < 2; j++) |
---|
| 813 | +// { |
---|
| 814 | +// for (int i = 0; i < initString.length; i++) |
---|
| 815 | +// { |
---|
| 816 | +// doc.insertString(doc.getLength(), initString[i], |
---|
| 817 | +// doc.getStyle(initStyles[i])); |
---|
| 818 | +// } |
---|
| 819 | +// } |
---|
| 820 | +// } catch (BadLocationException ble) |
---|
| 821 | +// { |
---|
| 822 | +// System.err.println("Couldn't insert initial text into text pane."); |
---|
| 823 | +// } |
---|
| 824 | + |
---|
| 825 | + return new JTextPane(); // textPane; |
---|
643 | 826 | } |
---|
644 | 827 | |
---|
645 | 828 | protected void addStylesToDocument(StyledDocument doc) |
---|
.. | .. |
---|
692 | 875 | protected static ImageIcon createImageIcon(String path, |
---|
693 | 876 | String description) |
---|
694 | 877 | { |
---|
695 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 878 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
696 | 879 | if (imgURL != null) |
---|
697 | 880 | { |
---|
698 | 881 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
724 | 907 | // NumberSlider vDivsField; |
---|
725 | 908 | // JCheckBox endcaps; |
---|
726 | 909 | JCheckBox liveCB; |
---|
| 910 | + JCheckBox selectCB; |
---|
727 | 911 | JCheckBox hideCB; |
---|
728 | 912 | JCheckBox link2masterCB; |
---|
729 | 913 | JCheckBox markCB; |
---|
.. | .. |
---|
731 | 915 | JCheckBox speedupCB; |
---|
732 | 916 | JCheckBox rewindCB; |
---|
733 | 917 | JCheckBox flipVCB; |
---|
| 918 | + |
---|
| 919 | + cCheckBox toggleTextureCB; |
---|
| 920 | + cCheckBox toggleSwitchCB; |
---|
| 921 | + |
---|
734 | 922 | JComboBox texresMenu; |
---|
| 923 | + |
---|
735 | 924 | JButton resetButton; |
---|
736 | 925 | JButton stepButton; |
---|
737 | 926 | JButton stepAllButton; |
---|
.. | .. |
---|
739 | 928 | JButton slowerButton; |
---|
740 | 929 | JButton fasterButton; |
---|
741 | 930 | JButton remarkButton; |
---|
| 931 | + |
---|
| 932 | + cGridBag editPanel; |
---|
| 933 | + cGridBag editCommandsPanel; |
---|
| 934 | + |
---|
| 935 | + cGridBag namePanel; |
---|
| 936 | + cGridBag setupPanel; |
---|
| 937 | + cGridBag setupPanel2; |
---|
| 938 | + cGridBag objectCommandsPanel; |
---|
| 939 | + cGridBag pushPanel; |
---|
| 940 | + cGridBag fillPanel; |
---|
742 | 941 | |
---|
743 | | - JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on) |
---|
| 942 | + JCheckBox AddCheckBox(cGridBag panel, String label, boolean on) |
---|
744 | 943 | { |
---|
745 | 944 | JCheckBox cb; |
---|
746 | 945 | |
---|
747 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
748 | | - oe.aConstraints.gridwidth = 1; // 3; |
---|
749 | | -// oe.aConstraints.weightx = 1; |
---|
750 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
751 | | - oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 946 | + panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
752 | 947 | cb.addItemListener(this); |
---|
753 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
754 | | - oe.aConstraints.gridwidth = 1; |
---|
755 | | - oe.aConstraints.gridx += 1; |
---|
756 | 948 | |
---|
757 | 949 | return cb; |
---|
758 | 950 | } |
---|
759 | 951 | |
---|
760 | | - cButton AddButton(ObjEditor oe, String label) |
---|
| 952 | + cButton AddButton(cGridBag panel, String label) |
---|
761 | 953 | { |
---|
762 | 954 | cButton cb; |
---|
763 | 955 | |
---|
764 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
765 | | - oe.aConstraints.gridwidth = 1; |
---|
766 | | -// oe.aConstraints.weightx = 1; |
---|
767 | | -// oe.aConstraints.anchor = GridBagConstraints.WEST; |
---|
768 | | - oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
| 956 | + panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1); |
---|
769 | 957 | cb.addActionListener(this); |
---|
770 | | -// oe.aConstraints.anchor = GridBagConstraints.EAST; |
---|
771 | | - oe.aConstraints.gridwidth = 1; |
---|
772 | | - oe.aConstraints.gridx += 1; |
---|
773 | 958 | |
---|
774 | 959 | return cb; |
---|
775 | 960 | } |
---|
776 | 961 | |
---|
777 | | - JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item) |
---|
| 962 | + JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item) |
---|
778 | 963 | { |
---|
779 | 964 | JComboBox combo; |
---|
780 | 965 | |
---|
781 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
782 | | - oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
783 | | - oe.aConstraints.gridx += 1; |
---|
| 966 | + panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
784 | 967 | combo.addActionListener(this); |
---|
785 | 968 | |
---|
786 | 969 | return combo; |
---|
787 | 970 | } |
---|
788 | 971 | |
---|
789 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, double min, double max, double current, double pow) |
---|
| 972 | + cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow) |
---|
790 | 973 | { |
---|
791 | | - NumberSlider combo; |
---|
| 974 | + cGridBag control = new cGridBag(); |
---|
| 975 | + |
---|
| 976 | + cNumberSlider combo; |
---|
792 | 977 | |
---|
793 | 978 | JLabel jlabel = new JLabel(label); |
---|
794 | | - |
---|
795 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
796 | 979 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
797 | | - aConstraints.gridwidth = 2; |
---|
798 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
799 | | - aConstraints.gridx += 1; |
---|
800 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
801 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
802 | | - ctrlPanel.add(combo = new NumberSlider(min, max, pow), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
803 | | - aConstraints.gridx += 1; |
---|
804 | | - aConstraints.gridwidth = 1; |
---|
805 | | - |
---|
| 980 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 981 | + control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
806 | 982 | combo.setFloat(current); |
---|
807 | | - |
---|
808 | | - combo.label = jlabel; |
---|
809 | | - |
---|
810 | | - combo.addChangeListener(this); |
---|
811 | | - |
---|
812 | | - return combo; |
---|
| 983 | + |
---|
| 984 | + panel.add(control); |
---|
| 985 | + |
---|
| 986 | + return control; |
---|
813 | 987 | } |
---|
814 | 988 | |
---|
815 | | - NumberSlider AddSlider(JPanel ctrlPanel, String label, int min, int max, int current) |
---|
| 989 | + cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current) |
---|
816 | 990 | { |
---|
817 | | - NumberSlider combo; |
---|
| 991 | + cGridBag control = new cGridBag(); |
---|
| 992 | + |
---|
| 993 | + cNumberSlider combo; |
---|
818 | 994 | |
---|
819 | 995 | JLabel jlabel = new JLabel(label); |
---|
820 | | - |
---|
821 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
822 | 996 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
823 | | - aConstraints.gridwidth = 2; |
---|
824 | | - ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
825 | | - aConstraints.gridx += 1; |
---|
826 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
827 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
828 | | - ctrlPanel.add(combo = new NumberSlider(min, max), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
829 | | - aConstraints.gridx += 1; |
---|
830 | | - aConstraints.gridwidth = 1; |
---|
831 | | - |
---|
| 997 | + control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 998 | + control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
832 | 999 | combo.setInteger(current); |
---|
833 | 1000 | |
---|
834 | | - combo.label = jlabel; |
---|
835 | | - |
---|
836 | | - combo.addChangeListener(this); |
---|
837 | | - |
---|
838 | | - return combo; |
---|
| 1001 | + panel.add(control); |
---|
| 1002 | + |
---|
| 1003 | + return control; |
---|
839 | 1004 | } |
---|
840 | 1005 | |
---|
841 | | - JTextArea AddText(JPanel ctrlPanel, String name) |
---|
| 1006 | + JTextArea AddText(cGridBag ctrlPanel, String name) |
---|
842 | 1007 | { |
---|
843 | 1008 | JTextArea text; |
---|
844 | 1009 | |
---|
845 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
846 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
847 | | - ctrlPanel.add(text = new JTextArea(name), aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
| 1010 | + ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
848 | 1011 | text.addCaretListener(this); |
---|
849 | | - aConstraints.gridx += 1; |
---|
850 | | - aConstraints.gridwidth = 1; |
---|
851 | 1012 | |
---|
852 | 1013 | return text; |
---|
853 | 1014 | } |
---|
.. | .. |
---|
877 | 1038 | objEditor.ctrlPanel.remove(j); |
---|
878 | 1039 | } |
---|
879 | 1040 | |
---|
| 1041 | + void Remove(cNumberSlider j) |
---|
| 1042 | + { |
---|
| 1043 | + j.removeChangeListener(this); |
---|
| 1044 | + //objEditor.ctrlPanel.remove(j.label); |
---|
| 1045 | + objEditor.ctrlPanel.remove(j); |
---|
| 1046 | + } |
---|
| 1047 | + |
---|
880 | 1048 | /* |
---|
881 | 1049 | */ |
---|
882 | | - void Return() // ObjEditor oe) |
---|
| 1050 | + void Return0() // ObjEditor oe) |
---|
883 | 1051 | { |
---|
884 | 1052 | aConstraints.gridy += 1; |
---|
885 | 1053 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
934 | 1102 | |
---|
935 | 1103 | void SetupUI2(ObjEditor oe) |
---|
936 | 1104 | { |
---|
937 | | -// oe.aConstraints.weightx = 0; |
---|
938 | | -// oe.aConstraints.weighty = 0; |
---|
939 | | -// oe.aConstraints.gridx = 0; |
---|
940 | | -// oe.aConstraints.gridy = 0; |
---|
941 | | - SetupName(oe); |
---|
| 1105 | + //SetupName(oe); |
---|
942 | 1106 | |
---|
943 | | - if (!GroupEditor.allparams) |
---|
| 1107 | + namePanel = new cGridBag(); |
---|
| 1108 | + |
---|
| 1109 | + nameField = AddText(namePanel, copy.GetName()); |
---|
| 1110 | + namePanel.add(nameField); |
---|
| 1111 | + oe.ctrlPanel.add(namePanel); |
---|
| 1112 | + |
---|
| 1113 | + oe.ctrlPanel.Return(); |
---|
| 1114 | + |
---|
| 1115 | + if (!allparams) |
---|
944 | 1116 | return; |
---|
945 | 1117 | |
---|
946 | | - liveCB = AddCheckBox(oe, "Live", copy.live); |
---|
947 | | - link2masterCB = AddCheckBox(oe, "Supp", copy.link2master); |
---|
948 | | - hideCB = AddCheckBox(oe, "Hide", copy.hide); |
---|
| 1118 | + setupPanel = new cGridBag().setVertical(false); |
---|
| 1119 | + |
---|
| 1120 | + liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
| 1121 | + liveCB.setToolTipText("Animate object"); |
---|
| 1122 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1123 | + selectCB.setToolTipText("Make object selectable"); |
---|
949 | 1124 | // Return(); |
---|
950 | | - markCB = AddCheckBox(oe, "Mark", copy.marked); |
---|
951 | | - rewindCB = AddCheckBox(oe, "Rew", copy.rewind); |
---|
952 | | - randomCB = AddCheckBox(oe, "Rand", copy.random); |
---|
953 | | - Return(); |
---|
954 | | - resetButton = AddButton(oe, "Reset"); |
---|
955 | | - stepButton = AddButton(oe, "Step"); |
---|
| 1125 | + hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
| 1126 | + hideCB.setToolTipText("Hide object"); |
---|
| 1127 | + markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
| 1128 | + markCB.setToolTipText("Set the animation target transform"); |
---|
| 1129 | + |
---|
| 1130 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1131 | + |
---|
| 1132 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
| 1133 | + rewindCB.setToolTipText("Rewind animation"); |
---|
| 1134 | + |
---|
| 1135 | + randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
| 1136 | + randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
| 1137 | + |
---|
| 1138 | + if (Globals.ADVANCED) |
---|
| 1139 | + { |
---|
| 1140 | + link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
| 1141 | + link2masterCB.setToolTipText("Attach to support"); |
---|
| 1142 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
| 1143 | + speedupCB.setToolTipText("Option motion capture"); |
---|
| 1144 | + } |
---|
| 1145 | + |
---|
| 1146 | + oe.ctrlPanel.add(setupPanel); |
---|
| 1147 | + oe.ctrlPanel.Return(); |
---|
| 1148 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1149 | + oe.ctrlPanel.Return(); |
---|
| 1150 | + |
---|
| 1151 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
| 1152 | + |
---|
| 1153 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
| 1154 | + resetButton.setToolTipText("Jump to frame zero"); |
---|
| 1155 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
| 1156 | + stepButton.setToolTipText("Step one frame"); |
---|
956 | 1157 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
957 | 1158 | // stepAllButton = AddButton(oe, "Step All"); |
---|
958 | | - speedupCB = AddCheckBox(oe, "Speed", copy.speedup); |
---|
959 | 1159 | // Return(); |
---|
960 | | - slowerButton = AddButton(oe, "Slow"); |
---|
961 | | - fasterButton = AddButton(oe, "Fast"); |
---|
962 | | - remarkButton = AddButton(oe, "Rem"); |
---|
| 1160 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
| 1161 | + slowerButton.setToolTipText("Decrease animation speed"); |
---|
| 1162 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
| 1163 | + fasterButton.setToolTipText("Increase animation speed"); |
---|
| 1164 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
| 1165 | + remarkButton.setToolTipText("Set the current transform as the target"); |
---|
963 | 1166 | |
---|
964 | | - Return(); |
---|
| 1167 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
| 1168 | + oe.ctrlPanel.Return(); |
---|
965 | 1169 | |
---|
| 1170 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
| 1171 | + normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
| 1172 | + //Return(); |
---|
| 1173 | + |
---|
| 1174 | + oe.ctrlPanel.Return(); |
---|
| 1175 | + |
---|
966 | 1176 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
967 | 1177 | // ObjEditor.aConstraints.gridx += 1; |
---|
968 | 1178 | |
---|
.. | .. |
---|
1056 | 1266 | oe.aConstraints.gridwidth = 1; |
---|
1057 | 1267 | /**/ |
---|
1058 | 1268 | nameField = AddText(oe.ctrlPanel, copy.GetName()); |
---|
1059 | | - Return(); |
---|
| 1269 | + oe.ctrlPanel.Return(); |
---|
1060 | 1270 | |
---|
1061 | 1271 | //ctrlPanel.add(textureButton = new Button("Texture...")); |
---|
1062 | 1272 | //textureButton.setEnabled(false); |
---|
.. | .. |
---|
1158 | 1368 | //JPanel worldPanel = |
---|
1159 | 1369 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1160 | 1370 | //worldPanel.setName("World"); |
---|
1161 | | - /*JPanel*/ cameraPanel = |
---|
1162 | | - new JPanel(new BorderLayout()); |
---|
1163 | | - cameraPanel.add(cameraView); |
---|
1164 | | - //new timeflow.app.TimeflowApp().TimeFlowWindow(cameraPanel, frame); |
---|
| 1371 | + centralPanel = new cGridBag(); |
---|
| 1372 | + centralPanel.preferredWidth = 20; |
---|
| 1373 | + |
---|
| 1374 | + if (Globals.ADVANCED) |
---|
| 1375 | + { |
---|
| 1376 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1377 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1165 | 1378 | |
---|
| 1379 | + cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
| 1380 | + cameraPanel.setContinuousLayout(true); |
---|
| 1381 | + cameraPanel.setOneTouchExpandable(true); |
---|
| 1382 | +// cameraPanel.setDividerLocation(0.9); |
---|
| 1383 | +// cameraPanel.setDividerSize(9); |
---|
| 1384 | + cameraPanel.setResizeWeight(1.0); |
---|
| 1385 | + |
---|
| 1386 | + } |
---|
| 1387 | + |
---|
| 1388 | + centralPanel.add(cameraView); |
---|
| 1389 | + centralPanel.setFocusable(true); |
---|
| 1390 | + //frame.setJMenuBar(timelineMenubar); |
---|
| 1391 | + //centralPanel.add(timelinePanel); |
---|
| 1392 | + |
---|
1166 | 1393 | //topView.camera = ; |
---|
1167 | 1394 | //frontView.camera = new Camera(2); |
---|
1168 | 1395 | //sideView.camera = new Camera(3); |
---|
.. | .. |
---|
1178 | 1405 | //frontView.object = copy; |
---|
1179 | 1406 | //sideView.object = copy; |
---|
1180 | 1407 | |
---|
1181 | | - XYZPanel = new JPanel(); |
---|
1182 | | - XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
| 1408 | + XYZPanel = new cGridBag().setVertical(true); |
---|
| 1409 | + //XYZPanel.setLayout(new GridLayout(3, 1, 5, 5)); |
---|
1183 | 1410 | |
---|
1184 | | - XYZPanel.add(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
1185 | | - XYZPanel.add(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
1186 | | - XYZPanel.add(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
| 1411 | + XYZPanel.preferredWidth = 5; |
---|
| 1412 | + XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll); |
---|
| 1413 | + XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll); |
---|
| 1414 | + XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll); |
---|
1187 | 1415 | |
---|
1188 | 1416 | /* |
---|
1189 | 1417 | gridPanel = new JPanel(); //new BorderLayout()); |
---|
.. | .. |
---|
1192 | 1420 | gridPanel.add(cameraView); |
---|
1193 | 1421 | gridPanel.add(XYZPanel); |
---|
1194 | 1422 | */ |
---|
1195 | | - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout()); |
---|
| 1423 | + gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
1196 | 1424 | gridPanel.setContinuousLayout(true); |
---|
1197 | 1425 | gridPanel.setOneTouchExpandable(true); |
---|
1198 | 1426 | gridPanel.setDividerLocation(1.0); |
---|
.. | .. |
---|
1221 | 1449 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1222 | 1450 | //tmp.setName("Edit"); |
---|
1223 | 1451 | objectPanel.add(materialPanel); |
---|
1224 | | - JPanel north = new JPanel(new BorderLayout()); |
---|
1225 | | - north.setName("Edit"); |
---|
1226 | | - north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1227 | | - objectPanel.add(north); |
---|
| 1452 | +// JPanel north = new JPanel(new BorderLayout()); |
---|
| 1453 | +// north.setName("Edit"); |
---|
| 1454 | +// north.add(ctrlPanel, BorderLayout.NORTH); |
---|
| 1455 | +// objectPanel.add(north); |
---|
| 1456 | + objectPanel.add(editPanel); |
---|
1228 | 1457 | objectPanel.add(infoPanel); |
---|
| 1458 | + objectPanel.add(toolboxPanel); |
---|
1229 | 1459 | |
---|
1230 | 1460 | /* |
---|
1231 | 1461 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1234 | 1464 | aConstraints.gridy += 1; |
---|
1235 | 1465 | aConstraints.gridwidth = 1; |
---|
1236 | 1466 | mainPanel.add(objectPanel, aConstraints); |
---|
1237 | | - */ |
---|
| 1467 | + */ |
---|
1238 | 1468 | |
---|
1239 | 1469 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1240 | 1470 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1245 | 1475 | scrollpane.setWheelScrollingEnabled(true); |
---|
1246 | 1476 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1247 | 1477 | |
---|
1248 | | - /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
1249 | | - scenePanel.add(scrollpane); |
---|
| 1478 | + /*JTabbedPane*/ scenePanel = new cGridBag(); |
---|
| 1479 | + scenePanel.preferredWidth = 6; |
---|
| 1480 | + |
---|
| 1481 | + JTabbedPane tabbedPane = new JTabbedPane(); |
---|
| 1482 | + tabbedPane.add(scrollpane); |
---|
1250 | 1483 | |
---|
1251 | | - scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
1252 | | - |
---|
1253 | | - optionsPanel = new JPanel(new GridBagLayout()); |
---|
| 1484 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1254 | 1485 | |
---|
1255 | 1486 | optionsPanel.setName("Options"); |
---|
1256 | | - scenePanel.add(optionsPanel); |
---|
| 1487 | + |
---|
| 1488 | + AddOptions(optionsPanel); //, aConstraints); |
---|
| 1489 | + |
---|
| 1490 | + tabbedPane.add(optionsPanel); |
---|
| 1491 | + |
---|
| 1492 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1257 | 1493 | |
---|
| 1494 | + scenePanel.add(tabbedPane); |
---|
1258 | 1495 | |
---|
1259 | 1496 | /* |
---|
1260 | 1497 | cTree jTree = new cTree(null); |
---|
.. | .. |
---|
1288 | 1525 | //bigPanel.setSize(new Dimension(10,10)); |
---|
1289 | 1526 | //bigPanel.add(ctrlPanel); |
---|
1290 | 1527 | //bigPanel.add(gridPanel); |
---|
| 1528 | + /** |
---|
1291 | 1529 | bigThree = new JPanel(); |
---|
1292 | 1530 | //big.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
1293 | 1531 | bigThree.setLayout(new GridBagLayout()); //1,3,5,5)); |
---|
.. | .. |
---|
1304 | 1542 | // aConstraints.gridheight = 3; |
---|
1305 | 1543 | aWindowConstraints.gridx = 1; |
---|
1306 | 1544 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
1307 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 1545 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
1308 | 1546 | aWindowConstraints.weightx = 0; |
---|
1309 | 1547 | aWindowConstraints.gridx = 4; |
---|
1310 | 1548 | aWindowConstraints.gridwidth = 1; |
---|
1311 | 1549 | // aConstraints.gridheight = 3; |
---|
1312 | 1550 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1313 | 1551 | bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 1552 | + /**/ |
---|
1314 | 1553 | |
---|
| 1554 | + bigThree = new cGridBag(); |
---|
| 1555 | + bigThree.addComponent(scenePanel); |
---|
| 1556 | + bigThree.addComponent(centralPanel); |
---|
| 1557 | + bigThree.addComponent(XYZPanel); |
---|
| 1558 | + |
---|
1315 | 1559 | // // SIDE EFFECT!!! |
---|
1316 | 1560 | // aConstraints.gridx = 0; |
---|
1317 | 1561 | // aConstraints.gridy = 0; |
---|
.. | .. |
---|
1332 | 1576 | //worldPane.add(bigPanel); |
---|
1333 | 1577 | //worldPane.add(worldPanel); |
---|
1334 | 1578 | /**/ |
---|
1335 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1579 | + //frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 1580 | + frame.add(/*"Center",*/framePanel); |
---|
1336 | 1581 | //frame.getContentPane().add(/*"Center",*/ worldPane); |
---|
1337 | 1582 | |
---|
1338 | 1583 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1339 | 1584 | |
---|
1340 | | - frame.setSize(1024, 768); |
---|
1341 | | - frame.show(); |
---|
| 1585 | + frame.setSize(1280, 860); |
---|
| 1586 | + |
---|
| 1587 | + frame.validate(); |
---|
| 1588 | + frame.setVisible(true); |
---|
1342 | 1589 | |
---|
| 1590 | + cameraView.requestFocusInWindow(); |
---|
| 1591 | + |
---|
1343 | 1592 | gridPanel.setDividerLocation(1.0); |
---|
1344 | 1593 | |
---|
1345 | 1594 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
.. | .. |
---|
1353 | 1602 | }); |
---|
1354 | 1603 | } |
---|
1355 | 1604 | |
---|
| 1605 | + void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
| 1606 | + { |
---|
| 1607 | + } |
---|
| 1608 | + |
---|
1356 | 1609 | JTree GetTree() |
---|
1357 | 1610 | { |
---|
1358 | 1611 | return objEditor.jTree; |
---|
.. | .. |
---|
1364 | 1617 | ctrlPanel.removeAll(); |
---|
1365 | 1618 | } |
---|
1366 | 1619 | |
---|
1367 | | - void SetupMaterial(JPanel ctrlPanel) |
---|
| 1620 | + void SetupMaterial(cGridBag panel) |
---|
1368 | 1621 | { |
---|
1369 | | - aConstraints.weighty = 0; |
---|
1370 | | - //aConstraints.weightx = 1; |
---|
1371 | | - /* |
---|
| 1622 | + /* |
---|
1372 | 1623 | ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints); |
---|
1373 | 1624 | materialLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1374 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1375 | | - aConstraints.gridx += 1; |
---|
1376 | 1625 | */ |
---|
1377 | 1626 | |
---|
1378 | | - aConstraints.gridwidth = 1; |
---|
1379 | | - ctrlPanel.add(createMaterialButton = new cButton("Create"), aConstraints); |
---|
1380 | | - aConstraints.gridx += 1; |
---|
1381 | | - aConstraints.weighty = 0; |
---|
1382 | | - aConstraints.gridwidth = 1; |
---|
| 1627 | + cGridBag editBar = new cGridBag().setVertical(false); |
---|
| 1628 | + |
---|
| 1629 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1630 | + createMaterialButton.setToolTipText("Create material"); |
---|
1383 | 1631 | |
---|
1384 | 1632 | /* |
---|
1385 | 1633 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1386 | | - aConstraints.gridx += 1; |
---|
1387 | | - aConstraints.weighty = 0; |
---|
1388 | | - aConstraints.gridwidth = 1; |
---|
1389 | 1634 | */ |
---|
1390 | 1635 | |
---|
1391 | | - ctrlPanel.add(clearMaterialButton = new cButton("Clear"), aConstraints); |
---|
1392 | | - aConstraints.gridx += 1; |
---|
| 1636 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1637 | + clearMaterialButton.setToolTipText("Clear material"); |
---|
| 1638 | + |
---|
| 1639 | + if (Globals.ADVANCED) |
---|
| 1640 | + { |
---|
| 1641 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
| 1642 | + editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
| 1643 | + editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
| 1644 | + } |
---|
1393 | 1645 | |
---|
1394 | | - ctrlPanel.add(resetSlidersButton = new cButton("Reset"), aConstraints); |
---|
1395 | | - |
---|
1396 | | - aConstraints.gridx += 1; |
---|
1397 | | - |
---|
1398 | | - ctrlPanel.add(propagateToggle = new cCheckBox("Prop", propagate), aConstraints); |
---|
1399 | | - |
---|
1400 | | - aConstraints.gridx += 1; |
---|
1401 | | - |
---|
1402 | | - ctrlPanel.add(multiplyToggle = new cCheckBox("Mult", false), aConstraints); |
---|
1403 | | - |
---|
1404 | | - aConstraints.gridx = 0; |
---|
1405 | | - aConstraints.gridy += 1; |
---|
1406 | | - aConstraints.weighty = 0; |
---|
1407 | | - aConstraints.gridwidth = 1; |
---|
| 1646 | + editBar.preferredHeight = 15; |
---|
| 1647 | + |
---|
| 1648 | + panel.add(editBar); |
---|
| 1649 | + |
---|
1408 | 1650 | /**/ |
---|
1409 | 1651 | //aConstraints.weighty = 0; |
---|
1410 | 1652 | ////aConstraints.weightx = 1; |
---|
1411 | 1653 | //aConstraints.weighty = 1; |
---|
1412 | 1654 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1413 | 1655 | //aConstraints.gridx += 1; |
---|
1414 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1415 | | - aConstraints.weighty = 0; |
---|
1416 | | - aConstraints.gridx = 0; |
---|
1417 | | - aConstraints.gridy += 1; |
---|
1418 | | - aConstraints.gridwidth = 1; |
---|
| 1656 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1419 | 1657 | |
---|
1420 | | - ctrlPanel.add(colorLabel = new JLabel("Color/hue"), aConstraints); |
---|
1421 | | - colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1422 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1423 | | - aConstraints.gridx += 1; |
---|
1424 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1425 | | - //aConstraints.weightx = 0; |
---|
1426 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1427 | | - aConstraints.gridx = 0; |
---|
1428 | | - aConstraints.gridy += 1; |
---|
1429 | | - aConstraints.gridwidth = 1; |
---|
| 1658 | + cGridBag colorSection = new cGridBag().setVertical(true); |
---|
| 1659 | + |
---|
| 1660 | + cGridBag color = new cGridBag(); |
---|
| 1661 | + color.add(colorLabel = new JLabel("Color/hue")); // , aConstraints); |
---|
| 1662 | + colorLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1663 | + color.add(colorField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1664 | + //colorField.preferredWidth = 200; |
---|
| 1665 | + colorSection.add(color); |
---|
1430 | 1666 | |
---|
1431 | | - ctrlPanel.add(modulationLabel = new JLabel("Saturation"), aConstraints); |
---|
1432 | | - modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1433 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1434 | | - aConstraints.gridx += 1; |
---|
1435 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1436 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1437 | | - aConstraints.gridx = 0; |
---|
1438 | | - aConstraints.gridy += 1; |
---|
1439 | | - aConstraints.gridwidth = 1; |
---|
| 1667 | + cGridBag modulation = new cGridBag(); |
---|
| 1668 | + modulation.add(modulationLabel = new JLabel("Saturation")); // , aConstraints); |
---|
| 1669 | + modulationLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1670 | + modulation.add(modulationField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1671 | + colorSection.add(modulation); |
---|
1440 | 1672 | |
---|
1441 | | - ctrlPanel.add(textureLabel = new JLabel("Texture"), aConstraints); |
---|
1442 | | - textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1443 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1444 | | - aConstraints.gridx += 1; |
---|
1445 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1446 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1447 | | - aConstraints.gridx = 0; |
---|
1448 | | - aConstraints.gridy += 1; |
---|
1449 | | - aConstraints.gridwidth = 1; |
---|
| 1673 | + cGridBag texture = new cGridBag(); |
---|
| 1674 | + texture.add(textureLabel = new JLabel("Texture")); // , aConstraints); |
---|
| 1675 | + textureLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1676 | + texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1677 | + colorSection.add(texture); |
---|
1450 | 1678 | |
---|
1451 | | - ctrlPanel.add(anisoLabel = new JLabel("AnisoU"), aConstraints); |
---|
1452 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1453 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1454 | | - aConstraints.gridx += 1; |
---|
1455 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1456 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1457 | | - aConstraints.gridx = 0; |
---|
1458 | | - aConstraints.gridy += 1; |
---|
1459 | | - aConstraints.gridwidth = 1; |
---|
| 1679 | + cGridBag anisoU = new cGridBag(); |
---|
| 1680 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1681 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1682 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1683 | + colorSection.add(anisoU); |
---|
1460 | 1684 | |
---|
1461 | | - ctrlPanel.add(anisoVLabel = new JLabel("AnisoV"), aConstraints); |
---|
1462 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1463 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1464 | | - aConstraints.gridx += 1; |
---|
1465 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1466 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1467 | | - aConstraints.gridx = 0; |
---|
1468 | | - aConstraints.gridy += 1; |
---|
1469 | | - aConstraints.gridwidth = 1; |
---|
| 1685 | + cGridBag anisoV = new cGridBag(); |
---|
| 1686 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1687 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1688 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1689 | + colorSection.add(anisoV); |
---|
1470 | 1690 | |
---|
1471 | | - ctrlPanel.add(shadowbiasLabel = new JLabel("Shadowbias"), aConstraints); |
---|
1472 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1473 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1474 | | - aConstraints.gridx += 1; |
---|
1475 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1476 | | - ctrlPanel.add(shadowbiasField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1477 | | - aConstraints.gridx = 0; |
---|
1478 | | - aConstraints.gridy += 1; |
---|
1479 | | - aConstraints.gridwidth = 1; |
---|
| 1691 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1692 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1693 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1694 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1695 | + colorSection.add(shadowbias); |
---|
1480 | 1696 | |
---|
1481 | | - //aConstraints.weighty = 1; |
---|
1482 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1483 | | - //aConstraints.gridx += 1; |
---|
1484 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1485 | | - aConstraints.weighty = 0; |
---|
1486 | | - aConstraints.gridx = 0; |
---|
1487 | | - aConstraints.gridy += 1; |
---|
1488 | | - aConstraints.gridwidth = 1; |
---|
| 1697 | + panel.add(new JSeparator()); |
---|
| 1698 | + |
---|
| 1699 | + panel.add(colorSection); |
---|
| 1700 | + |
---|
| 1701 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1702 | + |
---|
| 1703 | + cGridBag diffuseSection = new cGridBag().setVertical(true); |
---|
| 1704 | + |
---|
| 1705 | + cGridBag diffuse = new cGridBag(); |
---|
| 1706 | + diffuse.add(diffuseLabel = new JLabel("Diffuse")); // , aConstraints); |
---|
| 1707 | + diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1708 | + diffuse.add(diffuseField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1709 | + diffuseSection.add(diffuse); |
---|
1489 | 1710 | |
---|
1490 | | - ctrlPanel.add(diffuseLabel = new JLabel("Diffuse"), aConstraints); |
---|
1491 | | - diffuseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1492 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1493 | | - aConstraints.gridx += 1; |
---|
1494 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1495 | | - ctrlPanel.add(diffuseField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1496 | | - aConstraints.gridx = 0; |
---|
1497 | | - aConstraints.gridy += 1; |
---|
1498 | | - aConstraints.gridwidth = 1; |
---|
| 1711 | + cGridBag diffuseness = new cGridBag(); |
---|
| 1712 | + diffuseness.add(diffusenessLabel = new JLabel("Diffusion")); // , aConstraints); |
---|
| 1713 | + diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1714 | + diffuseness.add(diffusenessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1715 | + diffuseSection.add(diffuseness); |
---|
1499 | 1716 | |
---|
1500 | | - ctrlPanel.add(diffusenessLabel = new JLabel("Diffusion"), aConstraints); |
---|
1501 | | - diffusenessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1502 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1503 | | - aConstraints.gridx += 1; |
---|
1504 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1505 | | - ctrlPanel.add(diffusenessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1506 | | - aConstraints.gridx = 0; |
---|
1507 | | - aConstraints.gridy += 1; |
---|
1508 | | - aConstraints.gridwidth = 1; |
---|
| 1717 | + cGridBag selfshadow = new cGridBag(); |
---|
| 1718 | + selfshadow.add(selfshadowLabel = new JLabel("Selfshadow")); // , aConstraints); |
---|
| 1719 | + selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1720 | + selfshadow.add(selfshadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1721 | + diffuseSection.add(selfshadow); |
---|
1509 | 1722 | |
---|
1510 | | - ctrlPanel.add(selfshadowLabel = new JLabel("Selfshadow"), aConstraints); |
---|
1511 | | - selfshadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1512 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1513 | | - aConstraints.gridx += 1; |
---|
1514 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1515 | | - ctrlPanel.add(selfshadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1516 | | - aConstraints.gridx = 0; |
---|
1517 | | - aConstraints.gridy += 1; |
---|
1518 | | - aConstraints.gridwidth = 1; |
---|
| 1723 | + cGridBag sheen = new cGridBag(); |
---|
| 1724 | + sheen.add(sheenLabel = new JLabel("Sheen")); // , aConstraints); |
---|
| 1725 | + sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1726 | + sheen.add(sheenField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1727 | + diffuseSection.add(sheen); |
---|
1519 | 1728 | |
---|
1520 | | - ctrlPanel.add(sheenLabel = new JLabel("Sheen"), aConstraints); |
---|
1521 | | - sheenLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1522 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1523 | | - aConstraints.gridx += 1; |
---|
1524 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1525 | | - ctrlPanel.add(sheenField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1526 | | - aConstraints.gridx = 0; |
---|
1527 | | - aConstraints.gridy += 1; |
---|
1528 | | - aConstraints.gridwidth = 1; |
---|
| 1729 | + cGridBag subsurface = new cGridBag(); |
---|
| 1730 | + subsurface.add(subsurfaceLabel = new JLabel("Subsurface")); // , aConstraints); |
---|
| 1731 | + subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1732 | + subsurface.add(subsurfaceField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1733 | + diffuseSection.add(subsurface); |
---|
1529 | 1734 | |
---|
1530 | | - ctrlPanel.add(subsurfaceLabel = new JLabel("Subsurface"), aConstraints); |
---|
1531 | | - subsurfaceLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1532 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1533 | | - aConstraints.gridx += 1; |
---|
1534 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1535 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1536 | | - aConstraints.gridx = 0; |
---|
1537 | | - aConstraints.gridy += 1; |
---|
1538 | | - aConstraints.gridwidth = 1; |
---|
| 1735 | + cGridBag shadow = new cGridBag(); |
---|
| 1736 | + shadow.add(shadowLabel = new JLabel("Shadowing")); // , aConstraints); |
---|
| 1737 | + shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1738 | + shadow.add(shadowField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1739 | + diffuseSection.add(shadow); |
---|
1539 | 1740 | |
---|
1540 | | - ctrlPanel.add(shadowLabel = new JLabel("Shadowing"), aConstraints); |
---|
1541 | | - shadowLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1542 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1543 | | - aConstraints.gridx += 1; |
---|
1544 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1545 | | - ctrlPanel.add(shadowField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1546 | | - aConstraints.gridx = 0; |
---|
1547 | | - aConstraints.gridy += 1; |
---|
1548 | | - aConstraints.gridwidth = 1; |
---|
| 1741 | + cGridBag fakedepth = new cGridBag(); |
---|
| 1742 | + fakedepth.add(fakedepthLabel = new JLabel("Fakedepth")); // , aConstraints); |
---|
| 1743 | + fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1744 | + fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1745 | + diffuseSection.add(fakedepth); |
---|
1549 | 1746 | |
---|
1550 | | - ctrlPanel.add(fakedepthLabel = new JLabel("Fakedepth"), aConstraints); |
---|
1551 | | - fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1552 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1553 | | - aConstraints.gridx += 1; |
---|
1554 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1555 | | - ctrlPanel.add(fakedepthField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1556 | | - aConstraints.gridx = 0; |
---|
1557 | | - aConstraints.gridy += 1; |
---|
1558 | | - aConstraints.gridwidth = 1; |
---|
| 1747 | + panel.add(new JSeparator()); |
---|
| 1748 | + |
---|
| 1749 | + panel.add(diffuseSection); |
---|
| 1750 | + |
---|
| 1751 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1752 | + |
---|
| 1753 | + cGridBag specularSection = new cGridBag().setVertical(true); |
---|
1559 | 1754 | |
---|
1560 | | - //aConstraints.weighty = 1; |
---|
1561 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1562 | | - //aConstraints.gridx += 1; |
---|
1563 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1564 | | - aConstraints.weighty = 0; |
---|
1565 | | - aConstraints.gridx = 0; |
---|
1566 | | - aConstraints.gridy += 1; |
---|
1567 | | - aConstraints.gridwidth = 1; |
---|
| 1755 | + cGridBag specular = new cGridBag(); |
---|
| 1756 | + specular.add(specularLabel = new JLabel("Specular")); // , aConstraints); |
---|
| 1757 | + specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1758 | + specular.add(specularField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1759 | + specularSection.add(specular); |
---|
1568 | 1760 | |
---|
1569 | | - ctrlPanel.add(specularLabel = new JLabel("Specular"), aConstraints); |
---|
1570 | | - specularLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1571 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1572 | | - aConstraints.gridx += 1; |
---|
1573 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1574 | | - ctrlPanel.add(specularField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1575 | | - aConstraints.gridx = 0; |
---|
1576 | | - aConstraints.gridy += 1; |
---|
1577 | | - aConstraints.gridwidth = 1; |
---|
| 1761 | + cGridBag lightarea = new cGridBag(); |
---|
| 1762 | + lightarea.add(lightareaLabel = new JLabel("Lightarea")); // , aConstraints); |
---|
| 1763 | + lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1764 | + lightarea.add(lightareaField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1765 | + specularSection.add(lightarea); |
---|
1578 | 1766 | |
---|
1579 | | - ctrlPanel.add(lightareaLabel = new JLabel("Lightarea"), aConstraints); |
---|
1580 | | - lightareaLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1581 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1582 | | - aConstraints.gridx += 1; |
---|
1583 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1584 | | - ctrlPanel.add(lightareaField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1585 | | - aConstraints.gridx = 0; |
---|
1586 | | - aConstraints.gridy += 1; |
---|
1587 | | - aConstraints.gridwidth = 1; |
---|
| 1767 | + cGridBag shininess = new cGridBag(); |
---|
| 1768 | + shininess.add(shininessLabel = new JLabel("Roughness")); // , aConstraints); |
---|
| 1769 | + shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1770 | + shininess.add(shininessField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1771 | + specularSection.add(shininess); |
---|
1588 | 1772 | |
---|
1589 | | - ctrlPanel.add(shininessLabel = new JLabel("Roughness"), aConstraints); |
---|
1590 | | - shininessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1591 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1592 | | - aConstraints.gridx += 1; |
---|
1593 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1594 | | - ctrlPanel.add(shininessField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1595 | | - aConstraints.gridx = 0; |
---|
1596 | | - aConstraints.gridy += 1; |
---|
1597 | | - aConstraints.gridwidth = 1; |
---|
| 1773 | + cGridBag metalness = new cGridBag(); |
---|
| 1774 | + metalness.add(metalnessLabel = new JLabel("Metalness")); // , aConstraints); |
---|
| 1775 | + metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1776 | + metalness.add(metalnessField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1777 | + specularSection.add(metalness); |
---|
1598 | 1778 | |
---|
1599 | | - ctrlPanel.add(metalnessLabel = new JLabel("Metalness"), aConstraints); |
---|
1600 | | - metalnessLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1601 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1602 | | - aConstraints.gridx += 1; |
---|
1603 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1604 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1605 | | - aConstraints.gridx = 0; |
---|
1606 | | - aConstraints.gridy += 1; |
---|
1607 | | - aConstraints.gridwidth = 1; |
---|
| 1779 | + cGridBag velvet = new cGridBag(); |
---|
| 1780 | + velvet.add(velvetLabel = new JLabel("Velvet")); // , aConstraints); |
---|
| 1781 | + velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1782 | + velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1783 | + specularSection.add(velvet); |
---|
1608 | 1784 | |
---|
1609 | | - ctrlPanel.add(velvetLabel = new JLabel("Velvet"), aConstraints); |
---|
1610 | | - velvetLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1611 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1612 | | - aConstraints.gridx += 1; |
---|
1613 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1614 | | - ctrlPanel.add(velvetField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1615 | | - aConstraints.gridx = 0; |
---|
1616 | | - aConstraints.gridy += 1; |
---|
1617 | | - aConstraints.gridwidth = 1; |
---|
1618 | | - |
---|
1619 | | - shiftField = AddSlider(ctrlPanel, "Shift", 0.001, 50, copy.material.shift, -1); |
---|
1620 | | - Return(); |
---|
| 1785 | + shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1); |
---|
| 1786 | + //Return(); |
---|
1621 | 1787 | // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints); |
---|
1622 | 1788 | // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1623 | 1789 | // aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
1628 | 1794 | // aConstraints.gridy += 1; |
---|
1629 | 1795 | // aConstraints.gridwidth = 1; |
---|
1630 | 1796 | |
---|
1631 | | - //aConstraints.weighty = 1; |
---|
1632 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1633 | | - //aConstraints.gridx += 1; |
---|
1634 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1635 | | - aConstraints.weighty = 0; |
---|
1636 | | - aConstraints.gridx = 0; |
---|
1637 | | - aConstraints.gridy += 1; |
---|
1638 | | - aConstraints.gridwidth = 1; |
---|
1639 | 1797 | |
---|
1640 | | - ctrlPanel.add(cameraLabel = new JLabel("GlobalLight"), aConstraints); |
---|
1641 | | - cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1642 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1643 | | - aConstraints.gridx += 1; |
---|
1644 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1645 | | - ctrlPanel.add(cameraField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1646 | | - aConstraints.gridx = 0; |
---|
1647 | | - aConstraints.gridy += 1; |
---|
1648 | | - aConstraints.gridwidth = 1; |
---|
| 1798 | + panel.add(new JSeparator()); |
---|
| 1799 | + |
---|
| 1800 | + panel.add(specularSection); |
---|
| 1801 | + |
---|
| 1802 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1803 | + |
---|
| 1804 | + cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1649 | 1805 | |
---|
1650 | | - ctrlPanel.add(ambientLabel = new JLabel("Ambient"), aConstraints); |
---|
1651 | | - ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1652 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1653 | | - aConstraints.gridx += 1; |
---|
1654 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1655 | | - ctrlPanel.add(ambientField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1656 | | - aConstraints.gridx = 0; |
---|
1657 | | - aConstraints.gridy += 1; |
---|
1658 | | - aConstraints.gridwidth = 1; |
---|
| 1806 | + cGridBag camera = new cGridBag(); |
---|
| 1807 | + camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
| 1808 | + cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1809 | + camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1810 | + globalSection.add(camera); |
---|
1659 | 1811 | |
---|
1660 | | - ctrlPanel.add(backlitLabel = new JLabel("Backlit"), aConstraints); |
---|
1661 | | - backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1662 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1663 | | - aConstraints.gridx += 1; |
---|
1664 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1665 | | - ctrlPanel.add(backlitField = new NumberSlider(0.001, 50, -1), aConstraints); |
---|
1666 | | - aConstraints.gridx = 0; |
---|
1667 | | - aConstraints.gridy += 1; |
---|
1668 | | - aConstraints.gridwidth = 1; |
---|
| 1812 | + cGridBag ambient = new cGridBag(); |
---|
| 1813 | + ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
| 1814 | + ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1815 | + ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1816 | + globalSection.add(ambient); |
---|
1669 | 1817 | |
---|
1670 | | - ctrlPanel.add(opacityLabel = new JLabel("Opacity"), aConstraints); |
---|
1671 | | - opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1672 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1673 | | - aConstraints.gridx += 1; |
---|
1674 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1675 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
1676 | | - aConstraints.gridx = 0; |
---|
1677 | | - aConstraints.gridy += 1; |
---|
1678 | | - aConstraints.gridwidth = 1; |
---|
1679 | | - aConstraints.weighty = 0; |
---|
| 1818 | + cGridBag backlit = new cGridBag(); |
---|
| 1819 | + backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
| 1820 | + backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1821 | + backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1822 | + globalSection.add(backlit); |
---|
1680 | 1823 | |
---|
1681 | | - ctrlPanel.add(bumpLabel = new JLabel("Bump"), aConstraints); |
---|
1682 | | - bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1683 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1684 | | - aConstraints.gridx += 1; |
---|
1685 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1686 | | - ctrlPanel.add(bumpField = new NumberSlider(0.0, 2), aConstraints); |
---|
1687 | | - aConstraints.gridx = 0; |
---|
1688 | | - aConstraints.gridy += 1; |
---|
1689 | | - aConstraints.gridwidth = 1; |
---|
| 1824 | + cGridBag opacity = new cGridBag(); |
---|
| 1825 | + opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
| 1826 | + opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1827 | + opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1828 | + globalSection.add(opacity); |
---|
1690 | 1829 | |
---|
1691 | | - ctrlPanel.add(noiseLabel = new JLabel("Noise"), aConstraints); |
---|
1692 | | - noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1693 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1694 | | - aConstraints.gridx += 1; |
---|
1695 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1696 | | - ctrlPanel.add(noiseField = new NumberSlider(0.0, 1/*5*/), aConstraints); |
---|
1697 | | - aConstraints.gridx = 0; |
---|
1698 | | - aConstraints.gridy += 1; |
---|
1699 | | - aConstraints.gridwidth = 1; |
---|
| 1830 | + panel.add(new JSeparator()); |
---|
| 1831 | + |
---|
| 1832 | + panel.add(globalSection); |
---|
| 1833 | + |
---|
| 1834 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
| 1835 | + |
---|
| 1836 | + cGridBag textureSection = new cGridBag().setVertical(true); |
---|
1700 | 1837 | |
---|
1701 | | - ctrlPanel.add(powerLabel = new JLabel("Turbulance"), aConstraints); |
---|
1702 | | - powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1703 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1704 | | - aConstraints.gridx += 1; |
---|
1705 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1706 | | - ctrlPanel.add(powerField = new NumberSlider(0.0, 5), aConstraints); |
---|
1707 | | - aConstraints.gridx = 0; |
---|
1708 | | - aConstraints.gridy += 1; |
---|
1709 | | - aConstraints.gridwidth = 1; |
---|
| 1838 | + cGridBag bump = new cGridBag(); |
---|
| 1839 | + bump.add(bumpLabel = new JLabel("Bump")); // , aConstraints); |
---|
| 1840 | + bumpLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1841 | + bump.add(bumpField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
---|
| 1842 | + textureSection.add(bump); |
---|
1710 | 1843 | |
---|
1711 | | - ctrlPanel.add(borderfadeLabel = new JLabel("Borderfade"), aConstraints); |
---|
1712 | | - borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1713 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1714 | | - aConstraints.gridx += 1; |
---|
1715 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1716 | | - ctrlPanel.add(borderfadeField = new NumberSlider(0.0, 2), aConstraints); |
---|
1717 | | - aConstraints.gridx = 0; |
---|
1718 | | - aConstraints.gridy += 1; |
---|
1719 | | - aConstraints.gridwidth = 1; |
---|
| 1844 | + cGridBag noise = new cGridBag(); |
---|
| 1845 | + noise.add(noiseLabel = new JLabel("Noise")); // , aConstraints); |
---|
| 1846 | + noiseLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1847 | + noise.add(noiseField = new cNumberSlider(this, 0.0, 1/*5*/)); // , aConstraints); |
---|
| 1848 | + textureSection.add(noise); |
---|
1720 | 1849 | |
---|
1721 | | - ctrlPanel.add(fogLabel = new JLabel("Punch"), aConstraints); |
---|
1722 | | - fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1723 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1724 | | - aConstraints.gridx += 1; |
---|
1725 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1726 | | - ctrlPanel.add(fogField = new NumberSlider(0.0, 20), aConstraints); |
---|
1727 | | - aConstraints.gridx = 0; |
---|
1728 | | - aConstraints.gridy += 1; |
---|
1729 | | - aConstraints.gridwidth = 1; |
---|
| 1850 | + cGridBag power = new cGridBag(); |
---|
| 1851 | + power.add(powerLabel = new JLabel("Turbulance")); // , aConstraints); |
---|
| 1852 | + powerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1853 | + power.add(powerField = new cNumberSlider(this, 0.0, 5)); // , aConstraints); |
---|
| 1854 | + textureSection.add(power); |
---|
1730 | 1855 | |
---|
1731 | | - ctrlPanel.add(opacityPowerLabel = new JLabel("Halo"), aConstraints); |
---|
1732 | | - opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1733 | | - aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1734 | | - aConstraints.gridx += 1; |
---|
1735 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1736 | | - ctrlPanel.add(opacityPowerField = new NumberSlider(0.0, 10 /*10 dec 2013*/), aConstraints); |
---|
1737 | | - aConstraints.gridx = 0; |
---|
1738 | | - aConstraints.gridy += 1; |
---|
1739 | | - aConstraints.gridwidth = 1; |
---|
| 1856 | + cGridBag borderfade = new cGridBag(); |
---|
| 1857 | + borderfade.add(borderfadeLabel = new JLabel("Borderfade")); // , aConstraints); |
---|
| 1858 | + borderfadeLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1859 | + borderfade.add(borderfadeField = new cNumberSlider(this, 0.0, 2)); // , aConstraints); |
---|
| 1860 | + textureSection.add(borderfade); |
---|
1740 | 1861 | |
---|
1741 | | - //aConstraints.weighty = 1; |
---|
1742 | | - aConstraints.gridwidth = ObjEditor.GRIDWIDTH; // 100; |
---|
1743 | | - //aConstraints.gridx += 1; |
---|
1744 | | - ctrlPanel.add(new JLabel("----------------------------------"), aConstraints); |
---|
1745 | | - aConstraints.weighty = 0; |
---|
| 1862 | + cGridBag fog = new cGridBag(); |
---|
| 1863 | + fog.add(fogLabel = new JLabel("Punch")); // , aConstraints); |
---|
| 1864 | + fogLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1865 | + fog.add(fogField = new cNumberSlider(this, 0.0, 20)); // , aConstraints); |
---|
| 1866 | + textureSection.add(fog); |
---|
1746 | 1867 | |
---|
1747 | | - aConstraints.gridx = 0; |
---|
1748 | | - aConstraints.gridy = 0; |
---|
1749 | | - aConstraints.gridwidth = 1; |
---|
| 1868 | + cGridBag opacityPower = new cGridBag(); |
---|
| 1869 | + opacityPower.add(opacityPowerLabel = new JLabel("Halo")); // , aConstraints); |
---|
| 1870 | + opacityPowerLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1871 | + opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints); |
---|
| 1872 | + textureSection.add(opacityPower); |
---|
| 1873 | + |
---|
| 1874 | + panel.add(new JSeparator()); |
---|
| 1875 | + |
---|
| 1876 | + panel.add(textureSection); |
---|
| 1877 | + |
---|
| 1878 | + //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1750 | 1879 | |
---|
1751 | 1880 | SetMaterial(copy); // .GetMaterial()); |
---|
1752 | 1881 | |
---|
1753 | | - colorField.addChangeListener(this); |
---|
1754 | | - modulationField.addChangeListener(this); |
---|
| 1882 | + //colorField.addChangeListener(this); |
---|
| 1883 | +// modulationField.addChangeListener(this); |
---|
1755 | 1884 | metalnessField.addChangeListener(this); |
---|
1756 | 1885 | diffuseField.addChangeListener(this); |
---|
1757 | 1886 | specularField.addChangeListener(this); |
---|
.. | .. |
---|
1781 | 1910 | opacityPowerField.addChangeListener(this); |
---|
1782 | 1911 | /**/ |
---|
1783 | 1912 | |
---|
1784 | | - resetSlidersButton.addActionListener(this); |
---|
1785 | 1913 | clearMaterialButton.addActionListener(this); |
---|
1786 | 1914 | createMaterialButton.addActionListener(this); |
---|
1787 | | - |
---|
1788 | | - propagateToggle.addItemListener(this); |
---|
1789 | | - multiplyToggle.addItemListener(this); |
---|
| 1915 | + |
---|
| 1916 | + if (Globals.ADVANCED) |
---|
| 1917 | + { |
---|
| 1918 | + resetSlidersButton.addActionListener(this); |
---|
| 1919 | + propagateToggle.addItemListener(this); |
---|
| 1920 | + multiplyToggle.addItemListener(this); |
---|
| 1921 | + } |
---|
1790 | 1922 | } |
---|
1791 | 1923 | |
---|
1792 | 1924 | void DropFile(java.io.File[] files, boolean textures) |
---|
.. | .. |
---|
1957 | 2089 | |
---|
1958 | 2090 | //? flashIt = false; |
---|
1959 | 2091 | CameraPane pane = (CameraPane) cameraView; |
---|
1960 | | - pane.clickStart(location.x, location.y, 0); |
---|
| 2092 | + pane.clickStart(location.x, location.y, 0, 0); |
---|
1961 | 2093 | pane.clickEnd(location.x, location.y, 0, true); |
---|
1962 | 2094 | |
---|
1963 | 2095 | if (group.selection.size() == 1) |
---|
.. | .. |
---|
2006 | 2138 | e2.printStackTrace(); |
---|
2007 | 2139 | } |
---|
2008 | 2140 | } |
---|
| 2141 | + |
---|
2009 | 2142 | LoadJMEThread loadThread; |
---|
2010 | 2143 | |
---|
2011 | 2144 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
2063 | 2196 | //LoadFile0(filename, converter); |
---|
2064 | 2197 | } |
---|
2065 | 2198 | } |
---|
| 2199 | + |
---|
2066 | 2200 | LoadOBJThread loadObjThread; |
---|
2067 | 2201 | |
---|
2068 | 2202 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2141 | 2275 | |
---|
2142 | 2276 | void LoadObjFile(String fullname) |
---|
2143 | 2277 | { |
---|
2144 | | - /* |
---|
| 2278 | + System.out.println("Loading " + fullname); |
---|
| 2279 | + /**/ |
---|
2145 | 2280 | //lastFilename = fullname; |
---|
2146 | 2281 | if(loadObjThread == null) |
---|
2147 | 2282 | { |
---|
2148 | | - loadObjThread = new LoadOBJThread(); |
---|
2149 | | - loadObjThread.start(); |
---|
| 2283 | + loadObjThread = new LoadOBJThread(); |
---|
| 2284 | + loadObjThread.start(); |
---|
2150 | 2285 | } |
---|
2151 | 2286 | |
---|
2152 | 2287 | loadObjThread.add(fullname); |
---|
2153 | | - */ |
---|
| 2288 | + /**/ |
---|
2154 | 2289 | |
---|
2155 | | - System.out.println("Loading " + fullname); |
---|
2156 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2290 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2157 | 2291 | } |
---|
2158 | 2292 | |
---|
2159 | 2293 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2414 | 2548 | |
---|
2415 | 2549 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2416 | 2550 | { |
---|
2417 | | - if (GrafreeD.standAlone) |
---|
| 2551 | + if (Grafreed.standAlone) |
---|
2418 | 2552 | { |
---|
2419 | 2553 | /**/ |
---|
2420 | 2554 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
2421 | | - browser.show(); |
---|
| 2555 | + browser.setVisible(true); |
---|
2422 | 2556 | String filename = browser.getFile(); |
---|
2423 | 2557 | if (filename != null && filename.length() > 0) |
---|
2424 | 2558 | { |
---|
.. | .. |
---|
2563 | 2697 | } |
---|
2564 | 2698 | if (input == null) |
---|
2565 | 2699 | { |
---|
| 2700 | + new Exception().printStackTrace(); |
---|
2566 | 2701 | System.exit(0); |
---|
2567 | 2702 | } |
---|
2568 | 2703 | |
---|
.. | .. |
---|
2769 | 2904 | |
---|
2770 | 2905 | void SetMaterial(Object3D object) |
---|
2771 | 2906 | { |
---|
| 2907 | + latestObject = object; |
---|
| 2908 | + |
---|
2772 | 2909 | cMaterial mat = object.material; |
---|
2773 | 2910 | |
---|
2774 | 2911 | if (mat == null) |
---|
.. | .. |
---|
2777 | 2914 | return; |
---|
2778 | 2915 | } |
---|
2779 | 2916 | |
---|
2780 | | - multiplyToggle.setSelected(mat.multiply); |
---|
| 2917 | + if (multiplyToggle != null) |
---|
| 2918 | + multiplyToggle.setSelected(mat.multiply); |
---|
2781 | 2919 | |
---|
2782 | 2920 | assert (object.projectedVertices != null); |
---|
2783 | 2921 | |
---|
.. | .. |
---|
2953 | 3091 | cameraView.ToggleDL(); |
---|
2954 | 3092 | cameraView.repaint(); |
---|
2955 | 3093 | return; |
---|
2956 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3094 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2957 | 3095 | { |
---|
2958 | 3096 | cameraView.ToggleTexture(); |
---|
2959 | 3097 | // june 2013 copy.HardTouch(); |
---|
2960 | 3098 | cameraView.repaint(); |
---|
2961 | 3099 | return; |
---|
2962 | | - } else if (event.getSource() == toggleFullItem) |
---|
| 3100 | + } else if (event.getSource() == toggleTimelineItem) |
---|
2963 | 3101 | { |
---|
2964 | | - if (CameraPane.FULLSCREEN) |
---|
| 3102 | + timeline ^= true; |
---|
| 3103 | + |
---|
| 3104 | + if (timeline) |
---|
2965 | 3105 | { |
---|
2966 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
2967 | | - framePanel.add(bigThree); |
---|
2968 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
2969 | | - } else |
---|
2970 | | - { |
---|
2971 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
2972 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 3106 | + centralPanel.remove(cameraView); |
---|
| 3107 | + cameraPanel.add(cameraView); |
---|
| 3108 | + centralPanel.add(cameraPanel); |
---|
| 3109 | + frame.setJMenuBar(timelineMenubar); |
---|
| 3110 | + wasFullScreen = CameraPane.FULLSCREEN; |
---|
| 3111 | + if (!CameraPane.FULLSCREEN) |
---|
| 3112 | + ToggleFullScreen(); |
---|
| 3113 | + toggleFullScreenItem.setEnabled(false); |
---|
2973 | 3114 | } |
---|
| 3115 | + else |
---|
| 3116 | + { |
---|
| 3117 | + centralPanel.remove(cameraPanel); |
---|
| 3118 | + centralPanel.add(cameraView); |
---|
| 3119 | + frame.setJMenuBar(null); |
---|
| 3120 | + if (!wasFullScreen) |
---|
| 3121 | + ToggleFullScreen(); |
---|
| 3122 | + toggleFullScreenItem.setEnabled(true); |
---|
| 3123 | + } |
---|
| 3124 | + |
---|
2974 | 3125 | frame.validate(); |
---|
2975 | | - cameraView.ToggleFullScreen(); |
---|
| 3126 | + return; |
---|
| 3127 | + } else if (event.getSource() == toggleFullScreenItem) |
---|
| 3128 | + { |
---|
| 3129 | + ToggleFullScreen(); |
---|
| 3130 | + frame.validate(); |
---|
2976 | 3131 | |
---|
2977 | 3132 | return; |
---|
2978 | | - } else if (event.getSource() == toggleRandomItem) |
---|
| 3133 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
2979 | 3134 | { |
---|
2980 | | - cameraView.ToggleRandom(); |
---|
| 3135 | + cameraView.ToggleSwitch(); |
---|
2981 | 3136 | cameraView.repaint(); |
---|
2982 | 3137 | return; |
---|
2983 | 3138 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
3006 | 3161 | { |
---|
3007 | 3162 | copy.live ^= true; |
---|
3008 | 3163 | return; |
---|
| 3164 | + } else if (event.getSource() == selectCB) |
---|
| 3165 | + { |
---|
| 3166 | + copy.dontselect ^= true; |
---|
| 3167 | + return; |
---|
3009 | 3168 | } else if (event.getSource() == hideCB) |
---|
3010 | 3169 | { |
---|
3011 | 3170 | copy.hide ^= true; |
---|
.. | .. |
---|
3020 | 3179 | if (event.getSource() == randomCB) |
---|
3021 | 3180 | { |
---|
3022 | 3181 | copy.random ^= true; |
---|
| 3182 | + objEditor.refreshContents(); |
---|
3023 | 3183 | return; |
---|
3024 | 3184 | } |
---|
3025 | 3185 | if (event.getSource() == speedupCB) |
---|
.. | .. |
---|
3043 | 3203 | |
---|
3044 | 3204 | public void actionPerformed(ActionEvent event) |
---|
3045 | 3205 | { |
---|
| 3206 | + Object source = event.getSource(); |
---|
3046 | 3207 | // SCRIPT DIALOG |
---|
3047 | | - if (event.getSource() == okbutton) |
---|
| 3208 | + if (source == okbutton) |
---|
3048 | 3209 | { |
---|
3049 | 3210 | textpanel.setVisible(false); |
---|
3050 | 3211 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3056 | 3217 | textarea = null; |
---|
3057 | 3218 | textpanel = null; |
---|
3058 | 3219 | } |
---|
3059 | | - if (event.getSource() == cancelbutton) |
---|
| 3220 | + if (source == cancelbutton) |
---|
3060 | 3221 | { |
---|
3061 | 3222 | textpanel.setVisible(false); |
---|
3062 | 3223 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3068 | 3229 | //applySelf(); |
---|
3069 | 3230 | //client.refreshEditWindow(); |
---|
3070 | 3231 | //refreshContents(); |
---|
3071 | | - if (event.getSource() == nameField) |
---|
| 3232 | + if (source == nameField) |
---|
3072 | 3233 | { |
---|
3073 | 3234 | //System.out.println("ObjEditor " + event); |
---|
3074 | 3235 | applySelf0(true); |
---|
3075 | 3236 | //parent.applySelf(); |
---|
3076 | 3237 | objEditor.refreshContents(); |
---|
3077 | | - } else if (event.getSource() == resetButton) |
---|
| 3238 | + } else if (source == resetButton) |
---|
3078 | 3239 | { |
---|
3079 | 3240 | CameraPane.fullreset = true; |
---|
3080 | 3241 | copy.Reset(); // ResetMeshes(); |
---|
3081 | 3242 | copy.Touch(); |
---|
3082 | 3243 | objEditor.refreshContents(); |
---|
3083 | | - } else if (event.getSource() == stepItem) |
---|
| 3244 | + } else if (source == stepItem) |
---|
3084 | 3245 | { |
---|
3085 | | - cameraView.ONESTEP = true; |
---|
| 3246 | + //cameraView.ONESTEP = true; |
---|
| 3247 | + Globals.ONESTEP = true; |
---|
3086 | 3248 | cameraView.repaint(); |
---|
3087 | 3249 | return; |
---|
3088 | | - } else if (event.getSource() == stepButton) |
---|
| 3250 | + } else if (source == stepButton) |
---|
3089 | 3251 | { |
---|
3090 | 3252 | copy.Step(); |
---|
3091 | 3253 | copy.Touch(); |
---|
3092 | 3254 | objEditor.refreshContents(); |
---|
3093 | | - } else if (event.getSource() == slowerButton) |
---|
| 3255 | + } else if (source == slowerButton) |
---|
3094 | 3256 | { |
---|
3095 | 3257 | copy.Slower(); |
---|
3096 | 3258 | copy.Touch(); |
---|
3097 | 3259 | objEditor.refreshContents(); |
---|
3098 | | - } else if (event.getSource() == fasterButton) |
---|
| 3260 | + } else if (source == fasterButton) |
---|
3099 | 3261 | { |
---|
3100 | 3262 | copy.Faster(); |
---|
3101 | 3263 | copy.Touch(); |
---|
3102 | 3264 | objEditor.refreshContents(); |
---|
3103 | | - } else if (event.getSource() == remarkButton) |
---|
| 3265 | + } else if (source == remarkButton) |
---|
3104 | 3266 | { |
---|
3105 | 3267 | copy.Remark(); |
---|
3106 | 3268 | copy.Touch(); |
---|
3107 | 3269 | objEditor.refreshContents(); |
---|
3108 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3270 | + } else if (source == stepAllButton) |
---|
3109 | 3271 | { |
---|
3110 | 3272 | copy.StepAll(); |
---|
3111 | 3273 | copy.Touch(); |
---|
3112 | 3274 | objEditor.refreshContents(); |
---|
3113 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3275 | + } else if (source == resetAllButton) |
---|
3114 | 3276 | { |
---|
3115 | 3277 | //CameraPane.fullreset = true; |
---|
3116 | 3278 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3143 | 3305 | // Close(); |
---|
3144 | 3306 | // } |
---|
3145 | 3307 | // else |
---|
3146 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3308 | + if (source == resetSlidersButton) |
---|
3147 | 3309 | { |
---|
3148 | 3310 | ResetSliders(); |
---|
3149 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3311 | + } else if (source == clearMaterialButton) |
---|
3150 | 3312 | { |
---|
3151 | 3313 | ClearMaterial(); |
---|
3152 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3314 | + } else if (source == createMaterialButton) |
---|
3153 | 3315 | { |
---|
3154 | 3316 | CreateMaterial(); |
---|
3155 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3317 | + } else if (source == clearPanelButton) |
---|
3156 | 3318 | { |
---|
3157 | 3319 | copy.ClearUI(); |
---|
3158 | 3320 | refreshContents(true); |
---|
3159 | | - } /* |
---|
3160 | | - } |
---|
3161 | | - |
---|
3162 | | - public boolean action(Event event, Object arg) |
---|
3163 | | - { |
---|
3164 | | - */ else if (event.getSource() == closeItem) |
---|
| 3321 | + } else if (source == importGFDItem) |
---|
| 3322 | + { |
---|
| 3323 | + ImportGFD(); |
---|
| 3324 | + } else |
---|
| 3325 | + if (source == importVRMLX3DItem) |
---|
| 3326 | + { |
---|
| 3327 | + ImportVRMLX3D(); |
---|
| 3328 | + } else |
---|
| 3329 | + if (source == import3DSItem) |
---|
| 3330 | + { |
---|
| 3331 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3332 | + } else |
---|
| 3333 | + if (source == importOBJItem) |
---|
| 3334 | + { |
---|
| 3335 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3336 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3337 | + browser.setVisible(true); |
---|
| 3338 | + String filename = browser.getFile(); |
---|
| 3339 | + if (filename != null && filename.length() > 0) |
---|
| 3340 | + { |
---|
| 3341 | + String fullname = browser.getDirectory() + filename; |
---|
| 3342 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3343 | + } |
---|
| 3344 | + } else |
---|
| 3345 | + if (source == closeItem) |
---|
3165 | 3346 | { |
---|
3166 | 3347 | Close(); |
---|
3167 | 3348 | //return true; |
---|
3168 | | - } else if (event.getSource() == loadItem) |
---|
| 3349 | + } else if (source == loadItem) |
---|
3169 | 3350 | { |
---|
3170 | 3351 | load(); |
---|
3171 | 3352 | //return true; |
---|
3172 | | - } else if (event.getSource() == saveItem) |
---|
| 3353 | + } else if (source == newItem) |
---|
| 3354 | + { |
---|
| 3355 | + New(); |
---|
| 3356 | + } else if (source == saveItem) |
---|
3173 | 3357 | { |
---|
3174 | 3358 | save(); |
---|
3175 | 3359 | //return true; |
---|
3176 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3360 | + } else if (source == saveAsItem) |
---|
3177 | 3361 | { |
---|
3178 | 3362 | saveAs(); |
---|
3179 | 3363 | //return true; |
---|
3180 | | - } else if (event.getSource() == reexportItem) |
---|
| 3364 | + } else if (source == reexportItem) |
---|
3181 | 3365 | { |
---|
3182 | 3366 | reexport(); |
---|
3183 | 3367 | //return true; |
---|
3184 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3368 | + } else if (source == exportAsItem) |
---|
3185 | 3369 | { |
---|
3186 | 3370 | export(); |
---|
3187 | 3371 | //return true; |
---|
3188 | | - } else if (event.getSource() == povItem) |
---|
| 3372 | + } else if (source == povItem) |
---|
3189 | 3373 | { |
---|
3190 | 3374 | generatePOV(); |
---|
3191 | 3375 | //return true; |
---|
3192 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3376 | + } else if (source == zBufferItem) |
---|
3193 | 3377 | { |
---|
3194 | 3378 | try |
---|
3195 | 3379 | { |
---|
.. | .. |
---|
3211 | 3395 | cameraView.repaint(); |
---|
3212 | 3396 | //return true; |
---|
3213 | 3397 | } |
---|
3214 | | - */ else if (event.getSource() == editCameraItem) |
---|
3215 | | - { |
---|
3216 | | - cameraView.ProtectCamera(); |
---|
3217 | | - cameraView.repaint(); |
---|
3218 | | - return; |
---|
3219 | | - } else if (event.getSource() == revertCameraItem) |
---|
3220 | | - { |
---|
3221 | | - cameraView.RevertCamera(); |
---|
3222 | | - cameraView.repaint(); |
---|
3223 | | - return; |
---|
3224 | | - } else if (event.getSource() == textureButton) |
---|
3225 | | - { |
---|
3226 | | - return; // true; |
---|
3227 | | - } else // combos... |
---|
3228 | | - if (event.getSource() == texresMenu) |
---|
| 3398 | + */ else // combos... |
---|
| 3399 | + if (source == texresMenu) |
---|
3229 | 3400 | { |
---|
3230 | 3401 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3231 | 3402 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3237 | 3408 | } |
---|
3238 | 3409 | } |
---|
3239 | 3410 | |
---|
3240 | | - void ToggleAnimation() |
---|
| 3411 | + void New() |
---|
3241 | 3412 | { |
---|
3242 | | - if (!CameraPane.ANIMATION) |
---|
| 3413 | + while (copy.Size() > 1) |
---|
3243 | 3414 | { |
---|
3244 | | - FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3415 | + copy.remove(1); |
---|
| 3416 | + } |
---|
| 3417 | + |
---|
| 3418 | + ResetModel(); |
---|
| 3419 | + objEditor.refreshContents(); |
---|
| 3420 | + } |
---|
| 3421 | + |
---|
| 3422 | + static public byte[] Compress(Object3D o) |
---|
| 3423 | + { |
---|
| 3424 | + try |
---|
| 3425 | + { |
---|
| 3426 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3427 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 3428 | + ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 3429 | + |
---|
| 3430 | + Object3D parent = o.parent; |
---|
| 3431 | + o.parent = null; |
---|
| 3432 | + |
---|
| 3433 | + out.writeObject(o); |
---|
| 3434 | + |
---|
| 3435 | + o.parent = parent; |
---|
| 3436 | + |
---|
| 3437 | + out.flush(); |
---|
| 3438 | + |
---|
| 3439 | + zstream.close(); |
---|
| 3440 | + out.close(); |
---|
| 3441 | + |
---|
| 3442 | + return baos.toByteArray(); |
---|
| 3443 | + } catch (Exception e) |
---|
| 3444 | + { |
---|
| 3445 | + System.err.println(e); |
---|
| 3446 | + return null; |
---|
| 3447 | + } |
---|
| 3448 | + } |
---|
| 3449 | + |
---|
| 3450 | + static public Object Uncompress(byte[] bytes) |
---|
| 3451 | + { |
---|
| 3452 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3453 | + try |
---|
| 3454 | + { |
---|
| 3455 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3456 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3457 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3458 | + Object obj = in.readObject(); |
---|
| 3459 | + in.close(); |
---|
| 3460 | + |
---|
| 3461 | + return obj; |
---|
| 3462 | + } catch (Exception e) |
---|
| 3463 | + { |
---|
| 3464 | + System.err.println(e); |
---|
| 3465 | + return null; |
---|
| 3466 | + } |
---|
| 3467 | + } |
---|
| 3468 | + |
---|
| 3469 | + static public Object clone(Object o) |
---|
| 3470 | + { |
---|
| 3471 | + try |
---|
| 3472 | + { |
---|
| 3473 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3474 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3475 | + |
---|
| 3476 | + out.writeObject(o); |
---|
| 3477 | + |
---|
| 3478 | + out.flush(); |
---|
| 3479 | + out.close(); |
---|
| 3480 | + |
---|
| 3481 | + byte[] bytes = baos.toByteArray(); |
---|
| 3482 | + |
---|
| 3483 | + System.out.println("clone = " + bytes.length); |
---|
| 3484 | + |
---|
| 3485 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3486 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3487 | + Object obj = in.readObject(); |
---|
| 3488 | + in.close(); |
---|
| 3489 | + |
---|
| 3490 | + return obj; |
---|
| 3491 | + } catch (Exception e) |
---|
| 3492 | + { |
---|
| 3493 | + System.err.println(e); |
---|
| 3494 | + return null; |
---|
| 3495 | + } |
---|
| 3496 | + } |
---|
| 3497 | + |
---|
| 3498 | + cRadio GetCurrentTab() |
---|
| 3499 | + { |
---|
| 3500 | + cRadio ab; |
---|
| 3501 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3502 | + { |
---|
| 3503 | + ab = (cRadio)e.nextElement(); |
---|
| 3504 | + if(ab.GetObject() == copy) |
---|
| 3505 | + { |
---|
| 3506 | + return ab; |
---|
| 3507 | + } |
---|
| 3508 | + } |
---|
| 3509 | + |
---|
| 3510 | + return null; |
---|
| 3511 | + } |
---|
| 3512 | + |
---|
| 3513 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3514 | + |
---|
| 3515 | + public void Save() |
---|
| 3516 | + { |
---|
| 3517 | + System.err.println("Save"); |
---|
| 3518 | + |
---|
| 3519 | + cRadio tab = GetCurrentTab(); |
---|
| 3520 | + |
---|
| 3521 | + boolean temp = CameraPane.SWITCH; |
---|
| 3522 | + CameraPane.SWITCH = false; |
---|
| 3523 | + |
---|
| 3524 | + copy.ExtractBigData(hashtable); |
---|
| 3525 | + |
---|
| 3526 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3527 | + tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3528 | + |
---|
| 3529 | + copy.RestoreBigData(hashtable); |
---|
| 3530 | + |
---|
| 3531 | + CameraPane.SWITCH = temp; |
---|
| 3532 | + |
---|
| 3533 | + //assert(hashtable.isEmpty()); |
---|
| 3534 | + |
---|
| 3535 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3536 | + { |
---|
| 3537 | + tab.graphs[i] = null; |
---|
| 3538 | + } |
---|
| 3539 | + |
---|
| 3540 | + SetUndoStates(); |
---|
| 3541 | + |
---|
| 3542 | + // test save |
---|
| 3543 | + if (false) |
---|
| 3544 | + { |
---|
| 3545 | + try |
---|
| 3546 | + { |
---|
| 3547 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3548 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3549 | + |
---|
| 3550 | + p.writeObject(copy); |
---|
| 3551 | + |
---|
| 3552 | + p.flush(); |
---|
| 3553 | + |
---|
| 3554 | + ostream.close(); |
---|
| 3555 | + } catch (Exception e) |
---|
| 3556 | + { |
---|
| 3557 | + e.printStackTrace(); |
---|
| 3558 | + } |
---|
| 3559 | + } |
---|
| 3560 | + } |
---|
| 3561 | + |
---|
| 3562 | + void CopyChanged(Object3D obj) |
---|
| 3563 | + { |
---|
| 3564 | + SetUndoStates(); |
---|
| 3565 | + |
---|
| 3566 | + boolean temp = CameraPane.SWITCH; |
---|
| 3567 | + CameraPane.SWITCH = false; |
---|
| 3568 | + |
---|
| 3569 | + copy.ExtractBigData(hashtable); |
---|
| 3570 | + |
---|
| 3571 | + copy.clear(); |
---|
| 3572 | + |
---|
| 3573 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3574 | + { |
---|
| 3575 | + copy.add(obj.get(i)); |
---|
| 3576 | + } |
---|
| 3577 | + |
---|
| 3578 | + copy.RestoreBigData(hashtable); |
---|
| 3579 | + |
---|
| 3580 | + CameraPane.SWITCH = temp; |
---|
| 3581 | + |
---|
| 3582 | + //assert(hashtable.isEmpty()); |
---|
| 3583 | + |
---|
| 3584 | + copy.Touch(); |
---|
| 3585 | + |
---|
| 3586 | + ResetModel(); |
---|
| 3587 | + copy.HardTouch(); // recompile? |
---|
| 3588 | + |
---|
| 3589 | + cRadio ab; |
---|
| 3590 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3591 | + { |
---|
| 3592 | + ab = (cRadio)e.nextElement(); |
---|
| 3593 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3594 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3595 | + if (test != null) |
---|
| 3596 | + { |
---|
| 3597 | + test.editWindow = ab.object.editWindow; |
---|
| 3598 | + ab.object = test; |
---|
| 3599 | + } |
---|
| 3600 | + } |
---|
| 3601 | + |
---|
| 3602 | + refreshContents(); |
---|
| 3603 | + } |
---|
| 3604 | + |
---|
| 3605 | + cButton undoButton; |
---|
| 3606 | + cButton redoButton; |
---|
| 3607 | + |
---|
| 3608 | + void SetUndoStates() |
---|
| 3609 | + { |
---|
| 3610 | + cRadio tab = GetCurrentTab(); |
---|
| 3611 | + |
---|
| 3612 | + undoButton.setEnabled(tab.undoindex > 0); |
---|
| 3613 | + redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null); |
---|
| 3614 | + } |
---|
| 3615 | + |
---|
| 3616 | + public void Undo() |
---|
| 3617 | + { |
---|
| 3618 | + System.err.println("Undo"); |
---|
| 3619 | + |
---|
| 3620 | + cRadio tab = GetCurrentTab(); |
---|
| 3621 | + |
---|
| 3622 | + if (tab.undoindex == 0) |
---|
| 3623 | + { |
---|
| 3624 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3625 | + return; |
---|
| 3626 | + } |
---|
| 3627 | + |
---|
| 3628 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3629 | + { |
---|
| 3630 | + Save(); |
---|
| 3631 | + tab.undoindex -= 1; |
---|
| 3632 | + } |
---|
| 3633 | + |
---|
| 3634 | + tab.undoindex -= 1; |
---|
| 3635 | + |
---|
| 3636 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3637 | + } |
---|
| 3638 | + |
---|
| 3639 | + public void Redo() |
---|
| 3640 | + { |
---|
| 3641 | + cRadio tab = GetCurrentTab(); |
---|
| 3642 | + |
---|
| 3643 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3644 | + { |
---|
| 3645 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3646 | + return; |
---|
| 3647 | + } |
---|
| 3648 | + |
---|
| 3649 | + tab.undoindex += 1; |
---|
| 3650 | + |
---|
| 3651 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3652 | + } |
---|
| 3653 | + |
---|
| 3654 | + void ImportGFD() |
---|
| 3655 | + { |
---|
| 3656 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
3245 | 3657 | browser.show(); |
---|
3246 | 3658 | String filename = browser.getFile(); |
---|
3247 | 3659 | if (filename != null && filename.length() > 0) |
---|
3248 | 3660 | { |
---|
3249 | | - CameraPane.filename = browser.getDirectory() + filename; |
---|
| 3661 | + String fullname = browser.getDirectory() + filename; |
---|
| 3662 | + |
---|
| 3663 | + //Object3D readobj = |
---|
| 3664 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3665 | + //makeSomething(readobj); |
---|
| 3666 | + } |
---|
| 3667 | + } |
---|
| 3668 | + |
---|
| 3669 | + void ImportVRMLX3D() |
---|
| 3670 | + { |
---|
| 3671 | + if (Grafreed.standAlone) |
---|
| 3672 | + { |
---|
| 3673 | + /**/ |
---|
| 3674 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3675 | + browser.show(); |
---|
| 3676 | + String filename = browser.getFile(); |
---|
| 3677 | + if (filename != null && filename.length() > 0) |
---|
| 3678 | + { |
---|
| 3679 | + String fullname = browser.getDirectory() + filename; |
---|
| 3680 | + LoadVRMLX3D(fullname); |
---|
| 3681 | + } |
---|
| 3682 | + /**/ |
---|
| 3683 | + } |
---|
| 3684 | + } |
---|
| 3685 | + |
---|
| 3686 | + void ToggleAnimation() |
---|
| 3687 | + { |
---|
| 3688 | + if (!Globals.ANIMATION) |
---|
| 3689 | + { |
---|
| 3690 | + FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE); |
---|
| 3691 | + browser.setVisible(true); |
---|
| 3692 | + String filename = browser.getFile(); |
---|
| 3693 | + if (filename != null && filename.length() > 0) |
---|
| 3694 | + { |
---|
| 3695 | + Globals.filename = browser.getDirectory() + filename; |
---|
3250 | 3696 | //CameraPane.framecount = 0; |
---|
3251 | | - CameraPane.imagecount = 0; |
---|
| 3697 | + Globals.imagecount = 0; |
---|
3252 | 3698 | |
---|
3253 | | - CameraPane.ANIMATION ^= true; |
---|
| 3699 | + Globals.ANIMATION ^= true; |
---|
3254 | 3700 | |
---|
3255 | | - GrafreeD.wav.cursor = 0; |
---|
3256 | | - GrafreeD.wav.loop = 0; |
---|
| 3701 | + Grafreed.wav.cursor = 0; |
---|
| 3702 | + Grafreed.wav.loop = 0; |
---|
3257 | 3703 | } |
---|
3258 | 3704 | } else |
---|
3259 | 3705 | { |
---|
3260 | | - CameraPane.ANIMATION ^= true; |
---|
| 3706 | + Globals.ANIMATION ^= true; |
---|
3261 | 3707 | } |
---|
3262 | 3708 | } |
---|
3263 | 3709 | |
---|
.. | .. |
---|
3303 | 3749 | void CreateMaterial() |
---|
3304 | 3750 | { |
---|
3305 | 3751 | //copy.ClearMaterial(); // PATCH |
---|
3306 | | - copy.CreateMaterialS(multiplyToggle.isSelected()); |
---|
| 3752 | + copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected()); |
---|
3307 | 3753 | if (copy.selection.size() > 0) |
---|
3308 | 3754 | //SetMaterial(copy); |
---|
3309 | 3755 | { |
---|
.. | .. |
---|
3354 | 3800 | assert false; |
---|
3355 | 3801 | } |
---|
3356 | 3802 | |
---|
3357 | | - void EditSelection() |
---|
| 3803 | + void EditSelection(boolean newWindow) |
---|
3358 | 3804 | { |
---|
3359 | 3805 | } |
---|
3360 | 3806 | |
---|
.. | .. |
---|
3362 | 3808 | { |
---|
3363 | 3809 | copy.ResetBlockLoop(); // temporary problem |
---|
3364 | 3810 | |
---|
3365 | | - boolean random = CameraPane.RANDOM; |
---|
3366 | | - CameraPane.RANDOM = false; // parse everything |
---|
| 3811 | + boolean random = CameraPane.SWITCH; |
---|
| 3812 | + CameraPane.SWITCH = false; // parse everything |
---|
3367 | 3813 | copy.ResetDisplayList(); |
---|
3368 | 3814 | copy.HardTouch(); |
---|
3369 | | - CameraPane.RANDOM = random; |
---|
| 3815 | + CameraPane.SWITCH = random; |
---|
3370 | 3816 | } |
---|
3371 | 3817 | |
---|
3372 | 3818 | // public void applySelf() |
---|
.. | .. |
---|
3436 | 3882 | current.fakedepth = (float) fakedepthField.getFloat(); |
---|
3437 | 3883 | current.shadowbias = (float) shadowbiasField.getFloat(); |
---|
3438 | 3884 | |
---|
3439 | | - if (!NumberSlider.frozen) |
---|
| 3885 | + if (!cNumberSlider.frozen) |
---|
3440 | 3886 | { |
---|
3441 | 3887 | //System.out.println("Propagate = " + propagate); |
---|
3442 | 3888 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3889 | + |
---|
| 3890 | + if (copy.material != null) |
---|
| 3891 | + { |
---|
| 3892 | + cMaterial mat = copy.material; |
---|
| 3893 | + |
---|
| 3894 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3895 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3896 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3897 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3898 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3899 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3900 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3901 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3902 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3903 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3904 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3905 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3906 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3907 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3908 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3909 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3910 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3911 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3912 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3913 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3914 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3915 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3916 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3917 | + } |
---|
| 3918 | + |
---|
3443 | 3919 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3444 | 3920 | { |
---|
3445 | 3921 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3484 | 3960 | || e.getSource() == apertureField |
---|
3485 | 3961 | || e.getSource() == shadowblurField) |
---|
3486 | 3962 | { |
---|
| 3963 | + new Exception().printStackTrace(); |
---|
3487 | 3964 | System.exit(0); |
---|
3488 | 3965 | cameraView.options1[0] = (float) focusField.getFloat() * 10; |
---|
3489 | 3966 | cameraView.options1[1] = (float) apertureField.getFloat() / 1000; |
---|
.. | .. |
---|
3510 | 3987 | //System.out.println("PARENT = " + parent); |
---|
3511 | 3988 | //if (parent != null) |
---|
3512 | 3989 | // parent.applySelf(); |
---|
3513 | | - refreshContents(); |
---|
| 3990 | + if (e.getSource() == normalpushField) |
---|
| 3991 | + { |
---|
| 3992 | + objEditor.refreshContents(); |
---|
| 3993 | + //Refresh(); |
---|
| 3994 | + } |
---|
| 3995 | + else |
---|
| 3996 | + refreshContents(); |
---|
3514 | 3997 | // ??? client.refreshEditWindow(); |
---|
3515 | 3998 | } |
---|
3516 | 3999 | //else |
---|
.. | .. |
---|
3522 | 4005 | //group.name = nameField.getText(); |
---|
3523 | 4006 | //objEditor.applySelf(); |
---|
3524 | 4007 | |
---|
3525 | | - assert (objEditor == this); |
---|
| 4008 | + // OCT2018: assert (objEditor == this); |
---|
3526 | 4009 | if (copy.selection == null || copy.selection.size() == 0) |
---|
3527 | 4010 | //super.applySelf() |
---|
3528 | 4011 | ; else |
---|
.. | .. |
---|
3546 | 4029 | objEditor.copy = keep; |
---|
3547 | 4030 | } |
---|
3548 | 4031 | } |
---|
| 4032 | + |
---|
| 4033 | + if (normalpushField != null) |
---|
| 4034 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3549 | 4035 | } |
---|
3550 | 4036 | |
---|
3551 | 4037 | void SnapObject() |
---|
3552 | 4038 | { |
---|
3553 | | - Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
3554 | | - SnapObject(obj); |
---|
| 4039 | + if (copy.selection.size() > 0) |
---|
| 4040 | + { |
---|
| 4041 | + Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
| 4042 | + SnapObject(obj); |
---|
| 4043 | + } |
---|
3555 | 4044 | } |
---|
3556 | 4045 | |
---|
3557 | 4046 | void SnapObject(Object3D obj) |
---|
.. | .. |
---|
3797 | 4286 | |
---|
3798 | 4287 | radioPanel.revalidate(); |
---|
3799 | 4288 | radioPanel.repaint(); |
---|
3800 | | - ctrlPanel.revalidate(); // ? new |
---|
| 4289 | + ctrlPanel.validate(); // ? new |
---|
3801 | 4290 | ctrlPanel.repaint(); |
---|
3802 | 4291 | } |
---|
3803 | 4292 | } |
---|
.. | .. |
---|
3806 | 4295 | |
---|
3807 | 4296 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3808 | 4297 | { |
---|
| 4298 | + if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 4299 | + Save(); |
---|
3809 | 4300 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3810 | 4301 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3811 | 4302 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
3892 | 4383 | { |
---|
3893 | 4384 | ResetModel(); |
---|
3894 | 4385 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 4386 | + |
---|
| 4387 | + if (thing.Size() == 0) |
---|
| 4388 | + { |
---|
| 4389 | + //EditSelection(false); |
---|
| 4390 | + } |
---|
| 4391 | + |
---|
3895 | 4392 | refreshContents(); |
---|
3896 | 4393 | } |
---|
3897 | 4394 | |
---|
.. | .. |
---|
4009 | 4506 | } |
---|
4010 | 4507 | } |
---|
4011 | 4508 | } |
---|
| 4509 | + |
---|
4012 | 4510 | LoadGFDThread loadGFDThread; |
---|
4013 | 4511 | |
---|
4014 | 4512 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4028 | 4526 | |
---|
4029 | 4527 | try |
---|
4030 | 4528 | { |
---|
| 4529 | + // Try compressed version first. |
---|
4031 | 4530 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4032 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4531 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4532 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4033 | 4533 | |
---|
4034 | 4534 | readobj = (Object3D) p.readObject(); |
---|
4035 | 4535 | istream.close(); |
---|
.. | .. |
---|
4037 | 4537 | readobj.ResetDisplayList(); |
---|
4038 | 4538 | } catch (Exception e) |
---|
4039 | 4539 | { |
---|
4040 | | - e.printStackTrace(); |
---|
| 4540 | + //e.printStackTrace(); |
---|
| 4541 | + try |
---|
| 4542 | + { |
---|
| 4543 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4544 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4545 | + |
---|
| 4546 | + readobj = (Object3D) p.readObject(); |
---|
| 4547 | + istream.close(); |
---|
| 4548 | + |
---|
| 4549 | + readobj.ResetDisplayList(); |
---|
| 4550 | + } catch (Exception e2) |
---|
| 4551 | + { |
---|
| 4552 | + e2.printStackTrace(); |
---|
| 4553 | + } |
---|
4041 | 4554 | } |
---|
4042 | 4555 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4043 | 4556 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4083 | 4596 | |
---|
4084 | 4597 | void LoadIt(Object obj) |
---|
4085 | 4598 | { |
---|
| 4599 | + if (obj == null) |
---|
| 4600 | + { |
---|
| 4601 | + // Invalid file |
---|
| 4602 | + return; |
---|
| 4603 | + } |
---|
| 4604 | + |
---|
4086 | 4605 | System.out.println("Loaded " + obj); |
---|
4087 | 4606 | //new Exception().printStackTrace(); |
---|
4088 | 4607 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4092 | 4611 | |
---|
4093 | 4612 | if (readobj != null) |
---|
4094 | 4613 | { |
---|
| 4614 | + if (Globals.SAVEONMAKE) |
---|
| 4615 | + Save(); |
---|
4095 | 4616 | try |
---|
4096 | 4617 | { |
---|
4097 | 4618 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4154 | 4675 | |
---|
4155 | 4676 | void load() // throws ClassNotFoundException |
---|
4156 | 4677 | { |
---|
4157 | | - if (GrafreeD.standAlone) |
---|
| 4678 | + if (Grafreed.standAlone) |
---|
4158 | 4679 | { |
---|
4159 | 4680 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4160 | 4681 | browser.show(); |
---|
.. | .. |
---|
4241 | 4762 | try |
---|
4242 | 4763 | { |
---|
4243 | 4764 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4244 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4765 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4766 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4245 | 4767 | |
---|
4246 | 4768 | p.writeObject(copy); |
---|
4247 | 4769 | p.flush(); |
---|
4248 | 4770 | |
---|
| 4771 | + zstream.close(); |
---|
4249 | 4772 | ostream.close(); |
---|
4250 | 4773 | |
---|
4251 | 4774 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4255 | 4778 | { |
---|
4256 | 4779 | } |
---|
4257 | 4780 | } |
---|
| 4781 | + |
---|
4258 | 4782 | String lastname; |
---|
4259 | 4783 | |
---|
4260 | 4784 | void saveAs() |
---|
4261 | 4785 | { |
---|
4262 | | - if (GrafreeD.standAlone) |
---|
| 4786 | + if (Grafreed.standAlone) |
---|
4263 | 4787 | { |
---|
4264 | 4788 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4265 | 4789 | browser.setVisible(true); |
---|
4266 | 4790 | String filename = browser.getFile(); |
---|
4267 | 4791 | if (filename != null && filename.length() > 0) |
---|
4268 | 4792 | { |
---|
| 4793 | + if (!filename.endsWith(".gfd")) |
---|
| 4794 | + filename += ".gfd"; |
---|
4269 | 4795 | lastname = browser.getDirectory() + filename; |
---|
4270 | 4796 | save(); |
---|
4271 | 4797 | } |
---|
.. | .. |
---|
4364 | 4890 | try |
---|
4365 | 4891 | { |
---|
4366 | 4892 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4367 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4368 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4893 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4894 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4369 | 4895 | |
---|
4370 | 4896 | Object3D objectparent = obj.parent; |
---|
4371 | 4897 | obj.parent = null; |
---|
4372 | 4898 | |
---|
4373 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4899 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4374 | 4900 | |
---|
4375 | 4901 | obj.parent = objectparent; |
---|
4376 | 4902 | |
---|
.. | .. |
---|
4382 | 4908 | p.writeObject(object); |
---|
4383 | 4909 | p.flush(); |
---|
4384 | 4910 | |
---|
| 4911 | + zstream.close(); |
---|
4385 | 4912 | ostream.close(); |
---|
4386 | | - // zstream.close(); |
---|
4387 | 4913 | |
---|
4388 | 4914 | // group.selection.get(0).parent = parent; |
---|
4389 | 4915 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4404 | 4930 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4405 | 4931 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4406 | 4932 | copy.generatePOV(buffer); |
---|
4407 | | - if (GrafreeD.standAlone) |
---|
| 4933 | + if (Grafreed.standAlone) |
---|
4408 | 4934 | { |
---|
4409 | 4935 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4410 | 4936 | browser.show(); |
---|
.. | .. |
---|
4430 | 4956 | Object3D client; |
---|
4431 | 4957 | Object3D copy; |
---|
4432 | 4958 | MenuBar menuBar; |
---|
4433 | | - Menu windowMenu; |
---|
| 4959 | + Menu fileMenu; |
---|
| 4960 | + MenuItem newItem; |
---|
4434 | 4961 | MenuItem loadItem; |
---|
4435 | 4962 | MenuItem saveItem; |
---|
4436 | 4963 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4438 | 4965 | MenuItem reexportItem; |
---|
4439 | 4966 | MenuItem povItem; |
---|
4440 | 4967 | MenuItem closeItem; |
---|
4441 | | - Menu cameraMenu; |
---|
| 4968 | + |
---|
4442 | 4969 | CheckboxMenuItem zBufferItem; |
---|
4443 | 4970 | //MenuItem normalLensItem; |
---|
4444 | | - MenuItem editCameraItem; |
---|
4445 | | - MenuItem revertCameraItem; |
---|
4446 | | - CheckboxMenuItem toggleLiveItem; |
---|
4447 | 4971 | MenuItem stepItem; |
---|
4448 | | - CheckboxMenuItem toggleFullItem; |
---|
| 4972 | + CheckboxMenuItem toggleLiveItem; |
---|
| 4973 | + CheckboxMenuItem toggleFullScreenItem; |
---|
| 4974 | + CheckboxMenuItem toggleTimelineItem; |
---|
4449 | 4975 | CheckboxMenuItem toggleRenderItem; |
---|
4450 | 4976 | CheckboxMenuItem toggleDebugItem; |
---|
4451 | 4977 | CheckboxMenuItem toggleFrustumItem; |
---|
4452 | 4978 | CheckboxMenuItem toggleFootContactItem; |
---|
4453 | 4979 | CheckboxMenuItem toggleDLItem; |
---|
4454 | 4980 | CheckboxMenuItem toggleTextureItem; |
---|
4455 | | - CheckboxMenuItem toggleRandomItem; |
---|
| 4981 | + CheckboxMenuItem toggleSwitchItem; |
---|
4456 | 4982 | CheckboxMenuItem toggleRootItem; |
---|
4457 | 4983 | CheckboxMenuItem animationItem; |
---|
4458 | 4984 | CheckboxMenuItem toggleHandleItem; |
---|
4459 | 4985 | CheckboxMenuItem togglePaintItem; |
---|
4460 | 4986 | JSplitPane mainPanel; |
---|
4461 | 4987 | JScrollPane scrollpane; |
---|
| 4988 | + |
---|
4462 | 4989 | JPanel toolbarPanel; |
---|
4463 | | - JPanel treePanel; |
---|
| 4990 | + |
---|
| 4991 | + cGridBag treePanel; |
---|
| 4992 | + |
---|
4464 | 4993 | JPanel radioPanel; |
---|
4465 | 4994 | ButtonGroup buttonGroup; |
---|
4466 | | - JPanel ctrlPanel; |
---|
4467 | | - JPanel materialPanel; |
---|
| 4995 | + |
---|
| 4996 | + cGridBag toolboxPanel; |
---|
| 4997 | + cGridBag materialPanel; |
---|
| 4998 | + cGridBag ctrlPanel; |
---|
| 4999 | + |
---|
4468 | 5000 | JScrollPane infoPanel; |
---|
4469 | | - JPanel optionsPanel; |
---|
| 5001 | + |
---|
| 5002 | + cGridBag optionsPanel; |
---|
| 5003 | + |
---|
4470 | 5004 | JTabbedPane objectPanel; |
---|
4471 | | - JPanel XYZPanel; |
---|
| 5005 | + boolean materialFlushed; |
---|
| 5006 | + Object3D latestObject; |
---|
| 5007 | + |
---|
| 5008 | + cGridBag XYZPanel; |
---|
| 5009 | + |
---|
4472 | 5010 | JSplitPane gridPanel; |
---|
4473 | 5011 | JSplitPane bigPanel; |
---|
4474 | | - JPanel bigThree; |
---|
4475 | | - JTabbedPane scenePanel; |
---|
4476 | | - JPanel cameraPanel; |
---|
| 5012 | + |
---|
| 5013 | + cGridBag bigThree; |
---|
| 5014 | + cGridBag scenePanel; |
---|
| 5015 | + cGridBag centralPanel; |
---|
| 5016 | + JSplitPane cameraPanel; |
---|
| 5017 | + JPanel timelinePanel; |
---|
| 5018 | + JMenuBar timelineMenubar; |
---|
4477 | 5019 | JSplitPane framePanel; |
---|
4478 | 5020 | JTextArea/*Field*/ nameField; |
---|
4479 | | - cButton textureButton; |
---|
| 5021 | + //cButton textureButton; |
---|
4480 | 5022 | cButton okButton; |
---|
4481 | 5023 | cButton applyButton; |
---|
4482 | 5024 | cButton cancelButton; |
---|
.. | .. |
---|
4523 | 5065 | // MATERIAL |
---|
4524 | 5066 | JLabel materialLabel; |
---|
4525 | 5067 | JLabel colorLabel; |
---|
4526 | | - NumberSlider colorField; |
---|
| 5068 | + cNumberSlider colorField; |
---|
4527 | 5069 | JLabel modulationLabel; |
---|
4528 | | - NumberSlider modulationField; |
---|
| 5070 | + cNumberSlider modulationField; |
---|
4529 | 5071 | JLabel metalnessLabel; |
---|
4530 | | - NumberSlider metalnessField; |
---|
| 5072 | + cNumberSlider metalnessField; |
---|
4531 | 5073 | JLabel diffuseLabel; |
---|
4532 | | - NumberSlider diffuseField; |
---|
| 5074 | + cNumberSlider diffuseField; |
---|
4533 | 5075 | JLabel specularLabel; |
---|
4534 | | - NumberSlider specularField; |
---|
| 5076 | + cNumberSlider specularField; |
---|
4535 | 5077 | JLabel shininessLabel; |
---|
4536 | | - NumberSlider shininessField; |
---|
| 5078 | + cNumberSlider shininessField; |
---|
4537 | 5079 | JLabel shiftLabel; |
---|
4538 | | - NumberSlider shiftField; |
---|
| 5080 | + cNumberSlider shiftField; |
---|
4539 | 5081 | JLabel ambientLabel; |
---|
4540 | | - NumberSlider ambientField; |
---|
| 5082 | + cNumberSlider ambientField; |
---|
4541 | 5083 | JLabel lightareaLabel; |
---|
4542 | | - NumberSlider lightareaField; |
---|
| 5084 | + cNumberSlider lightareaField; |
---|
4543 | 5085 | JLabel diffusenessLabel; |
---|
4544 | | - NumberSlider diffusenessField; |
---|
| 5086 | + cNumberSlider diffusenessField; |
---|
4545 | 5087 | JLabel velvetLabel; |
---|
4546 | | - NumberSlider velvetField; |
---|
| 5088 | + cNumberSlider velvetField; |
---|
4547 | 5089 | JLabel sheenLabel; |
---|
4548 | | - NumberSlider sheenField; |
---|
| 5090 | + cNumberSlider sheenField; |
---|
4549 | 5091 | JLabel subsurfaceLabel; |
---|
4550 | | - NumberSlider subsurfaceField; |
---|
| 5092 | + cNumberSlider subsurfaceField; |
---|
4551 | 5093 | //JLabel bumpLabel; |
---|
4552 | 5094 | //NumberSlider bumpField; |
---|
4553 | 5095 | JLabel backlitLabel; |
---|
4554 | | - NumberSlider backlitField; |
---|
| 5096 | + cNumberSlider backlitField; |
---|
4555 | 5097 | JLabel anisoLabel; |
---|
4556 | | - NumberSlider anisoField; |
---|
| 5098 | + cNumberSlider anisoField; |
---|
4557 | 5099 | JLabel anisoVLabel; |
---|
4558 | | - NumberSlider anisoVField; |
---|
| 5100 | + cNumberSlider anisoVField; |
---|
4559 | 5101 | JLabel cameraLabel; |
---|
4560 | | - NumberSlider cameraField; |
---|
| 5102 | + cNumberSlider cameraField; |
---|
4561 | 5103 | JLabel selfshadowLabel; |
---|
4562 | | - NumberSlider selfshadowField; |
---|
| 5104 | + cNumberSlider selfshadowField; |
---|
4563 | 5105 | JLabel shadowLabel; |
---|
4564 | | - NumberSlider shadowField; |
---|
| 5106 | + cNumberSlider shadowField; |
---|
4565 | 5107 | JLabel textureLabel; |
---|
4566 | | - NumberSlider textureField; |
---|
| 5108 | + cNumberSlider textureField; |
---|
4567 | 5109 | JLabel opacityLabel; |
---|
4568 | | - NumberSlider opacityField; |
---|
| 5110 | + cNumberSlider opacityField; |
---|
4569 | 5111 | JLabel fakedepthLabel; |
---|
4570 | | - NumberSlider fakedepthField; |
---|
| 5112 | + cNumberSlider fakedepthField; |
---|
4571 | 5113 | JLabel shadowbiasLabel; |
---|
4572 | | - NumberSlider shadowbiasField; |
---|
| 5114 | + cNumberSlider shadowbiasField; |
---|
4573 | 5115 | JLabel bumpLabel; |
---|
4574 | | - NumberSlider bumpField; |
---|
| 5116 | + cNumberSlider bumpField; |
---|
4575 | 5117 | JLabel noiseLabel; |
---|
4576 | | - NumberSlider noiseField; |
---|
| 5118 | + cNumberSlider noiseField; |
---|
4577 | 5119 | JLabel powerLabel; |
---|
4578 | | - NumberSlider powerField; |
---|
| 5120 | + cNumberSlider powerField; |
---|
4579 | 5121 | JLabel borderfadeLabel; |
---|
4580 | | - NumberSlider borderfadeField; |
---|
| 5122 | + cNumberSlider borderfadeField; |
---|
4581 | 5123 | JLabel fogLabel; |
---|
4582 | | - NumberSlider fogField; |
---|
| 5124 | + cNumberSlider fogField; |
---|
4583 | 5125 | JLabel opacityPowerLabel; |
---|
4584 | | - NumberSlider opacityPowerField; |
---|
4585 | | - JTree jTree; |
---|
| 5126 | + cNumberSlider opacityPowerField; |
---|
| 5127 | + cTree jTree; |
---|
4586 | 5128 | //ObjectUI parent; |
---|
| 5129 | + |
---|
| 5130 | + cNumberSlider normalpushField; |
---|
| 5131 | + |
---|
| 5132 | + private MenuItem importGFDItem; |
---|
| 5133 | + private MenuItem importVRMLX3DItem; |
---|
| 5134 | + private MenuItem import3DSItem; |
---|
| 5135 | + private MenuItem importOBJItem; |
---|
4587 | 5136 | } |
---|