From: <sh...@us...> - 2007-12-11 09:01:13
|
Revision: 11389 http://jedit.svn.sourceforge.net/jedit/?rev=11389&view=rev Author: shlomy Date: 2007-12-11 01:01:09 -0800 (Tue, 11 Dec 2007) Log Message: ----------- Fixed the handling of the tab windows Modified Paths: -------------- plugins/InfoNodeDW/trunk/src/infonode/WindowManager.java Modified: plugins/InfoNodeDW/trunk/src/infonode/WindowManager.java =================================================================== --- plugins/InfoNodeDW/trunk/src/infonode/WindowManager.java 2007-12-10 10:28:33 UTC (rev 11388) +++ plugins/InfoNodeDW/trunk/src/infonode/WindowManager.java 2007-12-11 09:01:09 UTC (rev 11389) @@ -180,16 +180,10 @@ private void minimizeTabWindows(TabWindow tw, Direction dir) { for (int i = 0; i < tw.getChildWindowCount(); i++) { DockingWindow w = tw.getChildWindow(i); + //w.minimize(dir); w.addListener(viewCreateListener); } - tw.minimize(dir); - //if (tw.getChildWindowCount() == 0) - //tw.setVisible(false); -/* while (tw.getChildWindowCount() > 0) { - DockingWindow w = tw.getChildWindow(0); - w.minimize(dir); - w.addListener(viewCreateListener); - }*/ + tw.setVisible(false); } private void setViewLayout() { DockingWindow sw = null; @@ -424,30 +418,30 @@ private void showDockableWindowNoNotify(String name) { String position = getDockablePosition(name); View v = viewMap.getView(name); - if (v == null) { + if (v == null) v = constructDockableView(name); - TabWindow tw = null; - if (position.equals(DockableWindowManager.LEFT)) - tw = leftTab; - else if (position.equals(DockableWindowManager.RIGHT)) - tw = rightTab; - else if (position.equals(DockableWindowManager.BOTTOM)) - tw = bottomTab; - if (position.equals(DockableWindowManager.TOP)) - tw = topTab; - if (tw != null) { - tw.addTab(v); - if (tw.isMinimized()) - tw.restore(); - //setViewLayout(); - } else { - // floating - FloatingWindow fw = rootWindow.createFloatingWindow( - new Point(0, 0), v.getPreferredSize(), v); - fw.getTopLevelAncestor().setVisible(true); - } - } else + else { viewCreateListener.checkFirstShow(v); + v = viewMap.getView(name); + } + TabWindow tw = null; + if (position.equals(DockableWindowManager.LEFT)) + tw = leftTab; + else if (position.equals(DockableWindowManager.RIGHT)) + tw = rightTab; + else if (position.equals(DockableWindowManager.BOTTOM)) + tw = bottomTab; + if (position.equals(DockableWindowManager.TOP)) + tw = topTab; + if (tw != null) { + if (v.getWindowParent() != tw) + tw.addTab(v); + tw.setVisible(true); + } else { // floating + FloatingWindow fw = rootWindow.createFloatingWindow( + new Point(0, 0), v.getPreferredSize(), v); + fw.getTopLevelAncestor().setVisible(true); + } v.makeVisible(); } public Component add(Component comp, int index) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |