List of usage examples for com.google.gwt.user.client.ui HasVerticalAlignment ALIGN_MIDDLE
VerticalAlignmentConstant ALIGN_MIDDLE
To view the source code for com.google.gwt.user.client.ui HasVerticalAlignment ALIGN_MIDDLE.
Click Source Link
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.plugin.EditBoxExporterView.java
License:Open Source License
/** * To set Properties./*from w w w.jav a 2 s . co m*/ * * @param pluginConfigDTO BatchClassPluginConfigDTO * @param row int */ public void setProperties(BatchClassPluginConfigDTO pluginConfigDTO, int row) { EditPluginView editPluginView = presenter.getController().getMainPresenter().getView().getPluginView() .getEditPluginView(); if (pluginConfigDTO.getSampleValue() != null && !pluginConfigDTO.getSampleValue().isEmpty()) { if (pluginConfigDTO.getSampleValue().size() > 1) { // Create a listBox if (pluginConfigDTO.isMultivalue()) { // Create a multiple select list box Label propertyName = new Label( pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); List<String> sampleValueList = pluginConfigDTO.getSampleValue(); int max_visible_item_count = MAX_VISIBLE_ITEM_COUNT; if (sampleValueList.size() < MAX_VISIBLE_ITEM_COUNT) { max_visible_item_count = sampleValueList.size(); } ListBox fieldValue = editPluginView.addMultipleSelectListBox(row, sampleValueList, max_visible_item_count, pluginConfigDTO.getValue()); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, fieldValue); docFieldWidgets.add(new EditableWidgetStorage(pluginConfigDTO, fieldValue)); } else { // Create a drop down Label propertyName = new Label( pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); ListBox fieldValue = editPluginView.addDropDown(row, pluginConfigDTO.getSampleValue(), pluginConfigDTO.getValue()); EditableWidgetStorage editableWidgetStorage = new EditableWidgetStorage(pluginConfigDTO, fieldValue); editableWidgetStorage.setValidatable(Boolean.FALSE); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, fieldValue); docFieldWidgets.add(editableWidgetStorage); } } else { // Create a read only text box Label propertyName = new Label( pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); TextBox fieldValue = new TextBox(); fieldValue.setText(pluginConfigDTO.getValue()); final ValidatableWidget<TextBox> validatableTextBox = editPluginView.addTextBox(row, pluginConfigDTO, Boolean.TRUE); EditableWidgetStorage editableWidgetStorage = new EditableWidgetStorage(pluginConfigDTO, validatableTextBox); editableWidgetStorage.setValidatable(Boolean.FALSE); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, validatableTextBox.getWidget()); docFieldWidgets.add(editableWidgetStorage); } } else { // Create a text box Label propertyName = new Label(pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); final ValidatableWidget<TextBox> validatableTextBox = editPluginView.addTextBox(row, pluginConfigDTO, Boolean.FALSE); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, validatableTextBox.getWidget()); docFieldWidgets.add(new EditableWidgetStorage(pluginConfigDTO, validatableTextBox)); } flextable.getFlexCellFormatter().addStyleName(row, 0, AdminConstants.BOLD_TEXT_STYLE); flextable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.plugin.EditFuzzyDBPropertiesView.java
License:Open Source License
/** * To set properties./*from w w w. j ava 2 s.c o m*/ * * @param pluginConfigDTO BatchClassPluginConfigDTO * @param row int */ public void setProperties(BatchClassPluginConfigDTO pluginConfigDTO, int row) { EditPluginView editPluginView = presenter.getController().getMainPresenter().getView().getPluginView() .getEditPluginView(); if (pluginConfigDTO.getSampleValue() != null && !pluginConfigDTO.getSampleValue().isEmpty() && !pluginConfigDTO.getName().equals(FUZZYDB_THRESHOLD_VALUE)) { if (pluginConfigDTO.getSampleValue().size() > 1) { // Create a listBox if (pluginConfigDTO.isMultivalue()) { // Create a multiple select list box Label propertyName = new Label( pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); List<String> sampleValueList = pluginConfigDTO.getSampleValue(); int max_visible_item_count = MAX_VISIBLE_ITEM_COUNT; if (sampleValueList.size() < MAX_VISIBLE_ITEM_COUNT) { max_visible_item_count = sampleValueList.size(); } ListBox fieldValue = editPluginView.addMultipleSelectListBox(row, sampleValueList, max_visible_item_count, pluginConfigDTO.getValue()); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, fieldValue); docFieldWidgets.add(new EditableWidgetStorage(pluginConfigDTO, fieldValue)); } else { // Create a drop down Label propertyName = new Label( pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); ListBox fieldValue = editPluginView.addDropDown(row, pluginConfigDTO.getSampleValue(), pluginConfigDTO.getValue()); EditableWidgetStorage editableWidgetStorage = new EditableWidgetStorage(pluginConfigDTO, fieldValue); editableWidgetStorage.setValidatable(Boolean.FALSE); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, fieldValue); docFieldWidgets.add(editableWidgetStorage); } } else { // Create a read only text box Label propertyName = new Label( pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); TextBox fieldValue = new TextBox(); fieldValue.setText(pluginConfigDTO.getValue()); final ValidatableWidget<TextBox> validatableTextBox = editPluginView.addTextBox(row, pluginConfigDTO, Boolean.TRUE); EditableWidgetStorage editableWidgetStorage = new EditableWidgetStorage(pluginConfigDTO, validatableTextBox); editableWidgetStorage.setValidatable(Boolean.FALSE); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, validatableTextBox.getWidget()); docFieldWidgets.add(editableWidgetStorage); } } else { // Create a text box Label propertyName = new Label(pluginConfigDTO.getDescription() + BatchClassManagementConstants.COLON); final ValidatableWidget<TextBox> validatableTextBox = editPluginView.addTextBox(row, pluginConfigDTO, Boolean.FALSE); flextable.setWidget(row, 0, propertyName); if (pluginConfigDTO.isMandatory()) { addWidgetStar(row, 1); } flextable.setWidget(row, 2, validatableTextBox.getWidget()); docFieldWidgets.add(new EditableWidgetStorage(pluginConfigDTO, validatableTextBox)); } flextable.getFlexCellFormatter().addStyleName(row, 0, AdminConstants.BOLD_TEXT_STYLE); flextable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.plugin.EditPluginView.java
License:Open Source License
/** * To format row./*from ww w .jav a 2 s .c o m*/ * * @param row int */ public void formatRow(int row) { editTable.getCellFormatter().setWidth(row, 0, "40%"); editTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); editTable.getCellFormatter().setWidth(row, 1, "1%"); editTable.getCellFormatter().setWidth(row, 2, "70px"); editTable.getCellFormatter().setWidth(row, BatchClassManagementConstants.THREE, "58%"); editTable.getFlexCellFormatter().setAlignment(row, BatchClassManagementConstants.THREE, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM); editTable.getFlexCellFormatter().addStyleName(row, BatchClassManagementConstants.THREE, "sampleData"); editTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text"); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.plugin.EditPluginView.java
License:Open Source License
/** * To add Buttons./*from w w w. j ava2 s.c o m*/ * * @param row int */ public void addButtons(int row) { editTable.setWidget(row, 1, save); editTable.setWidget(row, 2, cancel); editTable.getFlexCellFormatter().setAlignment(row, 1, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.plugin.KV_PP_EditView.java
License:Open Source License
/** * To format the row.//from w ww. j a v a2s. co m * * @param row int */ public void formatRow(int row) { editTable.getCellFormatter().setWidth(row, 0, "60%"); editTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); editTable.getCellFormatter().setWidth(row, 1, "1%"); editTable.getCellFormatter().setWidth(row, 2, "70px"); editTable.getCellFormatter().setWidth(row, BatchClassManagementConstants.THREE, "58%"); editTable.getFlexCellFormatter().setAlignment(row, BatchClassManagementConstants.THREE, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM); editTable.getFlexCellFormatter().addStyleName(row, BatchClassManagementConstants.THREE, "sampleData"); editTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text"); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.scanner.EditScannerView.java
License:Open Source License
/** * To format Row./*from w ww. j ava2 s .c o m*/ * * @param row int */ public void formatRow(int row) { dataTable.getCellFormatter().setWidth(row, 0, "40%"); dataTable.getFlexCellFormatter().setAlignment(row, 0, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE); dataTable.getCellFormatter().setWidth(row, 1, "1%"); dataTable.getCellFormatter().setWidth(row, 2, "70px"); dataTable.getCellFormatter().setWidth(row, BatchClassManagementConstants.THREE, "58%"); dataTable.getFlexCellFormatter().setAlignment(row, BatchClassManagementConstants.THREE, HasHorizontalAlignment.ALIGN_LEFT, HasVerticalAlignment.ALIGN_BOTTOM); dataTable.getFlexCellFormatter().addStyleName(row, BatchClassManagementConstants.THREE, "sampleData"); dataTable.getFlexCellFormatter().addStyleName(row, 0, "bold_text"); }
From source file:com.ephesoft.dcma.gwt.batchinstance.client.view.BatchInstanceView.java
License:Open Source License
/** * Constructor.//from w ww. jav a 2s.c om */ public BatchInstanceView() { super(); initWidget(binder.createAndBindUi(this)); restartBatchButton = new Button(); deleteBatchButton = new Button(); openBatchButton = new Button(); refreshButtonPanel = new VerticalPanel(); priorityListBox = new ListBox(Boolean.TRUE); batchInstanceListBox = new ListBox(Boolean.TRUE); priorityLabel = new Label(); batchInstanceLabel = new Label(); searchBatchButton = new Button(); searchBatchLabel = new Label(); deleteButtonPanel = new HorizontalPanel(); searchBatchTextBox = new TextBox(); refreshButton = new Button(); restartOptions = new ListBox(); restartAllButton = new Button(); deleteAllButton = new Button(); unlockButton = new Button(); nextButton = new Button(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.NEXT_TEXT)); previousButton = new Button(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.PREVIOUS_TEXT)); unlockButtonPanel = new HorizontalPanel(); deleteOpenPanel = new VerticalPanel(); unlockRestartPanel = new VerticalPanel(); refreshButton.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_REFRESH)); refreshButton.setWidth(BatchInstanceConstants.BUTTON_WIDTH); refreshButton .setTitle(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_REFRESH_TOOLTIP)); refreshButton.addStyleName(CoreCommonConstants.MARGIN_BOTTOM_5_CSS); restartAllButton .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_RESTART_ALL)); deleteAllButton.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_DELETE_ALL)); deleteAllButton .setTitle(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_DELETE_TOOLTIP)); deleteAllButton.setWidth(BatchInstanceConstants.BUTTON_WIDTH); unlockButton.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_UNLOCK)); unlockButton.addStyleName(CoreCommonConstants.MARGIN_BOTTOM_5_CSS); unlockButton .setTitle(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_UNLOCK_TOOLTIP)); searchBatchLabel.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.LABEL_SEARCH_BATCH) + BatchInstanceConstants.COLON); searchBatchButton .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_SEARCH_BATCH)); searchBatchButton.addStyleName(CoreCommonConstants.MARGIN_LEFT_5_CSS); restartBatchButton .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_RESTART_BATCH)); restartBatchButton.setTitle( LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_RESTART_BATCH_TITLE)); restartBatchButton.addStyleName(CoreCommonConstants.MARGIN_LEFT_5_CSS); deleteBatchButton .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_DELETE_BATCH)); deleteBatchButton.addStyleName(CoreCommonConstants.MARGIN_BOTTOM_5_CSS); deleteBatchButton.setTitle( LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_DELETE_BATCH_TOOLTIP)); openBatchButton.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_OPEN_BATCH)); openBatchButton .setTitle(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BUTTON_OPEN_BATCH_TITLE)); openBatchButton.setWidth(CoreCommonConstants._58PX); deleteBatchButton.setWidth(CoreCommonConstants._58PX); restartAllButton.setWidth(CoreCommonConstants._97PX); unlockButton.setWidth(CoreCommonConstants._97PX); totalBatchesLabel.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.TOTAL_BATCHES)); deletedBatchesLabel .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.DELETED_BATCHES)); totalBatchesLabel.addStyleName(CoreCommonConstants.BOLD_TEXT_CSS); deletedBatchesLabel.addStyleName(CoreCommonConstants.BOLD_TEXT_CSS); searchBatchTextBox.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.SEARCH_CRITERIA)); searchBatchTextBox.setTitle(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.SEARCH_TYPE)); batchAlerts.setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.BATCH_ALERTS)); batchInstanceListView = new BatchInstanceListView(); batchInstanceLayoutPanel.add(batchInstanceListView.listView); searchBatchTextBox.setWidth(CoreCommonConstants._120PX); batchInstanceControlPanel.addStyleName(CoreCommonConstants.OPTIONS_PANEL); batchInstanceControlPanel.addStyleName(CoreCommonConstants.OPTION_PANEL_MARGIN_CSS); fillPriorityListBox(); fillBatchInstanceListBox(batchInstanceListBox); setDefaultFilters(); batchInstanceListPanel.addStyleName("mainPanelLayout"); topPanelContainer.addStyleName(CoreCommonConstants.TOP_PANEL_CSS); searchPanel.addStyleName(BatchInstanceConstants.GRP_PANEL_STYLE_NAME); searchPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); filterPanel.addStyleName(BatchInstanceConstants.GRP_PANEL_STYLE_NAME); filterPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); restartPanel.addStyleName(BatchInstanceConstants.GRP_PANEL_STYLE_NAME); restartPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); deleteButtonPanel.addStyleName(CoreCommonConstants.LAST_GRP_PANEL_CSS); unlockButtonPanel.addStyleName(CoreCommonConstants.LAST_GRP_PANEL_CSS); filterPanel.add(priorityLabel); filterPanel.add(priorityListBox); filterPanel.add(batchInstanceLabel); filterPanel.add(batchInstanceListBox); refreshButtonPanel.add(refreshButton); refreshButtonPanel.add(deleteAllButton); filterPanel.add(refreshButtonPanel); filterPanel.setCellVerticalAlignment(priorityLabel, HasVerticalAlignment.ALIGN_MIDDLE); filterPanel.setCellVerticalAlignment(batchInstanceLabel, HasVerticalAlignment.ALIGN_MIDDLE); filterPanel.setCellVerticalAlignment(refreshButton, HasVerticalAlignment.ALIGN_MIDDLE); filterPanel.setCellVerticalAlignment(deleteAllButton, HasVerticalAlignment.ALIGN_MIDDLE); searchPanel.add(searchBatchLabel); searchPanel.add(searchBatchTextBox); searchPanel.add(searchBatchButton); searchPanel.setCellVerticalAlignment(searchBatchLabel, HasVerticalAlignment.ALIGN_MIDDLE); searchPanel.setCellVerticalAlignment(searchBatchTextBox, HasVerticalAlignment.ALIGN_MIDDLE); searchPanel.setCellVerticalAlignment(searchBatchButton, HasVerticalAlignment.ALIGN_MIDDLE); restartPanel.add(restartOptions); restartPanel.add(restartBatchButton); restartPanel.setCellVerticalAlignment(restartBatchButton, HasVerticalAlignment.ALIGN_MIDDLE); restartPanel.setCellVerticalAlignment(restartOptions, HasVerticalAlignment.ALIGN_MIDDLE); deleteOpenPanel.add(deleteBatchButton); deleteOpenPanel.add(openBatchButton); deleteButtonPanel.add(deleteOpenPanel); deleteButtonPanel.add(nextButton); deleteButtonPanel.setCellVerticalAlignment(deleteBatchButton, HasVerticalAlignment.ALIGN_MIDDLE); deleteButtonPanel.setCellVerticalAlignment(nextButton, HasVerticalAlignment.ALIGN_MIDDLE); restartAllButton.setEnabled(false); unlockRestartPanel.add(unlockButton); unlockRestartPanel.add(restartAllButton); unlockButtonPanel.add(unlockRestartPanel); unlockButtonPanel.add(previousButton); unlockButtonPanel.setCellVerticalAlignment(unlockButton, HasVerticalAlignment.ALIGN_MIDDLE); unlockButtonPanel.setCellVerticalAlignment(restartAllButton, HasVerticalAlignment.ALIGN_MIDDLE); unlockButtonPanel.setCellVerticalAlignment(openBatchButton, HasVerticalAlignment.ALIGN_MIDDLE); unlockButtonPanel.setCellVerticalAlignment(previousButton, HasVerticalAlignment.ALIGN_MIDDLE); actionPanel.add(deleteButtonPanel); controlPanel.setWidth("100%"); controlPanel.add(unlockButtonPanel); controlPanel.setCellHorizontalAlignment(unlockButtonPanel, HasHorizontalAlignment.ALIGN_LEFT); batchAlertPanel.setBorderWidth(0); setLabelsStyle(); batchAlerts.setStyleName(CoreCommonConstants.HEADER_BOLD_TEXT_CSS); batchInstanceLabel .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.LABEL_TABLE_COLUMN_STATUS) + BatchInstanceConstants.COLON); priorityLabel .setText(LocaleDictionary.get().getConstantValue(BatchInstanceConstants.LABEL_TABLE_COLUMN_PRIORITY) + BatchInstanceConstants.COLON); mainLayoutPanel.addStyleName(CoreCommonConstants.MAIN_CONTAINER_CSS); priorityListBox.setVisibleItemCount(BatchInstanceConstants.THREE); batchInstanceListBox.setVisibleItemCount(BatchInstanceConstants.THREE); clearRestartOptions(); restartOptions.setWidth(CoreCommonConstants._100_PERCENTAGE); slidingPanel.setWidget(actionPanel); slidingPanel.setVisible(true); refreshButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { clearSearchBatchBox(); presenter.updateTable(); } }); deleteAllButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent clickEvent) { final List<DataFilter> statusFilters = new ArrayList<DataFilter>(); List<String> selectedBatchInstanceStatus = getBatchInstanceSelected(); statusFilters.clear(); boolean isValidSelection = true; boolean foundInAllStatusList = false; BatchInstanceStatus[] allStatusList = BatchInstanceStatus.values(); for (String batchInstanceStat : selectedBatchInstanceStatus) { for (BatchInstanceStatus batchInstanceStatus : allStatusList) { if (batchInstanceStatus.getId() == Integer.parseInt(batchInstanceStat)) { foundInAllStatusList = true; if (!ActionableStatus.valuesAsString().contains(batchInstanceStatus.name())) { isValidSelection = false; break; } } } } if (!isValidSelection || !foundInAllStatusList) { ConfirmationDialogUtil.showConfirmationDialogError(LocaleDictionary.get() .getMessageValue(BatchInstanceMessages.MSG_DELETE_ALL_STATUS_IMPROPER)); } else { if (batchInstanceDTOMap == null || batchInstanceDTOMap.size() == 0) { ConfirmationDialogUtil.showConfirmationDialogError(LocaleDictionary.get() .getMessageValue(BatchInstanceMessages.MSG_DELETE_ALL_NO_RECORD)); } else { for (String batchInstance : selectedBatchInstanceStatus) { statusFilters.add(new DataFilter(BatchInstanceConstants.STATUS, batchInstance)); } List<String> priorities = getPrioritySelected(); for (String priority : priorities) { statusFilters.add(new DataFilter(BatchInstanceConstants.PRIORITY, priority)); } final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil.showConfirmationDialog( LocaleDictionary.get() .getMessageValue(BatchInstanceMessages.MSG_DELETE_ALL_CONFIRM), LocaleDictionary.get().getMessageValue(BatchInstanceMessages.MSG_DELETE_ALL_TITLE), false); confirmationDialog.addDialogListener(new DialogListener() { @Override public void onOkClick() { presenter.onDeleteAllBatchButtonClick(statusFilters); } @Override public void onCancelClick() { confirmationDialog.hide(); } }); } } } }); addButtonHandlers(); addBoxHandlers(); }
From source file:com.ephesoft.dcma.gwt.core.client.ui.table.Table.java
License:Open Source License
private void createTableHeader(boolean isRadioButton) { Images images = GWT.create(Images.class); final TableHeader header = tableData.getHeader(); final List<HeaderColumn> columns = header.getHeaderColumns(isRadioButton); String width = null;/* www . j a v a 2s . c om*/ int counter = 0; for (final HeaderColumn column : columns) { width = column.getWidth() + "%"; headerTable.getCellFormatter().setWidth(0, counter, width); headerTable.getCellFormatter().addStyleName(0, counter, "wordWrap"); HorizontalPanel headerPanel = new HorizontalPanel(); Label name = new Label(column.getName()); headerPanel.add(name); final Label sortImage = new Label(); sortImage.setWidth("5px"); sortImage.setStyleName("alignMiddle"); if (order != null && column.getDomainProperty() != null && order.getSortProperty().getProperty().equals(column.getDomainProperty().getProperty())) { if (column.isPrimaryAsc()) { DOM.setInnerHTML(sortImage.getElement(), AbstractImagePrototype.create(images.sortUp()).getHTML()); } else { DOM.setInnerHTML(sortImage.getElement(), AbstractImagePrototype.create(images.sortDown()).getHTML()); } } headerPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); headerPanel.add(sortImage); if (counter == 0 && isRadioButton) { name.setText(""); } headerTable.setWidget(0, counter, headerPanel); if (column.isSortable()) { name.addStyleName("cursorHand"); name.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { order = new Order(column.getDomainProperty(), !column.isPrimaryAsc()); navBar.setOrder(order); column.setPrimaryAsc(!column.isPrimaryAsc()); navBar.getListner().onPagination(navBar.getStartIndex(), visibleRecodrCount, order); } }); } headerTable.getFlexCellFormatter().setVerticalAlignment(0, counter, HasVerticalAlignment.ALIGN_TOP); headerTable.getCellFormatter().setHorizontalAlignment(0, counter, HasHorizontalAlignment.ALIGN_LEFT); counter++; } headerTable.getRowFormatter().setStyleName(0, selectionStyle.header()); }
From source file:com.ephesoft.dcma.gwt.core.client.view.MultipleSelectTwoSidedListBox.java
License:Open Source License
private void addCSSStyles() { moveUpButton.addStyleName(BUTTON_STYLE); moveDownButton.addStyleName(BUTTON_STYLE); moveRightButton.addStyleName(BUTTON_STYLE); moveLeftButton.addStyleName(BUTTON_STYLE); moveRightButton.setWidth("70px"); moveLeftButton.setWidth("70px"); moveUpButton.setWidth("55px"); moveDownButton.setWidth("55px"); availableLabel.addStyleName(BOLD_TEXT); selectedLabel.addStyleName(BOLD_TEXT); leftHandSideListBoxPanel.setSpacing(SPACING_CONSTANT_5); rightHandSideListBoxPanel.setSpacing(SPACING_CONSTANT_5); leftHandSideListBox.setWidth(_200PX); rightHandSideListBox.setWidth(_200PX); customHorizontalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); customHorizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); customHorizontalPanel.setSpacing(SPACING_CONSTANT_30); customVerticalButtonPanel.setSpacing(SPACING_CONSTANT_30); addRemoveButtonVerticalPanel.setSpacing(SPACING_CONSTANT_30); customVerticalButtonPanel.setCellVerticalAlignment(moveUpButton, HasVerticalAlignment.ALIGN_MIDDLE); customVerticalButtonPanel.setCellVerticalAlignment(moveDownButton, HasVerticalAlignment.ALIGN_MIDDLE); addRemoveButtonVerticalPanel.setCellVerticalAlignment(moveUpButton, HasVerticalAlignment.ALIGN_MIDDLE); addRemoveButtonVerticalPanel.setCellVerticalAlignment(moveDownButton, HasVerticalAlignment.ALIGN_MIDDLE); customHorizontalPanel.setCellVerticalAlignment(leftHandSideListBoxPanel, HasVerticalAlignment.ALIGN_MIDDLE); customHorizontalPanel.setCellVerticalAlignment(rightHandSideListBoxPanel, HasVerticalAlignment.ALIGN_MIDDLE); customHorizontalPanel.setCellVerticalAlignment(addRemoveButtonVerticalPanel, HasVerticalAlignment.ALIGN_MIDDLE); customHorizontalPanel.setCellVerticalAlignment(customVerticalButtonPanel, HasVerticalAlignment.ALIGN_MIDDLE); }
From source file:com.ephesoft.dcma.gwt.core.client.view.PopUpDialogBox.java
License:Open Source License
/** * Constructor.//from www. jav a 2 s . c o m * * @param showOkButton true if ok button is needed. * @param showCancelButton true if cancel button is needed. * @param center true if dialog box is to be center aligned. * @param isVisible true if dialog box is to be visible immediately on construction. */ public PopUpDialogBox(final boolean showOkButton, final boolean showCancelButton, final boolean center, final boolean isVisible) { super(); setWidget(BINDER.createAndBindUi(this)); addStyleName(CoreCommonConstants.CSS_DIALOG_BOX); okButton = new Button(LocaleDictionary.get().getConstantValue(LocaleCommonConstants.title_confirmation_ok), new ClickHandler() { @Override public void onClick(final ClickEvent clickEvent) { listener.onOkClick(); } }); cancelButton = new Button( LocaleDictionary.get().getConstantValue(LocaleCommonConstants.title_confirmation_cancel), new ClickHandler() { @Override public void onClick(final ClickEvent clickEvent) { listener.onCancelClick(); } }); okButton.setVisible(showOkButton); cancelButton.setVisible(showCancelButton); horizontalButtonPanel.setHeight(BUTTON_PANEL_HEIGHT); if (showOkButton) { horizontalButtonPanel.add(okButton); horizontalButtonPanel.setCellHorizontalAlignment(okButton, HasHorizontalAlignment.ALIGN_RIGHT); horizontalButtonPanel.setCellVerticalAlignment(okButton, HasVerticalAlignment.ALIGN_MIDDLE); } if (showCancelButton) { horizontalButtonPanel.add(cancelButton); horizontalButtonPanel.setCellHorizontalAlignment(cancelButton, HasHorizontalAlignment.ALIGN_LEFT); horizontalButtonPanel.setCellVerticalAlignment(cancelButton, HasVerticalAlignment.ALIGN_MIDDLE); } horizontalButtonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER); setAnimationEnabled(true); setGlassEnabled(true); if (center) { center(); } if (isVisible) { show(); } listMainPanel.setVisible(true); }