Package com.google.gwt.event.shared

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


     * to identify the view to show: If the path contains
     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppController(clientFactory,eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
            RootLayoutPanel.get().add(new StandaloneEditorManager(clientFactory, eventBus).getBaseLayout());
View Full Code Here


        if ( Window.Location.getPath().contains( "StandaloneEditor.html" ) ) {
            RootLayoutPanel.get().add( new StandaloneEditorManager().getBaseLayout() );
        } else {

            ClientFactory clientFactory = GWT.create( ClientFactory.class );
            EventBus eventBus = clientFactory.getEventBus();
            PlaceController placeController = clientFactory.getPlaceController();
            Perspective defaultPlace = new AuthorPerspectivePlace();

            perspectivesPanel = new PerspectivesPanel( clientFactory.getPerspectivesPanelView( hideTitle() ),
                                                       placeController );
View Full Code Here

     * to identify the view to show: If the path contains
     * "StandaloneEditor.html" then the StandaloneGuidedEditorManager is used to
     * render the view. If not, the default view is shown.
     */
    private void createMain() {
        EventBus eventBus = new SimpleEventBus();
        SuggestionCompletionCache.getInstance().setEventBus(eventBus);
        ClientFactory clientFactory = new ClientFactoryImpl(eventBus);
        appController = new AppControllerImpl(clientFactory, eventBus);

        if (Window.Location.getPath().contains("StandaloneEditor.html")) {
View Full Code Here

    } catch (NumberFormatException e) {
      RootPanel.get().add(new Label("employeeId is invalid"));
      return;
    }

    final EventBus eventBus = new SimpleEventBus();
    final ExpensesRequestFactory requestFactory = GWT.create(ExpensesRequestFactory.class);
    requestFactory.initialize(eventBus, new GaeAuthRequestTransport(eventBus));

    requestFactory.employeeRequest().findEmployee(employeeId).fire(
        new Receiver<EmployeeProxy>() {
View Full Code Here

    @Test
    public void testStart() throws Exception {

        AcceptItem acceptTabItem = mock( AcceptItem.class );
        EventBus eventBus = mock( EventBus.class );      
        startActivity( acceptTabItem, eventBus );

        verify( view ).init(
                place.getMultiViewRows().toArray( new MultiViewRow[place.getMultiViewRows().size()] ),
                clientFactory,
View Full Code Here

public class RunTimePerspectiveTest {

    @Test
    public void testAllBuildersExist() throws Exception {
        ClientFactory clientFactory = mock(ClientFactory.class);
        EventBus eventBus = mock(EventBus.class);
        Collection<NavigationItemBuilder> builders = new RunTimePerspective().getBuilders(clientFactory, eventBus);

        assertEquals(4, builders.size());
        assertTrue(builders.toArray()[0] instanceof TasksNavigationItemBuilder);
        assertTrue(builders.toArray()[1] instanceof ProcessesNavigationItemBuilder);
View Full Code Here

        resizable.setSize("" + widgetWidth + "px", "" + widgetHeight + "px");
    }
   
    protected void undoableEvent(ResizeEvent event, FBFormItem item) {
        Map<String, Object> dataSnapshot = new HashMap<String, Object>();
        EventBus bus = CommonGlobals.getInstance().getEventBus();
        dataSnapshot.put("item", item);
        dataSnapshot.put("oldWidth", item.getWidth());
        dataSnapshot.put("oldHeight", item.getHeight());
        dataSnapshot.put("newWidth", "" + event.getWidth() + "px");
        dataSnapshot.put("newHeight", "" + event.getHeight() + "px");
        bus.fireEvent(new UndoableEvent(dataSnapshot, new UndoableHandler() {
            @Override
            public void onEvent(UndoableEvent event) { /* do nothing */ }
            @Override
            public void undoAction(UndoableEvent event) {
                FBFormItem item = (FBFormItem) event.getData("item");
View Full Code Here

    private final UndoRedoManager mgr = UndoRedoManager.getInstance();
    private MenuItem item = null;
   
    public EditFormRedoCommand() {
        EventBus bus = CommonGlobals.getInstance().getEventBus();
        bus.addHandler(UndoableEvent.TYPE, new UndoableHandler() {
            @Override
            public void onEvent(UndoableEvent event) { 
                checkEnabled();
            }
            @Override
            public void doAction(UndoableEvent event) {  }
            @Override
            public void undoAction(UndoableEvent event) {  }
        });
        bus.addHandler(UndoRedoEvent.TYPE, new UndoRedoHandler() {
            @Override
            public void onEvent(UndoRedoEvent event) {
                checkEnabled();
            }
         });
View Full Code Here

            public void onClick(ClickEvent event) {
                Map<String, Object> dataSnapshot = new HashMap<String, Object>();
                dataSnapshot.put("labelBoxValue", labelBox.getValue());
                dataSnapshot.put("valueBoxValue", valueBox.getValue());
                dataSnapshot.put("item", getItem());
                EventBus bus = CommonGlobals.getInstance().getEventBus();
                bus.fireEvent(new UndoableEvent(dataSnapshot, new UndoableHandler() {
                    @Override
                    public void onEvent(UndoableEvent event) {  }
                    @Override
                    public void undoAction(UndoableEvent event) {
                        String label = (String) event.getData("labelBoxValue");
View Full Code Here

    private final UndoRedoManager mgr = UndoRedoManager.getInstance();
    private MenuItem item = null;
   
    public EditFormUndoCommand() {
        EventBus bus = CommonGlobals.getInstance().getEventBus();
        bus.addHandler(UndoableEvent.TYPE, new UndoableHandler() {
            @Override
            public void onEvent(UndoableEvent event) {
                checkEnabled();
            }
            @Override
            public void undoAction(UndoableEvent event) {   }
            @Override
            public void doAction(UndoableEvent event) {  }
        });
        bus.addHandler(UndoRedoEvent.TYPE, new UndoRedoHandler() {
            @Override
            public void onEvent(UndoRedoEvent event) {
                checkEnabled();
            }
        });
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.