Issue #2955 - Made chat invitation dialogs non-modal
Change-Id: Ib7294e8149996715b6a247a1e04335dc1a0c7023 Former-commit-id:ead90bc794
[formerlyead90bc794
[formerly bb61e3c39d5dabf7e698726f0a093d8cf4f7088a]] Former-commit-id:b507739637
Former-commit-id:9a082a1588
This commit is contained in:
parent
b114642835
commit
ae984e4c16
1 changed files with 17 additions and 19 deletions
|
@ -67,6 +67,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase;
|
||||||
* Feb 13, 2014 2751 bclement better types for roomid and inviter
|
* Feb 13, 2014 2751 bclement better types for roomid and inviter
|
||||||
* Mar 06, 2014 2848 bclement moved join logic to separate method
|
* Mar 06, 2014 2848 bclement moved join logic to separate method
|
||||||
* Mar 27, 2014 2632 mpduff Set the OK button as the default button.
|
* Mar 27, 2014 2632 mpduff Set the OK button as the default button.
|
||||||
|
* Apr 18, 2014 2955 mpduff Make dialog non-modal.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -105,18 +106,11 @@ public class InviteDialog extends CaveSWTDialogBase {
|
||||||
*
|
*
|
||||||
* @param parentShell
|
* @param parentShell
|
||||||
* Parent shell.
|
* Parent shell.
|
||||||
* @param title
|
* @param event
|
||||||
* Title for the dialog.
|
* The invitation event
|
||||||
* @param labelStr
|
|
||||||
* Test to put in the label for the message text control.
|
|
||||||
* @param messageStr
|
|
||||||
* Message to be displayed.
|
|
||||||
* @param iconStyle
|
|
||||||
* Icon style to be displayed.
|
|
||||||
*/
|
*/
|
||||||
public InviteDialog(Shell parentShell, IVenueInvitationEvent event) {
|
public InviteDialog(Shell parentShell, IVenueInvitationEvent event) {
|
||||||
super(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL
|
super(parentShell, SWT.DIALOG_TRIM, CAVE.NONE);
|
||||||
| SWT.PRIMARY_MODAL | SWT.SYSTEM_MODAL, CAVE.NONE);
|
|
||||||
setText("Session Invitation");
|
setText("Session Invitation");
|
||||||
IUser inviter = event.getInviter();
|
IUser inviter = event.getInviter();
|
||||||
VenueId room = event.getRoomId();
|
VenueId room = event.getRoomId();
|
||||||
|
@ -151,7 +145,7 @@ public class InviteDialog extends CaveSWTDialogBase {
|
||||||
@Override
|
@Override
|
||||||
protected void initializeComponents(Shell shell) {
|
protected void initializeComponents(Shell shell) {
|
||||||
mainComp = new Composite(shell, SWT.NONE);
|
mainComp = new Composite(shell, SWT.NONE);
|
||||||
GridLayout gl = new GridLayout(2, false);
|
GridLayout gl = new GridLayout(1, false);
|
||||||
gl.marginHeight = 0;
|
gl.marginHeight = 0;
|
||||||
gl.marginWidth = 0;
|
gl.marginWidth = 0;
|
||||||
gl.horizontalSpacing = 0;
|
gl.horizontalSpacing = 0;
|
||||||
|
@ -233,10 +227,10 @@ public class InviteDialog extends CaveSWTDialogBase {
|
||||||
font = new Font(Display.getCurrent(), fontData[0]);
|
font = new Font(Display.getCurrent(), fontData[0]);
|
||||||
}
|
}
|
||||||
if (heading) {
|
if (heading) {
|
||||||
gd = new GridData(SWT.LEFT, SWT.NONE, false, false);
|
gd = new GridData(SWT.LEFT, SWT.CENTER, false, false);
|
||||||
label.setFont(font);
|
label.setFont(font);
|
||||||
} else {
|
} else {
|
||||||
gd = new GridData(SWT.LEFT, SWT.NONE, true, true);
|
gd = new GridData(SWT.LEFT, SWT.CENTER, true, true);
|
||||||
gd.widthHint = 300;
|
gd.widthHint = 300;
|
||||||
}
|
}
|
||||||
label.setLayoutData(gd);
|
label.setLayoutData(gd);
|
||||||
|
@ -250,16 +244,15 @@ public class InviteDialog extends CaveSWTDialogBase {
|
||||||
Composite actionButtonComp = new Composite(mainComp, SWT.NONE);
|
Composite actionButtonComp = new Composite(mainComp, SWT.NONE);
|
||||||
actionButtonComp.setLayout(new GridLayout(2, false));
|
actionButtonComp.setLayout(new GridLayout(2, false));
|
||||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||||
gd.horizontalSpan = 2;
|
|
||||||
actionButtonComp.setLayoutData(gd);
|
actionButtonComp.setLayoutData(gd);
|
||||||
|
|
||||||
int btnWidth = 80;
|
int btnWidth = 80;
|
||||||
gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);
|
gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);
|
||||||
gd.widthHint = btnWidth;
|
gd.widthHint = btnWidth;
|
||||||
Button okBtn = new Button(actionButtonComp, SWT.PUSH);
|
Button joinBtn = new Button(actionButtonComp, SWT.PUSH);
|
||||||
okBtn.setText("Join");
|
joinBtn.setText("Join");
|
||||||
okBtn.setLayoutData(gd);
|
joinBtn.setLayoutData(gd);
|
||||||
okBtn.addSelectionListener(new SelectionAdapter() {
|
joinBtn.addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent se) {
|
public void widgetSelected(SelectionEvent se) {
|
||||||
String handle = handleText.getText().trim();
|
String handle = handleText.getText().trim();
|
||||||
|
@ -294,7 +287,7 @@ public class InviteDialog extends CaveSWTDialogBase {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.getShell().setDefaultButton(okBtn);
|
this.getShell().setDefaultButton(joinBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -340,6 +333,11 @@ public class InviteDialog extends CaveSWTDialogBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the IVenueSession being used.
|
||||||
|
*
|
||||||
|
* @return the IVenueSession
|
||||||
|
*/
|
||||||
public IVenueSession getSession() {
|
public IVenueSession getSession() {
|
||||||
return session;
|
return session;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue