Merge "Issue #2955 - Made chat invitation dialogs non-modal" into development
Former-commit-id:98bd36ee38
[formerlyd265706c90
] [formerlycdd56443f0
] [formerly98bd36ee38
[formerlyd265706c90
] [formerlycdd56443f0
] [formerlydb6fba6f75
[formerlycdd56443f0
[formerly f4ced5dc67106d959dd97a35e589a266fe8089ce]]]] Former-commit-id:db6fba6f75
Former-commit-id:ce3e1793cd
[formerly339f68fa9b
] [formerly 522c875e651b5a312c176729c7d6dfa6c3eb0050 [formerly897133a27a
]] Former-commit-id: 886e5fa99946b75185cfac1ac8c59df414fe10d9 [formerly474612939c
] Former-commit-id:24b3163c37
This commit is contained in:
commit
22612b0fda
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
|
||||
* Mar 06, 2014 2848 bclement moved join logic to separate method
|
||||
* Mar 27, 2014 2632 mpduff Set the OK button as the default button.
|
||||
* Apr 18, 2014 2955 mpduff Make dialog non-modal.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -105,18 +106,11 @@ public class InviteDialog extends CaveSWTDialogBase {
|
|||
*
|
||||
* @param parentShell
|
||||
* Parent shell.
|
||||
* @param title
|
||||
* Title for the dialog.
|
||||
* @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.
|
||||
* @param event
|
||||
* The invitation event
|
||||
*/
|
||||
public InviteDialog(Shell parentShell, IVenueInvitationEvent event) {
|
||||
super(parentShell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL
|
||||
| SWT.PRIMARY_MODAL | SWT.SYSTEM_MODAL, CAVE.NONE);
|
||||
super(parentShell, SWT.DIALOG_TRIM, CAVE.NONE);
|
||||
setText("Session Invitation");
|
||||
IUser inviter = event.getInviter();
|
||||
VenueId room = event.getRoomId();
|
||||
|
@ -151,7 +145,7 @@ public class InviteDialog extends CaveSWTDialogBase {
|
|||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
mainComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(2, false);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
gl.marginHeight = 0;
|
||||
gl.marginWidth = 0;
|
||||
gl.horizontalSpacing = 0;
|
||||
|
@ -233,10 +227,10 @@ public class InviteDialog extends CaveSWTDialogBase {
|
|||
font = new Font(Display.getCurrent(), fontData[0]);
|
||||
}
|
||||
if (heading) {
|
||||
gd = new GridData(SWT.LEFT, SWT.NONE, false, false);
|
||||
gd = new GridData(SWT.LEFT, SWT.CENTER, false, false);
|
||||
label.setFont(font);
|
||||
} else {
|
||||
gd = new GridData(SWT.LEFT, SWT.NONE, true, true);
|
||||
gd = new GridData(SWT.LEFT, SWT.CENTER, true, true);
|
||||
gd.widthHint = 300;
|
||||
}
|
||||
label.setLayoutData(gd);
|
||||
|
@ -250,16 +244,15 @@ public class InviteDialog extends CaveSWTDialogBase {
|
|||
Composite actionButtonComp = new Composite(mainComp, SWT.NONE);
|
||||
actionButtonComp.setLayout(new GridLayout(2, false));
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd.horizontalSpan = 2;
|
||||
actionButtonComp.setLayoutData(gd);
|
||||
|
||||
int btnWidth = 80;
|
||||
gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false);
|
||||
gd.widthHint = btnWidth;
|
||||
Button okBtn = new Button(actionButtonComp, SWT.PUSH);
|
||||
okBtn.setText("Join");
|
||||
okBtn.setLayoutData(gd);
|
||||
okBtn.addSelectionListener(new SelectionAdapter() {
|
||||
Button joinBtn = new Button(actionButtonComp, SWT.PUSH);
|
||||
joinBtn.setText("Join");
|
||||
joinBtn.setLayoutData(gd);
|
||||
joinBtn.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent se) {
|
||||
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() {
|
||||
return session;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue