Java Code Examples for com.smartgwt.client.widgets.layout.VLayout#setVisible()

The following examples show how to use com.smartgwt.client.widgets.layout.VLayout#setVisible() . 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: Legend.java    From SensorWebClient with GNU General Public License v2.0 5 votes vote down vote up
private void createExportMenu() {
    exportMenu = new VLayout();
    exportMenu.setLeft(exportButton.getAbsoluteLeft());
    exportMenu.setTop(30);
    exportMenu.setStyleName("n52_sensorweb_client_interactionmenu");
    exportMenu.setAutoHeight();
    exportMenu.setZIndex(1000000);
    exportMenu.addMember(createPDFLabel());
    exportMenu.addMember(createCSVLabel());
    exportMenu.setVisible(false);
}
 
Example 2
Source File: ErrorHandler.java    From proarc with GNU General Public License v3.0 4 votes vote down vote up
/**
     * 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();
    }