List of usage examples for com.google.gwt.user.client.ui HorizontalPanel HorizontalPanel
public HorizontalPanel()
From source file:com.ephesoft.dcma.gwt.home.client.view.LandingView.java
License:Open Source License
/** * To build the Landing Page.// w w w. j av a 2 s .com * * @return FocusPanel */ public FocusPanel buildLandingPage() { focusPanel = new FocusPanel(); flowpanel = new DockLayoutPanel(Unit.PCT); flowpanel.setHeight(HUNDRED_PERCENT); flowpanel.addStyleName(CoreCommonConstants.MAIN_CONTAINER_CSS); HorizontalPanel horCapPanel = new HorizontalPanel(); VerticalPanel innerVerPanel = new VerticalPanel(); innerVerPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); VerticalPanel capPanel = new VerticalPanel(); capPanel.setStyleName(CoreCommonConstants.TOP_PANEL_CSS); HorizontalPanel title = new HorizontalPanel(); title.setBorderWidth(0); title.setSize(HUNDRED_PERCENT, HUNDRED_PERCENT); Label titleLabel = new Label( LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_BATCH_ALERTS)); title.add(titleLabel); titleLabel.addStyleName(CoreCommonConstants.HEADER_BOLD_TEXT_CSS); capPanel.add(titleLabel); HorizontalPanel simPanel = new HorizontalPanel(); simPanel.setSize(HUNDRED_PERCENT, HUNDRED_PERCENT); Label pendingForReviewLabel = new Label( LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_PEND_FOR_REVIEW) + ": "); pendingForReviewLabel.addStyleName(CoreCommonConstants.BOLD_TEXT_CSS); pendingForReviewLabelValue = new Label(""); Label pendingForValidationLabel = new Label( LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_PEND_FOR_VALIDATION) + ": "); pendingForValidationLabel.addStyleName(CoreCommonConstants.BOLD_TEXT_CSS); pendingForValidationLabelValue = new Label(""); Label totalBatchCount = new Label( LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_TOTAL_BATCHES) + ": "); totalBatchCount.addStyleName(CoreCommonConstants.BOLD_TEXT_CSS); totalBatchValue = new Label(BatchListConstants.EMPTY_STRING); Label pipe = new Label(BatchListConstants.EMPTY_STRING); pipe.setStyleName("pipe"); simPanel.add(totalBatchCount); simPanel.add(totalBatchValue); simPanel.add(pipe); simPanel.add(pendingForReviewLabel); simPanel.add(pendingForReviewLabelValue); simPanel.add(pendingForValidationLabel); simPanel.add(pendingForValidationLabelValue); simPanel.setCellWidth(pendingForReviewLabel, "7%"); simPanel.setCellWidth(pendingForReviewLabelValue, "2%"); simPanel.setCellWidth(pendingForValidationLabel, "7%"); simPanel.setCellWidth(pendingForValidationLabelValue, "20%"); simPanel.setCellWidth(totalBatchCount, "5%"); simPanel.setCellWidth(totalBatchValue, "2%"); simPanel.setCellWidth(pipe, "1%"); capPanel.add(simPanel); capPanel.setWidth(HUNDRED_PERCENT); innerVerPanel.add(capPanel); Label dummyLabel = new Label(); dummyLabel.setHeight("40px"); innerVerPanel.add(dummyLabel); HorizontalPanel buttonTextPanel = new HorizontalPanel(); buttonTextPanel.add(dummyLabel); buttonTextPanel.setCellWidth(dummyLabel, "20%"); innerVerPanel.add(buttonTextPanel); horCapPanel.add(innerVerPanel); horCapPanel.setCellHorizontalAlignment(innerVerPanel, HasAlignment.ALIGN_LEFT); horCapPanel.setWidth(HUNDRED_PERCENT); flowpanel.addNorth(horCapPanel, BatchListConstants.FIFTEEN); reviewTable = new ReviewValidateTable(true); reviewValidateTabLayoutPanel = new TabLayoutPanel(BatchListConstants.FIVE, Unit.PCT); reviewValidateTabLayoutPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); reviewValidateTabLayoutPanel.add(reviewTable.getMainPanel()); validateTable = new ReviewValidateTable(false); reviewValidateTabLayoutPanel.add(validateTable.getMainPanel(), ""); flowpanel.add(reviewValidateTabLayoutPanel); focusPanel.add(flowpanel); focusPanel.addKeyDownHandler(new KeyDownHandler() { @Override public void onKeyDown(KeyDownEvent arg0) { presenter.getController().getEventBus().fireEvent(new BatchListKeyDownEvent(arg0)); } }); return focusPanel; }
From source file:com.ephesoft.dcma.gwt.home.client.view.reviewtable.ReviewValidateTable.java
License:Open Source License
/** * Constructor.//from w w w .j ava2s .co m */ public ReviewValidateTable() { super(); mainPanel = new DockLayoutPanel(Unit.PCT); searchAndFilterContanier = new FlowPanel(); filterAndSearchPanel = new HorizontalPanel(); searchAndFilterContanier.addStyleName(CoreCommonConstants.OPTIONS_PANEL); filterAndSearchPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); priorityListBox = createPriorityListBox(); searchPanel = new HorizontalPanel(); listView = new ListView(); listView.setTableRowCount(BatchListConstants.FIFTEEN); addHeaders(); HorizontalPanel listBoxPanel; listBoxPanel = new HorizontalPanel(); searchBatchButton = new Button(); searchBatchLabel = new Label(); searchBatchTextBox = new TextBox(); 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); searchPanel.addStyleName(CoreCommonConstants.LAST_GRP_PANEL_NORMAL_CSS); searchBatchLabel.setText(LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_SEARCH_BATCH) + BatchListConstants.COLON); searchBatchButton.setText(LocaleDictionary.get().getConstantValue(BatchListConstants.BUTTON_SEARCH_BATCH)); listBoxPanel.addStyleName(CoreCommonConstants.GRP_PANEL_NORMAL_CSS); searchAndFilterContanier.add(filterAndSearchPanel); mainPanel.addNorth(searchAndFilterContanier, BatchListConstants.FIFTEEN); mainPanel.addStyleName("padding0"); mainPanel.add(listView); Label priorityLabel = new Label( LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_PRIORITY_LISTBOX)); refreshButton = new Button( LocaleDictionary.get().getConstantValue(BatchListConstants.LABEL_REFRESH_BUTTON)); listBoxPanel.add(priorityLabel); listBoxPanel.add(priorityListBox); listBoxPanel.add(refreshButton); listBoxPanel.setCellHorizontalAlignment(priorityLabel, HasHorizontalAlignment.ALIGN_RIGHT); listBoxPanel.setCellHorizontalAlignment(refreshButton, HasHorizontalAlignment.ALIGN_LEFT); listBoxPanel.setWidth(CoreCommonConstants._100_PERCENTAGE); filterAndSearchPanel.add(listBoxPanel); filterAndSearchPanel.add(searchPanel); filterAndSearchPanel.setCellHorizontalAlignment(listBoxPanel, HasHorizontalAlignment.ALIGN_LEFT); filterAndSearchPanel.setCellWidth(listBoxPanel, CoreCommonConstants._20_PERCENTAGE); filterAndSearchPanel.setCellHorizontalAlignment(searchPanel, HasHorizontalAlignment.ALIGN_LEFT); searchBatchTextBox.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { searchBatchButton.click(); } } }); searchBatchTextBox.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { searchBatchTextBox.setText(BatchListConstants.EMPTY_STRING); } }); }
From source file:com.ephesoft.dcma.gwt.login.client.LoginEntryPoint.java
License:Open Source License
@Override public void onLoad() { Document.get().setTitle(LocaleDictionary.get().getConstantValue(LoginConstants.LOGIN_TITLE)); Label userName = new Label(LocaleDictionary.get().getConstantValue(LoginConstants.LOGIN_USERNAME)); userName.setStyleName("text_bold"); Label password = new Label(LocaleDictionary.get().getConstantValue(LoginConstants.LOGIN_PASSWORD)); password.setStyleName("text_bold"); /*/*from ww w . ja v a 2s .c om*/ * CheckBox remMe = new CheckBox(LocaleDictionary.get().getConstantValue( LoginConstants.login_remember_me)); * remMe.setEnabled(false); Label forgPwd = new Label(LocaleDictionary.get().getConstantValue(LoginConstants * .login_forgot_pwd)); */ Label version = new Label(LocaleDictionary.get().getConstantValue(LoginConstants.VERSION_TEXT)); final Label versionNumber = new Label(); RootPanel.get("userName").add(userName); RootPanel.get("password").add(password); /* * RootPanel.get("remMe").add(remMe); RootPanel.get("forgPwd").add(forgPwd); */ RootPanel.get("version").add(version); ((LoginRemoteServiceAsync) createRpcService()).getProductVersion(new EphesoftAsyncCallback<String>() { @Override public void onSuccess(String version) { versionNumber.setText(version); } @Override public void customFailure(Throwable arg0) { ConfirmationDialogUtil.showConfirmationDialogError( LocaleDictionary.get().getMessageValue(LoginConstants.UNABLE_TO_RETRIVE_VERSION_INFO)); } }); RootPanel.get("versionLabel").add(versionNumber); SubmitButton submitButton = new SubmitButton(); submitButton.setFocus(true); submitButton.setText(LocaleDictionary.get().getConstantValue(LoginConstants.LOGIN_BUTTON_TEXT)); submitButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { login(); } }); submitButton.setStyleName("btn_blue"); RootPanel.get("buttonLogin").add(submitButton); final Label expiryMsg = new Label(); ((LoginRemoteServiceAsync) createRpcService()).getLicenseExpiryMsg(new EphesoftAsyncCallback<Void>() { @Override public void customFailure(Throwable arg0) { String alertMsg = arg0.getLocalizedMessage(); int indexOfDelimiter = alertMsg.indexOf('@'); String days = alertMsg.substring(0, indexOfDelimiter); int remainingDays = Integer.parseInt(days); String dateString = alertMsg.substring(indexOfDelimiter + 1); if (remainingDays != 0) { expiryMsg.setText(LocaleDictionary.get().getMessageValue(LoginMessages.LICENSE_EXPIRY_MSG, days, dateString)); } else { expiryMsg.setText( LocaleDictionary.get().getMessageValue(LoginMessages.LICENSE_EXPIRY_MSG_TODAY)); } } @Override public void onSuccess(Void arg0) { // Nothing to do .. on success of RPC call } }); expiryMsg.setStyleName(LICENSE_TEXT); RootPanel.get(EXPIRY_MSG_LEBEL).add(expiryMsg); final HorizontalPanel horPanel = new HorizontalPanel(); horPanel.setWidth("100%"); RootPanel.get().add(horPanel); ScreenMaskUtility.maskScreen("Loading"); rpcService.getFooterProperties(new EphesoftAsyncCallback<Map<String, String>>() { @Override public void onSuccess(Map<String, String> footerProperties) { String footerText = footerProperties.get(CoreCommonConstants.FOOTER_TEXT_KEY); String footerLink = footerProperties.get(CoreCommonConstants.FOOTER_LINK_KEY); final Anchor footerInfo = new Anchor(footerText, footerLink); horPanel.add(footerInfo); horPanel.setCellHorizontalAlignment(footerInfo, HasHorizontalAlignment.ALIGN_CENTER); ScreenMaskUtility.unmaskScreen(); } @Override public void customFailure(Throwable arg0) { ScreenMaskUtility.unmaskScreen(); ConfirmationDialogUtil .showConfirmationDialogError("Application could not be authorized. Please try again."); } }); }
From source file:com.ephesoft.dcma.gwt.rv.client.view.DocumentTree.java
License:Open Source License
private void createTree(boolean fireEvent) { clearView();// www . ja v a 2 s . c o m List<Document> docBeans = presenter.batchDTO.getBatch().getDocuments().getDocument(); int counter = 0; TreeItem item = null; boolean isThumbNailLoaded = false; boolean isFirstThumbNail = false; for (final Document docBean : docBeans) { VerticalPanel docTitleVerticalPanel = new VerticalPanel(); HorizontalPanel docTitlePanel = new HorizontalPanel(); docTitlePanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE); docTitleVerticalPanel.add(docTitlePanel); Label docTitleLabel = new Label(); Label docType = new Label(); docTitlePanel.add(docTitleLabel); Label icon = new Label(); icon.setStyleName(ReviewValidateConstants.NO_ERROR_ICON); docTitlePanel.add(icon); docTitleVerticalPanel.add(docType); final TreeItem docItem = docTree.addItem(docTitleVerticalPanel); addDocDisplayItemsAndHandlers(docBean, docTitleLabel, docType, icon, docItem); if (presenter.batchDTO.isErrorContained(docBean)) { isThumbNailLoaded = true; icon.setStyleName(ReviewValidateConstants.ERROR_ICON); if (counter == 0) { item = docItem; counter++; } } Iterator<Page> iter = docBean.getPages().getPage().iterator(); for (int i = 0; i < Math.ceil(docBean.getPages().getPage().size() / 2.0); i++) { FlexTable flexTable = new FlexTable(); for (int j = 0; j < 2; j++) { if (iter.hasNext()) { final Page pageTypeBean = iter.next(); final RotatableImage image = new RotatableImage(); if (isThumbNailLoaded && !isFirstThumbNail) { isThumbNailLoaded = false; isFirstThumbNail = true; if (!pageTypeBean.isIsRotated()) { image.setUrl( presenter.batchDTO.getAbsoluteURLFor(pageTypeBean.getThumbnailFileName()), pageTypeBean.getDirection()); } else { image.setUrl( presenter.batchDTO.getAbsoluteURLForRotatedImage( pageTypeBean.getThumbnailFileName(), pageTypeBean.getDirection().toString()), pageTypeBean.getDirection()); } } image.addStyleName(ReviewValidateConstants.THUMBNAIL_DEFAULT); image.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { setPageSelected(image, true); } }); VerticalPanel imagePanel = setImagesForTree(pageTypeBean, image); flexTable.setWidget(0, j, imagePanel); } docItem.addItem(flexTable); } } } if (fireEvent) { setDocumentSelected(item); if (selectedDocItem != null) { selectedDocItem.setState(true); } } }
From source file:com.ephesoft.dcma.gwt.rv.client.view.ExternalAppDialogBox.java
License:Open Source License
public ExternalAppDialogBox(String url, java.util.Map<String, String> dimensionsOfPopUpMap) { super();//from w w w . j a v a2s. c om setWidget(BINDER.createAndBindUi(this)); addStyleName(ReviewValidateConstants.CONFIGURED_DIMENSIONS_DIALOG); int xDimension; int yDimension; try { xDimension = Integer.parseInt(dimensionsOfPopUpMap.get(ReviewValidateConstants.POP_UP_X_DIMENSION)); if (xDimension < 0) { xDimension = DEFAULT_X_DIMENSION; } } catch (Exception e) { xDimension = DEFAULT_X_DIMENSION; } try { yDimension = Integer.parseInt(dimensionsOfPopUpMap.get(ReviewValidateConstants.POP_UP_Y_DIMENSION)); if (yDimension < 0) { yDimension = DEFAULT_Y_DIMENSION; } } catch (Exception e) { yDimension = DEFAULT_Y_DIMENSION; } setWidth(xDimension + "px"); setHeight(yDimension + "px"); Frame frame = new Frame(url); frame.setWidth(xDimension + "px"); frame.setHeight(yDimension + "px"); okButton = new Button("Ok", new ClickHandler() { @Override public void onClick(ClickEvent arg0) { listener.onOkClick(); hide(); } }); okButton.setTitle("Ctrl+a"); closeButton = new Button("Close", new ClickHandler() { @Override public void onClick(ClickEvent arg0) { listener.onCloseClick(); hide(); } }); closeButton.setTitle("Ctrl+z"); okButton.getElement().setAttribute("id", "okButtonElement"); closeButton.getElement().setAttribute("id", "closeButtonElement"); okButton.setVisible(false); closeButton.setVisible(false); HorizontalPanel horizontalButtonPanel = new HorizontalPanel(); horizontalButtonPanel.setSpacing(5); horizontalButtonPanel.add(okButton); horizontalButtonPanel.add(closeButton); horizontalButtonPanel.setCellHorizontalAlignment(okButton, HasHorizontalAlignment.ALIGN_CENTER); horizontalButtonPanel.setCellHorizontalAlignment(closeButton, HasHorizontalAlignment.ALIGN_CENTER); verticalPanel.add(frame); verticalPanel.setCellHorizontalAlignment(frame, HasHorizontalAlignment.ALIGN_CENTER); verticalPanel.setCellHorizontalAlignment(horizontalButtonPanel, HasHorizontalAlignment.ALIGN_CENTER); verticalPanel.add(horizontalButtonPanel); setModal(true); setVisible(true); show(); }
From source file:com.ephesoft.dcma.gwt.rv.client.view.FuzzySearchResultView.java
License:Open Source License
public FuzzySearchResultView(final ReviewValidatePresenter reviewValidatePresenter, String width, String height) {/*from ww w. j a v a 2 s .c o m*/ super(); initWidget(BINDER.createAndBindUi(this)); // fuzzySearchScrollPanel.setSize("100%", "100%"); fuzzyTable = new FlexTable(); fuzzyTable.setWidth("100%"); buttonHorizontalPanel = new HorizontalPanel(); Button cancelBtn = new Button(); selectBtn = new Button(); buttonHorizontalPanel.add(selectBtn); buttonHorizontalPanel.add(cancelBtn); buttonHorizontalPanel.setSpacing(5); buttonHorizontalPanel.setVerticalAlignment(HasAlignment.ALIGN_TOP); addStyleName("overflow_scroll"); fuzzySearchListPanel.add(buttonHorizontalPanel); setWidth(width); setHeight(height); fuzzySearchListPanel.add(fuzzyTable); fuzzySearchListPanel.addStyleName("border"); // cancelBtn.setText("Cancel"); // selectBtn.setText("Select"); cancelBtn.setText(LocaleDictionary.get().getConstantValue(ReviewValidateConstants.FUZZY_SEARCH_CANCEL_BTN)); selectBtn.setText(LocaleDictionary.get().getConstantValue(ReviewValidateConstants.FUZZY_SEARCH_SELECT_BTN)); selectBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { // TODO remove this hard coding and get it from hash map. int returnIndex = getSelectedRowId(); FuzzySearchResultView.this.fireEvent(new FuzzySearchEvent(returnIndex)); dialogBox.hide(true); ScreenMaskUtility.unmaskScreen(); reviewValidatePresenter.setFocus(); } }); cancelBtn.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { dialogBox.hide(true); ScreenMaskUtility.unmaskScreen(); reviewValidatePresenter.setFocus(); } }); }
From source file:com.ephesoft.dcma.gwt.rv.client.view.PageMovePanel.java
License:Open Source License
public PageMovePanel(String selectedPageId, String selectedDocumentId, final List<String> listOfDocumentId, BatchDTO batchDTO, DialogBox confirmationDialog, final ReviewValidatePresenter reviewValidatePresenter) { super();// ww w. j a v a 2 s.c o m this.selectedPageId = selectedPageId; this.selectedDocumentId = selectedDocumentId; this.confirmationDialog = confirmationDialog; this.listOfDocumentId = listOfDocumentId; this.batchDTO = batchDTO; int selectedIndex = 0; listBox1 = new ListBox(); listBox2 = new ListBox(); for (String documentId : listOfDocumentId) { listBox1.addItem(documentId); } listBox1.setSelectedIndex(selectedIndex); String moveToDocumentId = PageMovePanel.this.listOfDocumentId.get(0); populateListOfPages(moveToDocumentId); listBox1.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent changeEvent) { int selectedIndex = PageMovePanel.this.listBox1.getSelectedIndex(); String selectedDocumentId = PageMovePanel.this.listOfDocumentId.get(selectedIndex); populateListOfPages(selectedDocumentId); listBox2.clear(); for (Page currPage : listOfPages) { if (currPage.getIdentifier().equals(PageMovePanel.this.selectedPageId)) { continue; } listBox2.addItem( LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_PAGE) + " " + currPage.getIdentifier()); } if (listBox2.getItemCount() == 0) { listBox2.setEnabled(false); } else { listBox2.setEnabled(true); } } }); for (Page currPage : listOfPages) { if (currPage.getIdentifier().equals(PageMovePanel.this.selectedPageId)) { continue; } listBox2.addItem(LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_PAGE) + " " + currPage.getIdentifier()); } if (listBox2.getItemCount() == 0) { listBox2.setEnabled(false); } else { listBox2.setEnabled(true); } // listBox2.addClickHandler(new ClickHandler(){ // // @Override // public void onClick(ClickEvent arg0) { // listBox2.clear(); // listBox2.addItem("Select"); // for(PageType currPage:listOfPages){ // listBox2.addItem("Page "+currPage.getIdentifier()); // } // // }}); rb0 = new RadioButton("myRadioGroup", LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_MOVE_BEFORE)); rb1 = new RadioButton("myRadioGroup", LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_MOVE_AFTER)); movePageButton = new Button( LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_MOVE_PAGE)); movePageButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { int moveToIndexDoc = PageMovePanel.this.listBox1.getSelectedIndex(); final String moveToDocumentId1 = PageMovePanel.this.listOfDocumentId.get(moveToIndexDoc); PageMovePanel.this.setMoveToDocumentId(moveToDocumentId1); int moveToIndexPage = PageMovePanel.this.listBox2.getSelectedIndex(); String moveToPageId1 = PageMovePanel.this.listOfPages.get(moveToIndexPage).getIdentifier(); Boolean moveAfterchecked = PageMovePanel.this.rb1.getValue(); Batch batch = PageMovePanel.this.batchDTO.getBatch(); ScreenMaskUtility.maskScreen(); rpcService.movePageOfDocument(batch, PageMovePanel.this.selectedPageId, PageMovePanel.this.selectedDocumentId, moveToDocumentId1, moveToPageId1, moveAfterchecked, new AsyncCallback<BatchDTO>() { @Override public void onFailure(Throwable arg0) { ScreenMaskUtility.unmaskScreen(); if (!reviewValidatePresenter.displayErrorMessage(arg0)) { ConfirmationDialogUtil.showConfirmationDialogError(LocaleDictionary.get() .getMessageValue(ReviewValidateMessages.MSG_MOVEPANEL_MOVE_ERROR, PageMovePanel.this.selectedPageId, moveToDocumentId1, arg0.getMessage())); } } @Override public void onSuccess(BatchDTO batchDTO) { PageMovePanel.this.batchDTO = batchDTO; listener.onOkClick(); PageMovePanel.this.confirmationDialog.hide(); ScreenMaskUtility.unmaskScreen(); } }); } }); cancelButton = new Button( LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_CANCEL_BUTTON)); cancelButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { PageMovePanel.this.confirmationDialog.hide(); if (reviewValidatePresenter != null) { reviewValidatePresenter.setFocus(); } } }); rb1.setChecked(true); horizontalPanel = new HorizontalPanel(); Label labelDocument = new Label( LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_DOCUMENT) + ":"); this.add(labelDocument); this.add(listBox1); Label labelPage = new Label( LocaleDictionary.get().getConstantValue(ReviewValidateConstants.TITLE_MOVEPANEL_PAGE) + ":"); this.add(labelPage); this.add(listBox2); this.add(rb0); this.add(rb1); horizontalPanel.add(movePageButton); horizontalPanel.add(cancelButton); horizontalPanel.setSpacing(5); this.add(horizontalPanel); }
From source file:com.ephesoft.dcma.gwt.rv.client.view.TableExtractionView.java
License:Open Source License
private void setTableUI(final FlexTable flexTable, final DataTable dataTable) { ScrollPanel panel = new ScrollPanel(); if (dataTable.getRows().getRow().size() == 0) { setEmptyTableView(flexTable, dataTable.getHeaderRow()); }/*from w w w . j a va 2 s .c om*/ panel.add(flexTable); panel.setHeight("150px"); panel.setWidth("400px"); panel.setTitle(dataTable.getName()); HorizontalPanel hPanel = new HorizontalPanel(); insertRowButton = new Button(); deleteRowButton = new Button(); deleteAllRowButton = new Button(); manualExtractionButton = new Button(); setButtonsText(); onInsertButtonClicked(insertRowButton, dataTable); onDeleteButtonClicked(deleteRowButton, dataTable); onDeleteAllButtonClicked(deleteAllRowButton, dataTable); onManualExtractionButtonClicked(manualExtractionButton, dataTable); final String tableName = dataTable.getName(); tableNameVsButtonMap.put(insertRowButton, tableName); tableNameVsButtonMap.put(deleteRowButton, tableName); tableNameVsButtonMap.put(deleteAllRowButton, tableName); tableNameVsButtonMap.put(manualExtractionButton, tableName); Label label = new Label(); label.setWidth(GAP_BETWEEN_BUTTONS); hPanel.add(insertRowButton); hPanel.add(label); label = new Label(); label.setWidth(GAP_BETWEEN_BUTTONS); hPanel.add(deleteRowButton); hPanel.add(label); label = new Label(); label.setWidth(GAP_BETWEEN_BUTTONS); hPanel.add(deleteAllRowButton); hPanel.add(label); hPanel.add(manualExtractionButton); Label emptyLabel = new Label(); emptyLabel.setHeight("20px"); verticalPanel.add(emptyLabel); emptyLabel = new Label(); emptyLabel.setText(dataTable.getName()); verticalPanel.add(emptyLabel); verticalPanel.add(hPanel); emptyLabel = new Label(); emptyLabel.setHeight("10px"); verticalPanel.add(emptyLabel); verticalPanel.add(panel); }
From source file:com.ephesoft.dcma.gwt.rv.client.view.TableExtractionView.java
License:Open Source License
private void addHeaderColumns(final List<Column> columnList, final FlexTable flexTable) { tableNameVsCheckBoxMap.get(selectedDataTableName).clear(); int columnNumber = 0; for (Column headerColumn : columnList) { HorizontalPanel headerRowPanel = new HorizontalPanel(); Label headerText = new Label(headerColumn.getName()); headerRowPanel.add(headerText);//w w w. j ava 2 s . c o m headerRowPanel.setWidth("80px"); CheckBox validationCheckBox = new CheckBox(); validationCheckBox.setVisible(Boolean.FALSE); headerRowPanel.add(validationCheckBox); headerRowPanel.setCellVerticalAlignment(validationCheckBox, HasVerticalAlignment.ALIGN_MIDDLE); tableNameVsCheckBoxMap.get(selectedDataTableName).add(validationCheckBox); flexTable.setWidget(0, columnNumber, headerRowPanel); flexTable.getCellFormatter().addStyleName(0, columnNumber, "wordWrap"); columnNumber++; } }
From source file:com.ephesoft.gxt.admin.client.view.plugin.PluginDetailView.java
License:Open Source License
public void addNoFieldExists() { HorizontalPanel cont = new HorizontalPanel(); cont.addStyleName("pluginPanel"); Label label = new Label(); label.setText(LocaleDictionary.getConstantValue(BatchClassConstants.NO_FIELD_EXISTS)); label.addStyleName("noPluginLabel"); cont.add(label);//from w w w .j a va 2 s . c o m vlayoutContainer.add(cont); }