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">
|
label="1 Pane Layout">
|
||||||
<parameter
|
<parameter
|
||||||
name="sideViews"
|
name="sideViews"
|
||||||
value="1">
|
value="0">
|
||||||
</parameter>
|
</parameter>
|
||||||
</command>
|
</command>
|
||||||
<command
|
<command
|
||||||
|
|
|
@ -51,6 +51,7 @@ import com.raytheon.viz.ui.EditorUtil;
|
||||||
* Jan 23, 2018 7082 njensen Rewrote execute() to use Eclipse 4 MUIElements
|
* Jan 23, 2018 7082 njensen Rewrote execute() to use Eclipse 4 MUIElements
|
||||||
* to resize the display for differing number of
|
* to resize the display for differing number of
|
||||||
* side views
|
* side views
|
||||||
|
* Aug 24, 2022 srcarter If no side panes, make the side width 0
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -164,10 +165,15 @@ public class ChangeD2DLayoutAction extends AbstractHandler {
|
||||||
*/
|
*/
|
||||||
private void sizeWidth(MElementContainer<MUIElement> sideViewsContainer,
|
private void sizeWidth(MElementContainer<MUIElement> sideViewsContainer,
|
||||||
int nSideViews) {
|
int nSideViews) {
|
||||||
|
int width;
|
||||||
if (nSideViews > 5) {
|
if (nSideViews > 5) {
|
||||||
nSideViews = 5;
|
nSideViews = 5;
|
||||||
}
|
}
|
||||||
int width = (6 - nSideViews) * 1000;
|
if (nSideViews == 0) {
|
||||||
|
width = 0;
|
||||||
|
} else {
|
||||||
|
width = (6 - nSideViews) * 1000;
|
||||||
|
}
|
||||||
int diff = 10000 - width;
|
int diff = 10000 - width;
|
||||||
MElementContainer<MUIElement> screenContainer = sideViewsContainer
|
MElementContainer<MUIElement> screenContainer = sideViewsContainer
|
||||||
.getParent();
|
.getParent();
|
||||||
|
|
|
@ -51,6 +51,7 @@ import com.raytheon.viz.ui.UiUtil;
|
||||||
* 7/1/06 chammack Initial Creation.
|
* 7/1/06 chammack Initial Creation.
|
||||||
* Mar 21, 2013 1638 mschenke Changed map scales not tied to d2d
|
* Mar 21, 2013 1638 mschenke Changed map scales not tied to d2d
|
||||||
* Oct 10, 2013 2104 mschenke Switched to use MapScalesManager
|
* Oct 10, 2013 2104 mschenke Switched to use MapScalesManager
|
||||||
|
* Aug 24, 2022 srcarter Default to single pane view
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -93,30 +94,32 @@ public class D2D5Pane implements IPerspectiveFactory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int numViews = ChangeD2DLayoutAction.getViewCount() == 2 ? 2
|
int numViews = 0;
|
||||||
: baseViewsToAdd.size();
|
|
||||||
|
|
||||||
String lastAdded = null;
|
String lastAdded = null;
|
||||||
|
|
||||||
Collections.sort(baseViewsToAdd);
|
Collections.sort(baseViewsToAdd);
|
||||||
|
|
||||||
for (int i = 0; i < baseViewsToAdd.size(); ++i) {
|
if (numViews > 0) {
|
||||||
String baseView = baseViewsToAdd.get(i);
|
for (int i = 0; i < baseViewsToAdd.size(); ++i) {
|
||||||
if (baseViewsToAdd.contains(baseView)) {
|
String baseView = baseViewsToAdd.get(i);
|
||||||
if (lastAdded == null) {
|
if (baseViewsToAdd.contains(baseView)) {
|
||||||
layout.addStandaloneView(
|
if (lastAdded == null) {
|
||||||
baseView,
|
layout.addStandaloneView(baseView, false,
|
||||||
false,
|
IPageLayout.LEFT,
|
||||||
IPageLayout.LEFT,
|
ChangeD2DLayoutAction.getViewCount() == 2
|
||||||
ChangeD2DLayoutAction.getViewCount() == 2 ? THREE_PANE_WIDTH
|
? THREE_PANE_WIDTH
|
||||||
: FIVE_PANE_WIDTH, editorArea);
|
: FIVE_PANE_WIDTH,
|
||||||
} else {
|
editorArea);
|
||||||
layout.addStandaloneView(baseView, false,
|
} else {
|
||||||
IPageLayout.BOTTOM, (i >= numViews) ? 1.0f
|
layout.addStandaloneView(baseView, false,
|
||||||
: 1.0f / (numViews - i + 1), lastAdded);
|
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