com.google.gwt.event.logical.shared.CloseHandler Java Examples

The following examples show how to use com.google.gwt.event.logical.shared.CloseHandler. 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: PropertiesPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchNewPropertyDialoge(String group) {

        propertyWindow = new DefaultWindow(Console.MESSAGES.createTitle("System Property"));
        propertyWindow.setWidth(480);
        propertyWindow.setHeight(360);
        propertyWindow.addCloseHandler(new CloseHandler<PopupPanel>() {
            @Override
            public void onClose(CloseEvent<PopupPanel> event) {

            }
        });

        propertyWindow.trapWidget(
                new NewPropertyWizard(this, group, true).asWidget()
        );

        propertyWindow.setGlassEnabled(true);
        propertyWindow.center();
    }
 
Example #2
Source File: WebPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchConnectorDialogue() {
    window = new DefaultWindow(Console.MESSAGES.createTitle("Connector"));
    window.setWidth(480);
    window.setHeight(400);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    window.trapWidget(
            new NewConnectorWizard(this, connectors, socketsBindingList).asWidget()
    );

    window.setGlassEnabled(true);
    window.center();
}
 
Example #3
Source File: MsgDestinationsPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchNewSecDialogue() {
    window = new DefaultWindow(Console.MESSAGES.createTitle("Security Setting"));
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    window.trapWidget(
            new NewSecurityPatternWizard(this, providerEntity).asWidget()
    );

    window.setGlassEnabled(true);
    window.center();
}
 
Example #4
Source File: MsgDestinationsPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchNewAddrDialogue() {
    window = new DefaultWindow(Console.MESSAGES.createTitle("Addressing Setting"));
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    window.trapWidget(
            new NewAddressPatternWizard(this, providerEntity).asWidget()
    );

    window.setGlassEnabled(true);
    window.center();
}
 
Example #5
Source File: MsgDestinationsPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchNewQueueDialogue() {
    window = new DefaultWindow(Console.MESSAGES.createTitle("JMS Queue"));
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    window.trapWidget(
            new NewQueueWizard(this).asWidget()
    );

    window.setGlassEnabled(true);
    window.center();
}
 
Example #6
Source File: MsgDestinationsPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchNewTopicDialogue() {
    window = new DefaultWindow(Console.MESSAGES.createTitle("JMS Topic"));
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    window.trapWidget(
            new NewTopicWizard(this).asWidget()
    );

    window.setGlassEnabled(true);
    window.center();
}
 
Example #7
Source File: StandaloneServerPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
private void showVersionInfo(String json)
{
    DefaultWindow window = new DefaultWindow("Management Model Versions");
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    TextArea textArea = new TextArea();
    textArea.setStyleName("fill-layout");
    textArea.setText(json);

    window.setWidget(textArea);

    window.setGlassEnabled(true);
    window.center();
}
 
Example #8
Source File: HostPropertiesPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
public void launchNewPropertyDialoge(String group) {

        propertyWindow = new DefaultWindow(Console.MESSAGES.newTitle("Host Property"));
        propertyWindow.setWidth(480);
        propertyWindow.setHeight(360);
        propertyWindow.addCloseHandler(new CloseHandler<PopupPanel>() {
            @Override
            public void onClose(CloseEvent<PopupPanel> event) {

            }
        });

        propertyWindow.trapWidget(
                new NewPropertyWizard(this, group, true).asWidget()
        );

        propertyWindow.setGlassEnabled(true);
        propertyWindow.center();
    }
 
Example #9
Source File: TopologyPresenter.java    From core with GNU Lesser General Public License v2.1 6 votes vote down vote up
private void showVersionInfo(String json) {
    DefaultWindow window = new DefaultWindow("Management Model Versions");
    window.setWidth(480);
    window.setHeight(360);
    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

        }
    });

    TextArea textArea = new TextArea();
    textArea.setStyleName("fill-layout");
    textArea.setText(json);

    window.setWidget(textArea);

    window.setGlassEnabled(true);
    window.center();
}
 
Example #10
Source File: Popup.java    From swellrt with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a popup.
 *
 * @param reference   reference element for the positioner
 * @param positioner  strategy for positioning the popup
 */
public Popup(Element reference, RelativePopupPositioner positioner) {
  this.reference = reference;
  this.positioner = positioner;
  popupPanel.addStyleName("editor-popup");
  popupPanel.setAnimationEnabled(true);
  popupPanel.addCloseHandler(new CloseHandler<PopupPanel>() {
    @Override
    public void onClose(CloseEvent<PopupPanel> event) {
      Popup.this.hide();
    }
  });
}
 
Example #11
Source File: Popup.java    From incubator-retired-wave with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a popup.
 *
 * @param reference   reference element for the positioner
 * @param positioner  strategy for positioning the popup
 */
public Popup(Element reference, RelativePopupPositioner positioner) {
  this.reference = reference;
  this.positioner = positioner;
  popupPanel.addStyleName("editor-popup");
  popupPanel.setAnimationEnabled(true);
  popupPanel.addCloseHandler(new CloseHandler<PopupPanel>() {
    @Override
    public void onClose(CloseEvent<PopupPanel> event) {
      Popup.this.hide();
    }
  });
}
 
Example #12
Source File: MaterialChip.java    From gwt-material with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerRegistration addCloseHandler(CloseHandler closeHandler) {
    return addHandler(closeHandler, CloseEvent.getType());
}
 
Example #13
Source File: DefaultTabLayoutPanel.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Override
public HandlerRegistration addCloseHandler(CloseHandler<Widget> handler) {
    return addHandler(handler, CloseEvent.getType());
}
 
Example #14
Source File: MainLayoutViewImpl.java    From core with GNU Lesser General Public License v2.1 4 votes vote down vote up
@Inject
public MainLayoutViewImpl(final Header header, Footer footer, MessageCenter messageCenter, PlaceManager placeManager) {

    this.messageCenter = messageCenter;
    this.header = header;
    this.placeManager = placeManager;

    mainContentPanel = new LayoutPanel();
    mainContentPanel.setStyleName("main-content-panel");
    mainContentPanel.addStyleName("animated");

    // see http://www.w3.org/TR/wai-aria/states_and_properties#aria-live
    mainContentPanel.getElement().setAttribute("role", "region");
    mainContentPanel.getElement().setAttribute("aria-live", "polite");
    mainContentPanel.getElement().setId("main-content-area");

    headerPanel = new LayoutPanel();
    headerPanel.setStyleName("header-panel");
    headerPanel.getElement().setId("header");

    footerPanel = new LayoutPanel();
    footerPanel.setStyleName("footer-panel");
    footerPanel.getElement().setId("footer");

    panel = new DockLayoutPanel(Style.Unit.PX);
    panel.getElement().setAttribute("id", "container");

    panel.addNorth(headerPanel, 80);
    panel.addSouth(footerPanel, 42);
    panel.add(mainContentPanel);

    getHeaderPanel().add(header.asWidget());
    getFooterPanel().add(footer.asWidget());

    // the application window
    window = new DefaultWindow("");
   // window.addStyleName("animated");

    window.addCloseHandler(new CloseHandler<PopupPanel>() {
        @Override
        public void onClose(CloseEvent<PopupPanel> event) {

            Console.getPlaceManager().revealRelativePlace(-1);
            // clearing the slot:
            // this is necessary to signal GWTP that the slot is not used
            // without subsequent attempts to reveal the same place twice would not succeed
            Scheduler.get().scheduleDeferred(new Scheduler.ScheduledCommand() {
                @Override
                public void execute() {
                    presenter.clearSlot(MainLayoutPresenter.TYPE_Popup);
                }
            });

           /* window.removeStyleName(ACTIVE_CSS);
            window.addStyleName(INACTIVE_CSS);*/
        }
    });

    window.setWidth(640);
    window.setHeight(480);
    window.setAutoHideOnHistoryEventsEnabled(true);
    //window.setGlassStyleName("application-panel-glass");
    window.setGlassEnabled(true);
}