├── war ├── images │ ├── ios.png │ ├── ios.zip │ ├── all │ │ ├── chevron.png │ │ ├── spinner.gif │ │ ├── xswitch.png │ │ ├── xcheckbox.png │ │ ├── xradiobutton.png │ │ ├── chevronSelected.png │ │ ├── navigationContent.png │ │ ├── xcheckbox-selected.png │ │ └── xradiobutton-selected.png │ ├── closeCorner.png │ ├── icons │ │ ├── earth.jpg │ │ ├── tab0.png │ │ ├── tab1.png │ │ ├── tab3.png │ │ ├── tab4.png │ │ ├── cursor.png │ │ ├── i-button.png │ │ ├── i-form.png │ │ ├── i-image.png │ │ ├── i-list.png │ │ ├── i-picker.png │ │ ├── i-radio.png │ │ ├── i-slider.png │ │ ├── i-switch.png │ │ ├── list00.png │ │ ├── list01.png │ │ ├── list02.png │ │ ├── list03.png │ │ ├── list1x.png │ │ ├── list2x.png │ │ ├── tallimg.jpg │ │ ├── wideimg.jpg │ │ ├── bgSample0.png │ │ ├── bgSample1.png │ │ ├── bgSample2.png │ │ ├── i-checkbox.png │ │ ├── i-progress.png │ │ ├── next-logo.png │ │ ├── simpsonXY.jpg │ │ ├── i-navigation.png │ │ ├── next-logo-16.png │ │ ├── tab0-selected.png │ │ ├── tab1-selected.png │ │ ├── tab3-selected.png │ │ ├── tab4-selected.png │ │ ├── xbuttonImage.png │ │ ├── next-logo-white.png │ │ ├── apple-touch-icon.png │ │ ├── apple-touch-icon-114.png │ │ ├── apple-touch-icon-72.png │ │ └── xbuttonImageSelected.png │ └── closeCornerPressed.png ├── WEB-INF │ ├── lib │ │ └── gwt-servlet.jar │ └── web.xml ├── code │ ├── SliderController.js │ ├── SwitchController.js │ ├── LabelImageController.js │ ├── PickerController.js │ ├── DragController.js │ ├── ProgressController.js │ ├── HorizontalController.js │ ├── VerticalController.js │ ├── PopController.js │ ├── NavigationBarController.js │ ├── FormController.js │ ├── FadeController.js │ ├── SlideController.js │ ├── PopupController.js │ ├── ButtonsController.js │ ├── FlipController.js │ ├── SlideUpDownController.js │ ├── SwapController.js │ ├── CheckboxController.js │ ├── RadioButtonController.js │ └── ListController.js ├── index.html └── next.css ├── .settings ├── com.google.gdt.eclipse.core.prefs ├── com.google.gwt.eclipse.core.prefs └── org.eclipse.jdt.ui.prefs ├── src └── next │ ├── demo.gwt.xml │ ├── interfaces │ ├── rpc │ │ ├── HelloServiceAsync.java │ │ └── HelloService.java │ ├── Globals.java │ ├── ResponseReader.java │ ├── controller │ │ ├── HelloWorldController.java │ │ ├── GitXTableController.java │ │ ├── animation │ │ │ ├── SlideController.java │ │ │ ├── PopController.java │ │ │ ├── FadeController.java │ │ │ ├── FlipController.java │ │ │ ├── SwapController.java │ │ │ ├── SlideUpDownController.java │ │ │ ├── VerticalController.java │ │ │ ├── DragController.java │ │ │ ├── HorizontalController.java │ │ │ └── AnimationsController.java │ │ ├── GitXController.java │ │ ├── widgets │ │ │ ├── SwitchController.java │ │ │ ├── LabelImageController.java │ │ │ ├── PickerController.java │ │ │ ├── FormController.java │ │ │ ├── SliderController.java │ │ │ ├── ProgressController.java │ │ │ ├── PopupController.java │ │ │ ├── ListController.java │ │ │ ├── NavigationBarController.java │ │ │ ├── RadioButtonController.java │ │ │ ├── CheckboxController.java │ │ │ ├── ButtonsController.java │ │ │ └── WidgetsController.java │ │ └── DemoUtils.java │ ├── HTTP.java │ └── Main.java │ └── server │ └── HelloServiceImpl.java ├── .classpath ├── LICENSE ├── .project └── README.md /war/images/ios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/ios.png -------------------------------------------------------------------------------- /war/images/ios.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/ios.zip -------------------------------------------------------------------------------- /war/images/all/chevron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/chevron.png -------------------------------------------------------------------------------- /war/images/all/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/spinner.gif -------------------------------------------------------------------------------- /war/images/all/xswitch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/xswitch.png -------------------------------------------------------------------------------- /war/images/closeCorner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/closeCorner.png -------------------------------------------------------------------------------- /war/images/icons/earth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/earth.jpg -------------------------------------------------------------------------------- /war/images/icons/tab0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab0.png -------------------------------------------------------------------------------- /war/images/icons/tab1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab1.png -------------------------------------------------------------------------------- /war/images/icons/tab3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab3.png -------------------------------------------------------------------------------- /war/images/icons/tab4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab4.png -------------------------------------------------------------------------------- /war/images/all/xcheckbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/xcheckbox.png -------------------------------------------------------------------------------- /war/images/icons/cursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/cursor.png -------------------------------------------------------------------------------- /war/images/icons/i-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-button.png -------------------------------------------------------------------------------- /war/images/icons/i-form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-form.png -------------------------------------------------------------------------------- /war/images/icons/i-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-image.png -------------------------------------------------------------------------------- /war/images/icons/i-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-list.png -------------------------------------------------------------------------------- /war/images/icons/i-picker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-picker.png -------------------------------------------------------------------------------- /war/images/icons/i-radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-radio.png -------------------------------------------------------------------------------- /war/images/icons/i-slider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-slider.png -------------------------------------------------------------------------------- /war/images/icons/i-switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-switch.png -------------------------------------------------------------------------------- /war/images/icons/list00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/list00.png -------------------------------------------------------------------------------- /war/images/icons/list01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/list01.png -------------------------------------------------------------------------------- /war/images/icons/list02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/list02.png -------------------------------------------------------------------------------- /war/images/icons/list03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/list03.png -------------------------------------------------------------------------------- /war/images/icons/list1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/list1x.png -------------------------------------------------------------------------------- /war/images/icons/list2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/list2x.png -------------------------------------------------------------------------------- /war/images/icons/tallimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tallimg.jpg -------------------------------------------------------------------------------- /war/images/icons/wideimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/wideimg.jpg -------------------------------------------------------------------------------- /war/WEB-INF/lib/gwt-servlet.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/WEB-INF/lib/gwt-servlet.jar -------------------------------------------------------------------------------- /war/images/all/xradiobutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/xradiobutton.png -------------------------------------------------------------------------------- /war/images/icons/bgSample0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/bgSample0.png -------------------------------------------------------------------------------- /war/images/icons/bgSample1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/bgSample1.png -------------------------------------------------------------------------------- /war/images/icons/bgSample2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/bgSample2.png -------------------------------------------------------------------------------- /war/images/icons/i-checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-checkbox.png -------------------------------------------------------------------------------- /war/images/icons/i-progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-progress.png -------------------------------------------------------------------------------- /war/images/icons/next-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/next-logo.png -------------------------------------------------------------------------------- /war/images/icons/simpsonXY.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/simpsonXY.jpg -------------------------------------------------------------------------------- /war/images/all/chevronSelected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/chevronSelected.png -------------------------------------------------------------------------------- /war/images/closeCornerPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/closeCornerPressed.png -------------------------------------------------------------------------------- /war/images/icons/i-navigation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/i-navigation.png -------------------------------------------------------------------------------- /war/images/icons/next-logo-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/next-logo-16.png -------------------------------------------------------------------------------- /war/images/icons/tab0-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab0-selected.png -------------------------------------------------------------------------------- /war/images/icons/tab1-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab1-selected.png -------------------------------------------------------------------------------- /war/images/icons/tab3-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab3-selected.png -------------------------------------------------------------------------------- /war/images/icons/tab4-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/tab4-selected.png -------------------------------------------------------------------------------- /war/images/icons/xbuttonImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/xbuttonImage.png -------------------------------------------------------------------------------- /war/images/all/navigationContent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/navigationContent.png -------------------------------------------------------------------------------- /war/images/icons/next-logo-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/next-logo-white.png -------------------------------------------------------------------------------- /war/images/all/xcheckbox-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/xcheckbox-selected.png -------------------------------------------------------------------------------- /war/images/icons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/apple-touch-icon.png -------------------------------------------------------------------------------- /war/images/all/xradiobutton-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/all/xradiobutton-selected.png -------------------------------------------------------------------------------- /war/images/icons/apple-touch-icon-114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/apple-touch-icon-114.png -------------------------------------------------------------------------------- /war/images/icons/apple-touch-icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/apple-touch-icon-72.png -------------------------------------------------------------------------------- /war/images/icons/xbuttonImageSelected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nextinterfaces/next-demo/HEAD/war/images/icons/xbuttonImageSelected.png -------------------------------------------------------------------------------- /.settings/com.google.gdt.eclipse.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jun 09 08:36:45 PDT 2011 2 | eclipse.preferences.version=1 3 | jarsExcludedFromWebInfLib= 4 | launchConfigExternalUrlPrefix= 5 | warSrcDir=war 6 | warSrcDirIsOutput=true 7 | -------------------------------------------------------------------------------- /war/code/SliderController.js: -------------------------------------------------------------------------------- 1 | XSlider slider = new XSlider(75); /*** 75% ***/ 2 | 3 | slider.addValueChangeHandler(new ValueChangeHandler() { 4 | 5 | public void onValueChange(ValueChangeEvent e) { 6 | 7 | /*** slide selection: e.getValue() ***/ 8 | 9 | } 10 | }); -------------------------------------------------------------------------------- /war/code/SwitchController.js: -------------------------------------------------------------------------------- 1 | XSwitch switchBtn = new XSwitch(true); 2 | 3 | switchBtn.addValueChangeHandler(new ValueChangeHandler() { 4 | 5 | @Override 6 | public void onValueChange(ValueChangeEvent e) { 7 | 8 | e.getValue(); /*** Switched true/false ***/ 9 | 10 | } 11 | }); -------------------------------------------------------------------------------- /war/code/LabelImageController.js: -------------------------------------------------------------------------------- 1 | XLabel headline = new XLabel("Headline Title", XLabelType.Header); 2 | 3 | XLabel text = new XLabel("Label text: Neque porro quisquam est qui dolorem ipsum"); 4 | 5 | XAnchor link = new XAnchor("NEXT url", "http://nextinterfaces.com", "_blank"); 6 | 7 | XImage img = new XImage("http://www.nextinterfaces.com/images/next-logo.png"); -------------------------------------------------------------------------------- /src/next/demo.gwt.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/next/interfaces/rpc/HelloServiceAsync.java: -------------------------------------------------------------------------------- 1 | package next.interfaces.rpc; 2 | 3 | import com.google.gwt.user.client.rpc.AsyncCallback; 4 | 5 | /** 6 | * The async counterpart of GreetingService. 7 | */ 8 | public interface HelloServiceAsync { 9 | void sayHello(String input, AsyncCallback callback) throws IllegalArgumentException; 10 | } 11 | -------------------------------------------------------------------------------- /war/code/PickerController.js: -------------------------------------------------------------------------------- 1 | XPicker picker = new XPicker(); 2 | 3 | picker.add("Castle in the Sky"); 4 | 5 | picker.add("Totoro"); 6 | 7 | picker.add("Spirited Away"); 8 | 9 | /*** selected ***/ 10 | picker.add("Ponyo", true); 11 | 12 | picker.addValueChangeHandler(new ValueChangeHandler() { 13 | public void onValueChange(ValueChangeEvent e) { 14 | ... 15 | } 16 | }); -------------------------------------------------------------------------------- /war/code/DragController.js: -------------------------------------------------------------------------------- 1 | class DragScrollController extends XController { 2 | 3 | public DragScrollController() { 4 | setTitle("My title"); 5 | } 6 | 7 | @Override 8 | public Scroll getScrollOrientation() { 9 | return XController.Scroll.DRAGGABLE; 10 | } 11 | 12 | @Override 13 | public IsWidget getViewContent() { 14 | return new HTML("The scrollable content."); 15 | } 16 | } -------------------------------------------------------------------------------- /war/code/ProgressController.js: -------------------------------------------------------------------------------- 1 | final XProgress progress = new XProgress(); 2 | 3 | /*** progress.setTransistionTiming(1000); ***/ 4 | 5 | XButton btn = new XButton("Start Progress"); 6 | 7 | btn.addClickHandler(new ClickHandler() { 8 | public void onClick(ClickEvent event) { 9 | 10 | if(!progress.isRunning()){ 11 | progress.reset(); 12 | runProgress(0, progress); 13 | } 14 | } 15 | }); -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /war/code/HorizontalController.js: -------------------------------------------------------------------------------- 1 | class HorizontalScrollController extends XController { 2 | 3 | public HorizontalScrollController() { 4 | setTitle("My title"); 5 | } 6 | 7 | @Override 8 | public Scroll getScrollOrientation() { 9 | return XController.Scroll.HORIZONTAL; 10 | } 11 | 12 | @Override 13 | public IsWidget getViewContent() { 14 | return new HTML("The scrollable content."); 15 | } 16 | } -------------------------------------------------------------------------------- /war/code/VerticalController.js: -------------------------------------------------------------------------------- 1 | class VerticalScrollController extends XController { 2 | 3 | public VerticalScrollController() { 4 | setTitle("Vertical Scroll"); 5 | } 6 | 7 | @Override 8 | public Scroll getScrollOrientation() { 9 | return XController.Scroll.VERTICAL; 10 | } 11 | 12 | @Override 13 | public IsWidget getViewContent() { 14 | return new HTML("The scrollable content."); 15 | } 16 | } -------------------------------------------------------------------------------- /war/code/PopController.js: -------------------------------------------------------------------------------- 1 | class PopController extends XController { 2 | 3 | PopController() { 4 | setTitle("Pop Example"); 5 | 6 | /*** XController pop In ***/ 7 | /*** this.popIn(); ***/ 8 | 9 | /*** XController pop Out ***/ 10 | /*** this.popOut(); ***/ 11 | } 12 | 13 | @Override 14 | public Scroll getScrollOrientation() { 15 | return XController.Scroll.VERTICAL; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/next/interfaces/rpc/HelloService.java: -------------------------------------------------------------------------------- 1 | package next.interfaces.rpc; 2 | 3 | import com.google.gwt.user.client.rpc.RemoteService; 4 | import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; 5 | 6 | /** 7 | * The client side stub for the RPC service. 8 | */ 9 | @RemoteServiceRelativePath("hello") 10 | public interface HelloService extends RemoteService { 11 | String sayHello(String name) throws IllegalArgumentException; 12 | } 13 | -------------------------------------------------------------------------------- /war/code/NavigationBarController.js: -------------------------------------------------------------------------------- 1 | XNavigationBar bar = new XNavigationBar(); 2 | 3 | bar.setTitle("A Title"); 4 | 5 | bar.setLeftTitle("Back", Type.BACK_BUTTON); 6 | 7 | bar.getLeftButton().addClickHandler(new ClickHandler() { 8 | public void onClick(ClickEvent e) { 9 | ... 10 | } 11 | }); 12 | 13 | bar.setRightTitle("Done"); 14 | 15 | bar.getRightButton().addClickHandler(new ClickHandler() { 16 | public void onClick(ClickEvent e) { 17 | ... 18 | } 19 | }); -------------------------------------------------------------------------------- /.settings/com.google.gwt.eclipse.core.prefs: -------------------------------------------------------------------------------- 1 | #Thu Jul 28 17:38:36 PDT 2011 2 | eclipse.preferences.version=1 3 | entryPointModules= 4 | filesCopiedToWebInfLib=gwt-servlet.jar 5 | gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48ZW50cnktcG9pbnQtbW9kdWxlPm5leHQuZGVtbzwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+ 6 | -------------------------------------------------------------------------------- /src/next/server/HelloServiceImpl.java: -------------------------------------------------------------------------------- 1 | package next.server; 2 | 3 | import next.interfaces.rpc.HelloService; 4 | 5 | import com.google.gwt.user.server.rpc.RemoteServiceServlet; 6 | 7 | /** 8 | * The server side implementation of the RPC service. 9 | */ 10 | @SuppressWarnings("serial") 11 | public class HelloServiceImpl extends RemoteServiceServlet implements HelloService { 12 | 13 | public String sayHello(String input) throws IllegalArgumentException { 14 | return "Hello from RPC - " + input; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /war/code/FormController.js: -------------------------------------------------------------------------------- 1 | XTextField text = new XTextField("Text"); 2 | 3 | XTextField password = new XTextField("Password", XTextFieldType.PASSWORD); 4 | 5 | XTextField email = new XTextField("Email", XTextFieldType.EMAIL); 6 | 7 | XTextField number = new XTextField("Number", XTextFieldType.NUMBER); 8 | 9 | XTextField tel = new XTextField("Tel", XTextFieldType.TEL); 10 | 11 | XTextField url = new XTextField("URL", XTextFieldType.URL); 12 | 13 | XTextField textarea = new XTextField("Text Area", XTextFieldType.TEXTAREA); -------------------------------------------------------------------------------- /war/code/FadeController.js: -------------------------------------------------------------------------------- 1 | class FadeController extends XController { 2 | 3 | FadeController() { 4 | setTitle("Fade Example"); 5 | 6 | /*** XController fades In ***/ 7 | /*** this.fadeIn(); ***/ 8 | 9 | /*** XController fades Out ***/ 10 | /*** this.fadeOut(); ***/ 11 | } 12 | 13 | @Override 14 | public IsWidget getViewContent() { 15 | return new HTML("view content"); 16 | } 17 | 18 | @Override 19 | public Scroll getScrollOrientation() { 20 | return XController.Scroll.VERTICAL; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /war/code/SlideController.js: -------------------------------------------------------------------------------- 1 | class SlideController extends XController { 2 | 3 | SlideController() { 4 | setTitle("Slide Example"); 5 | 6 | /*** slides out by pop previous controller in parent ***/ 7 | /*** getNavigationController().popController(true); ***/ 8 | } 9 | 10 | @Override 11 | public IsWidget getViewContent() { 12 | return new HTML("view content"); 13 | } 14 | 15 | @Override 16 | public Scroll getScrollOrientation() { 17 | return XController.Scroll.VERTICAL; 18 | } 19 | } 20 | 21 | /*** somewhere else ***/ 22 | getNavigationController().pushController(slideController, true); 23 | -------------------------------------------------------------------------------- /war/code/PopupController.js: -------------------------------------------------------------------------------- 1 | new XButton("Rounded"); 2 | 3 | new XButton("Shadow", XButtonType.Shadow); 4 | 5 | new XButton("Navigation", XButtonType.Navigation); 6 | 7 | new XButton("Blue", XButtonType.NavigationBlue); 8 | 9 | new XButton("Red", XButtonType.NavigationRed); 10 | 11 | new XButton("Black", XButtonType.NavigationBlack); 12 | 13 | new XButton("Left", XButtonType.Image, "images/icon.png", "images/icon-pressed.png", true); 14 | 15 | new XButton("Right", XButtonType.Image, "images/icon.png", "images/icon-pressed.png", false); 16 | 17 | btn.addClickHandler(new ClickHandler() { 18 | public void onClick(ClickEvent e) { 19 | ... 20 | } 21 | }); -------------------------------------------------------------------------------- /war/code/ButtonsController.js: -------------------------------------------------------------------------------- 1 | new XButton("Rounded"); 2 | 3 | new XButton("Shadow", XButtonType.Shadow); 4 | 5 | new XButton("Navigation", XButtonType.Navigation); 6 | 7 | new XButton("Blue", XButtonType.NavigationBlue); 8 | 9 | new XButton("Red", XButtonType.NavigationRed); 10 | 11 | new XButton("Black", XButtonType.NavigationBlack); 12 | 13 | new XButton("Left", XButtonType.Image, "images/icon.png", "images/icon-pressed.png", true); 14 | 15 | new XButton("Right", XButtonType.Image, "images/icon.png", "images/icon-pressed.png", false); 16 | 17 | btn.addClickHandler(new ClickHandler() { 18 | public void onClick(ClickEvent e) { 19 | ... 20 | } 21 | }); -------------------------------------------------------------------------------- /war/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | helloServlet 11 | next.server.HelloServiceImpl 12 | 13 | 14 | 15 | helloServlet 16 | /nextdemo/hello 17 | 18 | 19 | 20 | index.html 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /war/code/FlipController.js: -------------------------------------------------------------------------------- 1 | class FlipController extends XController { 2 | 3 | public FlipController(XController invokerController) { 4 | 5 | setTitle("Flip Example"); 6 | 7 | /*** flips out to originator ***/ 8 | /*** FlipController.this.flipTo(invokerController, null); ***/ 9 | } 10 | 11 | @Override 12 | public IsWidget getViewContent() { 13 | return new HTML("view content"); 14 | } 15 | 16 | @Override 17 | public Scroll getScrollOrientation() { 18 | return XController.Scroll.VERTICAL; 19 | } 20 | } 21 | 22 | /*** somewhere else flips in ***/ 23 | FlipController ctrl = new FlipController(getNavigationController().getVisibleController()); 24 | this.flipTo(ctrl, null); 25 | -------------------------------------------------------------------------------- /war/code/SlideUpDownController.js: -------------------------------------------------------------------------------- 1 | SlideUpDownController extends XController { 2 | 3 | SlideUpDownController() { 4 | 5 | setTitle("Slide Up/Down"); 6 | 7 | /*** When invoked via slideUpIn() then ***/ 8 | /*** this.slideUpReverse(); ***/ 9 | 10 | /*** When instantiated with slideDownIn() then ***/ 11 | /*** this.slideDownReverse(); ***/ 12 | } 13 | 14 | @Override 15 | public IsWidget getViewContent() { 16 | return new HTML("view content"); 17 | } 18 | } 19 | 20 | 21 | SlideUpDownController ctrl = new SlideUpDownController("Slide Up", true); 22 | ctrl.slideUpIn(); 23 | 24 | SlideUpDownController ctrl = new SlideUpDownController("Slide Down", false); 25 | ctrl.slideDownIn(); -------------------------------------------------------------------------------- /war/code/SwapController.js: -------------------------------------------------------------------------------- 1 | SwapController extends XController { 2 | 3 | SwapController(IController invokerController) { 4 | 5 | setTitle("Swap example"); 6 | 7 | /*** reverse swap using ***/ 8 | /*** Command afterCommand = ...; ***/ 9 | /*** this.swapToReverse(invokerController, afterCommand); ***/ 10 | } 11 | 12 | @Override 13 | public IsWidget getViewContent() { 14 | return new HTML("view content"); 15 | } 16 | } 17 | 18 | /*** instantiate ***/ 19 | SwapController ctrl = new SwapController(getNavigationController().getVisibleController()); 20 | 21 | someOtherController.swapTo(ctrl, new Command(){ 22 | public void execute(){ 23 | /*** on swap complete callback ***/ 24 | } 25 | }); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | NEXT Software Terms of Service 2 | 3 | Apache License, Version 2.0 4 | 5 | Copyright 2011 Vancouver Ywebb Consulting Ltd 6 | 7 | The NEXT interfaces software and sample code developed by Vancouver Ywebb 8 | Consulting Ltd is licensed under the Apache License, v. 2.0 (the "License"); you 9 | may not use this file except in compliance with the License. You may obtain a 10 | copy of the License at 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | 14 | Unless required by applicable law or agreed to in writing, software distributed 15 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 16 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 17 | specific language governing permissions and limitations under the License. -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | next-Demo 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | com.google.gdt.eclipse.core.webAppProjectValidator 15 | 16 | 17 | 18 | 19 | com.google.gwt.eclipse.core.gwtProjectValidator 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.jdt.core.javanature 26 | com.google.gwt.eclipse.core.gwtNature 27 | 28 | 29 | -------------------------------------------------------------------------------- /war/code/CheckboxController.js: -------------------------------------------------------------------------------- 1 | /*** vertical group ***/ 2 | XCheckbox c0 = new XCheckbox("Red", "Red"); 3 | 4 | XCheckbox c1 = new XCheckbox("Green", "Green"); 5 | 6 | XCheckbox c2 = new XCheckbox("Blue", "Blue"); 7 | 8 | c0.setValue(true); 9 | 10 | 11 | XCheckboxGroup groupVertical = new XCheckboxGroup(true); 12 | 13 | groupVertical.add(c0, c1, c2); 14 | 15 | 16 | /*** horizontal group ***/ 17 | XCheckbox v0 = new XCheckbox("Red", "Red"); 18 | 19 | XCheckbox v1 = new XCheckbox("Green", "Green"); 20 | 21 | XCheckbox v2 = new XCheckbox("Blue", "Blue"); 22 | 23 | 24 | XCheckboxGroup groupHorizontal = new XCheckboxGroup(false); 25 | 26 | groupHorizontal.add(v0, v1, v2); 27 | 28 | groupHorizontal.addSelectionChangedHandler(new SelectionChangedHandler() { 29 | public void onSelectionChanged(SelectionChangedEvent e) { 30 | /*** selection ***/ 31 | groupHorizontal.getCheckedWidgets(); 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /src/next/interfaces/Globals.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces; 17 | 18 | public interface Globals { 19 | 20 | String GIT_HOST = "https://github.com/nextinterfaces/next-demo/tree/master/src/next/interfaces"; 21 | String SOURCE_PATH = "code/$.js"; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /war/code/RadioButtonController.js: -------------------------------------------------------------------------------- 1 | /*** vertical group ***/ 2 | XRadioButton h0 = new XRadioButton("Red", "Red"); 3 | h0.setValue(true);/*** selected ***/ 4 | 5 | XRadioButton h1 = new XRadioButton("Green", "Green"); 6 | 7 | XRadioButton h2 = new XRadioButton("Blue", "Blue"); 8 | 9 | 10 | XRadioButtonGroup groupVertical = new XRadioButtonGroup(true); 11 | groupVertical.add(h0, h1, h2); 12 | 13 | 14 | /*** horizontal group ***/ 15 | XRadioButton v0 = new XRadioButton("Red", "Red"); 16 | 17 | XRadioButton v1 = new XRadioButton("Green", "Green"); 18 | 19 | XRadioButton v2 = new XRadioButton("Blue", "Blue"); 20 | 21 | XRadioButtonGroup groupHorizontal = new XRadioButtonGroup(false); 22 | groupHorizontal.add(v0, v1, v2); 23 | 24 | groupHorizontal.addSelectionChangedHandler(new SelectionChangedHandler() { 25 | public void onSelectionChanged(SelectionChangedEvent e) { 26 | /*** selection ***/ 27 | groupHorizontal.getCheckedWidget().getName(); 28 | } 29 | }); -------------------------------------------------------------------------------- /src/next/interfaces/ResponseReader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces; 17 | 18 | import com.google.gwt.http.client.Response; 19 | 20 | public abstract class ResponseReader { 21 | 22 | public abstract void onSuccess(Response resp); 23 | 24 | public void onError(Response resp, Throwable e) { 25 | throw new RuntimeException("Error: " + e); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /war/code/ListController.js: -------------------------------------------------------------------------------- 1 | CellData data = new CellData(); 2 | data.setWestWidgets(new Image("images/icons/list0.png")); 3 | data.setTextWidgets(new Label("Ariplane Mode")); 4 | data.setEastWidgets(new XSwitch(true)); 5 | XTableCell cell0 = new XTableCell(data); 6 | 7 | data = new CellData(); 8 | data.setWestWidgets(new Image("images/icons/list1.png")); 9 | data.setTextWidgets(new Label("WI-FI")); 10 | data.setEastWidgets(new Image("images/icons/list1x.png")); 11 | XTableCell cell1 = new XTableCell(data); 12 | 13 | data = new CellData(); 14 | data.setWestWidgets(new Image("images/icons/list2.png")); 15 | data.setTextWidgets(new Label("Notifications")); 16 | data.setEastWidgets(new Image("images/icons/list2x.png")); 17 | XTableCell cell2 = new XTableCell(data); 18 | 19 | data = new CellData(); 20 | data.setWestWidgets(new Image("images/icons/list3.png")); 21 | data.setTextWidgets(new Label("Sound")); 22 | data.setEastWidgets(new XSlider(60)); 23 | XTableCell cell3 = new XTableCell(data); 24 | 25 | XTableView tableView = new XTableView(); 26 | tableView.addItem(cell0, cell1, cell2, cell3); -------------------------------------------------------------------------------- /src/next/interfaces/controller/HelloWorldController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller; 17 | 18 | import next.i.controller.XTableController; 19 | import next.i.view.TableData; 20 | 21 | public class HelloWorldController extends XTableController { 22 | 23 | public HelloWorldController() { 24 | 25 | setTitle("Hello World"); 26 | 27 | TableData tableDS = new TableData(); 28 | tableDS.add("Hello", "World"); 29 | 30 | initDataSource(tableDS); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/GitXTableController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller; 17 | 18 | import next.i.controller.XController; 19 | import next.i.controller.XTableController; 20 | 21 | import com.google.gwt.event.dom.client.ClickEvent; 22 | import com.google.gwt.event.dom.client.ClickHandler; 23 | 24 | public abstract class GitXTableController extends XTableController { 25 | 26 | public GitXTableController() { 27 | 28 | getNavigationBar().setRightTitle("Source"); 29 | getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 30 | public void onClick(ClickEvent event) { 31 | DemoUtils.openGit(getGitPath()); 32 | } 33 | }); 34 | } 35 | 36 | @Override 37 | public Scroll getScrollOrientation() { 38 | return XController.Scroll.VERTICAL; 39 | } 40 | 41 | public abstract String getGitPath(); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/SlideController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.view.XBarItem.Type; 19 | import next.i.view.CellData; 20 | import next.i.view.TableData; 21 | import next.interfaces.controller.DemoUtils; 22 | import next.interfaces.controller.GitXTableController; 23 | 24 | import com.google.gwt.event.dom.client.ClickEvent; 25 | import com.google.gwt.event.dom.client.ClickHandler; 26 | 27 | public class SlideController extends GitXTableController { 28 | 29 | public SlideController() { 30 | 31 | setTitle("Slide Example"); 32 | 33 | getNavigationBar().setLeftTitle("Back", Type.BACK_BUTTON); 34 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 35 | public void onClick(ClickEvent event) { 36 | getNavigationController().popController(true); 37 | } 38 | }); 39 | 40 | TableData tableDS = new TableData(); 41 | tableDS.add(data()); 42 | 43 | initDataSource(tableDS); 44 | } 45 | 46 | private CellData[] data() { 47 | return DemoUtils.DATA; 48 | } 49 | 50 | public String getGitPath() { 51 | return "/controller/animation/SlideController"; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/GitXController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller; 17 | 18 | import next.i.controller.XController; 19 | import next.i.view.XBarItem.Type; 20 | 21 | import com.google.gwt.event.dom.client.ClickEvent; 22 | import com.google.gwt.event.dom.client.ClickHandler; 23 | import com.google.gwt.user.client.ui.IsWidget; 24 | 25 | public abstract class GitXController extends XController { 26 | 27 | public GitXController() { 28 | 29 | getNavigationBar().setLeftTitle("Back", Type.BACK_BUTTON); 30 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 31 | public void onClick(ClickEvent event) { 32 | getNavigationController().popController(true); 33 | } 34 | }); 35 | 36 | getNavigationBar().setRightTitle("Source"); 37 | getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 38 | public void onClick(ClickEvent event) { 39 | DemoUtils.openGit(getGitPath()); 40 | } 41 | }); 42 | } 43 | 44 | @Override 45 | public Scroll getScrollOrientation() { 46 | return XController.Scroll.VERTICAL; 47 | } 48 | 49 | public abstract IsWidget getViewContent(); 50 | 51 | public abstract String getGitPath(); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/PopController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.view.XBarItem.Type; 19 | import next.i.view.CellData; 20 | import next.i.view.TableData; 21 | import next.interfaces.controller.DemoUtils; 22 | import next.interfaces.controller.GitXTableController; 23 | 24 | import com.google.gwt.event.dom.client.ClickEvent; 25 | import com.google.gwt.event.dom.client.ClickHandler; 26 | 27 | public class PopController extends GitXTableController { 28 | 29 | public PopController() { 30 | 31 | setTitle("Pop Example"); 32 | 33 | getNavigationBar().setLeftTitle("Done", Type.BUTTON); 34 | getNavigationBar().getLeftButton().setHighlighted(true); 35 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 36 | public void onClick(ClickEvent event) { 37 | PopController.this.popOut(); 38 | } 39 | }); 40 | 41 | TableData tableDS = new TableData(); 42 | tableDS.add(data()); 43 | 44 | initDataSource(tableDS); 45 | } 46 | 47 | private CellData[] data() { 48 | return DemoUtils.DATA; 49 | } 50 | 51 | public String getGitPath() { 52 | return "/controller/animation/PopController"; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/FadeController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.view.XBarItem.Type; 19 | import next.i.view.CellData; 20 | import next.i.view.TableData; 21 | import next.interfaces.controller.DemoUtils; 22 | import next.interfaces.controller.GitXTableController; 23 | 24 | import com.google.gwt.event.dom.client.ClickEvent; 25 | import com.google.gwt.event.dom.client.ClickHandler; 26 | 27 | public class FadeController extends GitXTableController { 28 | 29 | public FadeController() { 30 | 31 | setTitle("Fade Example"); 32 | 33 | getNavigationBar().setLeftTitle("Done", Type.BUTTON); 34 | getNavigationBar().getLeftButton().setHighlighted(true); 35 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 36 | public void onClick(ClickEvent event) { 37 | FadeController.this.fadeOut(); 38 | } 39 | }); 40 | 41 | TableData tableDS = new TableData(); 42 | tableDS.add(data()); 43 | 44 | initDataSource(tableDS); 45 | } 46 | 47 | private CellData[] data() { 48 | return DemoUtils.DATA; 49 | } 50 | 51 | public String getGitPath() { 52 | return "/controller/animation/FadeController"; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/FlipController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.controller.XController; 19 | import next.i.view.XBarItem.Type; 20 | import next.i.view.CellData; 21 | import next.i.view.TableData; 22 | import next.interfaces.controller.DemoUtils; 23 | import next.interfaces.controller.GitXTableController; 24 | 25 | import com.google.gwt.event.dom.client.ClickEvent; 26 | import com.google.gwt.event.dom.client.ClickHandler; 27 | 28 | public class FlipController extends GitXTableController { 29 | 30 | public FlipController(final XController invokerController) { 31 | 32 | setTitle("Flip Example"); 33 | 34 | getNavigationBar().setLeftTitle("Done", Type.BUTTON); 35 | getNavigationBar().getLeftButton().setHighlighted(true); 36 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 37 | public void onClick(ClickEvent event) { 38 | FlipController.this.flipTo(invokerController, null); 39 | } 40 | }); 41 | 42 | TableData tableDS = new TableData(); 43 | tableDS.add(data()); 44 | 45 | initDataSource(tableDS); 46 | } 47 | 48 | private CellData[] data() { 49 | return DemoUtils.DATA; 50 | } 51 | 52 | public String getGitPath() { 53 | return "/controller/animation/FlipController"; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/SwitchController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.widgets.XFlexTable; 19 | import next.i.view.widgets.XSwitch; 20 | import next.interfaces.controller.GitXController; 21 | 22 | import com.google.gwt.event.logical.shared.ValueChangeEvent; 23 | import com.google.gwt.event.logical.shared.ValueChangeHandler; 24 | import com.google.gwt.user.client.ui.HTML; 25 | import com.google.gwt.user.client.ui.IsWidget; 26 | 27 | public class SwitchController extends GitXController { 28 | 29 | public SwitchController() { 30 | setTitle("Switch"); 31 | } 32 | 33 | @Override 34 | public IsWidget getViewContent() { 35 | XFlexTable panel = new XFlexTable(); 36 | panel.setCellSpacing(40); 37 | 38 | final HTML label = new HTML("Switch is OFF"); 39 | XSwitch switchBtn = new XSwitch(true); 40 | switchBtn.addValueChangeHandler(new ValueChangeHandler() { 41 | @Override 42 | public void onValueChange(ValueChangeEvent e) { 43 | label.setHTML("Switch is " + (e.getValue()? "ON  " : "OFF")); 44 | } 45 | }); 46 | 47 | panel.addWidgets(switchBtn, label); 48 | 49 | return panel; 50 | } 51 | 52 | public String getGitPath() { 53 | return "/controller/widgets/SwitchController"; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/SwapController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.controller.XController; 19 | import next.i.view.XBarItem.Type; 20 | import next.i.view.CellData; 21 | import next.i.view.TableData; 22 | import next.interfaces.controller.DemoUtils; 23 | import next.interfaces.controller.GitXTableController; 24 | 25 | import com.google.gwt.event.dom.client.ClickEvent; 26 | import com.google.gwt.event.dom.client.ClickHandler; 27 | 28 | public class SwapController extends GitXTableController { 29 | 30 | public SwapController(final XController invokerController) { 31 | 32 | setTitle("Swap Example"); 33 | 34 | getNavigationBar().setLeftTitle("Done", Type.BUTTON); 35 | getNavigationBar().getLeftButton().setHighlighted(true); 36 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 37 | public void onClick(ClickEvent event) { 38 | SwapController.this.swapToReverse(invokerController, null); 39 | } 40 | }); 41 | 42 | TableData tableDS = new TableData(); 43 | tableDS.add(data()); 44 | 45 | initDataSource(tableDS); 46 | } 47 | 48 | private CellData[] data() { 49 | return DemoUtils.DATA; 50 | } 51 | 52 | public String getGitPath() { 53 | return "/controller/animation/SwapController"; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/LabelImageController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.widgets.XAnchor; 19 | import next.i.view.widgets.XFlexTable; 20 | import next.i.view.widgets.XImage; 21 | import next.i.view.widgets.XLabel; 22 | import next.i.view.widgets.XLabel.XLabelType; 23 | import next.interfaces.controller.GitXController; 24 | 25 | import com.google.gwt.user.client.ui.IsWidget; 26 | 27 | public class LabelImageController extends GitXController { 28 | 29 | public LabelImageController() { 30 | setTitle("Label and Image"); 31 | } 32 | 33 | @Override 34 | public IsWidget getViewContent() { 35 | XFlexTable panel = new XFlexTable("100%", null); 36 | panel.setCellSpacing(10); 37 | 38 | XLabel headline = new XLabel("Headline Title", XLabelType.Header); 39 | XLabel text = new XLabel("Label text: Neque porro quisquam est qui dolorem ipsum " 40 | + "quia dolor sit amet, consectetur, adipisci velit..."); 41 | 42 | XAnchor link = new XAnchor("Picture Original Link", "images/icons/earth.jpg", "_blank"); 43 | XImage img1 = new XImage("images/icons/earth.jpg"); 44 | 45 | panel.addWidgets(headline, text, link, img1); 46 | 47 | return panel; 48 | } 49 | 50 | public String getGitPath() { 51 | return "/controller/widgets/LabelImageController"; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/PickerController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.widgets.XFlexTable; 19 | import next.i.view.widgets.XPicker; 20 | import next.interfaces.controller.GitXController; 21 | 22 | import com.google.gwt.event.logical.shared.ValueChangeEvent; 23 | import com.google.gwt.event.logical.shared.ValueChangeHandler; 24 | import com.google.gwt.user.client.ui.IsWidget; 25 | 26 | public class PickerController extends GitXController { 27 | 28 | public PickerController() { 29 | setTitle("Picker"); 30 | } 31 | 32 | @Override 33 | public IsWidget getViewContent() { 34 | XFlexTable panel = new XFlexTable(); 35 | panel.setCellSpacing(40); 36 | 37 | XPicker picker = new XPicker(); 38 | picker.add("Castle in the Sky"); 39 | picker.add("Totoro"); 40 | picker.add("Spirited Away"); 41 | picker.add("Ponyo", true); 42 | picker.addValueChangeHandler(new ValueChangeHandler() { 43 | public void onValueChange(ValueChangeEvent e) { 44 | // Window.alert("You selected " + e.getValue() + " type=" + e.getType() 45 | // + " src=" + e.getSource()); 46 | } 47 | }); 48 | 49 | panel.addWidgets(picker); 50 | 51 | return panel; 52 | } 53 | 54 | public String getGitPath() { 55 | return "/controller/widgets/PickerController"; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/SlideUpDownController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.view.XBarItem.Type; 19 | import next.i.view.CellData; 20 | import next.i.view.TableData; 21 | import next.interfaces.controller.DemoUtils; 22 | import next.interfaces.controller.GitXTableController; 23 | 24 | import com.google.gwt.event.dom.client.ClickEvent; 25 | import com.google.gwt.event.dom.client.ClickHandler; 26 | 27 | public class SlideUpDownController extends GitXTableController { 28 | 29 | public SlideUpDownController(String title, final boolean isUp) { 30 | 31 | setTitle(title); 32 | 33 | getNavigationBar().setLeftTitle("Done", Type.BUTTON); 34 | getNavigationBar().getLeftButton().setHighlighted(true); 35 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 36 | public void onClick(ClickEvent event) { 37 | if (isUp) { 38 | SlideUpDownController.this.slideUpReverse(); 39 | 40 | } else { 41 | SlideUpDownController.this.slideDownReverse(); 42 | } 43 | } 44 | }); 45 | 46 | TableData tableDS = new TableData(); 47 | tableDS.add(data()); 48 | 49 | initDataSource(tableDS); 50 | } 51 | 52 | private CellData[] data() { 53 | return DemoUtils.DATA; 54 | } 55 | 56 | public String getGitPath() { 57 | return "/controller/animation/SlideUpDownController"; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/next/interfaces/HTTP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces; 17 | 18 | import next.i.XLog; 19 | 20 | import com.google.gwt.http.client.Request; 21 | import com.google.gwt.http.client.RequestBuilder; 22 | import com.google.gwt.http.client.RequestCallback; 23 | import com.google.gwt.http.client.RequestException; 24 | import com.google.gwt.http.client.Response; 25 | import com.google.gwt.http.client.URL; 26 | 27 | public class HTTP { 28 | 29 | public static void doGet(String url, ResponseReader responseReader) { 30 | 31 | RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url)); 32 | 33 | try { 34 | builder.sendRequest(null, new Callback_(responseReader)); 35 | } catch (RequestException e) { 36 | XLog.err("RequestException: " + e.getMessage()); 37 | responseReader.onError(null, e); 38 | } 39 | } 40 | 41 | 42 | private static class Callback_ implements RequestCallback { 43 | ResponseReader reader; 44 | 45 | public Callback_(ResponseReader reader) { 46 | this.reader = reader; 47 | } 48 | 49 | public void onError(Request request, Throwable e) { 50 | reader.onError(null, e); 51 | } 52 | 53 | public void onResponseReceived(Request request, Response response) { 54 | if (200 == response.getStatusCode()) { 55 | reader.onSuccess(response); 56 | } else { 57 | // XLog.warn("RequestCallback::onResponseReceived, not supported status '" 58 | // + response.getStatusCode() + "'"); 59 | reader.onError(response, null); 60 | } 61 | } 62 | } 63 | 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/FormController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.widgets.XFlexTable; 19 | import next.i.view.widgets.XTextField; 20 | import next.i.view.widgets.XTextField.XTextFieldType; 21 | import next.interfaces.controller.GitXController; 22 | 23 | import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; 24 | import com.google.gwt.user.client.ui.IsWidget; 25 | 26 | public class FormController extends GitXController { 27 | 28 | public FormController() { 29 | setTitle("Form"); 30 | } 31 | 32 | @Override 33 | public IsWidget getViewContent() { 34 | 35 | XFlexTable panel = new XFlexTable(null, "#fff"); 36 | panel.setCellSpacing(0); 37 | 38 | XTextField text = new XTextField("Text"); 39 | XTextField password = new XTextField("Password", XTextFieldType.PASSWORD); 40 | XTextField email = new XTextField("Email", XTextFieldType.EMAIL); 41 | XTextField number = new XTextField("Number", XTextFieldType.NUMBER); 42 | XTextField tel = new XTextField("Tel", XTextFieldType.TEL); 43 | XTextField url = new XTextField("URL", XTextFieldType.URL); 44 | XTextField textarea = new XTextField("Text Area", XTextFieldType.TEXTAREA); 45 | panel.addWidgets(text, password, email, number, tel, url, textarea); 46 | 47 | FlexCellFormatter fcf = panel.getFlexCellFormatter(); 48 | for (int i = 0; i < panel.getRowCount(); i++) { 49 | fcf.setHeight(i, 0, "50px"); 50 | } 51 | return panel; 52 | } 53 | 54 | public String getGitPath() { 55 | return "/controller/widgets/FormController"; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/SliderController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.widgets.XFlexTable; 19 | import next.i.view.widgets.XSlider; 20 | import next.interfaces.controller.GitXController; 21 | 22 | import com.google.gwt.event.logical.shared.ValueChangeEvent; 23 | import com.google.gwt.event.logical.shared.ValueChangeHandler; 24 | import com.google.gwt.user.client.ui.HTML; 25 | import com.google.gwt.user.client.ui.IsWidget; 26 | import com.google.gwt.user.client.ui.Label; 27 | 28 | public class SliderController extends GitXController { 29 | 30 | public SliderController() { 31 | setTitle("Slider"); 32 | } 33 | 34 | @Override 35 | public IsWidget getViewContent() { 36 | XFlexTable panel = new XFlexTable(); 37 | panel.setCellSpacing(40); 38 | 39 | HTML label = new HTML(" "); 40 | 41 | XSlider slider1 = new XSlider(75); 42 | XSlider slider2 = new XSlider(100); 43 | XSlider slider3 = new XSlider(35); 44 | 45 | addHandlers(label, slider1, slider2, slider3); 46 | 47 | panel.addWidgets(slider1, slider2, slider3, label); 48 | 49 | return panel; 50 | } 51 | 52 | private void addHandlers(final Label label, XSlider... sliders) { 53 | for (final XSlider s : sliders) { 54 | s.addValueChangeHandler(new ValueChangeHandler() { 55 | public void onValueChange(ValueChangeEvent e) { 56 | label.setText("Slided at: " + e.getValue() + "%"); 57 | } 58 | }); 59 | } 60 | } 61 | 62 | public String getGitPath() { 63 | return "/controller/widgets/SliderController"; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/VerticalController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.controller.XController; 19 | import next.i.view.XBarItem.Type; 20 | import next.i.view.widgets.XFlexTable; 21 | import next.interfaces.controller.DemoUtils; 22 | 23 | import com.google.gwt.event.dom.client.ClickEvent; 24 | import com.google.gwt.event.dom.client.ClickHandler; 25 | import com.google.gwt.user.client.ui.Image; 26 | import com.google.gwt.user.client.ui.IsWidget; 27 | 28 | public class VerticalController extends XController { 29 | 30 | public VerticalController() { 31 | setTitle("Vertical Scroll"); 32 | 33 | getNavigationBar().setLeftTitle("Back", Type.BACK_BUTTON); 34 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 35 | public void onClick(ClickEvent event) { 36 | getNavigationController().popController(true); 37 | } 38 | }); 39 | 40 | getNavigationBar().setRightTitle("Source"); 41 | getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 42 | public void onClick(ClickEvent event) { 43 | DemoUtils.openGit(getGitPath()); 44 | } 45 | }); 46 | } 47 | 48 | @Override 49 | public Scroll getScrollOrientation() { 50 | return XController.Scroll.VERTICAL; 51 | } 52 | 53 | @Override 54 | public IsWidget getViewContent() { 55 | XFlexTable panel = new XFlexTable("1080px", null); 56 | panel.addWidgets(new Image("images/icons/tallimg.jpg"), null); 57 | // panel.setHeight("1080px"); 58 | return panel; 59 | } 60 | 61 | public String getGitPath() { 62 | return "/controller/animation/VerticalController"; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/ProgressController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.widgets.XButton; 19 | import next.i.view.widgets.XFlexTable; 20 | import next.i.view.widgets.XProgress; 21 | import next.interfaces.controller.GitXController; 22 | 23 | import com.google.gwt.event.dom.client.ClickEvent; 24 | import com.google.gwt.event.dom.client.ClickHandler; 25 | import com.google.gwt.user.client.Timer; 26 | import com.google.gwt.user.client.ui.IsWidget; 27 | 28 | public class ProgressController extends GitXController { 29 | 30 | public ProgressController() { 31 | setTitle("Progress"); 32 | } 33 | 34 | @Override 35 | public IsWidget getViewContent() { 36 | XFlexTable panel = new XFlexTable(); 37 | panel.setCellSpacing(40); 38 | 39 | final XProgress progress = new XProgress(); 40 | // progress.setTransistionTiming(1000); 41 | XButton btn = new XButton("Start Progress"); 42 | 43 | btn.addClickHandler(new ClickHandler() { 44 | public void onClick(ClickEvent event) { 45 | if(!progress.isRunning()){ 46 | progress.reset(); 47 | runProgress(0, progress); 48 | } 49 | } 50 | }); 51 | 52 | panel.addWidgets(btn, progress); 53 | 54 | return panel; 55 | } 56 | 57 | private void runProgress(final double percent, final XProgress progress) { 58 | if (percent > 1.0) { 59 | // isRunning = false; 60 | return; 61 | } 62 | progress.setValue(percent); 63 | new Timer() { 64 | public void run() { 65 | runProgress(percent + 0.1, progress); 66 | } 67 | }.schedule(600); 68 | } 69 | 70 | public String getGitPath() { 71 | return "/controller/widgets/ProgressController"; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/PopupController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.controller.XTableController; 19 | import next.i.view.CellData; 20 | import next.i.view.TableData; 21 | import next.i.view.XTableCell; 22 | import next.i.view.XTableView; 23 | import next.interfaces.controller.DemoUtils; 24 | 25 | import com.google.gwt.event.dom.client.ClickEvent; 26 | import com.google.gwt.event.dom.client.ClickHandler; 27 | 28 | public class PopupController extends XTableController { 29 | 30 | public PopupController() { 31 | 32 | setTitle("Popups"); 33 | 34 | getNavigationBar().setRightTitle("Source"); 35 | getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 36 | public void onClick(ClickEvent event) { 37 | DemoUtils.openGit(getGitPath()); 38 | } 39 | }); 40 | 41 | ((XTableView) getView()).showChevron(true); 42 | 43 | TableData tableDS = new TableData(); 44 | tableDS.add( 45 | new CellData(null, "Top", null), 46 | new CellData(null, "Right", null), 47 | new CellData(null, "Bottom", null), 48 | new CellData(null, "Left", null), 49 | new CellData(null, "Center", null) 50 | ); 51 | 52 | initDataSource(tableDS); 53 | } 54 | 55 | @Override 56 | public void onRowSelected(int indexSelected, CellData cellDataSelected, XTableCell tableCell) { 57 | 58 | if (indexSelected == 0) { 59 | 60 | } else if (indexSelected == 1) { 61 | 62 | } else if (indexSelected == 2) { 63 | 64 | } else if (indexSelected == 3) { 65 | 66 | } else if (indexSelected == 4) { 67 | 68 | } 69 | 70 | } 71 | 72 | public String getGitPath() { 73 | return "/views/PopupController"; 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/next/interfaces/Main.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces; 17 | 18 | import next.i.HistoryController; 19 | import next.i.controller.XNavigationController; 20 | import next.i.controller.XTabBarController; 21 | import next.i.controller.XTabController; 22 | import next.interfaces.controller.animation.AnimationsController; 23 | import next.interfaces.controller.widgets.WidgetsController; 24 | 25 | import com.google.gwt.core.client.EntryPoint; 26 | import com.google.gwt.core.client.Scheduler; 27 | import com.google.gwt.core.client.Scheduler.ScheduledCommand; 28 | import com.google.gwt.user.client.ui.Image; 29 | import com.google.gwt.user.client.ui.RootLayoutPanel; 30 | import com.google.gwt.user.client.ui.RootPanel; 31 | 32 | /** 33 | * Main entry point class 34 | */ 35 | public class Main implements EntryPoint { 36 | 37 | public void onModuleLoad() { 38 | 39 | Scheduler.get().scheduleDeferred(new ScheduledCommand() { 40 | @Override 41 | public void execute() { 42 | 43 | XTabController tabAnimeCtrl = new XTabController(new XNavigationController(new AnimationsController())); 44 | tabAnimeCtrl.set("Animations", new Image("images/icons/tab0.png"), new Image("images/icons/tab0-selected.png")); 45 | 46 | XTabController tabWidgetsCtrl = new XTabController(new XNavigationController(new WidgetsController())); 47 | tabWidgetsCtrl.set("Widgets", new Image("images/icons/tab3.png"), new Image("images/icons/tab3-selected.png")); 48 | 49 | XTabBarController tabBarController = new XTabBarController(); 50 | tabBarController.addControllers(tabWidgetsCtrl, tabAnimeCtrl); 51 | tabBarController.attach(RootLayoutPanel.get()); 52 | 53 | RootPanel.get("loading").setVisible(false); 54 | 55 | new HistoryController().register("start"); 56 | } 57 | }); 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/DragController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.controller.XController; 19 | import next.i.view.XBarItem.Type; 20 | import next.i.view.widgets.XFlexTable; 21 | import next.interfaces.controller.DemoUtils; 22 | 23 | import com.google.gwt.event.dom.client.ClickEvent; 24 | import com.google.gwt.event.dom.client.ClickHandler; 25 | import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; 26 | import com.google.gwt.user.client.ui.HasVerticalAlignment; 27 | import com.google.gwt.user.client.ui.Image; 28 | import com.google.gwt.user.client.ui.IsWidget; 29 | 30 | public class DragController extends XController { 31 | 32 | public DragController() { 33 | setTitle("Drag Scroll"); 34 | 35 | getNavigationBar().setLeftTitle("Back", Type.BACK_BUTTON); 36 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 37 | public void onClick(ClickEvent event) { 38 | getNavigationController().popController(true); 39 | } 40 | }); 41 | 42 | getNavigationBar().setRightTitle("Source"); 43 | getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 44 | public void onClick(ClickEvent event) { 45 | DemoUtils.openGit(getGitPath()); 46 | } 47 | }); 48 | } 49 | 50 | @Override 51 | public Scroll getScrollOrientation() { 52 | return XController.Scroll.DRAGGABLE; 53 | } 54 | 55 | @Override 56 | public IsWidget getViewContent() { 57 | XFlexTable panel = new XFlexTable("100%", null); 58 | panel.addWidgets(new Image("images/icons/simpsonXY.jpg"), null); 59 | // panel.setWidth("1000px"); 60 | FlexCellFormatter fcf = panel.getFlexCellFormatter(); 61 | fcf.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE); 62 | return panel; 63 | } 64 | 65 | public String getGitPath() { 66 | return "/controller/animation/DragController"; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/HorizontalController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.controller.XController; 19 | import next.i.view.XBarItem.Type; 20 | import next.i.view.widgets.XFlexTable; 21 | import next.interfaces.controller.DemoUtils; 22 | 23 | import com.google.gwt.event.dom.client.ClickEvent; 24 | import com.google.gwt.event.dom.client.ClickHandler; 25 | import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; 26 | import com.google.gwt.user.client.ui.HasVerticalAlignment; 27 | import com.google.gwt.user.client.ui.Image; 28 | import com.google.gwt.user.client.ui.IsWidget; 29 | 30 | public class HorizontalController extends XController { 31 | 32 | public HorizontalController() { 33 | setTitle("Horizontal Scroll"); 34 | 35 | getNavigationBar().setLeftTitle("Back", Type.BACK_BUTTON); 36 | getNavigationBar().getLeftButton().addClickHandler(new ClickHandler() { 37 | public void onClick(ClickEvent event) { 38 | getNavigationController().popController(true); 39 | } 40 | }); 41 | 42 | getNavigationBar().setRightTitle("Source"); 43 | getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 44 | public void onClick(ClickEvent event) { 45 | DemoUtils.openGit(getGitPath()); 46 | } 47 | }); 48 | } 49 | 50 | @Override 51 | public Scroll getScrollOrientation() { 52 | return XController.Scroll.HORIZONTAL; 53 | } 54 | 55 | @Override 56 | public IsWidget getViewContent() { 57 | XFlexTable panel = new XFlexTable("100%", null); 58 | panel.addWidgets(new Image("images/icons/wideimg.jpg"), null); 59 | panel.setWidth("1000px"); 60 | FlexCellFormatter fcf = panel.getFlexCellFormatter(); 61 | fcf.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE); 62 | return panel; 63 | } 64 | 65 | public String getGitPath() { 66 | return "/controller/animation/HorizontalController"; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /war/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | NEXT - Java HTML5 mobile widgets for smartphones and tablets using GWT and CSS3 30 | 31 | 32 | 33 | 34 | 35 | 36 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/ListController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.CellData; 19 | import next.i.view.XTableCell; 20 | import next.i.view.XTableView; 21 | import next.i.view.widgets.XSlider; 22 | import next.i.view.widgets.XSwitch; 23 | import next.interfaces.controller.GitXController; 24 | 25 | import com.google.gwt.user.client.ui.Image; 26 | import com.google.gwt.user.client.ui.IsWidget; 27 | import com.google.gwt.user.client.ui.Label; 28 | 29 | public class ListController extends GitXController { 30 | 31 | public ListController() { 32 | setTitle("Lists"); 33 | } 34 | 35 | @Override 36 | public IsWidget getViewContent() { 37 | 38 | CellData data = new CellData(); 39 | data.setWestWidgets(new Image("images/icons/list00.png")); 40 | data.setTextWidgets(new Label("Ariplane Mode")); 41 | data.setEastWidgets(new XSwitch(true)); 42 | XTableCell c0 = new XTableCell(data); 43 | 44 | data = new CellData(); 45 | data.setWestWidgets(new Image("images/icons/list01.png")); 46 | data.setTextWidgets(new Label("WI-FI")); 47 | data.setEastWidgets(new Image("images/icons/list1x.png")); 48 | XTableCell c1 = new XTableCell(data); 49 | 50 | data = new CellData(); 51 | data.setWestWidgets(new Image("images/icons/list02.png")); 52 | data.setTextWidgets(new Label("Notifications")); 53 | data.setEastWidgets(new Image("images/icons/list2x.png")); 54 | XTableCell c2 = new XTableCell(data); 55 | 56 | data = new CellData(); 57 | data.setWestWidgets(new Image("images/icons/list03.png")); 58 | data.setTextWidgets(new Label("Sound")); 59 | data.setEastWidgets(new XSlider(60)); 60 | XTableCell c3 = new XTableCell(data); 61 | 62 | XTableView tableView = new XTableView(); 63 | tableView.addItem(c0, c1, c2, c3); 64 | 65 | return tableView; 66 | } 67 | 68 | public String getGitPath() { 69 | return "/widgets/ListController"; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NEXT 2 | ==== 3 | 4 | `next-demo` is a concept featuring [next framework](https://github.com/nextinterfaces/next) for developing Native Looking HTML5 Mobile apps for SmartPhones and Tablets. 5 | 6 | ### More information: 7 | http://nextinterfaces.com/ 8 | 9 | ### Demo (WebKit only): 10 | http://nextinterfaces.com/demo 11 | 12 | 13 | Supported Phones & Tablets: 14 | --------------------------- 15 | 16 | Device agnostic, it runs on 6 devices: iOS, Android, BlackBerry OS6+, webOS, Samsung Bada, PlayBook 17 | 18 | 19 | ### Dependencies: 20 | * Java5+ 21 | * GWT (Google Web Kit) 2.2+ 22 | * Eclipse & ANT (optional) 23 | 24 | Installation: 25 | ------------- 26 | 27 | ### Running the Demo: 28 | * [Download](http://nextinterfaces.com/download) `next-xx.zip` file 29 | * Add the attached `hello-next` project to Eclipse. Eclipse should automatically discover it as a GWT project. 30 | * From Eclipse `/Run /Run As Web Application` 31 | * You should see a demo similar to [next-demo](http://nextinterfaces.com/demo) 32 | 33 | ### Start a new project: 34 | * [Download](http://nextinterfaces.com/download) `next-xx.zip` file 35 | * Add the attached `next.jar` (`/hello-next/war/WEB-INF/next.jar`) file to your GWT project & classpath 36 | * Add `next.css` and `next/images` to your project root. Use `index.html` for reference. 37 | * Edit your project .gwt.xml and add 38 | 39 | 40 | 41 | ... 42 | 43 | 44 | ... 45 | 46 | 47 | 48 | ### Hello World in 30 seconds: 49 | 50 | * Create a new GWT project as explained above 51 | * Create class `HelloWorldController` 52 | 53 | class HelloWorldController extends XTableController { 54 | public HelloWorldController() { 55 | setTitle("Hello World"); 56 | TableData tableDS = new TableData(); 57 | tableDS.add("Hello", "World"); 58 | initDataSource(tableDS); 59 | } 60 | } 61 | 62 | * In your `EntryPoint` class paste 63 | 64 | public void onModuleLoad() { 65 | XTabBarController tabBarController = new XTabBarController(); 66 | tabBarController.addControllers(new XTabController(new HelloWorldController())); 67 | } 68 | 69 | 70 | * Eclipse `/Run /Run as Web Application` resulting in the screenshot bellow: 71 | 72 | ![alt tag](http://nextinterfaces.com/images/misc/hello-world-gwt-mobile-demo-phone-touch.png) 73 | 74 | See the zipped `/hello-next` project or [next-demo](https://github.com/nextinterfaces/next-demo) for more information. 75 | 76 | 77 | Documentation: 78 | -------------- 79 | 80 | http://nextinterfaces.com/start 81 | 82 | 83 | ![alt tag](http://nextinterfaces.com/i/next-simulator_1.png) 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/NavigationBarController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.XBarItem.Type; 19 | import next.i.view.XNavigationBar; 20 | import next.interfaces.controller.GitXController; 21 | 22 | import com.google.gwt.event.dom.client.ClickEvent; 23 | import com.google.gwt.event.dom.client.ClickHandler; 24 | import com.google.gwt.user.client.Window; 25 | import com.google.gwt.user.client.ui.HTML; 26 | import com.google.gwt.user.client.ui.IsWidget; 27 | import com.google.gwt.user.client.ui.VerticalPanel; 28 | 29 | public class NavigationBarController extends GitXController { 30 | 31 | public NavigationBarController() { 32 | setTitle("Navigation Bar"); 33 | } 34 | 35 | @Override 36 | public IsWidget getViewContent() { 37 | 38 | VerticalPanel panel = new VerticalPanel(); 39 | panel.setWidth("100%"); 40 | panel.getElement().getStyle().setProperty("background", "#f8f8f8"); 41 | panel.getElement().getStyle().setProperty("padding", "40px 20px"); 42 | 43 | XNavigationBar bar1 = new XNavigationBar(); 44 | bar1.setTitle("Bar One"); 45 | bar1.getElement().getStyle().setProperty("height", "30px"); 46 | panel.add(bar1); 47 | 48 | panel.add(new HTML(" ")); 49 | 50 | XNavigationBar bar2 = new XNavigationBar(); 51 | bar2.setLeftTitle("Back", Type.BACK_BUTTON); 52 | bar2.getLeftButton().addClickHandler(new ClickHandler() { 53 | public void onClick(ClickEvent event) { 54 | Window.alert("Back was tapped."); 55 | } 56 | }); 57 | bar2.setTitle("Bar Two"); 58 | panel.add(bar2); 59 | panel.add(new HTML(" ")); 60 | 61 | XNavigationBar bar3 = new XNavigationBar(); 62 | bar3.setTitle("Bar Three"); 63 | bar3.getElement().getStyle().setProperty("height", "60px"); 64 | 65 | bar3.setLeftTitle("Edit", Type.BUTTON); 66 | bar3.getLeftButton().addClickHandler(new ClickHandler() { 67 | public void onClick(ClickEvent event) { 68 | Window.alert("Edit was tapped."); 69 | } 70 | }); 71 | bar3.setRightTitle("Done"); 72 | bar3.getRightButton().addClickHandler(new ClickHandler() { 73 | public void onClick(ClickEvent event) { 74 | Window.alert("Done was tapped."); 75 | } 76 | }); 77 | 78 | panel.add(bar3); 79 | 80 | return panel; 81 | } 82 | 83 | public String getGitPath() { 84 | return "/widgets/NavigationBarController"; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/RadioButtonController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.mobile.SelectionChangedEvent; 19 | import next.i.mobile.SelectionChangedHandler; 20 | import next.i.view.widgets.XFlexTable; 21 | import next.i.view.widgets.XLabel; 22 | import next.i.view.widgets.XRadioButton; 23 | import next.i.view.widgets.XRadioButtonGroup; 24 | import next.i.view.widgets.XLabel.XLabelType; 25 | import next.interfaces.controller.GitXController; 26 | 27 | import com.google.gwt.user.client.ui.HTML; 28 | import com.google.gwt.user.client.ui.IsWidget; 29 | 30 | public class RadioButtonController extends GitXController { 31 | 32 | public RadioButtonController() { 33 | setTitle("Radio Button"); 34 | } 35 | 36 | @Override 37 | public IsWidget getViewContent() { 38 | 39 | XFlexTable panel = new XFlexTable(); 40 | panel.setCellSpacing(20); 41 | 42 | XRadioButton radio0 = new XRadioButton("Red", "Red"); 43 | XRadioButton radio1 = new XRadioButton("Green", "Green"); 44 | XRadioButton radio2 = new XRadioButton("Blue", "Blue"); 45 | 46 | final XRadioButtonGroup group1 = new XRadioButtonGroup(true); 47 | group1.add(radio0, radio1, radio2); 48 | 49 | XRadioButton radioA = new XRadioButton("Red", "Red"); 50 | XRadioButton radioB = new XRadioButton("Green", "Green"); 51 | XRadioButton radioC = new XRadioButton("Blue", "Blue"); 52 | 53 | final XRadioButtonGroup group2 = new XRadioButtonGroup(false); 54 | group2.add(radioA, radioB, radioC); 55 | 56 | final XLabel label1 = new XLabel("Favorite color", XLabelType.Header); 57 | final XLabel label2 = new XLabel("Favorite color", XLabelType.Header); 58 | 59 | radio0.setValue(true); 60 | radioA.setValue(true); 61 | 62 | group1.addSelectionChangedHandler(new SelectionChangedHandler() { 63 | public void onSelectionChanged(SelectionChangedEvent e) { 64 | label1.setText("Favorite color: " + group1.getCheckedWidget().getName()); 65 | } 66 | }); 67 | 68 | group2.addSelectionChangedHandler(new SelectionChangedHandler() { 69 | public void onSelectionChanged(SelectionChangedEvent e) { 70 | label2.setText("Favorite color: " + group2.getCheckedWidget().getName()); 71 | } 72 | }); 73 | 74 | panel.addWidgets(label2, group2, label1, group1, new HTML(" ")); 75 | 76 | return panel; 77 | } 78 | 79 | public String getGitPath() { 80 | return "/controller/widgets/RadioButtonController"; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/CheckboxController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.mobile.SelectionChangedEvent; 19 | import next.i.mobile.SelectionChangedHandler; 20 | import next.i.view.widgets.XCheckbox; 21 | import next.i.view.widgets.XCheckboxGroup; 22 | import next.i.view.widgets.XFlexTable; 23 | import next.i.view.widgets.XLabel; 24 | import next.i.view.widgets.XLabel.XLabelType; 25 | import next.interfaces.controller.GitXController; 26 | 27 | import com.google.gwt.user.client.ui.HTML; 28 | import com.google.gwt.user.client.ui.IsWidget; 29 | 30 | public class CheckboxController extends GitXController { 31 | 32 | public CheckboxController() { 33 | setTitle("Checkbox"); 34 | } 35 | 36 | @Override 37 | public IsWidget getViewContent() { 38 | 39 | XFlexTable panel = new XFlexTable(); 40 | panel.setCellSpacing(20); 41 | 42 | XCheckbox check0 = new XCheckbox("Red", "Red"); 43 | XCheckbox check1 = new XCheckbox("Green", "Green"); 44 | XCheckbox check2 = new XCheckbox("Blue", "Blue"); 45 | 46 | final XCheckboxGroup groupVertical = new XCheckboxGroup(true); 47 | groupVertical.add(check0, check1, check2); 48 | 49 | XCheckbox checkA = new XCheckbox("Red", "Red"); 50 | XCheckbox checkB = new XCheckbox("Green", "Green"); 51 | XCheckbox checkC = new XCheckbox("Blue", "Blue"); 52 | final XCheckboxGroup groupHorizontal = new XCheckboxGroup(false); 53 | groupHorizontal.add(checkA, checkB, checkC); 54 | 55 | final XLabel label1 = new XLabel("Favorite color", XLabelType.Header); 56 | final XLabel label2 = new XLabel("Favorite color", XLabelType.Header); 57 | 58 | panel.addWidgets(label2, groupHorizontal, label1, groupVertical, new HTML(" ")); 59 | 60 | check0.setValue(true); 61 | check1.setValue(true); 62 | checkA.setValue(true); 63 | checkC.setValue(true); 64 | 65 | groupVertical.addSelectionChangedHandler(new SelectionChangedHandler() { 66 | public void onSelectionChanged(SelectionChangedEvent e) { 67 | String s = "Favorite color: "; 68 | for (XCheckbox c : groupVertical.getCheckedWidgets()) { 69 | s += c.getName() + ", "; 70 | } 71 | label1.setText(s); 72 | } 73 | }); 74 | 75 | groupHorizontal.addSelectionChangedHandler(new SelectionChangedHandler() { 76 | public void onSelectionChanged(SelectionChangedEvent e) { 77 | String s = "Favorite color: "; 78 | for (XCheckbox c : groupHorizontal.getCheckedWidgets()) { 79 | s += c.getName() + ", "; 80 | } 81 | label2.setText(s); 82 | } 83 | }); 84 | 85 | return panel; 86 | } 87 | 88 | public String getGitPath() { 89 | return "/controller/widgets/CheckboxController"; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/ButtonsController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.view.CellData; 19 | import next.i.view.XTableCell; 20 | import next.i.view.XTableView; 21 | import next.i.view.widgets.XButton; 22 | import next.i.view.widgets.XButton.XButtonType; 23 | import next.interfaces.controller.GitXController; 24 | 25 | import com.google.gwt.user.client.ui.IsWidget; 26 | import com.google.gwt.user.client.ui.RootLayoutPanel; 27 | 28 | public class ButtonsController extends GitXController { 29 | 30 | public ButtonsController() { 31 | setTitle("Buttons"); 32 | 33 | RootLayoutPanel.get().getElement().addClassName("rootLayoutPanel222"); 34 | } 35 | 36 | @Override 37 | public IsWidget getViewContent() { 38 | 39 | CellData d0 = new CellData(null, "Rounded", new XButton("Rounded")); 40 | CellData d1 = new CellData(null, "Shadow", new XButton("Shadow", XButtonType.Shadow)); 41 | CellData d2 = new CellData(null, "Navigation", new XButton("Navigation", XButtonType.Navigation)); 42 | CellData d3 = new CellData(null, "Blue", new XButton("Blue", XButtonType.NavigationBlue)); 43 | CellData d4 = new CellData(null, "Red", new XButton("Red", XButtonType.NavigationRed)); 44 | CellData d5 = new CellData(null, "Black", new XButton("Black", XButtonType.NavigationBlack)); 45 | CellData d6 = new CellData(null, "Image button", new XButton("Left", XButtonType.Image, "images/icons/xbuttonImage.png", "images/icons/xbuttonImageSelected.png", true)); 46 | CellData d7 = new CellData(null, "Image button", new XButton("Right", XButtonType.Image, "images/icons/xbuttonImage.png", "images/icons/xbuttonImageSelected.png", false)); 47 | 48 | XTableView tableView = new XTableView(); 49 | tableView.addItem(new XTableCell(d0), new XTableCell(d1), new XTableCell(d2), new XTableCell(d3), 50 | new XTableCell(d4), new XTableCell(d5), new XTableCell(d6), new XTableCell(d7)); 51 | 52 | addClickHandlers(d0, d1, d2, d3, d4, d5, d6, d7); 53 | 54 | return tableView; 55 | } 56 | 57 | private void addClickHandlers(CellData... data) { 58 | for (CellData c : data) { 59 | // XButton b = (XButton) c.getEastWidgets()[0]; 60 | // b.addClickHandler(new ClickHandler() { 61 | // public void onClick(ClickEvent e) { 62 | // Window.alert("You tapped " + ((XButton)e.getSource()).getTitle() + "."); 63 | // // XPopup popup = new XPopup(); 64 | // // popup.setWidget(new XLabel("You tapped " + b.getTitle() + ".")); 65 | // // popup.setTop(30.0, Unit.PCT); popup.setRight(30.,Unit.PCT); 66 | // // popup.setBottom(30., Unit.PCT); popup.setLeft(30., Unit.PCT); 67 | // // popup.show(); 68 | // } 69 | // }); 70 | } 71 | } 72 | 73 | public String getGitPath() { 74 | return "/controller/widgets/ButtonsController"; 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/animation/AnimationsController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.animation; 17 | 18 | import next.i.controller.XController; 19 | import next.i.controller.XTableController; 20 | import next.i.util.Utils; 21 | import next.i.view.CellData; 22 | import next.i.view.TableData; 23 | import next.i.view.XTableCell; 24 | import next.i.view.XTableView; 25 | 26 | public class AnimationsController extends XTableController { 27 | 28 | private SlideController slideCtrl; 29 | 30 | public AnimationsController() { 31 | 32 | setTitle("Animations"); 33 | 34 | ((XTableView) getView()).showChevron(true); 35 | 36 | TableData tableDS = new TableData(); 37 | 38 | tableDS.add("Slide", "Slide up", "Slide down", "Fade", "Pop", "Swap", "Flip", "Horizontal Scroll", 39 | "Vertical Scroll", "Drag Scroll"); 40 | 41 | initDataSource(tableDS); 42 | } 43 | 44 | @Override 45 | public Scroll getScrollOrientation() { 46 | return XController.Scroll.VERTICAL; 47 | } 48 | 49 | @Override 50 | public void onRowSelected(int indexSelected, CellData cellDataSelected, XTableCell tableCell) { 51 | 52 | if (indexSelected == 0) { 53 | if (slideCtrl == null) { 54 | slideCtrl = new SlideController(); 55 | } 56 | getNavigationController().pushController(slideCtrl, true); 57 | 58 | } else if (indexSelected == 1) { 59 | SlideUpDownController ctrl = new SlideUpDownController("Slide Up", true); 60 | ctrl.slideUpIn(); 61 | 62 | } else if (indexSelected == 2) { 63 | SlideUpDownController ctrl = new SlideUpDownController("Slide Down", false); 64 | ctrl.slideDownIn(); 65 | 66 | } else if (indexSelected == 3) { 67 | FadeController ctrl = new FadeController(); 68 | ctrl.fadeIn(); 69 | 70 | } else if (indexSelected == 4) { 71 | PopController ctrl = new PopController(); 72 | ctrl.popIn(); 73 | 74 | } else if (indexSelected == 5) { 75 | SwapController ctrl = new SwapController(getNavigationController().getVisibleController()); 76 | this.swapTo(ctrl, null); 77 | 78 | } else if (indexSelected == 6) { 79 | if (!Utils.isAndroid()) { // disable android as it rotates wrong 80 | FlipController ctrl = new FlipController(getNavigationController().getVisibleController()); 81 | this.flipTo(ctrl, null); 82 | } 83 | 84 | } else if (indexSelected == 7) { 85 | HorizontalController ctrl = new HorizontalController(); 86 | getNavigationController().pushController(ctrl, true); 87 | 88 | } else if (indexSelected == 8) { 89 | VerticalController ctrl = new VerticalController(); 90 | getNavigationController().pushController(ctrl, true); 91 | 92 | } else if (indexSelected == 9) { 93 | DragController ctrl = new DragController(); 94 | getNavigationController().pushController(ctrl, true); 95 | } 96 | 97 | } 98 | 99 | public String getGitPath() { 100 | return "/controller/animation/AnimationsController"; 101 | } 102 | 103 | } 104 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/widgets/WidgetsController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller.widgets; 17 | 18 | import next.i.controller.XTableController; 19 | import next.i.view.CellData; 20 | import next.i.view.TableData; 21 | import next.i.view.XTableCell; 22 | import next.i.view.XTableView; 23 | import next.interfaces.rpc.HelloService; 24 | import next.interfaces.rpc.HelloServiceAsync; 25 | 26 | import com.google.gwt.core.client.GWT; 27 | import com.google.gwt.user.client.Window; 28 | import com.google.gwt.user.client.rpc.AsyncCallback; 29 | import com.google.gwt.user.client.ui.SimplePanel; 30 | 31 | public class WidgetsController extends XTableController { 32 | 33 | private final HelloServiceAsync helloRPC = GWT.create(HelloService.class); 34 | 35 | public WidgetsController() { 36 | 37 | setTitle("NEXT widgets"); 38 | 39 | // getNavigationBar().setRightTitle("Source"); 40 | // getNavigationBar().getRightButton().addClickHandler(new ClickHandler() { 41 | // public void onClick(ClickEvent event) { 42 | // DemoUtils.openGit(getGitPath()); 43 | // } 44 | // }); 45 | 46 | ((XTableView) getView()).showChevron(true); 47 | 48 | TableData tableDS = new TableData(); 49 | 50 | tableDS.add(new CellData(createImage("images/icons/i-list.png"), "Lists", null), new CellData( 51 | createImage("images/icons/i-slider.png"), "Slider", null), new CellData( 52 | createImage("images/icons/i-radio.png"), "Radio Button", null), new CellData( 53 | createImage("images/icons/i-button.png"), "Buttons", null), new CellData( 54 | createImage("images/icons/i-picker.png"), "Picker", null), new CellData( 55 | createImage("images/icons/i-switch.png"), "Switch", null), new CellData(createImage("images/icons/i-form.png"), 56 | "Form", null), new CellData(createImage("images/icons/i-progress.png"), "Progress", null), new CellData( 57 | createImage("images/icons/i-checkbox.png"), "CheckBox", null), new CellData( 58 | createImage("images/icons/i-image.png"), "Label and Image", null), new CellData( 59 | createImage("images/icons/i-navigation.png"), "Navigation", null) 60 | // new CellData(createImage("images/icons/i-TODO.png"), "Popup", null) 61 | ); 62 | // , "Slide" 63 | 64 | initDataSource(tableDS); 65 | } 66 | 67 | private SimplePanel createImage(String url) { 68 | SimplePanel img = new SimplePanel(); 69 | img.setSize("30px", "30px"); 70 | img.getElement().getStyle().setProperty("backgroundImage", "url('" + url + "')"); 71 | return img; 72 | } 73 | 74 | @Override 75 | public void onRowSelected(int indexSelected, CellData cellDataSelected, XTableCell tableCell) { 76 | 77 | if (indexSelected == 0) { 78 | // getNavigationController().pushController(new DragViewController(), 79 | // true); 80 | getNavigationController().pushController(new ListController(), true); 81 | 82 | } else if (indexSelected == 1) { 83 | getNavigationController().pushController(new SliderController(), true); 84 | 85 | } else if (indexSelected == 2) { 86 | getNavigationController().pushController(new RadioButtonController(), true); 87 | 88 | } else if (indexSelected == 3) { 89 | getNavigationController().pushController(new ButtonsController(), true); 90 | 91 | } else if (indexSelected == 4) { 92 | getNavigationController().pushController(new PickerController(), true); 93 | 94 | } else if (indexSelected == 5) { 95 | getNavigationController().pushController(new SwitchController(), true); 96 | 97 | } else if (indexSelected == 6) { 98 | getNavigationController().pushController(new FormController(), true); 99 | 100 | } else if (indexSelected == 7) { 101 | getNavigationController().pushController(new ProgressController(), true); 102 | 103 | } else if (indexSelected == 8) { 104 | getNavigationController().pushController(new CheckboxController(), true); 105 | 106 | } else if (indexSelected == 9) { 107 | getNavigationController().pushController(new LabelImageController(), true); 108 | 109 | } else if (indexSelected == 10) { 110 | getNavigationController().pushController(new NavigationBarController(), true); 111 | 112 | } else if (indexSelected == 11) { 113 | getNavigationController().pushController(new PopupController(), true); 114 | 115 | } else if (indexSelected == 100) { 116 | // getNavigationController().pushController(new SlideController(), true); 117 | 118 | // featuring RPC call 119 | helloRPC.sayHello("NEXT rocks!", new AsyncCallback() { 120 | public void onFailure(Throwable e) { 121 | Window.alert("Error happened: " + e.getMessage()); 122 | } 123 | 124 | public void onSuccess(String result) { 125 | Window.alert("Server said \"" + result + "\"."); 126 | } 127 | }); 128 | } 129 | 130 | } 131 | 132 | public String getGitPath() { 133 | return "/controller/widgets/WidgetsController"; 134 | } 135 | 136 | } 137 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.ui.prefs: -------------------------------------------------------------------------------- 1 | #Thu May 26 08:49:27 PDT 2011 2 | eclipse.preferences.version=1 3 | org.eclipse.jdt.ui.javadoc=false 4 | org.eclipse.jdt.ui.text.custom_code_templates= 5 | -------------------------------------------------------------------------------- /src/next/interfaces/controller/DemoUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Vancouver Ywebb Consulting Ltd 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package next.interfaces.controller; 17 | 18 | import next.i.view.CellData; 19 | import next.i.view.XDragScrollView; 20 | import next.i.view.widgets.XButton; 21 | import next.i.view.widgets.XButton.XButtonType; 22 | import next.i.view.widgets.XFlexTable; 23 | import next.i.view.widgets.XPopup; 24 | import next.i.view.widgets.XSpinner; 25 | import next.interfaces.Globals; 26 | import next.interfaces.HTTP; 27 | import next.interfaces.ResponseReader; 28 | 29 | import com.google.gwt.dom.client.Element; 30 | import com.google.gwt.event.dom.client.ClickEvent; 31 | import com.google.gwt.event.dom.client.ClickHandler; 32 | import com.google.gwt.http.client.Response; 33 | import com.google.gwt.user.client.Window; 34 | import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter; 35 | import com.google.gwt.user.client.ui.HTML; 36 | import com.google.gwt.user.client.ui.HasHorizontalAlignment; 37 | import com.google.gwt.user.client.ui.HasVerticalAlignment; 38 | 39 | public class DemoUtils { 40 | 41 | public static CellData[] DATA; 42 | 43 | static { 44 | DATA = populate(); 45 | } 46 | 47 | private static CellData[] populate() { 48 | 49 | String[] names = { "Argentina", "Bolivia", "Brazil", "Chile", "Colombia", "Costa Rica", "Cuba", 50 | "Dominican Republic", "Ecuador", "El Salvador", "Guatemala", "Honduras", "Mexico", "Nicaragua", "Panama", 51 | "Paraguay", "Peru", "Puerto Rico", "Uruguay", "Venezuela" }; 52 | 53 | int len = names.length; 54 | CellData[] arr = new CellData[len]; 55 | for (int i = 0; i < len; i++) { 56 | arr[i] = new CellData(names[i]); 57 | } 58 | 59 | return arr; 60 | } 61 | 62 | public static native void openURL(String url)/*-{ 63 | $wnd.open(url, 'target=_blank'); 64 | }-*/; 65 | 66 | public static void openGit(final String url) { 67 | openGit(null, url); 68 | } 69 | 70 | public static void openGit(String source, final String url) { 71 | 72 | final XFlexTable tbl = new XFlexTable(); 73 | 74 | final XButton btnCopy = new XButton("Copy", XButtonType.Shadow); 75 | btnCopy.addClickHandler(new ClickHandler() { 76 | public void onClick(ClickEvent event) { 77 | markText(tbl.getWidget(0, 0).getElement()); 78 | } 79 | }); 80 | 81 | final XButton btnGit = new XButton("View in GitHub", XButtonType.Shadow); 82 | btnGit.addClickHandler(new ClickHandler() { 83 | public void onClick(ClickEvent event) { 84 | // Window.open(Globals.GIT_HOST + url + ".java", "_tab", ""); 85 | // Utils.loadUrl(Globals.GIT_HOST + url + ".java"); 86 | 87 | // This click handler seems to work best 88 | openURL(Globals.GIT_HOST + url + ".java"); 89 | } 90 | }); 91 | 92 | tbl.getElement().setId("codeText"); 93 | String codeUrl = url.substring(url.lastIndexOf("/") + 1); 94 | HTTP.doGet(Globals.SOURCE_PATH.replace("$", codeUrl), new ResponseReader() { 95 | public void onSuccess(Response resp) { 96 | tbl.setWidget(0, 0, new HTML("
" + toHighlighted(resp.getText()) + "
")); 97 | tbl.setWidget(1, 0, btnCopy); 98 | tbl.setWidget(1, 1, btnGit); 99 | } 100 | }); 101 | 102 | final XPopup popup = new XPopup(); 103 | XDragScrollView view = new XDragScrollView(); 104 | view.addStyleName("codeDemo"); 105 | 106 | tbl.setWidget(0, 0, new XSpinner()); 107 | tbl.setCellSpacing(10); 108 | 109 | FlexCellFormatter fcf = tbl.getFlexCellFormatter(); 110 | fcf.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP); 111 | fcf.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT); 112 | fcf.setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_TOP); 113 | fcf.setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT); 114 | fcf.setVerticalAlignment(1, 1, HasVerticalAlignment.ALIGN_TOP); 115 | fcf.setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_LEFT); 116 | fcf.setColSpan(0, 0, 2); 117 | fcf.setWidth(1, 0, "50%"); 118 | fcf.setWidth(1, 1, "50%"); 119 | view.add(tbl); 120 | 121 | int h = Window.getClientHeight(); 122 | int w = Window.getClientWidth(); 123 | popup.setWidget(view); 124 | 125 | // mobile phone 126 | if (h + w < 1000) { 127 | popup.setTop("35px"); 128 | popup.setRight("5%"); 129 | popup.setLeft("5%"); 130 | popup.setBottom("40px"); 131 | 132 | } else { 133 | popup.setTop("35px"); 134 | popup.setRight("5%"); 135 | popup.setLeft("10%"); 136 | popup.setBottom("30%"); 137 | } 138 | 139 | popup.show(); 140 | } 141 | 142 | private static native void markText(Element elem) /*-{ 143 | if ($doc.selection && $doc.selection.createRange) { 144 | var range = $doc.selection.createRange(); 145 | range.moveToElementText(elem); 146 | range.select(); 147 | } else if ($doc.createRange && $wnd.getSelection) { 148 | var range = $doc.createRange(); 149 | range.selectNode(elem); 150 | var selection = $wnd.getSelection(); 151 | selection.removeAllRanges(); 152 | selection.addRange(range); 153 | } 154 | }-*/; 155 | 156 | private static String toHighlighted(String code) { 157 | 158 | String[] keywords = { "new ", "public ", "private ", "return ", "static ", "class ", "native ", "final ", 159 | "extends " }; 160 | 161 | code = code.replace("=", "="); 162 | code = code.replace(".", "."); 163 | code = code.replace(":", ":"); 164 | code = code.replace(",", ","); 165 | code = code.replace(";", ";"); 166 | code = code.replace("@Override", "@Override"); 167 | code = code.replace("true", "true"); 168 | code = code.replace("false", "false"); 169 | for (String k : keywords) { 170 | code = code.replace(k, "" + k.trim() + " "); 171 | } 172 | 173 | code = replaceEclosed('"', "codeQuot", code); 174 | code = code.replace("/*-{", "/*-{"); 175 | code = code.replace("}-*/", "}-*/"); 176 | code = code.replace("/***", "//"); 177 | code = code.replace("***/", ""); 178 | 179 | return code; 180 | } 181 | 182 | private static String replaceEclosed(char char_, String className, String code) { 183 | int count = 0; 184 | char[] chars = code.toCharArray(); 185 | 186 | StringBuilder buff = new StringBuilder(); 187 | 188 | for (char c : chars) { 189 | if (char_ == c) { 190 | if (count % 2 == 0) { 191 | buff.append("\""); 192 | 193 | } else { 194 | buff.append("\""); 195 | 196 | } 197 | count++; 198 | } else { 199 | buff.append(c); 200 | } 201 | } 202 | 203 | return buff.toString(); 204 | } 205 | 206 | } 207 | -------------------------------------------------------------------------------- /war/next.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 5 | /* Disable touch/hold text & image selection */ 6 | -webkit-touch-callout: none; 7 | cursor: default; 8 | -webkit-tap-highlight-color: RGBA(0, 0, 0, 0); 9 | -webkit-text-size-adjust: none; 10 | } 11 | 12 | html, body { 13 | height: 100%; 14 | overflow: hidden; 15 | margin: 0; 16 | padding: 0; 17 | } 18 | 19 | p,div,span,td { /* This disables inputs and textarea */ 20 | -webkit-user-select: none; 21 | user-select: none; 22 | } 23 | 24 | body { 25 | background: #6D84A2; 26 | } 27 | 28 | code, pre { 29 | font-size: .9em; 30 | } 31 | 32 | code, pre, pre * { 33 | font-family: Menlo, Monaco, Courier, monospace; 34 | -webkit-user-select: text; 35 | } 36 | 37 | .navigationContent { 38 | position: relative; 39 | width: 100%; 40 | height: 100%; 41 | } 42 | 43 | .navigationContent { 44 | background: #C5CCD4 url(images/all/navigationContent.png); 45 | } 46 | 47 | .navigationBar { 48 | width: 100%; 49 | height: 100%; 50 | background: #8195AF; 51 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#B0BCCD), color-stop(0.5, #889BB3), color-stop(0.5, #8195AF), to(#6D84A2) ); 52 | border-top: 1px solid #CDD5DF; 53 | border-bottom: 1px solid #2D3642; 54 | z-index: 10; 55 | } 56 | 57 | .navBarItem { 58 | padding: 0 5px; 59 | } 60 | 61 | .navBarItem .right { 62 | width: 5px; 63 | height: 30px; 64 | } 65 | 66 | .navBarItem .right div { 67 | width: inherit; 68 | height: inherit; 69 | margin-left: -1px; /*during animation there is 1px padding*/ 70 | background: url(images/ios.png) no-repeat; 71 | background-position: 0 -446px; 72 | } 73 | 74 | .navBarItem.selected .right div { 75 | background: url(images/ios.png) no-repeat; 76 | background-position: 0 -486px; 77 | } 78 | 79 | .navBarItem .body { 80 | vertical-align: middle; 81 | background: url(images/ios.png) no-repeat; 82 | background-position: 0 -246px; 83 | height: 30px; 84 | padding: 0 6px 0 10px; 85 | white-space: nowrap; 86 | font-weight: bold; 87 | font-size: 0.8em; 88 | color: #fff; 89 | text-shadow: 0 -1px 1px #465871; 90 | } 91 | 92 | .navBarItem.highlighted .body { 93 | background: url(images/ios.png) no-repeat; 94 | background-position: 0 -366px; 95 | } 96 | 97 | .navBarItem.highlighted .right div { 98 | background: url(images/ios.png) no-repeat; 99 | background-position: 0 -406px; 100 | } 101 | 102 | .navBarItem.highlighted.selected .right div { 103 | background: url(images/ios.png) no-repeat; 104 | background-position: 0 -486px; 105 | } 106 | 107 | .navBarItem.navBarItemBack .body { 108 | background: url(images/ios.png) no-repeat; 109 | background-position: 0 -286px; 110 | padding: 0 6px 0 15px; 111 | } 112 | 113 | .navBarItem.navBarItemBack.selected .body { 114 | background: url(images/ios.png) no-repeat; 115 | background-position: 0 -326px; 116 | } 117 | 118 | .navBarItem.selected .body { 119 | background: url(images/ios.png) no-repeat; 120 | background-position: 0 -526px; 121 | } 122 | 123 | .navBarTitle { 124 | vertical-align: middle; 125 | display: table-cell; 126 | white-space: nowrap; 127 | font-weight: bold; 128 | font-size: 1.2em; 129 | color: #fff; 130 | text-shadow: 0 -1px 1px #505965; 131 | } 132 | 133 | .tabContent { 134 | position: absolute; 135 | top: 0; 136 | left: 0; 137 | right: 0; 138 | display: -webkit-box; 139 | -webkit-box-orient: vertical; 140 | width: 100%; 141 | /* overflow: hidden; */ 142 | z-index: 0; 143 | } 144 | 145 | .tabBar { 146 | position: absolute; 147 | right: 0; 148 | bottom: 0; 149 | left: 0; 150 | display: -webkit-box; 151 | -webkit-box-orient: horizontal; 152 | -webkit-box-align: right; 153 | -webkit-box-pack: justify; 154 | z-index: 1; 155 | border-top: 1px solid #000; 156 | border-bottom: 1px solid #000; 157 | background: #151515; 158 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#434343), color-stop(0.01, #434343), color-stop(0.01, #2e2e2e), color-stop(0.5, #151515), color-stop(0.5, #000), 159 | to(#000) ); 160 | padding: 0 2px; 161 | } 162 | 163 | .tab { 164 | margin: 2px 0 1px 0; 165 | } 166 | 167 | .tab.selected { 168 | background: #363636; 169 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#494949), color-stop(0.5, #363636), color-stop(0.5, #252525), to(#252525) ); 170 | border-radius: 3px; 171 | } 172 | 173 | .tab .icon { 174 | text-align: center; 175 | white-space: nowrap; 176 | } 177 | 178 | .tab .title { 179 | color: #999; 180 | text-align: center; 181 | white-space: nowrap; 182 | font-size: .7em; 183 | font-weight: bold; 184 | text-shadow: 0 -1px 1px #000; 185 | letter-spacing: 1px; 186 | padding-bottom: 2px; 187 | } 188 | 189 | .tab.selected .title { 190 | color: #fff; 191 | } 192 | 193 | .toolbar { 194 | background-color: silver; 195 | width: 100%; 196 | display: -webkit-box; 197 | -webkit-box-orient: horizontal; 198 | -webkit-box-align: center; 199 | -webkit-box-pack: justify; 200 | z-index: 1; 201 | } 202 | 203 | .toolbar .buttonLeft { 204 | background-color: orange; 205 | -webkit-box-flex: 1; 206 | } 207 | 208 | .toolbar .buttonRight { 209 | background-color: lightBlue; 210 | -webkit-box-flex: 1; 211 | text-align: right; 212 | } 213 | 214 | .toolbar .title { 215 | background-color: lightGreen; 216 | -webkit-box-flex: 1; 217 | text-align: center; 218 | } 219 | 220 | .animeLock { 221 | position: absolute; 222 | left: 0px; 223 | top: 0px; 224 | right: 0px; 225 | bottom: 0px; 226 | } 227 | 228 | .tableCell { 229 | border-bottom: 1px solid #ccc; 230 | vertical-align: middle; 231 | white-space: nowrap; 232 | background-color: #fff; 233 | position: relative; 234 | width: 100%; 235 | } 236 | 237 | table.tableCell { 238 | border-spacing: 10px; 239 | } 240 | 241 | div.tableCell { 242 | padding: 10px 0; 243 | } 244 | 245 | .tableCell.selected { 246 | background: #0375ED; 247 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #058CF5), color-stop(1, #015EE6) ); 248 | } 249 | 250 | .tableCell.chevron { 251 | background-image: url("images/all/chevron.png"); 252 | background-repeat: no-repeat; 253 | background-position: right; 254 | } 255 | 256 | .tableCell.selected.chevron { 257 | background-image: url("images/all/chevronSelected.png"); 258 | background-image: url("images/all/chevronSelected.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0, #058CF5), color-stop(1, #015EE6) ); 259 | } 260 | 261 | .tableCellWestImage { 262 | position: absolute; 263 | top: 50%; 264 | left: 10px; 265 | } 266 | 267 | .tableCellEastImage { 268 | position: absolute; 269 | top: 50%; 270 | right: 10px; 271 | } 272 | 273 | .tableCellTitle, .tableCell .gwt-Label{ 274 | margin-left: 10px; 275 | color: #000; 276 | font-weight: bold; 277 | font-size: 1.2em; 278 | } 279 | 280 | .tableCell.selected .tableCellTitle, .tableCell.selected .gwt-Label { 281 | color: #fff; 282 | } 283 | 284 | .tableCellAccessory { 285 | font-size: 70%; 286 | color: gray; 287 | font-weight: normal; 288 | } 289 | 290 | .scrollPanel { 291 | position: absolute; 292 | left: 0px; 293 | top: 0px; 294 | right: 0px; 295 | bottom: 0px; 296 | overflow: hidden; 297 | } 298 | 299 | #dbg { 300 | z-index: 100; 301 | background: RGBA(255, 10, 100, .5); 302 | padding: 10px; 303 | } 304 | 305 | .sample { 306 | background: #fff; 307 | } 308 | 309 | /***************************** 310 | * XButton Navigation 311 | *****************************/ 312 | .xbutton.Navigation { 313 | border: 1px solid RGBA(48, 54, 62, .7); 314 | border-top: 1px solid RGBA(48, 54, 62, .9); 315 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#7E8FA7), color-stop(0.05, #8EA4C1), color-stop(0.5, #5877A2), color-stop(0.5, #476999), color-stop(1, #4A6C9B) ); 316 | -webkit-border-radius: 7px; 317 | border-radius: 7px; 318 | -webkit-box-shadow: 0px 0.1em 0px rgba(255, 255, 255, 0.3); 319 | } 320 | 321 | .xbutton.Navigation .body { 322 | vertical-align: middle; 323 | height: 30px; 324 | padding: 0 5px 0 10px; 325 | white-space: nowrap; 326 | font-size: 0.8em; 327 | font-weight: bold; 328 | color: #fff; 329 | text-shadow: 0 -1px 1px #465871; 330 | } 331 | 332 | .xbutton.Navigation.selected { 333 | border: 1px solid RGBA(43, 46, 54, .7); 334 | border-top: 1px solid RGBA(43, 46, 54, .9); 335 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#6F798F), color-stop(0.05, #7D88A5), color-stop(0.5, #3A4E78), color-stop(0.5, #253C6A), color-stop(1, #273F6D) ); 336 | -webkit-box-shadow: 0px 0.1em 0px rgba(255, 255, 255, 0.3); 337 | } 338 | 339 | .xbutton.Navigation.Red { 340 | border: 1px solid RGBA(67, 42, 44, .7); 341 | border-top: 1px solid RGBA(67, 42, 44, .9); 342 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#B46B71), color-stop(0.05, #D1787F), color-stop(0.5, #B82E3A), color-stop(0.5, #B01825), color-stop(1, #B01825) ); 343 | } 344 | 345 | .xbutton.Navigation.Red .body { 346 | text-shadow: 0 -1px 1px #6F252B; 347 | } 348 | 349 | .xbutton.Navigation.Red.selected { 350 | border: 1px solid RGBA(56, 44, 45, .7); 351 | border-top: 1px solid RGBA(56, 44, 45, .9); 352 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#957174), color-stop(0.05, #AB7F83), color-stop(0.5, #7D3A3F), color-stop(0.5, #6F252B), color-stop(1, #6F252B) ); 353 | } 354 | 355 | .xbutton.Navigation.Blue { 356 | border: 1px solid RGBA(42, 53, 75, .7); 357 | border-top: 1px solid RGBA(42, 53, 75, .9); 358 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#6E8AC8), color-stop(0.05, #7B9EEA), color-stop(0.5, #376FE0), color-stop(0.5, #2260DD), color-stop(1, #2463DE) ); 359 | } 360 | 361 | .xbutton.Navigation.Blue.selected { 362 | border: 1px solid RGBA(43, 46, 54, .7); 363 | border-top: 1px solid RGBA(43, 46, 54, .9); 364 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#6F798F), color-stop(0.05, #7D88A5), color-stop(0.5, #3A4E78), color-stop(0.5, #253C6A), color-stop(1, #273F6D) ); 365 | } 366 | 367 | .xbutton.Navigation.Black { 368 | border: 1px solid RGBA(36, 36, 36, .7); 369 | border-top: 1px solid RGBA(36, 36, 36, .9); 370 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#747474), color-stop(0.05, #838383), color-stop(0.5, #444), color-stop(0.5, #303030), color-stop(1, #333) ); 371 | } 372 | 373 | .xbutton.Navigation.Black .body { 374 | text-shadow: 0 -1px 1px #282828; 375 | } 376 | 377 | .xbutton.Navigation.Black.selected { 378 | border: 1px solid RGBA(29, 29, 29, .7); 379 | border-top: 1px solid RGBA(29, 29, 29, .9); 380 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#5d5d5d), color-stop(0.05, #696969), color-stop(0.5, #363636), color-stop(0.5, #262626), color-stop(1, #292929) ); 381 | } 382 | 383 | /***************************** 384 | * XButton Rounded - Default 385 | *****************************/ 386 | .xbutton.Rounded { 387 | border: 1px solid #9f9f9f; 388 | background-color: #fff; 389 | -webkit-border-radius: 10px; 390 | border-radius: 10px; 391 | padding: 3px; 392 | } 393 | 394 | .xbutton.Rounded .right { 395 | width: 5px; 396 | height: 30px; 397 | } 398 | 399 | .xbutton.Rounded .right div { 400 | width: inherit; 401 | height: inherit; 402 | } 403 | 404 | .xbutton.Rounded.selected { 405 | border: 1px solid #5987B0; 406 | background: -webkit-gradient(linear, left top, left bottom, from(#058CF5), to(#015FE6) ); 407 | } 408 | 409 | .xbutton.Rounded.selected .body { 410 | color: #fff; 411 | } 412 | 413 | .xbutton.Rounded .body { 414 | vertical-align: middle; 415 | height: 30px; 416 | padding: 0 5px 0 10px; 417 | white-space: nowrap; 418 | font-size: 0.9em; 419 | font-weight: bold; 420 | color: #385487; 421 | } 422 | 423 | /***************************** 424 | * XButton Shadow 425 | *****************************/ 426 | .xbutton.Shadow { 427 | border: 1px solid #9f9f9f; 428 | background-color: #fff; 429 | -webkit-border-radius: 10px; 430 | border-radius: 10px; 431 | padding: 3px; 432 | -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, .3); 433 | -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, .3); 434 | box-shadow: 0 1px 4px rgba(0, 0, 0, .3); 435 | /* display: block; 436 | position: relative; 437 | margin: .5em 5px; 438 | padding: 0; */ 439 | overflow: hidden; 440 | text-align: center; 441 | cursor: pointer; 442 | border: 1px solid #CCC; 443 | background: #EEE; 444 | font-weight: bold; 445 | color: #444; 446 | text-shadow: 0 1px 1px #F6F6F6; 447 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #FDFDFD), color-stop(1, #EEE) ); 448 | -moz-border-radius: 1em; 449 | -webkit-border-radius: 1em; 450 | border-radius: 1em; 451 | } 452 | 453 | .xbutton.Shadow .right { 454 | width: 5px; 455 | height: 30px; 456 | } 457 | 458 | .xbutton.Shadow .right div { 459 | width: inherit; 460 | height: inherit; 461 | } 462 | 463 | .xbutton.Shadow.selected { 464 | border: 1px solid #5987B0; 465 | background: -webkit-gradient(linear, left top, left bottom, from(#058CF5), to(#015FE6) ); 466 | text-shadow: 0 -1px 1px #333; 467 | } 468 | 469 | .xbutton.Shadow.selected .body { 470 | color: #fff; 471 | } 472 | 473 | .xbutton.Shadow .body { 474 | vertical-align: middle; 475 | height: 30px; 476 | padding: 0 5px 0 10px; 477 | white-space: nowrap; 478 | font-size: 0.9em; 479 | font-weight: bold; 480 | color: #385487; 481 | } 482 | 483 | /***************************** 484 | * xbutton Image 485 | *****************************/ 486 | .xbutton.Image { 487 | /*background-image: url(images/icons/xbuttonImage.png);*/ 488 | background-repeat: no-repeat; 489 | } 490 | 491 | .xbutton.Image .right { 492 | width: 5px; 493 | height: 30px; 494 | } 495 | 496 | .xbutton.Image .right div { 497 | width: inherit; 498 | height: inherit; 499 | } 500 | 501 | .xbutton.Image.selected { 502 | /*background-image: url(images/icons/xbuttonImageSelected.png);*/ 503 | } 504 | 505 | .xbutton.Image.selected .body { 506 | color: #154282; 507 | } 508 | 509 | .xbutton.Image .body { 510 | vertical-align: middle; 511 | padding: 0 5px; 512 | white-space: nowrap; 513 | font-size: 1em; 514 | font-weight: bold; 515 | color: #111; 516 | } 517 | 518 | /***************************** 519 | * xswitch 520 | *****************************/ 521 | .xswitch { 522 | background-image: url(images/all/xswitch.png); 523 | background-position: 0 0; 524 | background-repeat: no-repeat; 525 | width: 94px; 526 | height: 27px; 527 | -webkit-transition-property: background-position; 528 | -webkit-transition-duration: 300ms; 529 | -webkit-transition-timing-function: ease-in-out; 530 | border-radius: 4px; 531 | } 532 | 533 | .xswitch.off { 534 | background-position: -53px 0; 535 | } 536 | 537 | /***************************** 538 | * xslider 539 | *****************************/ 540 | .xslider { 541 | display: -webkit-box; 542 | -webkit-box-orient: horizontal; 543 | } 544 | 545 | .xslider .label { 546 | min-width: 2em; 547 | display: -webkit-box; 548 | -webkit-box-align: center; 549 | } 550 | 551 | .xslider .bar { 552 | position: relative; 553 | height: 1.2em; 554 | min-width: 7em; 555 | margin: 0 .5em 0 .5em; 556 | display: -webkit-box; 557 | -webkit-box-flex: 1; 558 | } 559 | 560 | .xslider .bar .right { 561 | position: absolute; 562 | top: .4em; 563 | width: 100%; 564 | border-radius: .3em; 565 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#BABABA), to(#fff) ); 566 | border: 1px solid #B3B3B3; 567 | height: .5em; 568 | -webkit-background-clip: content !important; 569 | } 570 | 571 | .xslider .bar .left { 572 | position: relative; 573 | top: .4em; 574 | border-top-left-radius: .3em; 575 | border-bottom-left-radius: .3em; 576 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4570AA), to(#63A1F3) ); 577 | float: left; 578 | border: 1px solid #366094; 579 | height: .5em; 580 | -webkit-background-clip: content !important; 581 | } 582 | 583 | .xslider .thumb { 584 | position: relative; 585 | margin: -8px 0 0 -18px; 586 | width: 36px; 587 | height: 36px; 588 | background-image: url(images/ios.png); 589 | background-position: 0 -898px; 590 | background-repeat: no-repeat; 591 | float: left; 592 | } 593 | 594 | /***************************** 595 | * xlabel 596 | *****************************/ 597 | .xlabel.Header { 598 | color: #4D546E; 599 | text-shadow: white 0 1px; 600 | margin: 14px 0 14px 0px; 601 | padding-left: 13px; 602 | font-size: 17px; 603 | font-weight: bold; 604 | } 605 | 606 | .xlabel.Text { 607 | color: #444; 608 | /* 609 | margin: 7px 0 7px 0px; 610 | padding-left: 13px; 611 | */ 612 | font-size: 1.2em; 613 | font-weight: bold; 614 | } 615 | 616 | /***************************** 617 | * xanchor 618 | *****************************/ 619 | .xanchor { 620 | color: #67F; 621 | font-weight: bold; 622 | text-decoration: underline; 623 | } 624 | 625 | /***************************** 626 | * Form CSS 627 | *****************************/ 628 | input,textarea,select { 629 | padding: 0; 630 | margin: 0; 631 | border: none; 632 | appearance: none; 633 | -webkit-appearance: none; 634 | font-size: 17px; 635 | font-weight: bold; 636 | } 637 | 638 | h2,p,a,input,textarea,select { 639 | outline: none; 640 | } 641 | 642 | input,input[type="password"],input[type="search"],isindex { 643 | -webkit-appearance: textfield; 644 | padding: 1px; 645 | background-color: white; 646 | border: 2px inset; 647 | -webkit-rtl-ordering: logical; 648 | -webkit-user-select: text; 649 | cursor: auto; 650 | } 651 | 652 | input,textarea,keygen,select,button,isindex,datagrid { 653 | margin: 0em; 654 | font: -webkit-small-control; 655 | color: initial; 656 | letter-spacing: normal; 657 | word-spacing: normal; 658 | line-height: normal; 659 | text-transform: none; 660 | text-indent: 0px; 661 | text-shadow: none; 662 | display: inline-block; 663 | text-align: -webkit-auto; 664 | } 665 | 666 | input::-webkit-input-placeholder,isindex::-webkit-input-placeholder,textarea::-webkit-input-placeholder { 667 | color: darkGray; 668 | } 669 | 670 | input::-webkit-input-speech-button { 671 | -webkit-appearance: -webkit-input-speech-button; 672 | display: inline-block; 673 | } 674 | 675 | input::-webkit-inner-spin-button { 676 | -webkit-appearance: inner-spin-button; 677 | display: inline-block; 678 | position: relative; 679 | cursor: default; 680 | -webkit-user-select: none; 681 | } 682 | 683 | input::-webkit-outer-spin-button { 684 | -webkit-appearance: outer-spin-button; 685 | display: inline-block; 686 | position: relative; 687 | cursor: default; 688 | margin-left: 2px; 689 | -webkit-user-select: none; 690 | } 691 | 692 | /***************************** 693 | * xtextfield 694 | *****************************/ 695 | .xtextfield { 696 | white-space: nowrap; 697 | height: inherit; 698 | border-bottom: 1px solid #ccc; 699 | } 700 | 701 | .xtextfield .label { 702 | color: black; 703 | white-space: nowrap; 704 | font-weight: bold; 705 | font-size: 1.2em; 706 | vertical-align: middle; 707 | text-align: left; 708 | padding: 0.7em; 709 | background: #f4f4f4; 710 | } 711 | 712 | .xtextfield .inputfield { 713 | color: #324F85; 714 | margin: 0; 715 | border: none; 716 | appearance: none; 717 | -webkit-appearance: none; 718 | font-size: 1.2em; 719 | font-weight: bold; 720 | width: 100%; 721 | height: 100%; 722 | } 723 | 724 | /***************************** 725 | * xprogress 726 | *****************************/ 727 | .xprogress { 728 | display: -webkit-box; 729 | -webkit-box-orient: horizontal; 730 | } 731 | 732 | .xprogress .label { 733 | min-width: 2em; 734 | display: -webkit-box; 735 | -webkit-box-align: center; 736 | } 737 | 738 | .xprogress .bar { 739 | position: relative; 740 | height: 1.2em; 741 | min-width: 10em; 742 | margin: 0 .5em 0 .5em; 743 | display: -webkit-box; 744 | -webkit-box-flex: 1; 745 | } 746 | 747 | .xprogress .bar .right { 748 | position: absolute; 749 | top: .4em; 750 | width: 100%; 751 | border-radius: .3em; 752 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#BABABA), to(#fff) ); 753 | border: 1px solid #B3B3B3; 754 | height: .5em; 755 | -webkit-background-clip: content !important; 756 | } 757 | 758 | .xprogress .bar .left { 759 | position: relative; 760 | top: .4em; 761 | border-radius: .3em; 762 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ADC7EB), to(#2676D6) ); 763 | /*background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#4570AA), 764 | to(#63A1F3) ); */ 765 | float: left; 766 | border: 1px solid #4570AA; 767 | height: .5em; 768 | -webkit-background-clip: content !important; 769 | -webkit-transition-property: width; 770 | -webkit-transition-duration: 500ms; 771 | -webkit-transition-timing-function: ease-out; 772 | } 773 | 774 | /***************************** 775 | * xpicker 776 | *****************************/ 777 | .min-width-480px .xpicker { 778 | width: 60%; 779 | display: inline-block; 780 | } 781 | 782 | .xpicker { 783 | display: block; 784 | position: relative; 785 | } 786 | 787 | .xbtn { 788 | display: block; 789 | position: relative; 790 | margin: .5em 5px; 791 | padding: 0; 792 | overflow: hidden; 793 | text-align: center; 794 | cursor: pointer; 795 | border: 1px solid #CCC; 796 | background: #EEE; 797 | font-weight: bold; 798 | color: #444; 799 | text-shadow: 0 1px 1px #F6F6F6; 800 | background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #FDFDFD), color-stop(1, #EEE) ); 801 | -moz-border-radius: 1em; 802 | -webkit-border-radius: 1em; 803 | border-radius: 1em; 804 | -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, .3); 805 | -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, .3); 806 | box-shadow: 0 1px 4px rgba(0, 0, 0, .3); 807 | } 808 | 809 | .xbtn .body { 810 | padding: .6em 45px .6em 25px; 811 | display: block; 812 | height: 100%; 813 | text-overflow: ellipsis; 814 | overflow: hidden; 815 | white-space: nowrap; 816 | position: relative; 817 | border-top: 1px solid white; 818 | border-color: rgba(255, 255, 255, .3); 819 | } 820 | 821 | .xpicker .xbtn select { 822 | cursor: pointer; 823 | -webkit-appearance: button; 824 | position: absolute; 825 | left: 0; 826 | top: 0; 827 | width: 100%; 828 | height: 100%; 829 | opacity: 0; 830 | } 831 | 832 | .xbtn .icon { 833 | background: #A5B3C6; 834 | background-image: url(images/ios.png); 835 | background-position: 0 -798px; 836 | background-repeat: no-repeat; 837 | -moz-border-radius: 9px; 838 | -webkit-border-radius: 9px; 839 | border-radius: 9px; 840 | width: 18px; 841 | height: 18px; 842 | position: absolute; 843 | top: 50%; 844 | right: 0; 845 | margin-top: -9px; 846 | margin-right: 12px; 847 | } 848 | 849 | /***************************** 850 | * xcheckbox, xradioButton 851 | *****************************/ 852 | .xcheckboxGroup,.xradioButtonGroup { 853 | display: -webkit-box; 854 | -webkit-box-orient: horizontal; 855 | width: 100%; 856 | } 857 | 858 | .xcheckboxGroup>span,.xradioButtonGroup>span { 859 | -webkit-box-flex: 1; 860 | display: -webkit-box; 861 | -webkit-box-align: center; 862 | -webkit-box-pack: center; 863 | padding: .5em .1em; 864 | background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#FCFCFC), to(#C8C8C8) ); 865 | text-shadow: #fff 0px 1px 1px; 866 | color: #7F7F7F; 867 | font-size: 1.2em; 868 | font-weight: bold; 869 | border-left: 1px solid #B8B8B8; 870 | border-right: 1px solid #B8B8B8; 871 | border-top: 1px solid #A8A8A8; 872 | border-bottom: 1px solid #999; 873 | } 874 | 875 | .xcheckboxGroup.horizontal>span.selected,.xradioButtonGroup.horizontal>span.selected { 876 | background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#2655A6), color-stop(0.08, #336FD4), color-stop(0.08, #3571D9), color-stop(0.5, #3D81E9), color-stop(0.5, #498AEB), 877 | to(#6EA9FB) ); 878 | border-top-color: #073E7D; 879 | border-left-color: #3871B2; 880 | border-right-color: #4082CB; 881 | border-bottom-color: #5077A2; 882 | color: #fff; 883 | text-shadow: #14519B 0px -1px 1px; 884 | } 885 | 886 | .xcheckboxGroup.horizontal>span>input,.xcheckboxGroup.horizontal>span>div,.xradioButtonGroup.horizontal>span>input,.xradioButtonGroup.horizontal>span>div { 887 | display: none; 888 | } 889 | 890 | .xcheckboxGroup>span:first-child,.xradioButtonGroup>span:first-child { 891 | border-bottom-left-radius: 0.6em 0.6em; 892 | border-top-left-radius: 0.6em 0.6em; 893 | border-right: 0px; 894 | border-top: 1px solid #A8A8A8; 895 | border-bottom: 1px solid #999; 896 | border-left: 1px solid #B8B8B8; 897 | } 898 | 899 | .xcheckboxGroup>span:last-child,.xradioButtonGroup>span:last-child { 900 | border-bottom-right-radius: 0.6em 0.6em; 901 | border-top-right-radius: 0.6em 0.6em; 902 | border-left: 0px; 903 | border-top: 1px solid #A8A8A8; 904 | border-bottom: 1px solid #999; 905 | border-right: 1px solid #B8B8B8; 906 | } 907 | 908 | .xcheckboxGroup>span:first-child.selected,.xradioButtonGroup>span:first-child.selected { 909 | border-right: 0px; 910 | border-top-color: #073E7D; 911 | border-bottom-color: #5077A2; 912 | border-left-color: #2F6FB8; 913 | } 914 | 915 | .xcheckboxGroup>span:last-child.selected,.xradioButtonGroup>span:last-child.selected { 916 | border-left: 0px; 917 | border-top-color: #073E7D; 918 | border-bottom-color: #5077A2; 919 | border-right-color: #4082CB; 920 | } 921 | 922 | /***** vertical *****/ 923 | .xcheckboxGroup.vertical,.xradioButtonGroup.vertical { 924 | -webkit-box-orient: vertical; 925 | } 926 | 927 | .xcheckboxGroup.vertical>span,.xradioButtonGroup.vertical>span { 928 | -webkit-box-flex: 1; 929 | display: -webkit-box; 930 | -webkit-box-align: center; 931 | -webkit-box-pack: center; 932 | padding: .5em; 933 | background: #fff; 934 | text-shadow: none; 935 | color: black; 936 | white-space: nowrap; 937 | font-weight: bold; 938 | font-size: 1.2em; 939 | -webkit-box-pack: start; 940 | border-left: 1px solid #A8A8A8; 941 | border-right: 1px solid #A8A8A8; 942 | border-top: 1px solid #A8A8A8; 943 | border-bottom: 0; 944 | } 945 | 946 | .xcheckboxGroup.vertical>span>input,.xradioButtonGroup.vertical>span>input { 947 | display: none; 948 | } 949 | 950 | .xcheckboxGroup.vertical>span { 951 | background-image: url(images/all/xcheckbox.png); 952 | background-position: center right; 953 | background-repeat: no-repeat; 954 | padding-right: 10px; 955 | } 956 | 957 | .xradioButtonGroup.vertical>span { 958 | background-image: url(images/all/xradiobutton.png); 959 | background-position: center right; 960 | background-repeat: no-repeat; 961 | padding-right: 10px; 962 | } 963 | 964 | .xcheckboxGroup.vertical>span.selected { 965 | background-color: #f0f0f0; 966 | background-image: url(images/all/xcheckbox-selected.png); 967 | background-position: center right; 968 | background-repeat: no-repeat; 969 | padding-right: 10px; 970 | } 971 | 972 | .xradioButtonGroup.vertical>span.selected { 973 | background-color: #f0f0f0; 974 | background-image: url(images/all/xradiobutton-selected.png); 975 | background-position: center right; 976 | background-repeat: no-repeat; 977 | padding-right: 10px; 978 | } 979 | 980 | .xcheckboxGroup.vertical>span:first-child,.xradioButtonGroup.vertical>span:first-child { 981 | border-bottom-left-radius: 0; 982 | border-top-right-radius: 0.6em 0.6em; 983 | } 984 | 985 | .xcheckboxGroup.vertical>span:last-child,.xradioButtonGroup.vertical>span:last-child { 986 | border-bottom-left-radius: 0.6em 0.6em; 987 | border-top-right-radius: 0; 988 | } 989 | 990 | .xcheckboxGroup.vertical>span:first-child.selected,.xradioButtonGroup.vertical>span:first-child.selected { 991 | border-bottom: 0; 992 | border-top: 1px solid #A8A8A8; 993 | border-left: 1px solid #A8A8A8; 994 | border-right: 1px solid #A8A8A8; 995 | } 996 | 997 | .xcheckboxGroup.vertical>span:last-child,.xradioButtonGroup.vertical>span:last-child { 998 | border-top: 1px solid #A8A8A8; 999 | border-bottom: 1px solid #A8A8A8; 1000 | border-left: 1px solid #A8A8A8; 1001 | border-right: 1px solid #A8A8A8; 1002 | } 1003 | 1004 | .xcheckboxGroup.vertical>span:last-child.selected,.xradioButtonGroup.vertical>span:last-child.selected { 1005 | border-color: #A8A8A8; 1006 | } 1007 | 1008 | /***************************** 1009 | * xpopup 1010 | *****************************/ 1011 | .xpopupOverlay { 1012 | -webkit-box-align: center; 1013 | -webkit-box-pack: center; 1014 | /* -webkit-transition: 0.25s opacity; */ 1015 | background: RGBA(0, 0, 0, .4); 1016 | background-image: -webkit-radial-gradient(rgba(127, 127, 127, 0.5), rgba(127, 127, 127, 0.5) 35%, rgba(0, 0, 0, 0.7)); 1017 | bottom: 0; 1018 | display: -webkit-box; 1019 | left: 0; 1020 | padding: 20px; 1021 | padding-bottom: 130px; 1022 | position: fixed; 1023 | right: 0; 1024 | top: 0; 1025 | z-index: 10; 1026 | } 1027 | 1028 | .xpopup { 1029 | position: absolute; 1030 | border: .3em solid #2D3642; 1031 | -webkit-border-radius: 0.3em; 1032 | border-radius: 0.3em; 1033 | background-color: #fff; 1034 | z-index: 100; 1035 | -webkit-box-shadow: RGBA(0, 0, 0, 0.8) 0 0.2em 0.6em; 1036 | box-shadow: RGBA(0, 0, 0, 0.8) 0 0.2em 0.6em; 1037 | } 1038 | 1039 | 1040 | 1041 | /* 1042 | ************************************************ 1043 | Bellow is a custom DEMO CSS and should not be used 1044 | ************************************************ 1045 | */ 1046 | 1047 | .codeDemo { 1048 | border: .3em solid #fff; 1049 | } 1050 | .codeDemo pre { 1051 | text-align: left; 1052 | color: #000; 1053 | } 1054 | .codeDemo .codeWord { color: #2361DE; } 1055 | .codeDemo .codeQuot { color: #008200; } 1056 | .codeDemo .codeJSNI { color: #DD8261; } 1057 | .codeDemo .codeGray { color: #aaa; } 1058 | .codeDemo .codePink { color: #FF1493; } 1059 | 1060 | /******* Borrowed from gwtmobile-ui ****** TODO cleanup 1061 | 1062 | .Android .xcheckboxGroup > span, 1063 | .Android .xradioButtonGroup > span { 1064 | -webkit-box-shadow: 0 0 1px #666; // android radius antialias workaround 1065 | } 1066 | 1067 | TODO support WVGA later.... 1068 | 1069 | Android native check box and radio button are too small in WVGA resolution 1070 | 1071 | .WVGA .xcheckboxGroup > span > input, 1072 | .WVGA .xradioButton > input { 1073 | display: none; 1074 | } 1075 | 1076 | .WVGA .xradioButton > div { 1077 | width: 1.2em; 1078 | height: 1.2em; 1079 | margin: 0 .4em 0 .4em; 1080 | background-image: 1081 | -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 16, 1082 | from(#fff), 1083 | to(gray)); 1084 | -webkit-border-radius: .6em; 1085 | border: 1px solid #444; 1086 | -webkit-box-shadow:0 0 .1em #444; 1087 | } 1088 | 1089 | .WVGA .xradioButton.selected > div { 1090 | background-image: 1091 | -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 16, 1092 | from(#4985E9), 1093 | to(#71A6F8)); 1094 | -webkit-box-shadow:0 0 .1em #27519C; 1095 | } 1096 | 1097 | .WVGA .CheckBoxIndicator { 1098 | position: relative; 1099 | margin: 0 .4em 0 .4em; 1100 | } 1101 | 1102 | .WVGA .CheckBoxIndicator > div:first-child { 1103 | width: .8em; 1104 | height: .8em; 1105 | padding: .1em; 1106 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#555), to(#777)); 1107 | -webkit-background-clip: padding; 1108 | border: .1em solid #333; 1109 | border-radius: .2em; 1110 | } 1111 | 1112 | .WVGA .CheckBoxIndicator > div:first-child > div { 1113 | width: .65em; 1114 | height: .65em; 1115 | background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(gray)); 1116 | border: .1em solid #333; 1117 | } 1118 | 1119 | .WVGA .selected .CheckBoxIndicator > div:nth-child(2), 1120 | .WVGA .selected .CheckBoxIndicator > div:nth-child(3), 1121 | .WVGA .selected .CheckBoxIndicator > div:nth-child(4) { 1122 | position: absolute; 1123 | background: #00CC00; 1124 | border: .1em solid #111; 1125 | } 1126 | 1127 | .WVGA .selected .CheckBoxIndicator > div:nth-child(2) { 1128 | width: .2em; 1129 | height: .3em; 1130 | top: .35em; 1131 | left: .2em; 1132 | -webkit-transform: rotate(-45deg); 1133 | border-bottom: 0; 1134 | } 1135 | 1136 | .WVGA .selected .CheckBoxIndicator > div:nth-child(3) { 1137 | width: .2em; 1138 | height: 1em; 1139 | top: -.1em; 1140 | left: .7em; 1141 | -webkit-transform: rotate(45deg); 1142 | border-bottom: 0; 1143 | } 1144 | 1145 | .WVGA .selected .CheckBoxIndicator > div:nth-child(4) { 1146 | width: .2em; 1147 | height: .4em; 1148 | top: .5em; 1149 | left: .4em; 1150 | -webkit-transform: rotate(-45deg); 1151 | border-right: 0; 1152 | border-top: 0; 1153 | } */ 1154 | 1155 | 1156 | 1157 | 1158 | 1159 | --------------------------------------------------------------------------------