Ejemplo n.º 1
0
  private Window createGeolocationWindow() {

    final Window w = new Window();
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setIcon(IconHelper.createStyle("accordion"));
    w.setHeading("Contact list");
    w.setWidth(500);
    w.setHeight(500);
    w.setLayout(new FitLayout());

    ContentPanel cp = new ContentPanel();
    cp.setAnimCollapse(false);
    cp.setHeading("Localize your friends");
    cp.setScrollMode(Scroll.NONE);
    cp.setLayout(new FitLayout());

    Frame frame = new Frame();
    frame.setUrl("geolocation.html");
    frame.setLayoutData(new FitLayout());
    cp.add(frame);

    w.add(cp);
    return w;
  }
Ejemplo n.º 2
0
 private Window createBogusWindow(int index) {
   Window w = new Window();
   w.setIcon(IconHelper.createStyle("bogus"));
   w.setMinimizable(true);
   w.setMaximizable(true);
   w.setHeading("Configurator Testapp " + ++index);
   w.setSize(400, 300);
   return w;
 }
Ejemplo n.º 3
0
 private Window createBogusWindow(int index) {
   Window w = new Window();
   w.setIcon(IconHelper.createStyle("bogus"));
   w.setMinimizable(true);
   w.setMaximizable(true);
   w.setHeading("Last messages window " + ++index);
   w.setSize(400, 300);
   w.addText("Here would be last seen message, \npossibly shown is some fancy way");
   return w;
 }
Ejemplo n.º 4
0
  private Window createStatisticWindow() {

    Window w = new Window();
    w.setIcon(IconHelper.createStyle("bogus"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("Statistics ");
    w.setSize(400, 400);

    w.setLayout(new AccordionLayout());

    ContentPanel cp = new ContentPanel();
    cp.setHeading("Most contacted friends this month");
    cp.setFrame(false);
    cp.setSize(300, 300);

    Frame frame = new Frame();
    frame.setUrl("chart.html");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    cp = new ContentPanel();
    cp.setHeading("Most contacted friends in total");
    cp.setFrame(false);
    cp.setSize(300, 300);

    frame = new Frame();
    frame.setUrl(
        "https://chart.googleapis.com/chart?cht=p3&chs=350x200&chd=t:70,30,10&&chl=Hollie|Emerson|Christinal");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    cp = new ContentPanel();
    cp.setHeading("Average sms per day last two weeks");
    cp.setFrame(false);
    cp.setSize(300, 300);

    frame = new Frame();
    frame.setUrl(
        "https://chart.googleapis.com/chart?cht=lc&chs=350x200&chd=t:25,50,70,90,25,44,56,34,23,56,0,0,34,5,5,103,3,2,6,13&&chl=1|2|3|4|5|6|7|8|9|10|11|12|13|14&chxt=x,y");
    frame.setLayoutData(new FitLayout());
    cp.setLayout(new FitLayout());
    cp.add(frame);

    w.add(cp);

    return w;
  }
Ejemplo n.º 5
0
  public Window getEmptyWindow() {

    Window w = new Window();
    w.setMinimizable(false);
    w.setMaximizable(false);
    w.setBodyBorder(false);
    w.setBorders(false);
    w.setClosable(false);
    w.setHeaderVisible(false);
    return w;
  }
Ejemplo n.º 6
0
  private Window createCheeseWindows() {
    Window w = new Window();
    w.setIcon(IconHelper.createStyle("icon-grid"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("3Dtest app");
    w.setSize(800, 600);
    w.setLayout(new FitLayout());

    Frame app3d = new Frame("scenes/cheese.xhtml");
    System.out.println(app3d.getUrl());

    w.add(app3d);
    return w;
  }
Ejemplo n.º 7
0
  private Window createConfiguratorWindows() {
    Window w = new Window();
    w.setIcon(IconHelper.createStyle("icon-grid"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("Zweite Test3DApp");
    w.setSize(800, 600);
    w.setLayout(new FitLayout());

    Frame app3d = new Frame("scenes/car3d/AC_1038.xhtml");
    System.out.println(app3d.getUrl());

    w.add(app3d);
    return w;
  }
Ejemplo n.º 8
0
  public Window createVideoWindow() {

    Window w = new Window();
    w.setSize(800, 800);
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setBodyBorder(false);
    w.setBorders(false);
    w.setHeading("Received mms:)");

    Frame frame = new Frame();
    frame.setUrl("video.html");
    frame.setLayoutData(new FitLayout());
    w.setLayout(new FitLayout());
    w.add(frame);

    return w;
  }
Ejemplo n.º 9
0
  public Window createPrezioWindow() {

    Window w = new Window();
    w.setSize(500, 500);
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setBodyBorder(false);
    w.setBorders(false);
    w.setHeading("Presentation:)");

    Frame frame = new Frame();
    frame.setUrl("https://prezi.com/secure/40398e8bef489ebec26c2f09c4e0cf4b1d419524/");
    frame.setLayoutData(new FitLayout());
    w.setLayout(new FitLayout());
    w.add(frame);

    return w;
  }
Ejemplo n.º 10
0
  private Window createTabWindow() {
    Window w = new Window();
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setSize(740, 480);
    w.setIcon(IconHelper.createStyle("tabs"));
    w.setHeading("Configurator Testapp");

    w.setLayout(new FitLayout());

    TabPanel panel = new TabPanel();

    for (int i = 0; i < 4; i++) {
      TabItem item = new TabItem("Configurator Testapp " + (i + 1));
      item.addText("Something useful would be here");
      panel.add(item);
    }

    w.add(panel);
    return w;
  }
Ejemplo n.º 11
0
  private Window createGridWindow() {
    Window w = new Window();
    w.setIcon(IconHelper.createStyle("icon-grid"));
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setHeading("Messages Window");
    w.setSize(500, 400);
    w.setLayout(new FitLayout());

    GroupingStore<Employee> employeeList = new GroupingStore<Employee>();
    employeeList.add(TestData.getEmployees());
    employeeList.groupBy("department");

    List<ColumnConfig> configs = new ArrayList<ColumnConfig>();

    ColumnConfig column = new ColumnConfig();
    column.setId("name");
    column.setHeader("Sender Name");
    column.setWidth(200);
    configs.add(column);

    column = new ColumnConfig("department", "User group", 150);
    column.setAlignment(HorizontalAlignment.LEFT);
    configs.add(column);

    column = new ColumnConfig("designation", "Taggs", 150);
    column.setAlignment(HorizontalAlignment.LEFT);
    configs.add(column);

    column = new ColumnConfig("salary", "Length", 100);
    column.setAlignment(HorizontalAlignment.RIGHT);
    final NumberFormat number = NumberFormat.getFormat("0.00");
    GridCellRenderer<Employee> checkSalary =
        new GridCellRenderer<Employee>() {
          public String render(
              Employee model,
              String property,
              ColumnData config,
              int rowIndex,
              int colIndex,
              ListStore<Employee> employeeList,
              Grid<Employee> grid) {
            double val = (Double) model.get(property);
            String style = val < 70000 ? "red" : "green";
            return "<span style='color:" + style + "'>" + number.format(val) + "</span>";
          }
        };
    column.setRenderer(checkSalary);
    configs.add(column);

    column = new ColumnConfig("joiningdate", "Date", 100);
    column.setAlignment(HorizontalAlignment.RIGHT);
    column.setDateTimeFormat(DateTimeFormat.getShortDateFormat());
    configs.add(column);

    final ColumnModel cm = new ColumnModel(configs);

    GroupingView view = new GroupingView();
    view.setForceFit(true);
    view.setGroupRenderer(
        new GridGroupRenderer() {
          public String render(GroupColumnData data) {
            String f = cm.getColumnById(data.field).getHeader();
            String l = data.models.size() == 1 ? "Item" : "Items";
            return f + ": " + data.group + " (" + data.models.size() + " " + l + ")";
          }
        });

    Grid<Employee> grid = new Grid<Employee>(employeeList, cm);
    grid.setView(view);
    grid.setBorders(true);

    ContentPanel cp = new ContentPanel();
    cp.setBodyBorder(false);
    cp.setHeading("Friends List");
    cp.setButtonAlign(HorizontalAlignment.CENTER);
    cp.setLayout(new FitLayout());
    cp.setSize(700, 420);
    cp.add(grid);
    w.add(cp);

    return w;
  }
Ejemplo n.º 12
0
  private Window createAccordionWindow() {
    final Window w = new Window();
    w.setMinimizable(true);
    w.setMaximizable(true);
    w.setIcon(IconHelper.createStyle("accordion"));
    w.setHeading("Contact list");
    w.setWidth(200);
    w.setHeight(350);

    ToolBar toolBar = new ToolBar();
    Button item = new Button();
    item.setIcon(IconHelper.createStyle("icon-connect"));
    toolBar.add(item);

    toolBar.add(new SeparatorToolItem());
    w.setTopComponent(toolBar);

    item = new Button();
    item.setIcon(IconHelper.createStyle("icon-user-add"));
    toolBar.add(item);

    item = new Button();
    item.setIcon(IconHelper.createStyle("icon-user-delete"));
    toolBar.add(item);

    w.setLayout(new AccordionLayout());

    ContentPanel cp = new ContentPanel();
    cp.setAnimCollapse(false);
    cp.setHeading("Online Users");
    cp.setScrollMode(Scroll.AUTO);
    cp.getHeader().addTool(new ToolButton("x-tool-refresh"));

    w.add(cp);

    TreeStore<ModelData> store = new TreeStore<ModelData>();
    TreePanel<ModelData> tree = new TreePanel<ModelData>(store);
    tree.setIconProvider(
        new ModelIconProvider<ModelData>() {

          public AbstractImagePrototype getIcon(ModelData model) {
            if (model.get("icon") != null) {
              return IconHelper.createStyle((String) model.get("icon"));
            } else {
              return null;
            }
          }
        });
    tree.setDisplayProperty("name");

    ModelData m = newItem("Eurecom", null);
    store.add(m, false);
    tree.setExpanded(m, true);

    store.add(m, newItem("Emerson Milton", "user-suit"), false);
    store.add(m, newItem("Christina Blake", "user-girl"), false);
    store.add(m, newItem("Heriberto Rush", "user-kid"), false);
    store.add(m, newItem("Candice Carson", "user-girl"), false);
    store.add(m, newItem("Bell Snedden", "user-kid"), false);
    store.add(m, newItem("Dirk Newman", "user-kid"), false);
    store.add(m, newItem("Chad Andrews", "user-suit"), false);

    m = newItem("Italy", null);
    store.add(m, false);
    tree.setExpanded(m, true);
    store.add(m, newItem("Benito Meeks", "user-suit"), false);
    store.add(m, newItem("Gail Horton", "user-girl"), false);

    m = newItem("Paris", null);
    store.add(m, false);
    tree.setExpanded(m, true);
    store.add(m, newItem("Claudio Engle", "user-suit"), false);
    store.add(m, newItem("Sine", "user-girl"), false);

    m = newItem("Hometown", null);
    store.add(m, false);
    tree.setExpanded(m, true);
    store.add(m, newItem("Hollie Voss", "user-girl"), false);

    cp.add(tree);

    cp = new ContentPanel();
    cp.setAnimCollapse(false);
    cp.setHeading("Settings");
    cp.setBodyStyleName("pad-text");
    cp.addText("Smape1");
    w.add(cp);

    cp = new ContentPanel();
    cp.setAnimCollapse(false);
    cp.setHeading("Blocked");
    cp.setBodyStyleName("pad-text");
    cp.addText("Smape2");
    w.add(cp);

    return w;
  }