Issue #2955 - Made chat invitation dialogs non-modal
Change-Id: Ib7294e8149996715b6a247a1e04335dc1a0c7023 Former-commit-id:f4f6283d2d
[formerly6da65fe71a
] [formerly71cf0d04e7
] [formerly71cf0d04e7
[formerlyead90bc794
]] [formerlyf4f6283d2d
[formerly6da65fe71a
] [formerly71cf0d04e7
] [formerly71cf0d04e7
[formerlyead90bc794
]] [formerlyb507739637
[formerly71cf0d04e7
[formerlyead90bc794
] [formerlyb507739637
[formerly bb61e3c39d5dabf7e698726f0a093d8cf4f7088a]]]]] Former-commit-id:b507739637
Former-commit-id:5a89a38bdb
[formerlyebbb721787
] [formerly75f794d54d
] [formerly 4eb4b1d4ec96e9267f15a3bdc7fdb64df0319cae [formerly 5c415e155bfe7e16d70fc0b35ad0574fc7085261] [formerly75f794d54d
[formerly9a082a1588
]]] Former-commit-id: e6748562707dafa3ff73a5ced66ee6c2f4b1a74b [formerly 6157e38ab3e1698599dadf55b906513f06b68612] [formerly6c4490b08c
[formerlyae984e4c16
]] Former-commit-id:6c4490b08c
Former-commit-id:326b17ce50
This commit is contained in:
parent
c775448476
commit
1acc01b3f9
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