From a7c1853a19caf93d7cab308fd671f5cc14659141 Mon Sep 17 00:00:00 2001 From: AWIPS User Date: Fri, 17 Apr 2015 09:33:43 -0600 Subject: [PATCH] d2d pane update to use either 5 or zero (full screen) Former-commit-id: ae28d64e7f00335fa1d207dc2e674853d06fb997 [formerly 785f28b7653aaf9440f5f01c9b315b6e98e88fc0] Former-commit-id: 837abad85ef3579aefcf1bcb8179548025f1195f --- cave/com.raytheon.uf.viz.d2d.ui/plugin.xml | 8 ++-- .../d2d/ui/actions/ChangeD2DLayoutAction.java | 6 +-- .../uf/viz/d2d/ui/perspectives/D2D5Pane.java | 46 ++++++++++--------- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml b/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml index 8db642bcaf..9d7e93e06e 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui/plugin.xml @@ -200,10 +200,10 @@ + label="Full Layout"> + value="0"> + label="Full Layout"> + value="0"> = numViews) ? 1.0f - : 1.0f / (numViews - i + 1), lastAdded); - } - lastAdded = baseView; - addedViews.add(lastAdded); - } + if (numViews > 0) { + for (int i = 0; i < baseViewsToAdd.size(); ++i) { + String baseView = baseViewsToAdd.get(i); + if (baseViewsToAdd.contains(baseView)) { + if (lastAdded == null) { + layout.addStandaloneView( + baseView, + false, + IPageLayout.LEFT, + ChangeD2DLayoutAction.getViewCount() == 0 ? ZERO_PANE_WIDTH + : FIVE_PANE_WIDTH, editorArea); + } else { + layout.addStandaloneView(baseView, false, + IPageLayout.BOTTOM, (i >= numViews) ? 1.0f + : 1.0f / (numViews - i + 1), lastAdded); + } + lastAdded = baseView; + addedViews.add(lastAdded); + } + } } addedViews.addAll(baseViewsToAdd); @@ -131,7 +133,7 @@ public class D2D5Pane implements IPerspectiveFactory { } } } - + if (extraViews.size() > 0) { IFolderLayout folder = layout.createFolder( "com.raytheon.uf.viz.d2d.ui.extrasFolder",