| CODENOTIFIER | HelpYou are not signed inSign in |
Project: jEdit
Revision: 13523
Author: shlomy
Date: 04 Sep 2008 04:52:47
Changes:Undo a small change I committed last version that caused the initial run to start without a text area.
Also, change floating properties for all existing tool windows whenever the options change.
| ... | ...@@ -310,12 +310,16 @@ | |
| 310 | 310 | tw.getTypeDescriptor(ToolWindowType.DOCKED).setIdVisibleOnTitleBar(false); |
| 311 | 311 | DockedTypeDescriptor dockedDescriptor = tw.getTypeDescriptor(DockedTypeDescriptor.class); |
| 312 | 312 | dockedDescriptor.addToolWindowAction(new FloatingFreeAction()); |
| 313 | setFloatingProperties((FloatingTypeDescriptor) tw.getTypeDescriptor(ToolWindowType.FLOATING)); | |
| 314 | setFloatingProperties((FloatingTypeDescriptor) tw.getTypeDescriptor(ToolWindowType.FLOATING_FREE)); | |
| 313 | setFloatingProperties(tw); | |
| 315 | 314 | return tw; |
| 316 | 315 | } |
| 317 | 316 | |
| 318 | private void setFloatingProperties(FloatingTypeDescriptor floatDescriptor) { | |
| 317 | private void setFloatingProperties(ToolWindow tw) { | |
| 318 | setFloatingDescriptorProperties((FloatingTypeDescriptor) tw.getTypeDescriptor(ToolWindowType.FLOATING)); | |
| 319 | setFloatingDescriptorProperties((FloatingTypeDescriptor) tw.getTypeDescriptor(ToolWindowType.FLOATING_FREE)); | |
| 320 | } | |
| 321 | ||
| 322 | private void setFloatingDescriptorProperties(FloatingTypeDescriptor floatDescriptor) { | |
| 319 | 323 | floatDescriptor.setAlwaysOnTop(OptionPane.getFloatOnTopProp()); |
| 320 | 324 | floatDescriptor.setOsDecorated(OptionPane.getFloatOsDecorationsProp()); |
| 321 | 325 | floatDescriptor.setAddToTaskBar(OptionPane.getFloatAddToTaskBarProp()); |
| ... | ...@@ -377,7 +381,6 @@ | |
| 377 | 381 | public void setMainPanel(JPanel panel) |
| 378 | 382 | { |
| 379 | 383 | wm.getContentManager().addContent("main", "main", null, panel); |
| 380 | wm.getContentManager().setEnabled(false); | |
| 381 | 384 | } |
| 382 | 385 | |
| 383 | 386 | public class MyDoggyDockingArea implements DockingArea { |
| ... | ...@@ -440,6 +443,10 @@ | |
| 440 | 443 | protected void propertiesChanged() { |
| 441 | 444 | super.propertiesChanged(); |
| 442 | 445 | setPushAwayMode(); |
| 446 | // Update floating properties | |
| 447 | ToolWindow[] windows = wm.getToolWindows(); | |
| 448 | for (ToolWindow w: windows) | |
| 449 | setFloatingProperties(w); | |
| 443 | 450 | } |
| 444 | 451 | |
| 445 | 452 | private void setPushAwayMode() { |