Change default d2d startup to 1 pane
plugin.xml - changed 1panel to have 0 side panes ChangeD2DLayoutAction - if 0 side panels, make side panel width 0 D2D5Pane - change initial start up to have 0 side panes
This commit is contained in:
parent
cba59e1fc2
commit
18aafccd2d
3 changed files with 31 additions and 22 deletions
|
@ -251,7 +251,7 @@
|
|||
label="1 Pane Layout">
|
||||
<parameter
|
||||
name="sideViews"
|
||||
value="1">
|
||||
value="0">
|
||||
</parameter>
|
||||
</command>
|
||||
<command
|
||||
|
|
|
@ -51,7 +51,8 @@ import com.raytheon.viz.ui.EditorUtil;
|
|||
* Jan 23, 2018 7082 njensen Rewrote execute() to use Eclipse 4 MUIElements
|
||||
* to resize the display for differing number of
|
||||
* side views
|
||||
*
|
||||
* Aug 24, 2022 srcarter If no side panes, make the side width 0
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
|
@ -164,10 +165,15 @@ public class ChangeD2DLayoutAction extends AbstractHandler {
|
|||
*/
|
||||
private void sizeWidth(MElementContainer<MUIElement> sideViewsContainer,
|
||||
int nSideViews) {
|
||||
int width;
|
||||
if (nSideViews > 5) {
|
||||
nSideViews = 5;
|
||||
}
|
||||
int width = (6 - nSideViews) * 1000;
|
||||
if (nSideViews == 0) {
|
||||
width = 0;
|
||||
} else {
|
||||
width = (6 - nSideViews) * 1000;
|
||||
}
|
||||
int diff = 10000 - width;
|
||||
MElementContainer<MUIElement> screenContainer = sideViewsContainer
|
||||
.getParent();
|
||||
|
|
|
@ -51,7 +51,8 @@ import com.raytheon.viz.ui.UiUtil;
|
|||
* 7/1/06 chammack Initial Creation.
|
||||
* Mar 21, 2013 1638 mschenke Changed map scales not tied to d2d
|
||||
* Oct 10, 2013 2104 mschenke Switched to use MapScalesManager
|
||||
*
|
||||
* Aug 24, 2022 srcarter Default to single pane view
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -93,30 +94,32 @@ public class D2D5Pane implements IPerspectiveFactory {
|
|||
}
|
||||
}
|
||||
|
||||
int numViews = ChangeD2DLayoutAction.getViewCount() == 2 ? 2
|
||||
: baseViewsToAdd.size();
|
||||
int numViews = 0;
|
||||
|
||||
String lastAdded = null;
|
||||
|
||||
Collections.sort(baseViewsToAdd);
|
||||
|
||||
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() == 2 ? THREE_PANE_WIDTH
|
||||
: FIVE_PANE_WIDTH, editorArea);
|
||||
} else {
|
||||
layout.addStandaloneView(baseView, false,
|
||||
IPageLayout.BOTTOM, (i >= numViews) ? 1.0f
|
||||
: 1.0f / (numViews - i + 1), 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() == 2
|
||||
? THREE_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);
|
||||
}
|
||||
lastAdded = baseView;
|
||||
addedViews.add(lastAdded);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue