Example usage for com.vaadin.server FontAwesome DATABASE

List of usage examples for com.vaadin.server FontAwesome DATABASE

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome DATABASE.

Prototype

FontAwesome DATABASE

To view the source code for com.vaadin.server FontAwesome DATABASE.

Click Source Link

Usage

From source file:de.uni_tuebingen.qbic.qbicmainportlet.PatientView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph//  w  w w .ja v a  2 s.c o  m
 */
void initView() {
    patientViewContent = new VerticalLayout();
    patientViewContent.setMargin(new MarginInfo(true, false, false, false));
    // patientViewContent.setMargin(true);

    headerLabel = "";

    patientViewTab = new TabSheet();
    patientViewTab.setHeight("100%");
    patientViewTab.setWidth("100%");

    datasetComponent = new DatasetComponent(datahandler, state, resourceUrl);
    biologicalSamplesComponent = new BiologicalSamplesComponent(datahandler, state, resourceUrl,
            "Biological Samples");
    measuredSamplesComponent = new LevelComponent(datahandler, state, resourceUrl, "Raw Data");
    resultsComponent = new LevelComponent(datahandler, state, resourceUrl, "Results");
    statusComponent = new PatientStatusComponent(datahandler, state, resourceUrl);
    workflowComponent = new WorkflowComponent(wfController);
    uploadComponent = new AttachmentUploadComponent();
    projectInformation = new ProjInformationComponent(datahandler, state, resourceUrl);
    experimentComponent = new ExperimentComponent(datahandler, state, resourceUrl);

    patientViewTab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    patientViewTab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    patientViewTab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    // patientViewTab.addTab(initDescription()).setIcon(FontAwesome.INFO_CIRCLE);
    patientViewTab.addTab(projectInformation).setIcon(FontAwesome.INFO_CIRCLE);
    patientViewTab.addTab(statusComponent).setIcon(FontAwesome.CHECK_CIRCLE);
    patientViewTab.addTab(initGraphs()).setIcon(FontAwesome.SITEMAP);
    // patientViewTab.addTab(initMemberSection()).setIcon(FontAwesome.USERS);
    // patientViewTab.addTab(initHLALayout()).setIcon(FontAwesome.BARCODE);
    // patientViewTab.addTab(initTable()).setIcon(FontAwesome.FLASK);

    patientViewTab.addTab(experimentComponent).setIcon(FontAwesome.FLASK);
    patientViewTab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE);
    patientViewTab.addTab(biologicalSamplesComponent).setIcon(FontAwesome.TINT);
    patientViewTab.addTab(measuredSamplesComponent).setIcon(FontAwesome.SIGNAL);
    patientViewTab.addTab(resultsComponent).setIcon(FontAwesome.TH_LARGE);
    patientViewTab.addTab(workflowComponent).setIcon(FontAwesome.COGS);
    patientViewTab.addTab(uploadComponent).setIcon(FontAwesome.UPLOAD);

    patientViewTab.setImmediate(true);

    patientViewTab.addSelectedTabChangeListener(new SelectedTabChangeListener() {

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            TabSheet tab = (TabSheet) event.getSource();

            if (event.getTabSheet().getSelectedTab().getCaption().equals("Project Graph")) {
                loadGraph();
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Exp. Steps")) {
                experimentComponent.updateUI(getCurrentBean());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) {
                datasetComponent.updateUI("project", getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Raw Data")) {
                measuredSamplesComponent.updateUI("project", getCurrentBean().getId(), "measured");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Biological Samples")) {
                biologicalSamplesComponent.updateUI(getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Results")) {
                resultsComponent.updateUI("project", getCurrentBean().getId(), "results");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Status")) {
                statusComponent.updateUI(getCurrentBean());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Workflows")) {
                Map<String, String> args = new HashMap<String, String>();
                args.put("id", getCurrentBean().getId());
                args.put("type", "project");
                workflowComponent.update(args);
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Upload Files")) {
                // (get space from currentBean)
                uploadComponent.updateUI(manager, getCurrentBean().getCode(), currentBean.getId().split("/")[1],
                        datahandler.getOpenBisClient());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("")) {
                projectInformation.updateUI(getCurrentBean(), "patient");
            }
        }
    });

    patientViewContent.addComponent(patientViewTab);
    this.addComponent(patientViewContent);

}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.ProjectView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph//from   w  w w  .  j  av  a  2 s  .  c om
 */
void initView() {
    projectview_content = new VerticalLayout();
    projectview_content.setMargin(new MarginInfo(true, false, false, false));

    // labelContent = new VerticalLayout();
    // labelContent.setMargin(new MarginInfo(true, false, true, false));

    headerLabel = "";

    // labelContent.addComponent(headerLabel);
    // projectview_content.addComponent(labelContent);

    projectview_tab = new TabSheet();
    projectview_tab.setWidth("100%");
    projectview_tab.setHeight("100%");

    datasetComponent = new DatasetComponent(datahandler, state, resourceUrl);
    biologicalSamplesComponent = new BiologicalSamplesComponent(datahandler, state, resourceUrl,
            "Biological Samples");
    measuredSamplesComponent = new LevelComponent(datahandler, state, resourceUrl, "Raw Data");
    resultsComponent = new LevelComponent(datahandler, state, resourceUrl, "Results");
    workflowComponent = new WorkflowComponent(wfController);
    uploadComponent = new AttachmentUploadComponent();
    projectInformation = new ProjInformationComponent(datahandler, state, resourceUrl);
    experimentComponent = new ExperimentComponent(datahandler, state, resourceUrl);

    // add styles to tab sheet
    projectview_tab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    projectview_tab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    // projectview_tab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    // add tabs to tabsheet
    projectview_tab.addTab(projectInformation).setIcon(FontAwesome.INFO_CIRCLE);
    projectview_tab.addTab(initGraphs()).setIcon(FontAwesome.SITEMAP);
    // projectview_tab.addTab(initMemberSection()).setIcon(FontAwesome.USERS);

    projectview_tab.addTab(experimentComponent).setIcon(FontAwesome.FLASK);
    projectview_tab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE);
    projectview_tab.addTab(biologicalSamplesComponent).setIcon(FontAwesome.TINT);
    projectview_tab.addTab(measuredSamplesComponent).setIcon(FontAwesome.SIGNAL);
    projectview_tab.addTab(resultsComponent).setIcon(FontAwesome.TH_LARGE);
    projectview_tab.addTab(workflowComponent).setIcon(FontAwesome.COGS);
    projectview_tab.addTab(uploadComponent).setIcon(FontAwesome.UPLOAD);

    projectview_tab.setImmediate(true);

    projectview_tab.addSelectedTabChangeListener(new SelectedTabChangeListener() {

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {
            if (event.getTabSheet().getSelectedTab().getCaption().equals("Project Graph")) {
                loadGraph();
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Exp. Steps")) {
                experimentComponent.updateUI(getCurrentBean());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) {
                datasetComponent.updateUI(navigateToLabel, getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Raw Data")) {
                measuredSamplesComponent.updateUI(navigateToLabel, getCurrentBean().getId(), "measured");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Biological Samples")) {
                biologicalSamplesComponent.updateUI(getCurrentBean().getId());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Results")) {
                resultsComponent.updateUI(navigateToLabel, getCurrentBean().getId(), "results");
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Workflows")) {
                Map<String, String> args = new HashMap<String, String>();
                args.put("id", getCurrentBean().getId());
                args.put("type", navigateToLabel);
                workflowComponent.update(args);
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("Upload Files")) {
                // (get space from currentBean)
                uploadComponent.updateUI(manager, getCurrentBean().getCode(), currentBean.getId().split("/")[1],
                        datahandler.getOpenBisClient());
            } else if (event.getTabSheet().getSelectedTab().getCaption().equals("")) {
                projectInformation.updateUI(getCurrentBean(), "project");
            }
        }
    });

    // projectview_content.addComponent(initMenuBar());
    projectview_content.addComponent(projectview_tab);
    // projectview_content.addComponent(initDescription());
    // projectview_content.addComponent(initStatistics());
    // projectview_content.addComponent(initTable());
    // projectview_content.addComponent(initButtonLayout());

    // projectview_content.addComponent(initGraph());

    // use the component that is returned by initTable
    // projectview_content.setComponentAlignment(this.table, Alignment.TOP_CENTER);
    // projectview_content.setWidth("100%");
    this.addComponent(projectview_content);
}

From source file:de.uni_tuebingen.qbic.qbicmainportlet.SampleView.java

License:Open Source License

/**
 * init this view. builds the layout skeleton Menubar Description and others Statisitcs Experiment
 * Table Graph/*from  w w  w  .j  a v  a  2  s  .  c om*/
 */
void initView() {
    setResponsive(true);
    setWidth(100, Unit.PERCENTAGE);

    sampview_content = new VerticalLayout();
    sampview_content.setMargin(new MarginInfo(true, true, false, false));
    sampview_content.setResponsive(true);

    sampview_tab = new TabSheet();
    sampview_tab.setResponsive(true);
    sampview_tab.setWidth(100, Unit.PERCENTAGE);
    sampview_tab.addStyleName(ValoTheme.TABSHEET_FRAMED);
    sampview_tab.addStyleName(ValoTheme.TABSHEET_EQUAL_WIDTH_TABS);
    sampview_tab.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);

    header = "";

    datasetComponent = new DatasetComponent(datahandler, state, resourceUrl);
    changeMetaDataComponent = new ChangeMetadataComponent(datahandler, state, resourceUrl);

    sampview_tab.addTab(initDescription()).setIcon(FontAwesome.INFO_CIRCLE);
    // sampview_tab.addTab(initStatistics()).setIcon(FontAwesome.BAR_CHART_O);
    sampview_tab.addTab(datasetComponent).setIcon(FontAwesome.DATABASE);
    initNoteComponent();
    sampview_tab.addTab(innerNotesComponent).setIcon(FontAwesome.PENCIL);

    sampview_tab.setImmediate(true);

    sampview_tab.addSelectedTabChangeListener(new SelectedTabChangeListener() {

        /**
         * 
         */
        private static final long serialVersionUID = 6899763427531265769L;

        @Override
        public void selectedTabChange(SelectedTabChangeEvent event) {

            if (event.getTabSheet().getSelectedTab().getCaption().equals("Datasets")) {
                datasetComponent.updateUI(navigateToLabel, getCurrentBean().getId());
            }
        }
    });

    sampview_content.addComponent(sampview_tab);
    this.addComponent(sampview_content);
}

From source file:org.eclipse.hawkbit.ui.login.AbstractHawkbitLoginUI.java

License:Open Source License

private void buildTenantField() {
    if (multiTenancyIndicator.isMultiTenancySupported()) {
        tenant = new TextField(i18n.getMessage("label.login.tenant"));
        tenant.setIcon(FontAwesome.DATABASE);
        tenant.addStyleName(//from   w ww  . j  a  va2s.c  o m
                ValoTheme.TEXTFIELD_INLINE_ICON + " " + ValoTheme.TEXTFIELD_SMALL + " " + LOGIN_TEXTFIELD);
        tenant.addStyleName("uppercase");
        tenant.setId("login-tenant");
    }
}

From source file:org.jumpmind.vaadin.ui.sqlexplorer.DbTree.java

License:Open Source License

public void refresh() {
    hasBeenExpanded.clear();//from   w  w w .  j ava2 s  .  c o  m
    List<IDb> databases = databaseProvider.getDatabases();
    Set<DbTreeNode> expandedItems = new HashSet<DbTreeNode>(expanded);
    expanded.clear();
    Set<DbTreeNode> selected = getSelected();
    removeAllItems();
    DbTreeNode firstNode = null;
    for (IDb database : databases) {
        DbTreeNode databaseNode = new DbTreeNode(this, database.getName(), NODE_TYPE_DATABASE,
                FontAwesome.DATABASE, null);
        addItem(databaseNode);
        setItemIcon(databaseNode, databaseNode.getIcon());

        if (firstNode == null) {
            firstNode = databaseNode;
        }
    }

    for (DbTreeNode expandedItem : expandedItems) {
        expandItem(expandedItem);
    }

    if (selected == null || selected.size() == 0) {
        selected = new HashSet<DbTreeNode>();
        selected.add(firstNode);
    }
    setValue(selected);
    focus();

}

From source file:org.jumpmind.vaadin.ui.sqlexplorer.SqlExplorer.java

License:Open Source License

protected DbTree buildDbTree() {

    final DbTree tree = new DbTree(databaseProvider, settingsProvider);
    tree.addValueChangeListener(new ValueChangeListener() {
        private static final long serialVersionUID = 1L;

        @Override/*from  w w  w .  j ava2  s.  co m*/
        public void valueChange(ValueChangeEvent event) {
            Set<DbTreeNode> nodes = dbTree.getSelected();
            if (nodes != null) {
                for (DbTreeNode treeNode : nodes) {
                    IDb db = dbTree.getDbForNode(treeNode);
                    QueryPanel panel = getQueryPanelForDb(db);
                    if (panel == null && db != null) {
                        openQueryWindow(db);
                    }
                }

                String selectedTabCaption = null;
                for (IInfoPanel panel : infoTabs) {
                    selectedTabCaption = panel.getSelectedTabCaption();
                    contentTabs.removeComponent(panel);
                }
                infoTabs.clear();

                if (nodes.size() > 0) {
                    DbTreeNode treeNode = nodes.iterator().next();
                    if (treeNode != null && treeNode.getType().equals(DbTree.NODE_TYPE_DATABASE)) {
                        IDb db = dbTree.getDbForNode(treeNode);
                        DatabaseInfoPanel databaseInfoTab = new DatabaseInfoPanel(db, settingsProvider.get(),
                                selectedTabCaption);
                        Tab tab = contentTabs.addTab(databaseInfoTab, db.getName(), FontAwesome.DATABASE, 0);
                        tab.setClosable(true);
                        selectContentTab(databaseInfoTab);
                        infoTabs.add(databaseInfoTab);
                    }
                    if (treeNode != null && treeNode.getType().equals(DbTree.NODE_TYPE_TABLE)) {
                        Table table = treeNode.getTableFor();
                        if (table != null) {
                            IDb db = dbTree.getDbForNode(treeNode);
                            TableInfoPanel tableInfoTab = new TableInfoPanel(table, user, db,
                                    settingsProvider.get(), SqlExplorer.this, selectedTabCaption);
                            Tab tab = contentTabs.addTab(tableInfoTab, table.getFullyQualifiedTableName(),
                                    FontAwesome.TABLE, 0);
                            tab.setClosable(true);
                            selectContentTab(tableInfoTab);
                            infoTabs.add(tableInfoTab);
                        }
                    } else if (treeNode != null && treeNode.getType().equals(DbTree.NODE_TYPE_TRIGGER)) {
                        Table table = treeNode.getParent().getTableFor();
                        IDdlReader reader = dbTree.getDbForNode(treeNode).getPlatform().getDdlReader();
                        Trigger trigger = reader.getTriggerFor(table, treeNode.getName());
                        if (trigger != null) {
                            IDb db = dbTree.getDbForNode(treeNode);
                            TriggerInfoPanel triggerInfoTab = new TriggerInfoPanel(trigger, db,
                                    settingsProvider.get(), selectedTabCaption);
                            Tab tab = contentTabs.addTab(triggerInfoTab, trigger.getName(),
                                    FontAwesome.CROSSHAIRS, 0);
                            tab.setClosable(true);
                            selectContentTab(triggerInfoTab);
                            infoTabs.add(triggerInfoTab);
                        }
                    }
                }
            }
        }
    });
    tree.registerAction(new DbTreeAction("Query", QUERY_ICON) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            openQueryWindow(nodes);
        }
    }, DbTree.NODE_TYPE_DATABASE, DbTree.NODE_TYPE_CATALOG, DbTree.NODE_TYPE_SCHEMA, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Select", QUERY_ICON) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            generateSelectForSelectedTables();
        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Insert", QUERY_ICON) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            generateDmlForSelectedTables(DmlType.INSERT);
        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Update", QUERY_ICON) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            generateDmlForSelectedTables(DmlType.UPDATE);
        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Delete", QUERY_ICON) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            generateDmlForSelectedTables(DmlType.DELETE);
        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Drop", FontAwesome.ARROW_DOWN) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            dropSelectedTables();
        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Import", FontAwesome.DOWNLOAD) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            if (nodes.size() > 0) {
                IDb db = dbTree.getDbForNode(nodes.iterator().next());
                new DbImportDialog(db.getPlatform(), dbTree.getSelectedTables()).showAtSize(0.6);
            }
        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Export", FontAwesome.UPLOAD) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            if (nodes.size() > 0) {
                IDb db = dbTree.getDbForNode(nodes.iterator().next());
                new DbExportDialog(db.getPlatform(), dbTree.getSelectedTables(), findQueryPanelForDb(db))
                        .showAtSize(0.6);
            }
        }
    }, DbTree.NODE_TYPE_TABLE, DbTree.NODE_TYPE_TRIGGER);

    tree.registerAction(new DbTreeAction("Fill", FontAwesome.BEER) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {
            if (nodes.size() > 0) {
                IDb db = dbTree.getDbForNode(nodes.iterator().next());
                new DbFillDialog(db.getPlatform(), dbTree.getSelectedTables(), findQueryPanelForDb(db))
                        .showAtSize(0.6);
            }

        }
    }, DbTree.NODE_TYPE_TABLE);

    tree.registerAction(new DbTreeAction("Copy Name", FontAwesome.COPY) {
        private static final long serialVersionUID = 1L;

        @Override
        public void handle(Set<DbTreeNode> nodes) {

            for (DbTreeNode treeNode : nodes) {
                IDb db = dbTree.getDbForNode(nodes.iterator().next());
                DatabaseInfo dbInfo = db.getPlatform().getDatabaseInfo();
                final String quote = dbInfo.getDelimiterToken();
                final String catalogSeparator = dbInfo.getCatalogSeparator();
                final String schemaSeparator = dbInfo.getSchemaSeparator();

                Table table = treeNode.getTableFor();
                if (table != null) {
                    QueryPanel panel = findQueryPanelForDb(db);
                    panel.appendSql(table.getQualifiedTableName(quote, catalogSeparator, schemaSeparator));
                    contentTabs.setSelectedTab(panel);
                }
            }
        }
    }, DbTree.NODE_TYPE_TABLE);

    return tree;

}