Omaha #3171 Change Archive Retention labels.
Change-Id: I42cbf2aae820c75564bba7dfbd4d7b2589b9e085 (cherry picked from commit 68b1dd7bca81df01df646d2b455383105e70b5bc [formerly825e2c1b19
] [formerly44a23b4500
[formerly 1249deb91b6463044a59ca564e26f82612f52d40]]) Former-commit-id:f79496d029
[formerly e2be5e04fff2e0f2c4cd25ed94c0daae07933455] Former-commit-id:ef2e4d0c2f
This commit is contained in:
parent
128b060e9f
commit
6894c12589
2 changed files with 20 additions and 6 deletions
|
@ -58,6 +58,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
* Oct 07, 2013 #2438 rferrel Properly save and load retention times.
|
||||
* Apr 14, 2014 #3023 rferrel Code clean up.
|
||||
* Apr 24, 2014 #3045 rferrel Implement loadedAllDsipalyData.
|
||||
* May 28, 2014 #3171 rferrel Change retention labels.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -159,14 +160,16 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg {
|
|||
|
||||
// composite for retention time selection
|
||||
Composite selectionComp = new Composite(retentionComp, SWT.NONE);
|
||||
selectionComp.setLayout(new GridLayout(3, true));
|
||||
selectionComp.setLayout(new GridLayout(3, false));
|
||||
selectionComp.setLayoutData(new GridData(SWT.FILL, SWT.DEFAULT, true,
|
||||
false));
|
||||
|
||||
gd = new GridData();
|
||||
gd.horizontalIndent = 20;
|
||||
Label minRetentionLbl = new Label(selectionComp, SWT.NONE);
|
||||
minRetentionLbl.setText("Minimum Retention: ");
|
||||
String tooltip = "Default retetion for all of\nthe Archive's Categories.";
|
||||
minRetentionLbl.setText("Default Retention:");
|
||||
minRetentionLbl.setToolTipText(tooltip);
|
||||
minRetentionLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(60, SWT.DEFAULT);
|
||||
|
@ -179,7 +182,8 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg {
|
|||
|
||||
Combo minRetentionCbo = new Combo(selectionComp, SWT.VERTICAL
|
||||
| SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
|
||||
minRetention = new RetentionHours(1, minRetentionSpnr, minRetentionCbo) {
|
||||
minRetention = new RetentionHours(1, minRetentionSpnr, minRetentionCbo,
|
||||
tooltip) {
|
||||
|
||||
@Override
|
||||
protected boolean handleTimeSelection() {
|
||||
|
@ -195,8 +199,10 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg {
|
|||
*/
|
||||
gd = new GridData();
|
||||
gd.horizontalIndent = 20;
|
||||
tooltip = "Current Category's retention\nfor checked Data Sets.";
|
||||
Label extRetentionLbl = new Label(selectionComp, SWT.NONE);
|
||||
extRetentionLbl.setText("Extended Retention: ");
|
||||
extRetentionLbl.setText("Selected Retention: ");
|
||||
extRetentionLbl.setToolTipText(tooltip);
|
||||
extRetentionLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(60, SWT.DEFAULT);
|
||||
|
@ -209,7 +215,8 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg {
|
|||
|
||||
Combo extRetentionCbo = new Combo(selectionComp, SWT.VERTICAL
|
||||
| SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
|
||||
extRetention = new RetentionHours(1, extRetentionSpnr, extRetentionCbo) {
|
||||
extRetention = new RetentionHours(1, extRetentionSpnr, extRetentionCbo,
|
||||
tooltip) {
|
||||
|
||||
@Override
|
||||
protected boolean handleTimeSelection() {
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 2, 2013 1966 rferrel Initial creation
|
||||
* May 28, 2014 3171 rferrel Change retention labels.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -75,13 +76,17 @@ public class RetentionHours {
|
|||
*/
|
||||
private final List<IModifyListener> listeners = new CopyOnWriteArrayList<IModifyListener>();
|
||||
|
||||
private final String tooltip;
|
||||
|
||||
/**
|
||||
* Constructor with default 7 day retention.
|
||||
*/
|
||||
public RetentionHours(int minUnit, Spinner timeSpnr, Combo timeUnitCombo) {
|
||||
public RetentionHours(int minUnit, Spinner timeSpnr, Combo timeUnitCombo,
|
||||
String tooltip) {
|
||||
this.minUnit = minUnit;
|
||||
this.timeSpnr = timeSpnr;
|
||||
this.timeUnitCombo = timeUnitCombo;
|
||||
this.tooltip = tooltip;
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -89,6 +94,7 @@ public class RetentionHours {
|
|||
* Set up Listeners on the combo boxes for time conversion.
|
||||
*/
|
||||
private void init() {
|
||||
timeSpnr.setToolTipText(tooltip);
|
||||
timeSpnr.setMinimum(minUnit);
|
||||
timeSpnr.addSelectionListener(new SelectionAdapter() {
|
||||
|
||||
|
@ -115,6 +121,7 @@ public class RetentionHours {
|
|||
});
|
||||
timeUnitCombo.setData(timeUnitCombo.getItem(timeUnitCombo
|
||||
.getSelectionIndex()));
|
||||
timeUnitCombo.setToolTipText(tooltip);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue