Package com.google.gwt.event.shared

Examples of com.google.gwt.event.shared.EventBus


*
*/
public class FormDisplayController {

    public FormDisplayController(RootPanel formInfo, final RootPanel formDisplay) {
        EventBus eventBus = CommonGlobals.getInstance().getEventBus();
        FormBuilderService server = FormBuilderGlobals.getInstance().getService();
        FormEncodingFactory.register(FormEncodingClientFactory.getEncoder(), FormEncodingClientFactory.getDecoder());
        try {
            final String innerJson = formInfo.getElement().getInnerHTML();
            formInfo.getElement().setInnerHTML("");
            formInfo.getElement().getStyle().setHeight(1, Unit.PX);
            eventBus.addHandler(RepresentationFactoryPopulatedEvent.TYPE, new RepresentationFactoryPopulatedHandler() {
                @Override
                public void onEvent(RepresentationFactoryPopulatedEvent event) {
                    try {
                        JsonLoadInput input = JsonLoadInput.parse(innerJson);
                        if (input != null && input.getForm() != null) {
View Full Code Here


    private FBInplaceEditor getEditor() {
        return (FBInplaceEditor) getWidget();
    }

    public final void fireSelectionEvent(FormItemSelectionEvent event) {
        EventBus bus = CommonGlobals.getInstance().getEventBus();
        bus.fireEvent(event);
    }
View Full Code Here

                  @Override
                  public void execute() {
                      Map<String, Object> dataSnapshot = new HashMap<String, Object>();
                      dataSnapshot.put("menuItem", CustomMenuItem.this);
                      dataSnapshot.put("groupName", groupName);
                      final EventBus bus = CommonGlobals.getInstance().getEventBus();
                      bus.fireEvent(new UndoableEvent(dataSnapshot, new UndoableHandler() {
                          @Override
                          public void onEvent(UndoableEvent event) { }
                          @Override
                          public void undoAction(UndoableEvent event) {
                              FBMenuItem item = (FBMenuItem) event.getData("menuItem");
                              String group = (String) event.getData("groupName");
                              bus.fireEvent(new MenuItemAddedEvent(item, group));
                          }
                          @Override
                          public void doAction(UndoableEvent event) {
                              FBMenuItem item = (FBMenuItem) event.getData("menuItem");
                              String group = (String) event.getData("groupName");
                              bus.fireEvent(new MenuItemRemoveEvent(item, group));
                          }
                      }));
                      removePanel.hide();
                  }
              });
View Full Code Here

TOP

Related Classes of com.google.gwt.event.shared.EventBus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.