Issue #1229 Changes for non-blocking LabelOffsetDialog.
Change-Id: Ic0d821549a300c53e29f4c321af3c51e22fb308e Former-commit-id:66379c3210
[formerly f1131f2d9d1d5e0194a65e787e2628e733563683] Former-commit-id:d319101ed9
This commit is contained in:
parent
3b3c636de4
commit
928e9f6a1d
2 changed files with 17 additions and 10 deletions
|
@ -35,6 +35,7 @@ import com.raytheon.viz.ui.dialogs.LabelOffsetDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 3, 2011 randerso Initial creation
|
||||
* Oct 17, 2012 1229 rferrel Made the dialog non-blocking.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -43,6 +44,8 @@ import com.raytheon.viz.ui.dialogs.LabelOffsetDialog;
|
|||
*/
|
||||
|
||||
public class LabelOffsetAction extends AbstractRightClickAction {
|
||||
private LabelOffsetDialog dialog;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -57,14 +60,18 @@ public class LabelOffsetAction extends AbstractRightClickAction {
|
|||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
LabelableCapability cap = getSelectedRsc().getCapability(
|
||||
LabelableCapability.class);
|
||||
LabelableCapability cap = getSelectedRsc().getCapability(
|
||||
LabelableCapability.class);
|
||||
|
||||
LabelOffsetDialog dlg = new LabelOffsetDialog(shell, cap);
|
||||
dlg.setBlockOnOpen(true);
|
||||
dlg.open();
|
||||
dialog = new LabelOffsetDialog(shell, cap);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.eclipse.swt.widgets.Spinner;
|
|||
import com.raytheon.uf.viz.core.rsc.capabilities.LabelableCapability;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Dialog change the location of labels.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -42,6 +42,7 @@ import com.raytheon.uf.viz.core.rsc.capabilities.LabelableCapability;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 3, 2011 randerso Initial creation
|
||||
* Oct 17, 2012 1229 rferrel Set origyOffset to the proper value.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -64,7 +65,6 @@ public class LabelOffsetDialog extends CaveJFACEDialog {
|
|||
*/
|
||||
public LabelOffsetDialog(Shell parentShell) {
|
||||
super(parentShell);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,7 +75,7 @@ public class LabelOffsetDialog extends CaveJFACEDialog {
|
|||
super(parentShell);
|
||||
this.cap = cap;
|
||||
this.origxOffset = cap.getxOffset();
|
||||
this.origyOffset = cap.getxOffset();
|
||||
this.origyOffset = cap.getyOffset();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue