Examples of LayoutManager


Examples of com.vaadin.client.LayoutManager

    /**
     * Attaches resize listeners to the widget, caption and spacing elements
     */
    private void attachListeners() {
        if (getWidget() != null && layout.getLayoutManager() != null) {
            LayoutManager lm = layout.getLayoutManager();
            if (getCaptionElement() != null && captionResizeListener != null) {
                lm.addElementResizeListener(getCaptionElement(),
                        captionResizeListener);
            }
            if (widgetResizeListener != null) {
                lm.addElementResizeListener(getWidget().getElement(),
                        widgetResizeListener);
            }
            if (getSpacingElement() != null && spacingResizeListener != null) {
                lm.addElementResizeListener(getSpacingElement(),
                        spacingResizeListener);
            }

            if (BrowserInfo.get().isIE8()) {
                lm.addElementResizeListener(getWidget().getElement(),
                        ie8CaptionElementResizeUpdateListener);
            }
        }
    }
View Full Code Here

Examples of com.vaadin.client.LayoutManager

    /**
     * Detaches resize listeners from the widget, caption and spacing elements
     */
    private void detachListeners() {
        if (getWidget() != null && layout.getLayoutManager() != null) {
            LayoutManager lm = layout.getLayoutManager();
            if (getCaptionElement() != null && captionResizeListener != null) {
                lm.removeElementResizeListener(getCaptionElement(),
                        captionResizeListener);
            }
            if (widgetResizeListener != null) {
                lm.removeElementResizeListener(getWidget().getElement(),
                        widgetResizeListener);
            }
            // in many cases, the listener has already been removed by
            // setSpacing(false)
            if (getSpacingElement() != null && spacingResizeListener != null) {
                lm.removeElementResizeListener(getSpacingElement(),
                        spacingResizeListener);
            }

            if (BrowserInfo.get().isIE8()) {
                lm.removeElementResizeListener(getWidget().getElement(),
                        ie8CaptionElementResizeUpdateListener);
            }
        }
    }
View Full Code Here

Examples of com.vaadin.client.LayoutManager

             * where the spacer already exists onAttach will handle it.
             */
            getElement().getParentElement().insertBefore(spacer, getElement());
        } else if (!spacing && spacer != null) {
            // Remove listener before spacer to avoid memory leak
            LayoutManager lm = layout.getLayoutManager();
            if (lm != null && spacingResizeListener != null) {
                lm.removeElementResizeListener(spacer, spacingResizeListener);
            }

            spacer.removeFromParent();
            spacer = null;
        }
View Full Code Here

Examples of com.vaadin.client.LayoutManager

    @Override
    public void init() {
        super.init();
        VPanel panel = getWidget();
        LayoutManager layoutManager = getLayoutManager();

        layoutManager.registerDependency(this, panel.captionNode);
        layoutManager.registerDependency(this, panel.bottomDecoration);
        layoutManager.registerDependency(this, panel.contentNode);
    }
View Full Code Here

Examples of com.vaadin.client.LayoutManager

    }

    @Override
    public void onUnregister() {
        VPanel panel = getWidget();
        LayoutManager layoutManager = getLayoutManager();

        layoutManager.unregisterDependency(this, panel.captionNode);
        layoutManager.unregisterDependency(this, panel.bottomDecoration);
        layoutManager.unregisterDependency(this, panel.contentNode);
    }
View Full Code Here

Examples of com.vaadin.client.LayoutManager

    }

    void updateSizes() {
        VPanel panel = getWidget();

        LayoutManager layoutManager = getLayoutManager();
        Profiler.enter("PanelConnector.layout getHeights");
        int top = layoutManager.getOuterHeight(panel.captionNode);
        int bottom = layoutManager.getInnerHeight(panel.bottomDecoration);
        Profiler.leave("PanelConnector.layout getHeights");

        Profiler.enter("PanelConnector.layout modify style");
        Style style = panel.getElement().getStyle();
        panel.captionNode.getParentElement().getStyle()
View Full Code Here

Examples of edu.stanford.bmir.protege.web.client.ui.LayoutManager

     */
    public Project(ProjectDetails projectDetails, PermissionsSet permissionsForCurrentUser) {
        this.projectDetails = checkNotNull(projectDetails);
        this.permissionManager = new ProjectPermissionManager(getProjectId());
        this.permissionManager.setUserPermissions(Application.get().getUserId(), checkNotNull(permissionsForCurrentUser));
        this.layoutManager = new LayoutManager(this);
        this.eventPollingManager = EventPollingManager.get(10 * 1000, projectDetails.getProjectId());
        eventPollingManager.start();
    }
View Full Code Here

Examples of java.awt.LayoutManager

      super.setProperty(name, value);
   
  }

  public void recreateLayout() throws GUIException {
    LayoutManager manager = panel.getLayout();
    if (manager instanceof HIGLayout && !(this instanceof Group)) {
      /* Recreate the hig layout. Why is this needed? */
      HIGLayout layout = (HIGLayout) manager;
      HIGLayout newLayout = new HIGLayout(layout.getWidths(), layout.getHeights());
      for (int i=1; i<layout.getColumnWeights().length; i++)
View Full Code Here

Examples of java.awt.LayoutManager

            g2D.flush(true);
          }
        }
      });
    }
    JPanel canvasPanel = new JPanel(new LayoutManager() {
        public void addLayoutComponent(String name, Component comp) {
        }
       
        public void removeLayoutComponent(Component comp) {
        }
View Full Code Here

Examples of java.awt.LayoutManager

      alignment = Alignment.LEFT;
    }

    // set alignment
    if (value instanceof JPanel) {
      final LayoutManager layout = ((JPanel) value).getLayout();
      if (layout instanceof FlowLayout) {
        final FlowLayout flowLayout = (FlowLayout) layout;
        flowLayout.setAlignment(alignment.getFlowLayoutAlignment());
      }
    } else if (result instanceof JLabel) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.