List of usage examples for com.google.gwt.user.client.ui HorizontalPanel HorizontalPanel
public HorizontalPanel()
From source file:com.edgenius.wiki.gwt.client.server.utils.ErrorCode.java
License:Open Source License
public static HorizontalPanel getMessage(String errorCode, String defaultErrorMsg, Widget[] widgets) { HorizontalPanel panel = new HorizontalPanel(); buildMessage(panel, errorCode, defaultErrorMsg, widgets); return panel; }
From source file:com.edgenius.wiki.gwt.client.space.SpaceLogoForm.java
License:Open Source License
public SpaceLogoForm() { final FormPanel form = new FormPanel(); form.setAction(GwtClientUtils.getBaseUrl() + "space/logo.do"); form.setMethod(FormPanel.METHOD_POST); form.setEncoding(FormPanel.ENCODING_MULTIPART); form.addSubmitHandler(this); form.addSubmitCompleteHandler(this); VerticalPanel panel = new VerticalPanel(); panel.add(message);/* www . j av a 2 s.co m*/ panel.add(spaceUname); HorizontalPanel h1 = new HorizontalPanel(); Label uploadLabel = new Label(Msg.consts.logo()); uploadLabel.setStyleName(Css.FORM_LABEL); FileUpload upload = new FileUpload(); upload.setName("file"); h1.add(uploadLabel); h1.add(upload); panel.add(h1); form.setWidget(panel); // Button update = new Button(Msg.consts.update()); update.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { form.submit(); } }); Button cancel = new Button(Msg.consts.cancel()); cancel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { //return to link panel for (Iterator<SpaceUpdateListener> iter = listener.iterator(); iter.hasNext();) { iter.next().spaceUpdateCancelled(); } } }); ButtonBar btnBar = new ButtonBar(); btnBar.add(update); btnBar.add(cancel); VerticalPanel main = new VerticalPanel(); main.add(form); main.add(btnBar); setWidget(main); }
From source file:com.edgenius.wiki.gwt.client.user.UserInfoPanel.java
License:Open Source License
public UserInfoPanel(final Widget parent, String spaceUname, final String username, String portrait, boolean showPortrait) { this.parent = parent; this.username = username; VerticalPanel main = new VerticalPanel(); HorizontalPanel center = new HorizontalPanel(); FlowPanel profile = new FlowPanel(); this.showPortrait = showPortrait; if (showPortrait && !StringUtil.isBlank(portrait)) { portraitPanel.add(GwtClientUtils.createUserPortrait(portrait)); }// ww w. j a v a 2s.c om center.add(portraitPanel); center.add(profile); status.setStyleName(Css.STATUS_SNAP); Label lb = new Label(Msg.consts.recent_update_pages()); lb.setStyleName(Css.HEADING3); lb.addStyleName(Css.UNDERLINE); profile.add(status); profile.add(lb); profile.add(pagesPanel); profile.add(loadingImg); main.add(message); main.add(center); if (!AbstractEntryPoint.isOffline()) { func.setWidth("100%"); func.setStyleName(Css.ACTION_TABS); main.add(func); } center.setCellWidth(profile, "100%"); center.setSpacing(2); profile.setSize("100%", "100%"); center.setSize("100%", "100%"); main.setSize("100%", "100%"); center.setStyleName(Css.PROFILE); this.setWidget(main); loadingImg.setVisible(true); PageControllerAsync pageController = ControllerFactory.getPageController(); //get user recent updated pages for this space pageController.getUserPagesInSpace(spaceUname, username, 5, this); }
From source file:com.edgenius.wiki.gwt.client.widgets.FeedbackDialog.java
License:Open Source License
public FeedbackDialog() { this.setText(Msg.consts.feedback()); this.setIcon(new Image(IconBundle.I.get().email())); final FormPanel form = new FormPanel(); form.setMethod(FormPanel.METHOD_POST); form.addSubmitHandler(this); form.setStyleName(Css.FORM);/*from w ww .j a v a 2 s.c o m*/ form.setWidget(panel); HorizontalPanel h1 = new HorizontalPanel(); Label emailLabel = new Label(Msg.consts.your_email()); h1.add(emailLabel); h1.add(emailBox); feedbackBox.valid(Msg.consts.feedback(), true, 0, 0, null); emailBox.valid(Msg.consts.email(), true, 0, 0, this); Label feedbackLabel = new Label(Msg.consts.your_feedback()); panel.add(message); panel.add(h1); panel.add(feedbackLabel); panel.add(feedbackBox); ButtonBar btnBar = getButtonBar(); Button send = new Button(Msg.consts.send(), ButtonIconBundle.tickImage()); Button cancel = new Button(Msg.consts.cancel(), ButtonIconBundle.crossImage()); send.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { form.submit(); } }); cancel.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { FeedbackDialog.this.hidebox(); } }); btnBar.add(cancel); btnBar.add(send); panel.setSize("100%", "100%"); emailLabel.setStyleName(Css.FORM_LABEL); feedbackLabel.setStyleName(Css.FORM_LABEL); emailBox.setStyleName(Css.FORM_INPUT); feedbackBox.setStyleName(Css.LONG_TEXTBOX); panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); panel.setCellHorizontalAlignment(feedbackBox, HasHorizontalAlignment.ALIGN_CENTER); this.setWidget(form); }
From source file:com.edgenius.wiki.gwt.client.widgets.ImageSlider.java
License:Open Source License
public ImageSlider(boolean showAltText, int sliderHeight, int imageWidth, int imageHeight, int showPerPage) { this.sliderHeight = sliderHeight; this.imageWidth = imageWidth; this.imageHeight = imageHeight; this.showCount = showPerPage; this.showAltText = showAltText; HorizontalPanel main = new HorizontalPanel(); main.add(leftBtn);/*from w w w.j a v a 2s . co m*/ main.add(rowPanel); main.add(rightBtn); main.setCellHorizontalAlignment(rowPanel, HasHorizontalAlignment.ALIGN_CENTER); leftBtn.setEnable(false); rightBtn.setEnable(false); this.setWidth("100%"); this.setStyleName(Css.IMAGE_SLIDE); this.setWidget(main); }
From source file:com.edgenius.wiki.gwt.client.widgets.ListPanel.java
License:Open Source License
public ListPanel(final int type) { this.type = type; HorizontalPanel funcPanel = new HorizontalPanel(); if (type == ListDialogue.GROUP) { funcPanel.add(new Label(Msg.consts.search_groups() + " ")); } else if (type == ListDialogue.USER) { funcPanel.add(new Label(Msg.consts.search_users() + " ")); }// ww w. ja va 2 s .c o m funcPanel.add(filter); filter.setStyleName(Css.SEARCH_INPUT); filter.setTitle(Msg.consts.input_keyword()); filter.addKeyDownHandler(new KeyDownHandler() { public void onKeyDown(KeyDownEvent event) { if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { keyword = filter.getText(); if (keyword == null || keyword.trim().length() == 0) return; if (type == ListDialogue.GROUP) { SearchControllerAsync action = ControllerFactory.getSearchController(); action.searchRoles(keyword, 0, PAGE_SIZE, new SearchAsync()); } else if (type == ListDialogue.USER) { SearchControllerAsync action = ControllerFactory.getSearchController(); action.searchUser(keyword, 0, PAGE_SIZE, new SearchAsync()); } } } }); funcPanel.add(selectedList); VerticalPanel panel = new VerticalPanel(); panel.add(message); panel.add(funcPanel); panel.add(table); panel.setSize("100%", "100%"); //To display hint, don't set focus first. // Scheduler.get().scheduleDeferred(new ScheduledCommand() { // public void execute() { // filter.setFocus(true); // } // }); this.setWidget(panel); }
From source file:com.edgenius.wiki.gwt.client.widgets.MessageWidget.java
License:Open Source License
/** * /*from w w w.j a v a 2 s . c o m*/ * Set simple text as message content. And message will disappear after timeout. * If timeout equals -1, it will always appear. * @param msg * @param timeout * @return message UUID */ private String show(String msg, int timeout, int type, boolean append, boolean allowClose) { Label msgLabel = new Label(msg); HorizontalPanel panel = new HorizontalPanel(); panel.add(msgLabel); return show(panel, timeout, type, append, allowClose); }
From source file:com.epam.feel.client.ui.util.gwtupload.FixedUploader.java
License:Apache License
protected Panel getUploaderPanel() { return new HorizontalPanel(); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.batch.ExportBatchClassView.java
License:Open Source License
/** * To get batch Folder List View./*from w w w. j av a 2 s . c om*/ * * @param propertyMap Map<String, String> */ public void getbatchFolderListView(Map<String, String> propertyMap) { HorizontalPanel horizontalPanel = new HorizontalPanel(); horizontalPanel.addStyleName("width100"); CheckBox checkBox = new CheckBox(propertyMap.get(BatchFolderListDTO.FOLDER_NAME)); checkBox.setName(propertyMap.get(BatchFolderListDTO.FOLDER_NAME)); checkBox.setFormValue(propertyMap.get(BatchFolderListDTO.FOLDER_NAME)); checkBox.setEnabled(Boolean.parseBoolean(propertyMap.get(BatchFolderListDTO.ENABLED))); checkBox.setChecked(Boolean.parseBoolean(propertyMap.get(BatchFolderListDTO.CHECKED))); horizontalPanel.add(checkBox); exportBatchClassViewPanel.add(horizontalPanel); }
From source file:com.ephesoft.dcma.gwt.admin.bm.client.view.BatchClassManagementView.java
License:Open Source License
/** * Constructor.//w w w . jav a 2s . c o m * * @param eventBus HandlerManager */ public BatchClassManagementView(HandlerManager eventBus) { super(); initWidget(BINDER.createAndBindUi(this)); editModulesPluginSelectView = new ConfigureModulesPluginSelectView(eventBus); addModuleView = new ConfigureModuleView(eventBus); editModulesPluginSelectViewLayoutPanel.add(editModulesPluginSelectView); addModulesViewLayoutPanel.add(addModuleView); Button edit = new Button(); copy = new Button(); Button delete = new Button(); Button export = new Button(); importButton = new Button(); bottomPanel.addStyleName("leftPadding"); bottomPanel.addStyleName("fullWidth"); edit.setText(AdminConstants.EDIT_BUTTON); copy.setText(AdminConstants.COPY_BUTTON); delete.setText(AdminConstants.DELETE_BUTTON); export.setText(AdminConstants.EXPORT_BUTTON); importButton.setText(AdminConstants.IMPORT_BUTTON); apply.setText(AdminConstants.APPLY_BUTTON); validate.setText(VALIDATE); validate.addStyleName(BUTTON_STYLE); buttonPanel = new HorizontalPanel(); buttonPanel.setWidth("100%"); buttonPanel.setSpacing(BatchClassManagementConstants.FIVE); buttonPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT); buttonPanel.setVerticalAlignment(HasAlignment.ALIGN_TOP); buttonPanel.add(export); buttonPanel.add(importButton); buttonPanel.add(edit); buttonPanel.setCellWidth(edit, "95%"); buttonPanel.add(new Label(BatchClassManagementConstants.EMPTY_STRING)); buttonPanel.add(copy); buttonPanel.add(new Label(BatchClassManagementConstants.EMPTY_STRING)); buttonPanel.add(delete); batchListPanel = new LayoutPanel(); batchClassListView = new BatchClassListView(); batchClassFieldListView = new BatchClassFieldListView(); batchListPanel.add(batchClassListView.listView); submit.setText(AdminConstants.SAVE_BUTTON); cancel.setText(AdminConstants.CANCEL_BUTTON); deploy.setText(AdminConstants.DEPLOY_BUTTON); learn.setText(AdminConstants.LEARN_FILES_BUTTON); sample.setText(AdminConstants.GENERATE_FOLDERS_BUTTON); learnDB.setText(AdminConstants.LEARN_DB_BUTTON); bottomButtons.setVisible(false); batchClassBreadCrumbView.setVisible(false); toggleDeployButtonEnable(false); edit.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { presenter.onEditButtonClicked(); } }); copy.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { String identifier = batchClassListView.listView.getSelectedRowIndex(); if (identifier == null || identifier.isEmpty()) { ConfirmationDialogUtil.showConfirmationDialogError( LocaleDictionary.get().getMessageValue(BatchClassManagementMessages.NO_RECORD_TO_COPY)); return; } final DialogBox dialogBox = new DialogBox(); final CopyBatchClassView copyBatchClassView = new CopyBatchClassView(); CopyBatchClassPresenter copyBatchClassPresenter = new CopyBatchClassPresenter( presenter.getController(), copyBatchClassView); copyBatchClassPresenter .setBatchClassDTO(presenter.getController().getBatchClassByIdentifier(identifier)); copyBatchClassView.setDialogBox(dialogBox); copyBatchClassPresenter.bind(); copyBatchClassPresenter.showBatchClassCopyView(); copyBatchClassView.getSaveButton().setFocus(true); } }); importButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { presenter.onImportButtonClicked(); } }); export.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { String identifier = batchClassListView.listView.getSelectedRowIndex(); if (identifier == null || identifier.isEmpty()) { ConfirmationDialogUtil.showConfirmationDialogError(LocaleDictionary.get() .getMessageValue(BatchClassManagementMessages.NO_RECORD_TO_EXPORT)); return; } presenter.onExportButtonClicked(identifier); } }); delete.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent arg0) { final String identifier = batchClassListView.listView.getSelectedRowIndex(); if (identifier == null || identifier.isEmpty()) { ConfirmationDialogUtil.showConfirmationDialogError(LocaleDictionary.get() .getMessageValue(BatchClassManagementMessages.NO_RECORD_TO_DELETE)); return; } final ConfirmationDialog confirmationDialog = ConfirmationDialogUtil.showConfirmationDialog( LocaleDictionary.get() .getMessageValue(BatchClassManagementMessages.DELETE_BATCH_CLASS_CONFORMATION), LocaleDictionary.get().getConstantValue( BatchClassManagementConstants.DELETE_BATCH_CLASS_TITLE), Boolean.FALSE); confirmationDialog.addDialogListener(new DialogListener() { @Override public void onOkClick() { confirmationDialog.hide(); presenter.onDeleteButtonClicked(identifier); } @Override public void onCancelClick() { confirmationDialog.hide(); } }); } }); }