Java Code Examples for com.smartgwt.client.widgets.IButton#setAutoFit()
The following examples show how to use
com.smartgwt.client.widgets.IButton#setAutoFit() .
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: PreviewPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 6 votes |
private void showReloadPanel() { IButton reloadButton = new IButton(I18N.message("reload")); reloadButton.setAutoFit(true); reloadButton.setSnapTo("C"); reloadButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { redraw(); } }); reload = new Canvas(); reload.setWidth100(); reload.setHeight100(); reload.setAlign(Alignment.CENTER); reload.addChild(reloadButton); addMember(reload); }
Example 2
Source File: ImportParentChooser.java From proarc with GNU General Public License v3.0 | 6 votes |
SelectionView(ClientMessages i18n) { this.i18n = i18n; setAutoHeight(); setIsGroup(true); setGroupTitle(i18n.ImportParentChooser_SelectionForm_Title()); setLayoutMargin(4); selection = new Canvas(); selection.setWidth100(); selection.setAutoHeight(); selection.setMargin(4); selection.setCanSelectText(Boolean.TRUE); clear = new IButton(i18n.ImportParentChooser_SelectionForm_Clear_Title()); clear.setTooltip(i18n.ImportParentChooser_SelectionForm_Clear_Hint()); clear.setAutoFit(Boolean.TRUE); setMembers(selection, clear); }
Example 3
Source File: OwnRulesListGrid.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
private Canvas createPublishRuleButton(final ListGridRecord ruleRecord) { IButton publishButton = new IButton(i18n.publishButton()); publishButton.setShowDown(false); publishButton.setShowRollOver(false); publishButton.setLayoutAlign(Alignment.CENTER); publishButton.setHeight(16); publishButton.setAutoFit(true); final boolean published = ruleRecord.getAttributeAsBoolean(PUBLISHED); if (published) { publishButton.setTitle(i18n.unpublishButton()); publishButton.setPrompt(i18n.cancelPublication()); } else { publishButton.setTitle(i18n.publishButton()); publishButton.setPrompt(i18n.publishThisRule()); } publishButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { String ruleName = ruleRecord.getAttribute(NAME); EventBus.getMainEventBus().fireEvent(new PublishRuleEvent(currentSession(), ruleName, !published, "USER")); } }); return publishButton; }
Example 4
Source File: FirewallPanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public FirewallPanel() { setWidth100(); setMembersMargin(5); setMargin(5); init(); Tab tab = new Tab(); tab.setTitle(I18N.message("firewall")); tab.setPane(form); TabSet tabs = new TabSet(); tabs.setWidth100(); tabs.setHeight100(); tabs.setTabs(tab); IButton save = new IButton(); save.setAutoFit(true); save.setTitle(I18N.message("save")); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); setMembers(tabs, save); }
Example 5
Source File: BruteForcePanel.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public BruteForcePanel() { super("bruteforceprevention"); IButton save = new IButton(); save.setAutoFit(true); save.setTitle(I18N.message("save")); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); addMember(save); SettingService.Instance.get().loadSettingsByNames( new String[] { "throttle.enabled", "throttle.username.max", "throttle.username.wait", "throttle.username.wait", "throttle.ip.max", "throttle.ip.wait" }, new AsyncCallback<GUIParameter[]>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIParameter[] params) { Map<String, String> p = new HashMap<String, String>(); for (GUIParameter par : params) p.put(par.getName(), par.getValue()); initForm(p); } }); }
Example 6
Source File: FillForm.java From document-management-software with GNU Lesser General Public License v3.0 | 5 votes |
public FillForm(GUIDocument frm) { setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("form") + " - " + Util.getBaseName(frm.getFileName())); setWidth(500); setHeight(400); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); IButton save = new IButton(); save.setTitle(I18N.message("save")); save.setAutoFit(true); save.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { onSave(); } }); HLayout buttonsBar = new HLayout(); buttonsBar.setWidth100(); buttonsBar.setHeight(25); buttonsBar.setMembers(save); propertiesPanel = new ExtendedPropertiesPanel(frm, null, true, true, false); VLayout layout = new VLayout(); layout.setMargin(3); layout.setMembersMargin(3); layout.setMembers(propertiesPanel, buttonsBar); addItem(layout); }
Example 7
Source File: ProgressTracker.java From proarc with GNU General Public License v3.0 | 5 votes |
public ProgressTracker(ClientMessages i18n) { this.i18n = i18n; widget = new VLayout(4); label = new Label(); label.setWidth100(); label.setAutoHeight(); progressbar = new Progressbar(); progressbar.setVertical(false); progressbar.setLength(400); progressbar.setBreadth(24); widget.setMembers(label, progressbar); widget.setWidth100(); widget.setAutoHeight(); progressPrefix = i18n.ProgressTracker_Progress_0(); closeBtn = new IButton(i18n.ProgressTracker_CloseBtn_Title(), new ClickHandler() { @Override public void onClick(ClickEvent event) { stop(); } }); closeBtn.setTooltip(i18n.ProgressTracker_CloseBtn_Hint()); closeBtn.setAutoFit(true); }
Example 8
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); } }); }