From: <sh...@us...> - 2007-12-11 11:06:09
|
Revision: 11392 http://jedit.svn.sourceforge.net/jedit/?rev=11392&view=rev Author: shlomy Date: 2007-12-11 03:06:07 -0800 (Tue, 11 Dec 2007) Log Message: ----------- More fixes 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-11 10:15:16 UTC (rev 11391) +++ plugins/InfoNodeDW/trunk/src/infonode/WindowManager.java 2007-12-11 11:06:07 UTC (rev 11392) @@ -67,7 +67,6 @@ private View mainView; private PanelWindowContainer topPanel, bottomPanel, leftPanel, rightPanel; private TabWindow leftTab, rightTab, bottomTab, topTab; - private HashMap<String, String> positions; private DockingWindowsTheme currentTheme = null; private HashSet<DockingWindow> dummyViews = new HashSet<DockingWindow>(); private ViewCloseListener viewCloseListener = new ViewCloseListener(); @@ -108,7 +107,6 @@ this.view = view; this.factory = factory; viewMap = new JEditViewMap(this); - positions = new HashMap<String, String>(); center = new JPanel(new BorderLayout()); mainView = new View(MAIN_VIEW_NAME, null, center); mainView.setName(MAIN_VIEW_NAME); @@ -289,8 +287,7 @@ String position = getDockablePosition(name); if (position.equals(DockableWindowManager.FLOATING)) continue; - String curPosition = getCurrentDockablePosition(name); - if (position == null || position.equals(curPosition)) + if (viewMap.getView(name) != null) continue; showDockableWindowNoNotify(name); notify.add(name); @@ -300,9 +297,6 @@ } } - private String getCurrentDockablePosition(String name) { - return positions.get(name); - } @Override public void handleMessage(EBMessage msg) { if (msg instanceof PropertiesChanged) @@ -395,7 +389,6 @@ View v = new View(getDockableTitle(name), null, c); v.setName(name); viewMap.addView(name, v); - positions.put(name, getDockablePosition(name)); v.addListener(viewCloseListener); return v; } @@ -418,14 +411,8 @@ private void showDockableWindowNoNotify(String name) { String position = getDockablePosition(name); View v = viewMap.getView(name); - if (v == null) + if (v == null) { v = constructDockableView(name); - else { - viewCreateListener.checkFirstShow(v); - v = viewMap.getView(name); - } - String currentPos = getCurrentDockablePosition(name); - if (currentPos == null || (! currentPos.equals(position))) { TabWindow tw = null; if (position.equals(DockableWindowManager.LEFT)) tw = leftTab; @@ -445,6 +432,11 @@ fw.getTopLevelAncestor().setVisible(true); } } + else { + viewCreateListener.checkFirstShow(v); + v = viewMap.getView(name); + } + v.getWindowParent().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. |