GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
ObjEditor.java | ●●●●● patch | view | raw | blame | history | |
Object3D.java | ●●●●● patch | view | raw | blame | history | |
cButton.java | ●●●●● patch | view | raw | blame | history | |
timeflow/app/TimeflowApp.java | ●●●●● patch | view | raw | blame | history |
GroupEditor.java
.. .. @@ -520,6 +520,9 @@ 520 520 521 521 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); 522 522 flashSelectionButton.addActionListener(this); 523 +524 + oe.toolbarPanel.add(new cButton(" ", false));525 +523 526 oe.aConstraints.gridx += 1; 524 527 oe.aConstraints.weighty = 0; 525 528 oe.aConstraints.gridwidth = 1; .. .. @@ -715,8 +718,7 @@ 715 718 dropAttributes |= Object3D.TEXTURE; 716 719 else 717 720 dropAttributes &= ~Object3D.TEXTURE; 718 - }719 - else if(e.getSource() == liveCB)721 + } else if(e.getSource() == liveCB)720 722 { 721 723 cameraView.ToggleLive(); 722 724 } .. .. @@ -2639,7 +2641,7 @@ 2639 2641 //gridPanel.setDividerLocation(1.0); 2640 2642 //bigPanel.setDividerLocation(0.0); 2641 2643 bigThree.remove(scenePanel); 2642 - bigThree.remove(cameraPanel);2644 + bigThree.remove(centralPanel);2643 2645 bigThree.remove(XYZPanel); 2644 2646 aWindowConstraints.gridx = 0; 2645 2647 aWindowConstraints.gridy = 0; .. .. @@ -2654,7 +2656,7 @@ 2654 2656 // aConstraints.gridheight = 3; 2655 2657 aWindowConstraints.gridx = 1; 2656 2658 aWindowConstraints.fill = GridBagConstraints.BOTH; 2657 - bigThree.add(cameraPanel, aWindowConstraints);2659 + bigThree.add(centralPanel, aWindowConstraints);2658 2660 aWindowConstraints.weightx = 0; 2659 2661 aWindowConstraints.gridx = 4; 2660 2662 aWindowConstraints.gridwidth = 1; .. .. @@ -2667,7 +2669,7 @@ 2667 2669 { 2668 2670 radio.layout = threeButton; 2669 2671 bigThree.remove(scenePanel); 2670 - bigThree.remove(cameraPanel);2672 + bigThree.remove(centralPanel);2671 2673 bigThree.remove(XYZPanel); 2672 2674 aWindowConstraints.gridx = 0; 2673 2675 aWindowConstraints.gridy = 0; .. .. @@ -2682,7 +2684,7 @@ 2682 2684 // aConstraints.gridheight = 3; 2683 2685 aWindowConstraints.gridx = 1; 2684 2686 aWindowConstraints.fill = GridBagConstraints.BOTH; 2685 - bigThree.add(cameraPanel, aWindowConstraints);2687 + bigThree.add(centralPanel, aWindowConstraints);2686 2688 aWindowConstraints.weightx = 0; 2687 2689 aWindowConstraints.gridx = 4; 2688 2690 aWindowConstraints.gridwidth = 1; .. .. @@ -2695,7 +2697,7 @@ 2695 2697 { 2696 2698 radio.layout = fourButton; 2697 2699 bigThree.remove(scenePanel); 2698 - bigThree.remove(cameraPanel);2700 + bigThree.remove(centralPanel);2699 2701 bigThree.remove(XYZPanel); 2700 2702 aWindowConstraints.gridx = 0; 2701 2703 aWindowConstraints.gridy = 0; .. .. @@ -2723,7 +2725,7 @@ 2723 2725 { 2724 2726 radio.layout = sixButton; 2725 2727 bigThree.remove(scenePanel); 2726 - bigThree.remove(cameraPanel);2728 + bigThree.remove(centralPanel);2727 2729 bigThree.remove(XYZPanel); 2728 2730 aWindowConstraints.gridx = 0; 2729 2731 aWindowConstraints.gridy = 0; .. .. @@ -2738,7 +2740,7 @@ 2738 2740 // aWindowConstraints.gridheight = 3; 2739 2741 aWindowConstraints.gridx = 1; 2740 2742 aWindowConstraints.fill = GridBagConstraints.BOTH; 2741 - bigThree.add(cameraPanel, aWindowConstraints);2743 + bigThree.add(centralPanel, aWindowConstraints);2742 2744 aWindowConstraints.weightx = 0; 2743 2745 aWindowConstraints.gridx = 4; 2744 2746 aWindowConstraints.gridwidth = 1; .. .. @@ -2751,7 +2753,7 @@ 2751 2753 { 2752 2754 radio.layout = sevenButton; 2753 2755 bigThree.remove(scenePanel); 2754 - bigThree.remove(cameraPanel);2756 + bigThree.remove(centralPanel);2755 2757 bigThree.remove(XYZPanel); 2756 2758 aWindowConstraints.gridx = 0; 2757 2759 aWindowConstraints.gridy = 0; .. .. @@ -2766,7 +2768,7 @@ 2766 2768 // aWindowConstraints.gridheight = 3; 2767 2769 aWindowConstraints.gridx = 1; 2768 2770 aWindowConstraints.fill = GridBagConstraints.BOTH; 2769 - bigThree.add(cameraPanel, aWindowConstraints);2771 + bigThree.add(centralPanel, aWindowConstraints);2770 2772 aWindowConstraints.weightx = 0; 2771 2773 aWindowConstraints.gridx = 4; 2772 2774 aWindowConstraints.gridwidth = 1; ObjEditor.java
.. .. @@ -292,9 +292,11 @@ 292 292 //normalLensItem.addActionListener(this); 293 293 cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); 294 294 revertCameraItem.addActionListener(this); 295 - cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen"));296 - toggleFullItem.addItemListener(this);297 - toggleFullItem.setState(CameraPane.FULLSCREEN);295 + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));296 + toggleFullScreenItem.addItemListener(this);297 + toggleFullScreenItem.setState(CameraPane.FULLSCREEN);298 + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));299 + toggleTimelineItem.addItemListener(this);298 300 cameraMenu.add("-"); 299 301 cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); 300 302 toggleTextureItem.addItemListener(this); .. .. @@ -1158,11 +1160,14 @@ 1158 1160 //JPanel worldPanel = 1159 1161 // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); 1160 1162 //worldPanel.setName("World"); 1161 - /*JPanel*/ cameraPanel =1162 - new JPanel(new BorderLayout());1163 - cameraPanel.add(cameraView);1164 - //new timeflow.app.TimeflowApp().TimeFlowWindow(cameraPanel, frame);1163 + centralPanel = new JPanel(new BorderLayout());1164 + timelinePanel = new JPanel(new BorderLayout());1165 + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);1165 1166 1167 + centralPanel.add(cameraView);1168 + //frame.setJMenuBar(timelineMenubar);1169 + //centralPanel.add(timelinePanel);1170 +1166 1171 //topView.camera = ; 1167 1172 //frontView.camera = new Camera(2); 1168 1173 //sideView.camera = new Camera(3); .. .. @@ -1192,7 +1197,7 @@ 1192 1197 gridPanel.add(cameraView); 1193 1198 gridPanel.add(XYZPanel); 1194 1199 */ 1195 - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout());1200 + gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout());1196 1201 gridPanel.setContinuousLayout(true); 1197 1202 gridPanel.setOneTouchExpandable(true); 1198 1203 gridPanel.setDividerLocation(1.0); .. .. @@ -1304,7 +1309,7 @@ 1304 1309 // aConstraints.gridheight = 3; 1305 1310 aWindowConstraints.gridx = 1; 1306 1311 aWindowConstraints.fill = GridBagConstraints.BOTH; 1307 - bigThree.add(cameraPanel, aWindowConstraints);1312 + bigThree.add(centralPanel, aWindowConstraints);1308 1313 aWindowConstraints.weightx = 0; 1309 1314 aWindowConstraints.gridx = 4; 1310 1315 aWindowConstraints.gridwidth = 1; .. .. @@ -2959,7 +2964,26 @@ 2959 2964 // june 2013 copy.HardTouch(); 2960 2965 cameraView.repaint(); 2961 2966 return; 2962 - } else if (event.getSource() == toggleFullItem)2967 + } else if (event.getSource() == toggleTimelineItem)2968 + {2969 + copy.timeline ^= true;2970 +2971 + if (copy.timeline)2972 + {2973 + centralPanel.remove(cameraView);2974 + centralPanel.add(timelinePanel);2975 + frame.setJMenuBar(timelineMenubar);2976 + }2977 + else2978 + {2979 + centralPanel.remove(timelinePanel);2980 + centralPanel.add(cameraView);2981 + frame.setJMenuBar(null);2982 + }2983 +2984 + frame.validate();2985 + return;2986 + } else if (event.getSource() == toggleFullScreenItem)2963 2987 { 2964 2988 if (CameraPane.FULLSCREEN) 2965 2989 { .. .. @@ -3221,9 +3245,9 @@ 3221 3245 cameraView.RevertCamera(); 3222 3246 cameraView.repaint(); 3223 3247 return; 3224 - } else if (event.getSource() == textureButton)3225 - {3226 - return; // true;3248 +// } else if (event.getSource() == textureButton)3249 +// {3250 +// return; // true;3227 3251 } else // combos... 3228 3252 if (event.getSource() == texresMenu) 3229 3253 { .. .. @@ -4445,7 +4469,8 @@ 4445 4469 MenuItem revertCameraItem; 4446 4470 CheckboxMenuItem toggleLiveItem; 4447 4471 MenuItem stepItem; 4448 - CheckboxMenuItem toggleFullItem;4472 + CheckboxMenuItem toggleFullScreenItem;4473 + CheckboxMenuItem toggleTimelineItem;4449 4474 CheckboxMenuItem toggleRenderItem; 4450 4475 CheckboxMenuItem toggleDebugItem; 4451 4476 CheckboxMenuItem toggleFrustumItem; .. .. @@ -4473,10 +4498,12 @@ 4473 4498 JSplitPane bigPanel; 4474 4499 JPanel bigThree; 4475 4500 JTabbedPane scenePanel; 4476 - JPanel cameraPanel;4501 + JPanel centralPanel;4502 + JPanel timelinePanel;4503 + JMenuBar timelineMenubar;4477 4504 JSplitPane framePanel; 4478 4505 JTextArea/*Field*/ nameField; 4479 - cButton textureButton;4506 + //cButton textureButton;4480 4507 cButton okButton; 4481 4508 cButton applyButton; 4482 4509 cButton cancelButton; Object3D.java
.. .. @@ -285,6 +285,7 @@ 285 285 return parent.GetName() + "#"; 286 286 } 287 287 288 + boolean timeline = false;288 289 boolean live = false; 289 290 boolean hide = false; 290 291 boolean link2master = false; // performs reset support/master at each frame cButton.java
.. .. @@ -7,4 +7,14 @@ 7 7 //setBorder(new javax.swing.border.EmptyBorder(0,0,0,0)); 8 8 setBorder(new javax.swing.border.EtchedBorder()); 9 9 } 10 +11 + cButton(String name, boolean border)12 + {13 + super(name);14 +15 + if (border)16 + setBorder(new javax.swing.border.EtchedBorder());17 + else18 + setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));19 + }10 20 } timeflow/app/TimeflowApp.java
.. .. @@ -68,7 +68,7 @@ 68 68 } 69 69 }; 70 70 71 - public void TimeFlowWindow(Container container, JFrame frame) throws HeadlessException71 + public JMenuBar TimeFlowWindow(Container container) throws HeadlessException72 72 { 73 73 // read example directory 74 74 String[] ex = getVisibleFiles("settings/examples"); .. .. @@ -172,7 +172,8 @@ 172 172 }); 173 173 174 174 JMenuBar menubar = new JMenuBar(); 175 - frame.setJMenuBar(menubar);175 +176 + // frame.setJMenuBar(menubar);176 177 177 178 JMenu fileMenu = new JMenu("File"); 178 179 menubar.add(fileMenu); .. .. @@ -340,7 +341,7 @@ 340 341 } 341 342 342 343 JMenu helpMenu = new JMenu("Help"); 343 - menubar.add(helpMenu);344 + //menubar.add(helpMenu);344 345 345 346 helpMenu.add(new WebDocAction(this)); 346 347 .. .. @@ -372,6 +373,8 @@ 372 373 } 373 374 } 374 375 }); 376 +377 + return menubar;375 378 } 376 379 377 380 void splash(boolean visible) .. .. @@ -404,7 +407,7 @@ 404 407 405 408 Container container = getContentPane(); 406 409 407 - TimeFlowWindow(container, this);410 + TimeFlowWindow(container);408 411 } 409 412 410 413 void makeRecentFileMenu()