Ejemplo n.º 1
0
  private static void showSimpleSearch(Application app) {
    WorkbenchView view = new WorkbenchView();
    MediaList<Media> list = new MediaList<>();
    list.getItems()
        .add(
            new DefaultMedia(
                "Chiroteuthis",
                "and descendants",
                "http://dsg.mbari.org/images/dsg/external/Mollusca/Cephalopoda/Chiroteuthis_calyx_01.png"));

    ActionFooter footer = new ActionFooter();
    footer.addAction(new Action(AppIcons.TRASH, "Remove all"));
    view.setFooterNode(footer);

    view.setCenterNode(list);

    app.setWorkbench(view);
    app.clearGlobalActions();
    app.addGlobalAction(new Action(AppIcons.PLUS, () -> {}));
  }
Ejemplo n.º 2
0
  private static void showAdvancedSearch(Application app) {
    WorkbenchView view = new WorkbenchView();
    FormLayout formLayout = new FormLayout();

    formLayout.addHeader("Advanced Search");
    formLayout.addField("Name");

    formLayout.addActions(new Action("Save"), new Action("Cancel"));

    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setContent(formLayout);
    scrollPane.setFitToWidth(true);
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);

    view.setCenterNode(scrollPane);

    app.setWorkbench(view);
    app.clearGlobalActions();
  }
Ejemplo n.º 3
0
  private static void showCustomizeResults(Application app) {
    WorkbenchView view = new WorkbenchView();

    FormLayout formLayout = new FormLayout();
    formLayout.addHeader("Customize Results");

    formLayout.addField("Return related associations", EditorType.CHECKBOX);
    formLayout.addField("Return concurrent observations", EditorType.CHECKBOX);
    formLayout.addField("Return concept hierarchy", EditorType.CHECKBOX);
    formLayout.addField("Return basic organism phylogeny", EditorType.CHECKBOX);
    formLayout.addField("Return detailed organism phylogeny", EditorType.CHECKBOX);
    formLayout.addField("Categorize associations into columns", EditorType.CHECKBOX);

    ScrollPane scrollPane = new ScrollPane();
    scrollPane.setContent(formLayout);
    scrollPane.setFitToWidth(true);
    scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
    scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);

    view.setCenterNode(scrollPane);

    app.setWorkbench(view);
    app.clearGlobalActions();
  }