Issue #2222 Changes to allow display of all selected data.
Change-Id: I1594f7f3cf888a3de7e6458e5e225eaa4d337adb Former-commit-id: b49c3147991d87c32aba619521502438c11eb8f6
This commit is contained in:
parent
a9f5465c99
commit
efed5777e9
5 changed files with 195 additions and 43 deletions
|
@ -3,6 +3,7 @@ package com.raytheon.uf.viz.archive.data;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -38,7 +39,8 @@ import com.raytheon.uf.common.time.util.TimeUtil;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 13, 2013 rferrel Initial creation
|
* Jun 13, 2013 rferrel Initial creation
|
||||||
* Jul 24, 2012 #2220 rferrel Change to get all data sizes only one time.
|
* Jul 24, 2013 #2220 rferrel Change to get all data sizes only one time.
|
||||||
|
* Aug 06, 2013 #2222 rferrel Changes to display all selected data.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -234,8 +236,8 @@ public class SizeJob extends Job {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check all displayData selection state so only the data in selections are
|
* Set the display data's select state and check to see if it needs to be
|
||||||
* set.
|
* requeue.
|
||||||
*
|
*
|
||||||
* @param selections
|
* @param selections
|
||||||
*/
|
*/
|
||||||
|
@ -259,14 +261,34 @@ public class SizeJob extends Job {
|
||||||
String displayLabel = displayData.getDisplayLabel();
|
String displayLabel = displayData.getDisplayLabel();
|
||||||
boolean selected = selectionsList.contains(displayLabel);
|
boolean selected = selectionsList.contains(displayLabel);
|
||||||
if (selected != displayData.isSelected()) {
|
if (selected != displayData.isSelected()) {
|
||||||
setSelect(archiveName, categoryName, displayLabel,
|
setSelect(displayData, selected);
|
||||||
selected);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get list of all selected data.
|
||||||
|
*
|
||||||
|
* @return selected
|
||||||
|
*/
|
||||||
|
public List<DisplayData> getSelectAll() {
|
||||||
|
List<DisplayData> selected = new LinkedList<DisplayData>();
|
||||||
|
for (ArchiveInfo archiveInfo : archiveInfoMap.values()) {
|
||||||
|
for (String categoryName : archiveInfo.getCategoryNames()) {
|
||||||
|
CategoryInfo categoryInfo = archiveInfo.get(categoryName);
|
||||||
|
for (DisplayData displayData : categoryInfo
|
||||||
|
.getDisplayDataList()) {
|
||||||
|
if (displayData.isSelected()) {
|
||||||
|
selected.add(displayData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save selections to the desired file.
|
* Save selections to the desired file.
|
||||||
*
|
*
|
||||||
|
@ -321,25 +343,16 @@ public class SizeJob extends Job {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the selection state and requeue size request.
|
* Update the selection state and if needed requeue size request.
|
||||||
*
|
*
|
||||||
* @param archiveName
|
* @param displayData
|
||||||
* @param categoryName
|
* @param state
|
||||||
* @param displayName
|
|
||||||
* @param selected
|
|
||||||
*/
|
*/
|
||||||
public void setSelect(String archiveName, String categoryName,
|
public void setSelect(DisplayData displayData, boolean state) {
|
||||||
String displayName, boolean selected) {
|
if (displayData.isSelected() != state) {
|
||||||
for (DisplayData displayData : archiveInfoMap.get(archiveName)
|
displayData.setSelected(state);
|
||||||
.get(categoryName).getDisplayDataList()) {
|
if (displayData.getSize() == DisplayData.UNKNOWN_SIZE) {
|
||||||
if (displayName.equals(displayData.getDisplayLabel())) {
|
requeue(displayData);
|
||||||
if (displayData.isSelected() != selected) {
|
|
||||||
displayData.setSelected(selected);
|
|
||||||
if (displayData.getSize() == DisplayData.UNKNOWN_SIZE) {
|
|
||||||
requeue(displayData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -351,6 +364,19 @@ public class SizeJob extends Job {
|
||||||
* @param categoryName
|
* @param categoryName
|
||||||
*/
|
*/
|
||||||
public void changeDisplayQueue(String archiveName, String categoryName) {
|
public void changeDisplayQueue(String archiveName, String categoryName) {
|
||||||
|
if (archiveName == null) {
|
||||||
|
if (displayArchive != null) {
|
||||||
|
synchronized (this) {
|
||||||
|
if (!displaySizesComputed.get() && !selectedQueue.isEmpty()) {
|
||||||
|
requeueRequest.set(true);
|
||||||
|
stopComputeSize.set(true);
|
||||||
|
displayArchive = null;
|
||||||
|
displaySizesComputed.set(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!archiveName.equals(displayArchive)
|
if (!archiveName.equals(displayArchive)
|
||||||
|| !categoryName.equals(displayCategory)) {
|
|| !categoryName.equals(displayCategory)) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
@ -394,8 +420,8 @@ public class SizeJob extends Job {
|
||||||
|
|
||||||
mainLoop: while (!shutdown.get()) {
|
mainLoop: while (!shutdown.get()) {
|
||||||
DisplayData displayData = null;
|
DisplayData displayData = null;
|
||||||
if (!displaySizesComputed.get()) {
|
synchronized (this) {
|
||||||
synchronized (this) {
|
if (!displaySizesComputed.get()) {
|
||||||
// Get sizes for the current display.
|
// Get sizes for the current display.
|
||||||
List<DisplayData> displayDatas = archiveInfoMap
|
List<DisplayData> displayDatas = archiveInfoMap
|
||||||
.get(displayArchive).get(displayCategory)
|
.get(displayArchive).get(displayCategory)
|
||||||
|
|
|
@ -74,6 +74,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* Jun 10, 2013 1966 rferrel Change to allow Case Creation to extend.
|
* Jun 10, 2013 1966 rferrel Change to allow Case Creation to extend.
|
||||||
* Jul 24, 2013 2220 rferrel Changes to queue size request for all data.
|
* Jul 24, 2013 2220 rferrel Changes to queue size request for all data.
|
||||||
* Aug 01, 2013 2221 rferrel Changes for select configuration.
|
* Aug 01, 2013 2221 rferrel Changes for select configuration.
|
||||||
|
* Aug 06, 2013 2222 rferrel Changes to display all selected data.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bgonzale
|
* @author bgonzale
|
||||||
|
@ -96,7 +97,13 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
||||||
protected ArchiveConfigManager manager = ArchiveConfigManager.getInstance();
|
protected ArchiveConfigManager manager = ArchiveConfigManager.getInstance();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must be set by sub-class prior to creating any components.
|
* Boolean to indicate when DisplayData is created should its selection be
|
||||||
|
* set based on the information in the configuration files.
|
||||||
|
*/
|
||||||
|
protected boolean setSelect = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Must be set by sub-class prior to creating table.
|
||||||
*/
|
*/
|
||||||
protected ArchiveConstants.Type type;
|
protected ArchiveConstants.Type type;
|
||||||
|
|
||||||
|
@ -111,12 +118,18 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
||||||
/** Performs save action button. */
|
/** Performs save action button. */
|
||||||
protected Button saveBtn;
|
protected Button saveBtn;
|
||||||
|
|
||||||
|
/** Optional button to toggle displaying all selected or category */
|
||||||
|
protected Button showSelectedBtn;
|
||||||
|
|
||||||
/** Flag set when user wants to close with unsaved modifications. */
|
/** Flag set when user wants to close with unsaved modifications. */
|
||||||
protected boolean closeFlag = false;
|
protected boolean closeFlag = false;
|
||||||
|
|
||||||
/** Current select (case/retention) loaded into the dialog. */
|
/** Current select (case/retention) loaded into the dialog. */
|
||||||
protected String selectName = ArchiveConstants.defaultSelectName;
|
protected String selectName = ArchiveConstants.defaultSelectName;
|
||||||
|
|
||||||
|
/** Which table is being displayed. */
|
||||||
|
private boolean showingSelected = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parentShell
|
* @param parentShell
|
||||||
*/
|
*/
|
||||||
|
@ -420,8 +433,6 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
||||||
/**
|
/**
|
||||||
* Populate the category combo based on the archive name and populate the
|
* Populate the category combo based on the archive name and populate the
|
||||||
* table.
|
* table.
|
||||||
*
|
|
||||||
* @param archiveName
|
|
||||||
*/
|
*/
|
||||||
private void populateCategoryCbo() {
|
private void populateCategoryCbo() {
|
||||||
initCategoryCbo();
|
initCategoryCbo();
|
||||||
|
@ -430,6 +441,7 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
||||||
|
|
||||||
private void initCategoryCbo() {
|
private void initCategoryCbo() {
|
||||||
String archiveName = getSelectedArchiveName();
|
String archiveName = getSelectedArchiveName();
|
||||||
|
ArchiveConfigManager manager = ArchiveConfigManager.getInstance();
|
||||||
categoryCbo.removeAll();
|
categoryCbo.removeAll();
|
||||||
for (String categoryName : manager.getCategoryNames(archiveName)) {
|
for (String categoryName : manager.getCategoryNames(archiveName)) {
|
||||||
categoryCbo.add(categoryName);
|
categoryCbo.add(categoryName);
|
||||||
|
@ -520,6 +532,7 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
||||||
setCursorBusy(true);
|
setCursorBusy(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
setShowingSelected(false);
|
||||||
|
|
||||||
ArchiveInfo archiveInfo = sizeJob.get(archiveName);
|
ArchiveInfo archiveInfo = sizeJob.get(archiveName);
|
||||||
|
|
||||||
|
@ -601,6 +614,72 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
||||||
setTotalSelectedItems(totalSelected);
|
setTotalSelectedItems(totalSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the showSelectedBtn for sub-classes.
|
||||||
|
*
|
||||||
|
* @param actionControlComp
|
||||||
|
*/
|
||||||
|
protected void createShowingSelectedBtn(Composite actionControlComp) {
|
||||||
|
showSelectedBtn = new Button(actionControlComp, SWT.PUSH);
|
||||||
|
setShowingSelected(false);
|
||||||
|
showSelectedBtn.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
handelShowSelectAll();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Populate the table with the desired display.
|
||||||
|
*/
|
||||||
|
protected void handelShowSelectAll() {
|
||||||
|
if (showingSelected) {
|
||||||
|
populateTableComp();
|
||||||
|
} else {
|
||||||
|
populateSelectAllTable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the state fo the showing selected flag and updates the label for the
|
||||||
|
* show selected button.
|
||||||
|
*
|
||||||
|
* @param state
|
||||||
|
*/
|
||||||
|
private void setShowingSelected(boolean state) {
|
||||||
|
if (showingSelected != state) {
|
||||||
|
showingSelected = state;
|
||||||
|
if (showingSelected) {
|
||||||
|
showSelectedBtn.setText(" Category ");
|
||||||
|
showSelectedBtn
|
||||||
|
.setToolTipText("Change display to show category.");
|
||||||
|
} else {
|
||||||
|
showSelectedBtn.setText(" Selected ");
|
||||||
|
showSelectedBtn
|
||||||
|
.setToolTipText("Change display to show all case selections");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Up date the table to display all selected data.
|
||||||
|
*/
|
||||||
|
private void populateSelectAllTable() {
|
||||||
|
setCursorBusy(true);
|
||||||
|
|
||||||
|
try {
|
||||||
|
setShowingSelected(true);
|
||||||
|
List<DisplayData> slectedData = sizeJob.getSelectAll();
|
||||||
|
|
||||||
|
tableComp.populateSelectAll(slectedData);
|
||||||
|
sizeJob.changeDisplayQueue(null, null);
|
||||||
|
} finally {
|
||||||
|
setCursorBusy(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
|
|
@ -60,6 +60,7 @@ import com.raytheon.uf.viz.archive.data.SizeJob;
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 23, 2013 #1964 lvenable Initial creation
|
* May 23, 2013 #1964 lvenable Initial creation
|
||||||
* Jul 24, 2013 #2221 rferrel Changes for select configuration.
|
* Jul 24, 2013 #2221 rferrel Changes for select configuration.
|
||||||
|
* Aug 06, 2013 #2222 rferrel Changes to display all selected data.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -74,6 +75,8 @@ public class ArchiveTableComp extends Composite {
|
||||||
/** Column to display size information,. */
|
/** Column to display size information,. */
|
||||||
private final int SIZE_COL_INDEX = 1;
|
private final int SIZE_COL_INDEX = 1;
|
||||||
|
|
||||||
|
private boolean showSelectAll = false;
|
||||||
|
|
||||||
/** Name of table's archive. */
|
/** Name of table's archive. */
|
||||||
String archiveName;
|
String archiveName;
|
||||||
|
|
||||||
|
@ -92,6 +95,9 @@ public class ArchiveTableComp extends Composite {
|
||||||
/** Size label. */
|
/** Size label. */
|
||||||
private Label sizeLbl;
|
private Label sizeLbl;
|
||||||
|
|
||||||
|
/** Composite for holding the table */
|
||||||
|
Composite tblComp;
|
||||||
|
|
||||||
/** The dialog's type. */
|
/** The dialog's type. */
|
||||||
private final ArchiveConstants.Type type;
|
private final ArchiveConstants.Type type;
|
||||||
|
|
||||||
|
@ -159,11 +165,20 @@ public class ArchiveTableComp extends Composite {
|
||||||
private void createTable() {
|
private void createTable() {
|
||||||
GridData gd = null;
|
GridData gd = null;
|
||||||
|
|
||||||
table = new Table(this, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL
|
tblComp = new Composite(this, SWT.NONE);
|
||||||
| SWT.H_SCROLL | SWT.MULTI | SWT.VIRTUAL);
|
GridLayout gl = new GridLayout(1, false);
|
||||||
|
gl.marginHeight = 0;
|
||||||
|
gl.marginWidth = 0;
|
||||||
|
gl.horizontalSpacing = 0;
|
||||||
|
tblComp.setLayout(gl);
|
||||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, true);
|
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, true);
|
||||||
gd.widthHint = 730;
|
gd.widthHint = 730;
|
||||||
gd.heightHint = 270;
|
gd.heightHint = 270;
|
||||||
|
tblComp.setLayoutData(gd);
|
||||||
|
|
||||||
|
table = new Table(tblComp, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL
|
||||||
|
| SWT.H_SCROLL | SWT.MULTI | SWT.VIRTUAL);
|
||||||
|
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||||
table.setLayoutData(gd);
|
table.setLayoutData(gd);
|
||||||
table.setHeaderVisible(true);
|
table.setHeaderVisible(true);
|
||||||
table.setLinesVisible(true);
|
table.setLinesVisible(true);
|
||||||
|
@ -174,8 +189,15 @@ public class ArchiveTableComp extends Composite {
|
||||||
TableItem item = (TableItem) event.item;
|
TableItem item = (TableItem) event.item;
|
||||||
int index = table.indexOf(item);
|
int index = table.indexOf(item);
|
||||||
DisplayData displayData = tableData[index];
|
DisplayData displayData = tableData[index];
|
||||||
item.setText(new String[] { displayData.getDisplayLabel(),
|
String label = null;
|
||||||
displayData.getSizeLabel() });
|
if (showSelectAll) {
|
||||||
|
label = displayData.getArchiveName() + " | "
|
||||||
|
+ displayData.getCategoryName() + " | "
|
||||||
|
+ displayData.getDisplayLabel();
|
||||||
|
} else {
|
||||||
|
label = displayData.getDisplayLabel();
|
||||||
|
}
|
||||||
|
item.setText(new String[] { label, displayData.getSizeLabel() });
|
||||||
item.setChecked(displayData.isSelected());
|
item.setChecked(displayData.isSelected());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -296,9 +318,7 @@ public class ArchiveTableComp extends Composite {
|
||||||
TableItem item = table.getItem(index);
|
TableItem item = table.getItem(index);
|
||||||
if (item.getChecked()) {
|
if (item.getChecked()) {
|
||||||
++count;
|
++count;
|
||||||
displayData.setSelected(true);
|
sizeJob.setSelect(displayData, true);
|
||||||
sizeJob.setSelect(archiveName, categoryName,
|
|
||||||
displayData.getDisplayLabel(), true);
|
|
||||||
if (tableTotalSize >= 0) {
|
if (tableTotalSize >= 0) {
|
||||||
long diSize = displayData.getSize();
|
long diSize = displayData.getSize();
|
||||||
if (diSize < 0) {
|
if (diSize < 0) {
|
||||||
|
@ -308,9 +328,7 @@ public class ArchiveTableComp extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
displayData.setSelected(false);
|
sizeJob.setSelect(displayData, false);
|
||||||
sizeJob.setSelect(archiveName, categoryName,
|
|
||||||
displayData.getDisplayLabel(), false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<DisplayData> displayDatas = Arrays.asList(tableData);
|
List<DisplayData> displayDatas = Arrays.asList(tableData);
|
||||||
|
@ -437,14 +455,29 @@ public class ArchiveTableComp extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set up table with values in the list.
|
* Update table display to show data for the desired category.
|
||||||
*
|
*
|
||||||
* @param displayDatas
|
* @param displayDatas
|
||||||
*/
|
*/
|
||||||
protected void populateTable(String archiveName, String categoryName,
|
protected void populateTable(String archiveName, String categoryName,
|
||||||
List<DisplayData> displayDatas) {
|
List<DisplayData> displayDatas) {
|
||||||
this.archiveName = archiveName;
|
showSelectAll = false;
|
||||||
this.categoryName = categoryName;
|
table.getColumn(0).setText("Label");
|
||||||
|
populateTable(displayDatas);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag table as showing all selected data and update display.
|
||||||
|
*
|
||||||
|
* @param displayDatas
|
||||||
|
*/
|
||||||
|
protected void populateSelectAll(List<DisplayData> displayDatas) {
|
||||||
|
showSelectAll = true;
|
||||||
|
table.getColumn(0).setText("Archive | Category | Label");
|
||||||
|
populateTable(displayDatas);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void populateTable(List<DisplayData> displayDatas) {
|
||||||
tableData = displayDatas.toArray(new DisplayData[0]);
|
tableData = displayDatas.toArray(new DisplayData[0]);
|
||||||
table.removeAll();
|
table.removeAll();
|
||||||
table.setItemCount(tableData.length);
|
table.setItemCount(tableData.length);
|
||||||
|
@ -458,7 +491,6 @@ public class ArchiveTableComp extends Composite {
|
||||||
table.setSortColumn(table.getColumn(LABEL_COL_INDEX));
|
table.setSortColumn(table.getColumn(LABEL_COL_INDEX));
|
||||||
table.setSortDirection(SWT.UP);
|
table.setSortDirection(SWT.UP);
|
||||||
table.clearAll();
|
table.clearAll();
|
||||||
updateSelectionLabels();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -70,6 +70,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* and generation of cases.
|
* and generation of cases.
|
||||||
* Jul 24, 2013 #2220 rferrel Add recompute size button.
|
* Jul 24, 2013 #2220 rferrel Add recompute size button.
|
||||||
* Jul 24, 2013 #2221 rferrel Changes for select configuration.
|
* Jul 24, 2013 #2221 rferrel Changes for select configuration.
|
||||||
|
* Aug 06, 2013 #2222 rferrel Changes to display all selected data.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -161,6 +162,8 @@ public class CaseCreationDlg extends AbstractArchiveDlg {
|
||||||
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.DO_NOT_BLOCK
|
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.DO_NOT_BLOCK
|
||||||
| CAVE.MODE_INDEPENDENT | CAVE.INDEPENDENT_SHELL);
|
| CAVE.MODE_INDEPENDENT | CAVE.INDEPENDENT_SHELL);
|
||||||
this.type = Type.Case;
|
this.type = Type.Case;
|
||||||
|
this.setSelect = false;
|
||||||
|
this.type = Type.Case;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -453,7 +456,7 @@ public class CaseCreationDlg extends AbstractArchiveDlg {
|
||||||
private void createBottomActionButtons() {
|
private void createBottomActionButtons() {
|
||||||
|
|
||||||
Composite actionControlComp = new Composite(shell, SWT.NONE);
|
Composite actionControlComp = new Composite(shell, SWT.NONE);
|
||||||
GridLayout gl = new GridLayout(7, false);
|
GridLayout gl = new GridLayout(8, false);
|
||||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||||
actionControlComp.setLayout(gl);
|
actionControlComp.setLayout(gl);
|
||||||
actionControlComp.setLayoutData(gd);
|
actionControlComp.setLayoutData(gd);
|
||||||
|
@ -517,6 +520,8 @@ public class CaseCreationDlg extends AbstractArchiveDlg {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
createShowingSelectedBtn(actionControlComp);
|
||||||
|
|
||||||
Button sizeBtn = new Button(actionControlComp, SWT.PUSH);
|
Button sizeBtn = new Button(actionControlComp, SWT.PUSH);
|
||||||
sizeBtn.setText(" Recompute Sizes ");
|
sizeBtn.setText(" Recompute Sizes ");
|
||||||
sizeBtn.addSelectionListener(new SelectionAdapter() {
|
sizeBtn.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import com.raytheon.uf.common.util.SizeUtil;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jun 7, 2013 1966 rferrel Initial creation
|
* Jun 7, 2013 1966 rferrel Initial creation
|
||||||
|
* Aug 06, 2013 2222 rferrel Changes to display all selected data.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -45,7 +46,16 @@ public class DisplayData implements Comparable<DisplayData> {
|
||||||
public static final Comparator<DisplayData> LABEL_ORDER = new Comparator<DisplayData>() {
|
public static final Comparator<DisplayData> LABEL_ORDER = new Comparator<DisplayData>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(DisplayData o1, DisplayData o2) {
|
public int compare(DisplayData o1, DisplayData o2) {
|
||||||
return o1.displayLabel.compareToIgnoreCase(o2.displayLabel);
|
int result = o1.getArchiveName().compareToIgnoreCase(
|
||||||
|
o2.getArchiveName());
|
||||||
|
if (result == 0) {
|
||||||
|
result = o1.getCategoryName().compareToIgnoreCase(
|
||||||
|
o2.getCategoryName());
|
||||||
|
}
|
||||||
|
if (result == 0) {
|
||||||
|
result = o1.displayLabel.compareToIgnoreCase(o2.displayLabel);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue