diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java index 07e85110ff..e681e992c0 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java @@ -303,6 +303,8 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox; * Do not use changed BBB from OUPResponse. * 17OCT2012 1229 rferrel Changes for non-blocking SWTMessageBox. * 05Nov2012 15560 S. Naples Added check to see if we are in edit mode before capturing keys. + * 13Dec2012 1353 rferrel Change to make edit cancel message not + * dispaly the red had kill job message. * * * @author lvenable @@ -396,10 +398,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, private static final int PAGE_SCROLL_LINES = 20; - private static final int MIN_WIDTH = 760; - - private static final int MIN_HEIGHT = 635; - private static final int EDITOR_WIDTH = 80; /* filters for file import/export and attach functions. */ @@ -1245,10 +1243,10 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, @Override public void shellClosed(ShellEvent event) { if (inEditMode) { - cancelDoClose = true; - cancelEditor(true); - bringToTop(); event.doit = false; + cancelDoClose = true; + bringToTop(); + cancelEditor(true); return; } @@ -3532,9 +3530,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, textEditor.addVerifyKeyListener(new VerifyKeyListener() { public void verifyKey(VerifyEvent event) { // Ignore edit keys when not in edit mode. - if (textEditor.getEditable() == false){ - return; - } + if (textEditor.getEditable() == false) { + return; + } if (event.keyCode == SWT.DEL || event.character == SWT.BS || event.keyCode == SWT.SHIFT) { // Do nothing... @@ -4422,7 +4420,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, } public void hideDialog() { - if (disposeOnExit == true) { + if (disposeOnExit == false) { + hide(); return; } @@ -4589,7 +4588,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, .getText().toUpperCase()), true); } updateTextEditor(body); - if ((inEditMode || resend) && saveEditedProduct(false, resend, true)) { + if ((inEditMode || resend) + && saveEditedProduct(false, resend, true)) { inEditMode = false; } @@ -4635,7 +4635,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, .getText())); } updateTextEditor(body); - if ((inEditMode || resend) && saveEditedProduct(false, resend, false)) { + if ((inEditMode || resend) + && saveEditedProduct(false, resend, false)) { inEditMode = false; } SendPracticeProductRequest req = new SendPracticeProductRequest(); @@ -6790,7 +6791,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, statusHandler.handle(p, response.getMessage()); } else { // no failure - // As of DR 15418, nothing is done with response.getChangedBBB() + // As of DR 15418, nothing is done with + // response.getChangedBBB() } Thread.interrupted(); diff --git a/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java b/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java index cdb315bbef..66136ccdcc 100644 --- a/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java +++ b/cave/com.raytheon.viz.textworkstation/src/com/raytheon/viz/textworkstation/TextWorkstationDlg.java @@ -24,6 +24,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; +import java.util.List; import java.util.TimeZone; import java.util.Timer; import java.util.TimerTask; @@ -31,7 +32,6 @@ import java.util.TimerTask; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; @@ -89,13 +89,18 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * on times on two machines being in synch. * 26Sep2012 1196 lvenable Dialog refactor to not block. * 02Oct2012 1229 rferrel Option to allow blocking when top dialog. + * 13Dec2012 1353 rferrel Fix bug introduced in the Show all dialogs. * * * * @author lvenable */ public class TextWorkstationDlg extends CaveSWTDialog implements - SelectionListener, ITextEditorCallback, INotificationObserver { + ITextEditorCallback, INotificationObserver { + + private final int INIT_BUTTON_CNT = 4; + + private final int MAX_BUTTON_CNT = 8; private String productToDisplay = null; @@ -125,11 +130,9 @@ public class TextWorkstationDlg extends CaveSWTDialog implements private Date date; - private int currentBtnCount = 4; + private List