Viewer updates (#19)

* Update .project

* Two little problems. 1. Packing of navigation dialog in Viewer mode; 2.
stopping limits of viewer scroll bar extending to present, which was
annoying with old data since data were in tiny fraction of scroll.

* Revert "Update .project"

This reverts commit ba2f15c088.

* Revert "Revert "Update .project""

This reverts commit bffd413cfa.

* Revert "Revert "Revert "Update .project"""

This reverts commit c8f2f2a1be.
This commit is contained in:
Douglas Gillespie 2022-02-22 12:22:19 +00:00 committed by GitHub
parent 642080d8db
commit b3cb30c512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -221,9 +221,16 @@ public class DataMapControl extends PamControlledUnit implements PamSettings {
firstTime = Math.min(firstTime, aSettingsSource.getSettings(0).getSettingsTime());
//don't let crazy times from corrupted data make giant datamaps
if (aSettingsSource.getSettings(nSets-1).getSettingsTime()<PamConstants.MAX_DATE_TIME) {
lastTime = Math.max(lastTime, aSettingsSource.getSettings(nSets-1).getSettingsTime());
}
/*
* ALSO, DON'T ALLOW REANALYSIS TIME IN THE FAR FUTURE OVER EXTEND THE DISPLAY TIME
* SINCE WHEN ANALYSING OLD DATA, IT'S INCREASINGLY SQUISHING THE SCROLL BAR AND MAKING IT HARD TO USE
* SO SET A MAX TIME WHICH IS ABOUT 10% BIGGER THAN THE MAX IN THE DATA.
*/
long maxTime = lastTime + (lastTime-firstTime)/10;
// if (aSettingsSource.getSettings(nSets-1).getSettingsTime()<PamConstants.MAX_DATE_TIME) {
// if (aSettingsSource.getSettings(nSets-1).getSettingsTime()<maxTime) {
lastTime = Math.max(lastTime, Math.min(maxTime, aSettingsSource.getSettings(nSets-1).getSettingsTime()));
// }
}
}

View File

@ -97,7 +97,7 @@ public class LoadOptionsDialog extends PamDialog {
// parentComponent.getp
setDialogComponent(panel);
// setSize(new Dimension(300,200));
pack();
// pack();
setLocationRelativeTo(parentComponent);
@ -173,6 +173,7 @@ public class LoadOptionsDialog extends PamDialog {
stepSize.setText(String.format("%d", scroller.scrollerData.pageStep));
minDuration = scrollerData.getStepSizeMillis()*100;
maxDuration = minDuration * 1000000;
pack();
}
private void setDuration(long duration) {