Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 337475 | Differences between
and this patch

Collapse All | Expand All

(-)a/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/ControlsDemo.java (-1 / +1 lines)
Lines 56-61 public class ControlsDemo implements IEntryPoint { Link Here
56
    topFolder.marginHeight = 5;
56
    topFolder.marginHeight = 5;
57
57
58
    final ExampleTab[] tabs = new ExampleTab[] {
58
    final ExampleTab[] tabs = new ExampleTab[] {
59
      new ShellTab( topFolder ),
59
      new ButtonTab( topFolder ),
60
      new ButtonTab( topFolder ),
60
//      new RequestTab( topFolder ),
61
//      new RequestTab( topFolder ),
61
      new CBannerTab( topFolder ),
62
      new CBannerTab( topFolder ),
Lines 73-79 public class ControlsDemo implements IEntryPoint { Link Here
73
      new LinkTab( topFolder ),
74
      new LinkTab( topFolder ),
74
      new SashTab( topFolder ),
75
      new SashTab( topFolder ),
75
      new SashFormTab( topFolder ),
76
      new SashFormTab( topFolder ),
76
      new ShellTab( topFolder ),
77
      new TabFolderTab( topFolder ),
77
      new TabFolderTab( topFolder ),
78
      new CTabFolderTab( topFolder ),
78
      new CTabFolderTab( topFolder ),
79
      new TableTab( topFolder ),
79
      new TableTab( topFolder ),
(-)a/runtime.ui/org.eclipse.rap.demo/src/org/eclipse/rap/demo/controls/ShellTab.java (-6 / +16 lines)
Lines 31-36 public class ShellTab extends ExampleTab { Link Here
31
  private final java.util.List shells;
31
  private final java.util.List shells;
32
  private int shellCounter;
32
  private int shellCounter;
33
  private final ShellAdapter confirmCloseListener;
33
  private final ShellAdapter confirmCloseListener;
34
  private final ShellAdapter shellActivatedListener;
35
  private final ShellAdapter shellDeactivatedListener;
34
  private Image shellImage;
36
  private Image shellImage;
35
  private Button createInvisibleButton;
37
  private Button createInvisibleButton;
36
  private Button createAsDialogButton;
38
  private Button createAsDialogButton;
Lines 52-57 public class ShellTab extends ExampleTab { Link Here
52
        event.doit = canClose;
54
        event.doit = canClose;
53
      }
55
      }
54
    };
56
    };
57
    shellActivatedListener = new ShellAdapter() {
58
      public void shellActivated( ShellEvent e ) {
59
        ((Shell)e.getSource()).getData();
60
      }
61
    };
62
    shellDeactivatedListener = new ShellAdapter() {
63
      public void shellDeactivated( ShellEvent e ) {
64
        ((Shell)e.getSource()).close();
65
      }
66
    };
55
    setDefaultStyle( SWT.SHELL_TRIM );
67
    setDefaultStyle( SWT.SHELL_TRIM );
56
  }
68
  }
57
69
Lines 188-198 public class ShellTab extends ExampleTab { Link Here
188
200
189
  private void createShell() {
201
  private void createShell() {
190
    Shell shell;
202
    Shell shell;
191
    if( createAsDialogButton.getSelection() ) {
203
    shell = new Shell( getShell(), getStyle() );
192
      shell = new Shell( getShell(), getStyle() );
193
    } else {
194
      shell = new Shell( getShell().getDisplay(), getStyle() );
195
    }
196
//    if( customBgColorButton.getSelection() ) {
204
//    if( customBgColorButton.getSelection() ) {
197
//      shell.setBackground( BG_COLOR_BROWN );
205
//      shell.setBackground( BG_COLOR_BROWN );
198
//    }
206
//    }
Lines 206-211 public class ShellTab extends ExampleTab { Link Here
206
    shell.setText( "Test Shell " + shellCounter );
214
    shell.setText( "Test Shell " + shellCounter );
207
    shell.setAlpha( alpha );
215
    shell.setAlpha( alpha );
208
    shell.setImage( shellImage );
216
    shell.setImage( shellImage );
217
    shell.addShellListener( shellActivatedListener );
218
    shell.addShellListener( shellDeactivatedListener );
209
    if( confirmCloseButton.getSelection() ) {
219
    if( confirmCloseButton.getSelection() ) {
210
      shell.addShellListener( confirmCloseListener );
220
      shell.addShellListener( confirmCloseListener );
211
    }
221
    }
Lines 348-354 public class ShellTab extends ExampleTab { Link Here
348
  private Point getNextShellLocation() {
358
  private Point getNextShellLocation() {
349
    Point result = getShell().getLocation();
359
    Point result = getShell().getLocation();
350
    int count = getShells().length % 12;
360
    int count = getShells().length % 12;
351
    result.x += 50 + count * 10;
361
    result.x += 200 + count * 10;
352
    result.y += 50 + count * 10;
362
    result.y += 50 + count * 10;
353
    return result ;
363
    return result ;
354
  }
364
  }

Return to bug 337475