List of usage examples for com.vaadin.server FontAwesome ANGLE_DOUBLE_DOWN
FontAwesome ANGLE_DOUBLE_DOWN
To view the source code for com.vaadin.server FontAwesome ANGLE_DOUBLE_DOWN.
Click Source Link
From source file:com.mycollab.module.project.view.ticket.TicketDashboardViewImpl.java
License:Open Source License
private void queryAndDisplayTickets() { wrapBody.removeAllComponents();//from ww w.j av a 2 s . c o m if (UserUIContext.getMessage(GenericI18Enum.FORM_DUE_DATE).equals(groupByState)) { baseCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("dueDate", sortDirection))); ticketGroupOrderComponent = new DueDateOrderComponent(); } else if (UserUIContext.getMessage(GenericI18Enum.FORM_START_DATE).equals(groupByState)) { baseCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("startdate", sortDirection))); ticketGroupOrderComponent = new StartDateOrderComponent(); } else if (UserUIContext.getMessage(GenericI18Enum.OPT_PLAIN).equals(groupByState)) { baseCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("lastupdatedtime", sortDirection))); ticketGroupOrderComponent = new SimpleListOrderComponent(); } else if (UserUIContext.getMessage(GenericI18Enum.FORM_CREATED_TIME).equals(groupByState)) { baseCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("createdtime", sortDirection))); ticketGroupOrderComponent = new CreatedDateOrderComponent(); } else if (UserUIContext.getMessage(GenericI18Enum.OPT_USER).equals(groupByState)) { baseCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("assignUser", sortDirection))); ticketGroupOrderComponent = new UserOrderComponent(); } else if (UserUIContext.getMessage(MilestoneI18nEnum.SINGLE).equals(groupByState)) { baseCriteria.setOrderFields( Collections.singletonList(new SearchCriteria.OrderField("milestoneId", sortDirection))); ticketGroupOrderComponent = new MilestoneOrderGroup(); } else { throw new MyCollabException("Do not support group view by " + groupByState); } wrapBody.addComponent(ticketGroupOrderComponent); final ProjectTicketService projectTicketService = AppContextUtil.getSpringBean(ProjectTicketService.class); int totalTasks = projectTicketService.getTotalTicketsCount(baseCriteria); ticketSearchPanel.setTotalCountNumber(totalTasks); currentPage = 0; int pages = totalTasks / 100; if (currentPage < pages) { MButton moreBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.ACTION_MORE), clickEvent -> { int newTotalTickets = projectTicketService.getTotalTicketsCount(baseCriteria); int newNumPages = newTotalTickets / 100; currentPage++; List<ProjectTicket> otherTickets = projectTicketService .findTicketsByCriteria(new BasicSearchRequest<>(baseCriteria, currentPage + 1, 100)); ticketGroupOrderComponent.insertTickets(otherTickets); if (currentPage >= newNumPages) { wrapBody.removeComponent(wrapBody.getComponent(1)); } }).withStyleName(WebThemes.BUTTON_ACTION).withIcon(FontAwesome.ANGLE_DOUBLE_DOWN); wrapBody.addComponent(moreBtn); } List<ProjectTicket> tickets = projectTicketService .findTicketsByCriteria(new BasicSearchRequest<>(baseCriteria, currentPage + 1, 100)); ticketGroupOrderComponent.insertTickets(tickets); }
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 va 2s.co m*/ 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);//w ww.ja va 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()); 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 w w . ja v 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(); }