package com.eclipsesource.rap.punchy.ece13;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;

import com.eclipsesource.rap.punchy.Presentation;


public class IncubatorExamplesSlides {

  public static void createSlides( Presentation presentation ) {
    new EceSlide( presentation ) {
      @Override
      public String getTitle() {
        return "Incubator: CKEditor";
      }
      @Override
      protected void createContent( Composite slideComposite ) {
        super.createContent( slideComposite );
        flow( "transparent", new CKEditorExamplePage().createControl( slideComposite ), SWT.DEFAULT, 450 );
      }
    };
    new EceSlide( presentation ) {
      @Override
      public String getTitle() {
        return "Incubator: Nebula Grid";
      }
      @Override
      protected void createContent( Composite slideComposite ) {
        super.createContent( slideComposite );
        //Composite example = new Composite( slideComposite, SWT.NONE );
        flow( new NebulaGridExamplePage().createControl( slideComposite ), SWT.DEFAULT, 450 );
      }
    };
    new EceSlide( presentation ) {
      @Override
      public String getTitle() {
        return "Incubator: DropDown / AutoSuggest";
      }
      @Override
      protected void createContent( Composite slideComposite ) {
        super.createContent( slideComposite );
        spacer( 50 );
        Composite example = new Composite( slideComposite, SWT.NONE );
        new DropDownDemo().createContents( example );
        flow( "transparent", example, SWT.DEFAULT, 50 );
        Composite example2 = new Composite( slideComposite, SWT.NONE );
        new AutoSuggestSnippet().createContents( example2 );
        flow( "transparent", example2, SWT.DEFAULT, 300 );
      }
    };
    new EceSlide( presentation ) {
      @Override
      public String getTitle() {
        return "Incubator: FileDialog";
      }
      @Override
      protected void createContent( Composite slideComposite ) {
        super.createContent( slideComposite );
        spacer( 30 );
        flow( "transparent", new FileUploadExamplePage().createControl( slideComposite ), SWT.DEFAULT, 350 );
      }
    };
    new EceSlide( presentation ) {
      @Override
      public String getTitle() {
        return "RAP Incubator";
      }
      @Override
      protected void createContent( Composite slideComposite ) {
        super.createContent( slideComposite );
        setListSpacing( 10 );
        list(
             "What is this?",
             "ClientScripting -> RWT Scripting",
             "CKEditor",
             "DropDown/AutoSuggest",
             "FileUpload/FileDialog",
             "Nebula Grid",
             "Beyond:",
             new String[] {
               "GMaps Widget",
               "Charting Prototype",
               "Tabris UI",
               "Some Community widget"
             }
            );
      }
    };
  }

}

@@ -2185,743 +2185,8 @@
  %7D;%0A
-    new EceSlide( presentation ) %7B%0A      @Override%0A      public String getTitle() %7B%0A        return %22RAP Incubator%22;%0A      %7D%0A      @Override%0A      protected void createContent( Composite slideComposite ) %7B%0A        super.createContent( slideComposite );%0A        setListSpacing( 10 );%0A        list(%0A             %22What is this?%22,%0A             %22ClientScripting -%3E RWT Scripting%22,%0A             %22CKEditor%22,%0A             %22DropDown/AutoSuggest%22,%0A             %22FileUpload/FileDialog%22,%0A             %22Nebula Grid%22,%0A             %22Beyond:%22,%0A             new String%5B%5D %7B%0A               %22GMaps Widget%22,%0A               %22Charting Prototype%22,%0A               %22Tabris UI%22,%0A               %22Some Community widget%22%0A             %7D%0A            );%0A      %7D%0A    %7D;%0A
   %7D%0A

Update slides