List of usage examples for com.vaadin.server FontAwesome BOOK
FontAwesome BOOK
To view the source code for com.vaadin.server FontAwesome BOOK.
Click Source Link
From source file:lifetime.component.welcome.HomeView.java
License:Apache License
public HomeView(String language) { this.language = language; super.setSizeFull(); nUsers = new InfoView("users", 10000000, FontAwesome.USERS); nJobs = new InfoView("jobs", 10000, FontAwesome.BRIEFCASE); nCourses = new InfoView("courses", 10000, FontAwesome.BOOK); searchText = new LifetimeTextField(); searchButton = new LifetimeButtonLink(null, language, "Search", FontAwesome.SEARCH); super.addComponents(getInfoView(), getSearchView()); }
From source file:org.jumpmind.vaadin.ui.sqlexplorer.DbTree.java
License:Open Source License
protected void expanded(DbTreeNode treeNode) { if (!hasBeenExpanded.contains(treeNode)) { hasBeenExpanded.add(treeNode);/* w w w . j a va 2s . co m*/ try { IDatabasePlatform platform = getDbForNode(treeNode).getPlatform(); IDdlReader reader = platform.getDdlReader(); Collection<?> children = getChildren(treeNode); if (children == null || children.size() == 0) { if (treeNode.getType().equals(NODE_TYPE_DATABASE)) { List<DbTreeNode> nextLevel = new ArrayList<DbTreeNode>(); List<String> catalogs = reader.getCatalogNames(); if (catalogs.size() > 0) { if (catalogs.remove(platform.getDefaultCatalog())) { catalogs.add(0, platform.getDefaultCatalog()); } for (String catalog : catalogs) { DbTreeNode catalogNode = new DbTreeNode(this, catalog, NODE_TYPE_CATALOG, FontAwesome.BOOK, treeNode); nextLevel.add(catalogNode); } } else { List<String> schemas = reader.getSchemaNames(null); if (schemas.remove(platform.getDefaultSchema())) { schemas.add(0, platform.getDefaultSchema()); } for (String schema : schemas) { DbTreeNode schemaNode = new DbTreeNode(this, schema, NODE_TYPE_SCHEMA, FontAwesome.BOOK, treeNode); nextLevel.add(schemaNode); } } if (nextLevel.size() == 0) { nextLevel.addAll(getTableTreeNodes(reader, treeNode, null, null)); } treeNode.getChildren().addAll(nextLevel); for (DbTreeNode node : nextLevel) { addTreeNode(node); } } else if (treeNode.getType().equals(NODE_TYPE_CATALOG)) { List<String> schemas = reader.getSchemaNames(treeNode.getName()); if (schemas.size() > 0) { if (schemas.remove(platform.getDefaultSchema())) { schemas.add(0, platform.getDefaultSchema()); } for (String schema : schemas) { DbTreeNode schemaNode = new DbTreeNode(this, schema, NODE_TYPE_SCHEMA, FontAwesome.BOOK, treeNode); treeNode.getChildren().add(schemaNode); addTreeNode(schemaNode); } } else { addTableNodes(reader, treeNode, treeNode.getName(), null); } } else if (treeNode.getType().equals(NODE_TYPE_SCHEMA)) { String catalogName = null; DbTreeNode parent = (DbTreeNode) getParent(treeNode); if (parent != null && parent.getType().equals(NODE_TYPE_CATALOG)) { catalogName = parent.getName(); } addTableNodes(reader, treeNode, catalogName, treeNode.getName()); } else if (treeNode.getType().equals(NODE_TYPE_TABLE)) { String catalogName = null, schemaName = null; DbTreeNode parent = (DbTreeNode) getParent(treeNode); if (parent != null && parent.getType().equals(NODE_TYPE_SCHEMA)) { schemaName = parent.getName(); DbTreeNode grandparent = (DbTreeNode) getParent(parent); if (grandparent != null && grandparent.getType().equals(NODE_TYPE_CATALOG)) { catalogName = grandparent.getName(); } } else if (parent != null && parent.getType().equals(NODE_TYPE_CATALOG)) { catalogName = parent.getName(); } addTriggerNodes(reader, treeNode, catalogName, schemaName); System.out.println(); } setChildrenAllowed(treeNode, treeNode.getChildren().size() > 0); } } catch (Exception ex) { log.error(ex.getMessage(), ex); CommonUiUtils.notify(ex); } } }