Java Code Examples for com.smartgwt.client.widgets.Canvas#setWidth100()
The following examples show how to use
com.smartgwt.client.widgets.Canvas#setWidth100() .
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: ErrorHandler.java From proarc with GNU General Public License v3.0 | 4 votes |
/** * Notifies user about error. * @param msg simple client message * @param detailMsg detail response message; can be HTML * @param debugInfo request details, URL, ... */ private void warn(String msg, String detailMsg, String debugInfo) { if (msg == null) { msg = i18n.ErrorHandler_UnexpectedError_Msg(); } SmartGwtMessages sgi18n = ClientUtils.createSmartGwtMessages(); boolean allowDetail = !msg.equals(detailMsg); final Dialog d = new Dialog(); d.setTitle(sgi18n.dialog_WarnTitle()); d.setIsModal(true); d.setAutoSize(Boolean.FALSE); d.setMessage(msg); d.setIcon("[SKIN]warn.png"); d.setCanDragResize(true); d.setCanDragReposition(Boolean.TRUE); d.setKeepInParentRect(Boolean.TRUE); // d.setShowMaximizeButton(Boolean.TRUE); d.setMinMemberSize(50); Button details = new Button(i18n.ErrorHandler_ButtonDetalis_Title()); details.setVisible(allowDetail); d.setButtons(Dialog.OK, details); if (allowDetail) { Canvas errorPane = new Canvas(); errorPane.setOverflow(Overflow.AUTO); errorPane.setWidth100(); errorPane.setHeight100(); errorPane.setContents(detailMsg); errorPane.setCanSelectText(true); Canvas debugInfoPane = new Canvas(); debugInfoPane.setWidth100(); debugInfoPane.setAutoHeight(); debugInfoPane.setContents(debugInfo); debugInfoPane.setCanSelectText(true); final VLayout detailPane = new VLayout(4); detailPane.setLayoutMargin(4); detailPane.setGroupTitle(i18n.ErrorHandler_ButtonDetalis_Title()); detailPane.setIsGroup(true); detailPane.setVisible(false); detailPane.addMember(errorPane); detailPane.addMember(debugInfoPane); detailPane.setWidth100(); detailPane.setHeight100(); d.addItem(detailPane); details.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() { @Override public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) { if (detailPane.isVisible()) { d.restore(); } else { d.maximize(); } detailPane.setVisible(!detailPane.isVisible()); } }); } d.show(); }