List of usage examples for com.vaadin.server FontAwesome ARROW_DOWN
FontAwesome ARROW_DOWN
To view the source code for com.vaadin.server FontAwesome ARROW_DOWN.
Click Source Link
From source file:org.jumpmind.metl.ui.views.design.EditDataDiffPanel.java
License:Open Source License
protected void buildButtonBar() { ButtonBar buttonBar = new ButtonBar(); addComponent(buttonBar);/*from w w w. j a v a 2 s.c om*/ if (!readOnly) { editButton = buttonBar.addButton("Edit Columns", FontAwesome.EDIT); editButton.addClickListener(new EditButtonClickListener()); } entityFilterField = buttonBar.addFilter(); entityFilterField.addTextChangeListener(event -> updateEntityTable(event.getText())); if (!readOnly) { Button moveUpButton = buttonBar.addButton("Move Up", FontAwesome.ARROW_UP); moveUpButton.addClickListener(new MoveUpClickListener()); Button moveDownButton = buttonBar.addButton("Move Down", FontAwesome.ARROW_DOWN); moveDownButton.addClickListener(new MoveDownClickListener()); Button moveTopButton = buttonBar.addButton("Move Top", FontAwesome.ANGLE_DOUBLE_UP); moveTopButton.addClickListener(new MoveTopClickListener()); Button moveBottomButton = buttonBar.addButton("Move Bottom", FontAwesome.ANGLE_DOUBLE_DOWN); moveBottomButton.addClickListener(new MoveBottomClickListener()); Button cutButton = buttonBar.addButton("Cut", FontAwesome.CUT); cutButton.addClickListener(new CutClickListener()); Button pasteButton = buttonBar.addButton("Paste", FontAwesome.PASTE); pasteButton.addClickListener(new PasteClickListener()); } addComponent(buttonBar); }
From source file:org.jumpmind.metl.ui.views.design.EditFormatPanel.java
License:Open Source License
protected void buildUI() { if (!readOnly) { ButtonBar buttonBar = new ButtonBar(); addComponent(buttonBar);//from w ww . jav a2 s . c o m Button moveUpButton = buttonBar.addButton("Move Up", FontAwesome.ARROW_UP); moveUpButton.addClickListener(new MoveUpClickListener()); Button moveDownButton = buttonBar.addButton("Move Down", FontAwesome.ARROW_DOWN); moveDownButton.addClickListener(new MoveDownClickListener()); Button moveTopButton = buttonBar.addButton("Move Top", FontAwesome.ANGLE_DOUBLE_UP); moveTopButton.addClickListener(new MoveTopClickListener()); Button moveBottomButton = buttonBar.addButton("Move Bottom", FontAwesome.ANGLE_DOUBLE_DOWN); moveBottomButton.addClickListener(new MoveBottomClickListener()); Button cutButton = buttonBar.addButton("Cut", FontAwesome.CUT); cutButton.addClickListener(new CutClickListener()); Button pasteButton = buttonBar.addButton("Paste", FontAwesome.PASTE); pasteButton.addClickListener(new PasteClickListener()); } table.setContainerDataSource(container); table.setSelectable(true); table.setSortEnabled(false); table.setImmediate(true); table.setSizeFull(); if (component.getType().equals(FixedLengthFormatter.TYPE) || component.getType().equals(FixedLengthParser.TYPE)) { table.setVisibleColumns( new Object[] { "entityName", "attributeName", "width", "startPos", "endPos", "transformText" }); table.setColumnHeaders(new String[] { "Entity Name", "Attribute Name", "Width", "Start Position", "End Position", "Transform" }); table.setColumnWidth("width", 75); } else { table.setVisibleColumns( new Object[] { "entityName", "attributeName", "ordinalSetting", "transformText" }); table.setColumnHeaders(new String[] { "Entity Name", "Attribute Name", "Ordinal", "Transform" }); } table.setTableFieldFactory(new EditFieldFactory()); table.setCellStyleGenerator(new TableCellStyleGenerator()); table.setEditable(true); table.setMultiSelect(true); if (!readOnly) { table.setDragMode(TableDragMode.MULTIROW); table.setDropHandler(new TableDropHandler()); } addComponent(table); setExpandRatio(table, 1.0f); Model model = component.getInputModel(); if (component.getType().equals(DelimitedParser.TYPE) || component.getType().equals(FixedLengthParser.TYPE)) { model = component.getOutputModel(); } if (model != null) { model = context.getConfigurationService().findModel(model.getId()); List<RecordFormat> attributes = new ArrayList<RecordFormat>(); for (ModelEntity entity : model.getModelEntities()) { for (ModelAttribute attr : entity.getModelAttributes()) { attributes.add(new RecordFormat(entity, attr)); } } Collections.sort(attributes, new Comparator<RecordFormat>() { public int compare(RecordFormat o1, RecordFormat o2) { return new Integer(o1.getOrdinalSetting()).compareTo(new Integer(o2.getOrdinalSetting())); } }); for (RecordFormat recordFormat : attributes) { table.addItem(recordFormat); } } calculatePositions(); saveOrdinalSettings(); saveLengthSettings(); saveTransformSettings(); }
From source file:org.jumpmind.metl.ui.views.design.EditSorterPanel.java
License:Open Source License
protected void buildUI() { ButtonBar buttonBar = new ButtonBar(); addComponent(buttonBar);/* w ww. j av a 2 s .c o m*/ Button moveUpButton = buttonBar.addButton("Move Up", FontAwesome.ARROW_UP); moveUpButton.addClickListener(new MoveUpClickListener()); Button moveDownButton = buttonBar.addButton("Move Down", FontAwesome.ARROW_DOWN); moveDownButton.addClickListener(new MoveDownClickListener()); Button moveTopButton = buttonBar.addButton("Move Top", FontAwesome.ANGLE_DOUBLE_UP); moveTopButton.addClickListener(new MoveTopClickListener()); Button moveBottomButton = buttonBar.addButton("Move Bottom", FontAwesome.ANGLE_DOUBLE_DOWN); moveBottomButton.addClickListener(new MoveBottomClickListener()); filterTextField = buttonBar.addFilter(); filterTextField.addTextChangeListener(event -> updateTable(event.getText())); table.setContainerDataSource(container); table.setSelectable(true); table.setSortEnabled(false); table.setImmediate(true); table.setSizeFull(); table.setVisibleColumns(new Object[] { "entityName", "attributeName", "ordinalSetting", "sortSetting" }); table.setColumnHeaders(new String[] { "Entity Name", "Attribute Name", "Sort Order", "Sort" }); table.setTableFieldFactory(new EditFieldFactory()); table.setCellStyleGenerator(new TableCellStyleGenerator()); table.setEditable(true); table.setMultiSelect(true); addComponent(table); setExpandRatio(table, 1.0f); updateTable(null); calculatePositions(); saveOrdinalSettings(); saveSortSettings(); }
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/* w ww. j av a 2 s. com*/ 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; }