Java Code Examples for com.smartgwt.client.widgets.layout.HLayout#setMembersMargin()
The following examples show how to use
com.smartgwt.client.widgets.layout.HLayout#setMembersMargin() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GUIGridsPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
@Override public void onDraw() { ToolStrip toolbar = new ToolStrip(); toolbar.setWidth100(); ToolStripButton save = new ToolStripButton(I18N.message("save")); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); toolbar.addButton(save); SectionStack documentsStack = prepareDocumentsGrid(); SectionStack searchStack = prepareSearchGrid(); HLayout body = new HLayout(); body.setMembersMargin(3); body.setWidth100(); body.setHeight100(); body.setMembers(documentsStack, searchStack); setMembers(toolbar, body); }
Example 2
Source File: EditingTabSet.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public EditingTabSet(ClickHandler saveHandler, ClickHandler cancelHandler) { saveButton = new Button(I18N.message("save")); saveButton.setAutoFit(true); saveButton.setMargin(2); saveButton.addClickHandler(saveHandler); saveButton.setLayoutAlign(VerticalAlignment.CENTER); cancelButton = new Button(I18N.message("cancel")); cancelButton.setAutoFit(true); cancelButton.setMargin(2); cancelButton.setLayoutAlign(VerticalAlignment.CENTER); cancelButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { hideSave(); } }); if (cancelHandler != null) cancelButton.addClickHandler(cancelHandler); savePanel = new HLayout(); savePanel.setHeight(20); savePanel.setMembersMargin(5); savePanel.setStyleName("warn"); savePanel.setMembers(saveButton, cancelButton); savePanel.hide(); setTabBarControls(savePanel, TabBarControls.TAB_SCROLLER, TabBarControls.TAB_PICKER); }
Example 3
Source File: GoogleAuthenticatorSetup.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
private void init(String account, String key, String qrUrl) { // Prepare the form with account informations StaticTextItem accountItem = ItemFactory.newStaticTextItem("account", I18N.message("account"), account); accountItem.setWrap(false); accountItem.setWrapTitle(false); StaticTextItem keyItem = ItemFactory.newStaticTextItem("key", I18N.message("key"), key); keyItem.setWrap(false); keyItem.setWrapTitle(false); DynamicForm form = new DynamicForm(); form.setTitleOrientation(TitleOrientation.LEFT); form.setItems(accountItem, keyItem); Label formTitle = new Label("<b>" + I18N.message(Constants.TWOFA_GOOGLE_AUTHENTICATOR+".hint1") + "</b>"); formTitle.setWrap(true); formTitle.setMinWidth(250); VLayout formLayout = new VLayout(); formLayout.setMembersMargin(2); formLayout.setMembers(formTitle, form); formLayout.setAlign(VerticalAlignment.TOP); // Prepare the QR Code HTMLFlow qrCode = new HTMLFlow("<img width='200' height='200' src='" + qrUrl + "'/>"); qrCode.setOverflow(Overflow.VISIBLE); Label qrCodeTitle = new Label("<b>" + I18N.message(Constants.TWOFA_GOOGLE_AUTHENTICATOR+".hint2") + "</b>"); qrCodeTitle.setWrap(true); qrCodeTitle.setMinWidth(250); VLayout qrCodeLayout = new VLayout(); qrCodeLayout.setWidth100(); qrCodeLayout.setHeight100(); qrCodeLayout.setMembers(qrCodeTitle, qrCode); VLayout separator = new VLayout(); separator.setWidth(20); HLayout body = new HLayout(); body.setMembersMargin(2); body.setMembers(formLayout, separator, qrCodeLayout); setMembers(body); }
Example 4
Source File: TaskDetailsDialog.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public TaskDetailsDialog(final WorkflowDashboard dashboard, GUIWorkflow wfl, boolean readOnly) { this.workflow = wfl; this.workflowDashboard = dashboard; this.readOnly = readOnly; setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("workflow")); setWidth(700); setHeight(420); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); addCloseClickHandler(new CloseClickHandler() { @Override public void onCloseClick(CloseClickEvent event) { workflowDashboard.refresh(); destroy(); } }); tabs = new TabSet(); tabs.setWidth100(); tabs.setHeight100(); workflowTab = new Tab(I18N.message("workflow")); tabs.addTab(workflowTab, 0); buttonsPanel = new VLayout(); mainPanel = new HLayout(); mainPanel.setMembersMargin(5); mainPanel.setMembers(tabs, buttonsPanel); addItem(mainPanel); form = new HLayout(25); form.setMargin(20); form.setWidth100(); form.setHeight100(); sxLayout = new VLayout(10); appendedDocsPanel = new VLayout(5); appendedDocsPanel.setMargin(5); notesPanel = new VLayout(5); notesPanel.setMargin(5); reload(wfl); }
Example 5
Source File: SignatureDialog.java From document-management-software with GNU Lesser General Public License v3.0 | 4 votes |
public SignatureDialog(long[] docIds) { super(); this.docIds = docIds; setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("signature")); setCanDragResize(true); setIsModal(true); setShowModalMask(true); setAutoSize(true); centerInPage(); VLayout layout = new VLayout(); layout.setWidth100(); layout.setHeight(40); form.setValuesManager(vm); form.setWrapItemTitles(false); form.setTitleOrientation(TitleOrientation.TOP); form.setNumCols(2); TextItem reason = ItemFactory.newTextItem("reason", "reason", null); reason.setRequired(true); reason.setWrapTitle(false); reason.setWidth(250); reason.setAutoComplete(AutoComplete.NONE); visualPositioning = new CheckboxItem(); visualPositioning.setName("visualpositioning"); visualPositioning.setTitle(I18N.message("visualpositioning")); visualPositioning.setDisabled(true); form.setItems(reason, visualPositioning); IButton sign = new IButton(I18N.message("sign")); sign.setAutoFit(true); sign.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSign(); } }); HLayout buttons = new HLayout(); buttons.setMembersMargin(5); buttons.setMargin(3); buttons.addMember(sign); layout.addMember(form); layout.addMember(buttons); addItem(layout); SignService.Instance.get().isVisualSignatureEnabled(new AsyncCallback<Boolean>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(Boolean enabled) { visualPositioning.setDisabled(!enabled); } }); }