Examples of Layout


Examples of com.vaadin.ui.Layout

    protected void attachField(Object propertyId, Field field) {
        if (propertyId == null || field == null) {
            return;
        }

        Layout layout = parentForm.getLayout();

        Field oldField = fields.get(propertyId);
        if (oldField != null) {
            layout.removeComponent(oldField);
        }

        fields.put(propertyId, field);

        if (layout instanceof CustomLayout) {
            ((CustomLayout) layout).addComponent(field, propertyId.toString());
        } else {
            layout.addComponent(field);
        }
    }
View Full Code Here

Examples of com.vaadin.ui.Layout

    }

    private Layout getLayout(String caption,
            Class<? extends Layout> layoutClass, String width) {
        Layout l;
        if (layoutClass == VerticalLayout.class) {
            if (verticalLayout == null) {
                verticalLayout = new VerticalLayout();
                verticalLayout.setStyleName("borders");
            }
            l = verticalLayout;
        } else if (layoutClass == HorizontalLayout.class) {
            if (horizontalLayout == null) {
                horizontalLayout = new HorizontalLayout();
                horizontalLayout.setStyleName("borders");
            }
            l = horizontalLayout;
        } else if (layoutClass == GridLayout.class) {
            if (gridLayout == null) {
                gridLayout = new GridLayout();
                gridLayout.setStyleName("borders");
            }
            l = gridLayout;
        } else if (layoutClass == CssLayout.class) {
            if (cssLayout == null) {
                cssLayout = new CssLayout();
                cssLayout.setStyleName("borders");
            }
            l = cssLayout;
        } else if (layoutClass == FormLayout.class) {
            if (formLayout == null) {
                formLayout = new FormLayout();
                formLayout.setStyleName("borders");
            }
            l = formLayout;
        } else {
            return null;
        }

        l.setCaption(caption);
        if (width.equals("auto")) {
            width = null;
        }

        l.setWidth(width);

        // addComponent(l);

        return l;
    }
View Full Code Here

Examples of com.volantis.mcs.layouts.Layout

            // Retrieve the layout type - canvas, montage or null.
            InternalLayoutContentBuilder content =
                    (InternalLayoutContentBuilder) getModelContent();
            LayoutType layoutType = null;
            if (content != null) {
                Layout layout = content.getLayout();
                if (layout != null) {
                    layoutType = layout.getType();
                }
            }

            if (layoutType == LayoutType.CANVAS) {
                // The variant is a canvas layout - disable montage controls
View Full Code Here

Examples of de.javakaffee.msm.bench.component.Layout

    private static final long serialVersionUID = 1L;

    private final Layout _border;

    public BasePage() {
        _border = new Layout( "border" );
        super.add( _border );
    }
View Full Code Here

Examples of edu.uci.ics.jung.algorithms.layout.Layout

    //add restart button
    JButton scramble = new JButton("Restart");
    scramble.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        Layout layout = vv.getGraphLayout();
        layout.initialize();
        Relaxer relaxer = vv.getModel().getRelaxer();
        if(relaxer != null) {
          relaxer.stop();
          relaxer.prerelax();
          relaxer.relax();
View Full Code Here

Examples of edu.uci.ics.jung.visualization.Layout

        VisualizationViewer vv = (VisualizationViewer)e.getSource();
        PickSupport pickSupport = vv.getPickSupport();
        PickedState pickedState = vv.getPickedState();

        if(pickSupport != null && pickedState != null) {
            Layout layout = vv.getGraphLayout();
            if(e.getModifiers() == getModifiers()) {
                vv.addPostRenderPaintable(lensPaintable);
                rect.setFrameFromDiagonal(down,down);
                // p is the screen point for the mouse event
                Point2D p = e.getPoint();
                // take away the view transform
                Point2D ip = vv.inverseViewTransform(p);
               
                vertex = pickSupport.getVertex(ip.getX(), ip.getY());
                if(vertex != null) {
                    if(pickedState.isPicked(vertex) == false) {
                        pickedState.clearPickedVertices();
                        pickedState.pick(vertex, true);
                        vv.fireStateChanged();
                    }
                    // layout.getLocation applies the layout transformer so
                    // q is transformed by the layout transformer only
                    Point2D q = layout.getLocation(vertex);
                    // transform the mouse point to graph coordinate system
                    Point2D gp = vv.inverseLayoutTransform(ip);

                    offsetx = (float) (gp.getX()-q.getX());
                    offsety = (float) (gp.getY()-q.getY());
                } else if(isPickingEdges() &&
                        (edge = pickSupport.getEdge(ip.getX(), ip.getY())) != null) {
                    pickedState.clearPickedEdges();
                    pickedState.pick(edge, true);
                } else {
                    pickedState.clearPickedEdges();
                    pickedState.clearPickedVertices();
                    vv.fireStateChanged();
                }
               
            } else if(e.getModifiers() == (addToSelectionModifiers)) {
                vv.addPostRenderPaintable(lensPaintable);
                rect.setFrameFromDiagonal(down,down);
                Point2D p = e.getPoint();
                // remove view transform
                Point2D ip = vv.inverseViewTransform(p);
                vertex = pickSupport.getVertex(ip.getX(), ip.getY());
                if(vertex != null) {
                    boolean wasThere = pickedState.pick(vertex, !pickedState.isPicked(vertex));
                    if(wasThere) {
                        vertex = null;
                    } else {
                        // layout.getLocation applies the layout transformer so
                        // q is transformed by the layout transformer only
                        Point2D q = layout.getLocation(vertex);
                        // translate mouse point to graph coord system
                        Point2D gp = vv.inverseLayoutTransform(ip);

                        offsetx = (float) (gp.getX()-q.getX());
                        offsety = (float) (gp.getY()-q.getY());
View Full Code Here

Examples of jp.co.nskint.uq.pd.signage.model.Layout

            if(manager == null) {
                errors.put("page", "指定されたマネージャは存在しません。");
                return forward("/error.jsp");
            }

            Layout layout = null;
            LayoutXml layoutXml = null;
            // 新規登録の場合
            if(lid < 1) {
                layout = new Layout();
                layoutXml = new LayoutXml();
                layoutXml.setName(DEFAULT_NAME);
                layoutXml.setHeight(DEFAULT_HEIGHT);
                layoutXml.setWidth(DEFAULT_WIDTH);
            }
            // 更新の場合
            else {
                layout = lService.get(manager, lid);

                // レイアウトXMLを取得
                if(layout != null) {
                    layoutXml = layout.getXmlModel();
                }
                else {
                    layoutXml = new LayoutXml();
                }
            }
View Full Code Here

Examples of name.shamansir.mvp4glayout.client.ui.widget.Layout

        unregisterHandlers();
       
        view.beforePortalChange(portal);
       
        currentBuilder = builder;
        final Layout layoutBuilt = builder.build(state);
        if (!portal.layout.equals(layoutBuilt.id())) {
            throw new IllegalArgumentException("Layout of passed portal (" + portal + " - " + portal.layout + ") does not matches " +
                                               "the passed layout built (" +  layoutBuilt.id() + ")");         
        }
        // currentBuilder = builder; // TODO: may be it must be here
       
        view.switchLayout(layoutBuilt);
        subscribePageEvents(layoutBuilt);
View Full Code Here

Examples of net.sf.gwtseam.model.Layout

 
  private class CreateLayout extends StartCommand
  {
    public void execute()
    {
      currentLayout = new Layout ();
      currentLayout.setForm(getAttributes().getValue("form"));
      currentLayout.setName(getAttributes().getValue("name"));
    }
View Full Code Here

Examples of net.sf.jabref.export.layout.Layout

  public String layout(String layoutFile, String entry) throws Exception {

    BibtexEntry be = bibtexString2BibtexEntry(entry);
    StringReader sr = new StringReader(layoutFile.replaceAll("__NEWLINE__", "\n"));
    Layout layout = new LayoutHelper(sr).getLayoutFromText(Globals.FORMATTER_PACKAGE);
    StringBuffer sb = new StringBuffer();
    sb.append(layout.doLayout(be, null));

    return sb.toString();
  }
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.