Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.HasWidgets


    public abstract HasWidgets getPanel();

    public HasWidgets getUnderlyingLayout(int x, int y) {
        for (FBFormItem item : items) {
            if (item instanceof LayoutFormItem) {
                HasWidgets newLayout = ((LayoutFormItem) item)
                        .getUnderlyingLayout(x, y);
                if (newLayout != null) {
                    return newLayout;
                }
            }
View Full Code Here


            @Override
            public void undoAction(UndoableEvent event) {
                FBFormItem formItem = (FBFormItem) event.getData("formItem");
                Integer x = (Integer) event.getData("x");
                Integer y = (Integer) event.getData("y");
                HasWidgets panel = layoutView.getUnderlyingLayout(x, y);
                panel.remove(formItem);
                bus.fireEvent(new FormItemRemovedEvent(formItem));
            }
            @Override
            public void doAction(UndoableEvent event) {
                FBFormItem formItem = (FBFormItem) event.getData("formItem");
                FBMenuItem menuItem = (FBMenuItem) event.getData("menuItem");
                Integer x = (Integer) event.getData("x");
                Integer y = (Integer) event.getData("y");
                if (formItem != null) {
                    HasWidgets panel = layoutView.getUnderlyingLayout(x, y);
                    if (panel instanceof FBForm) {
                        FBForm formDisplay = (FBForm) panel;
                        formDisplay.remove(menuItem);
                        formDisplay.replacePhantom(formItem);
                    } else {
View Full Code Here

            @Override
            public void undoAction(UndoableEvent event) {
                FBFormItem formItem = (FBFormItem) event.getData("formItem");
                Integer x = (Integer) event.getData("x");
                Integer y = (Integer) event.getData("y");
                HasWidgets panel = layoutView.getUnderlyingLayout(x, y);
                panel.remove(formItem);
                bus.fireEvent(new FormItemRemovedEvent(formItem));
                Integer oldX = (Integer) event.getData("oldMovableX");
                Integer oldY = (Integer) event.getData("oldMovableY");
                HasWidgets panel2 = layoutView.getUnderlyingLayout(oldX, oldY);
                panel2.add(formItem);
                bus.fireEvent(new FormItemAddedEvent(formItem, (Widget) panel2));
            }
            @Override
            public void doAction(UndoableEvent event) {
                FBFormItem formItem = (FBFormItem) event.getData("formItem");
                MovablePanel movable = (MovablePanel) event.getData("movable");
                Integer x = (Integer) event.getData("x");
                Integer y = (Integer) event.getData("y");
                if (formItem != null) {
                    bus.fireEvent(new FormItemRemovedEvent(formItem));
                    HasWidgets dropContainer = layoutView.getUnderlyingLayout(x, y);
                    Widget previousContainer = formItem.getParent();
                    if (previousContainer instanceof FBForm) {
                        FBForm formDisplay = (FBForm) previousContainer;
                        formDisplay.remove(movable);
                        formDisplay.remove(formItem);
View Full Code Here

        int x = context.mouseX;
        int y = context.mouseY;
        if (drag != null && (
                drag instanceof FBMenuItem //when you add a component from the menu
                || drag instanceof MovablePanel)) { //when you move an already dropped element
            HasWidgets panel = layoutView.getUnderlyingLayout(x, y);
            if (panel instanceof FBCompositeItem) {
                FBCompositeItem container = (FBCompositeItem) panel;
                phantoms.add(new PhantomPanel(container, x, y));
            } else if (((Widget) panel).getParent() instanceof FBCompositeItem) {
                FBCompositeItem container = (FBCompositeItem) ((Widget) panel).getParent();
View Full Code Here

    @Override
    public HasWidgets getUnderlyingLayout(Integer x, Integer y) {
        for (Widget widget : formDisplay) {
            if (widget instanceof LayoutFormItem) {
                LayoutFormItem item = (LayoutFormItem) widget;
                HasWidgets newLayout = item.getUnderlyingLayout(x, y);
                if (newLayout != null) {
                    return newLayout;
                }
            }
        }
View Full Code Here

                Object oldMemory = event.getData("oldMemory");
                Widget oldParent = (Widget) event.getData("oldItemParent");
                AbstractCopyPasteCommand.setMemory(oldMemory);
                CommonGlobals.getInstance().paste().enable();
                if (oldParent instanceof HasWidgets) {
                    HasWidgets oldParentPanel = (HasWidgets) oldParent;
                    oldParentPanel.add(item);
                } else if (oldParent instanceof HasOneWidget) {
                    HasOneWidget oldParentPanel = (HasOneWidget) oldParent;
                    oldParentPanel.setWidget(item);
                }
                bus.fireEvent(new FormItemAddedEvent(item, oldParent));
            }
            @Override
            public void onEvent(UndoableEvent event) { }
View Full Code Here

                    if (child instanceof ContainerResizedListener) {
                        ((ContainerResizedListener) child).iLayout();
                    }

                    if (child instanceof HasWidgets) {
                        final HasWidgets childContainer = (HasWidgets) child;
                        internalRunDescendentsLayout(childContainer);
                    }
                }
            } else if (child instanceof HasWidgets) {
                // propagate over non Paintable HasWidgets
View Full Code Here

      addHandlerIfNotNull(l, firebug);
      Handler system = GWT.create(SystemLogHandler.class);
      addHandlerIfNotNull(l, system);
      Handler remote = GWT.create(SimpleRemoteLogHandler.class);
      addHandlerIfNotNull(l, remote);
      HasWidgets loggingWidget = GWT.create(LoggingPopup.class);
      if (!(loggingWidget instanceof NullLoggingPopup)) {
        addHandlerIfNotNull(l, new HasWidgetsLogHandler(loggingWidget));
      }
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.HasWidgets

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.