Package com.vaadin.ui

Examples of com.vaadin.ui.Layout$AlignmentHandler


    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


        }

    }

    private static boolean hasNonRelativeWidthComponent(Form form) {
        Layout layout = form.getLayout();
        Layout footer = form.getFooter();

        if (layout != null && !hasRelativeWidth(layout)) {
            return true;
        }
        if (footer != null && !hasRelativeWidth(footer)) {
View Full Code Here

            ReservationsDB.Resource.PROPERTY_ID_DESCRIPTION).getValue();
        final Button rButton = new Button(name, this);
        rButton.setStyleName("link");
        rButton.setDescription(description);
        rButton.setData(resource);
        Layout resourceLayout = categoryLayouts.get(category);
        LinkedList<Item> resourceList = categoryResources.get(category);
        if (resourceLayout == null) {
          resourceLayout = new VerticalLayout();
          resourceLayout.setSizeUndefined();
          resourceLayout.setMargin(true);
          addComponent(resourceLayout);
          categoryLayouts.put(category, resourceLayout);
          resourceList = new LinkedList<Item>();
          categoryResources.put(category, resourceList);
          final Button cButton = new Button(category + " (any)", this);
          cButton.setStyleName("important-link");
          cButton.setData(category);
          resourceLayout.addComponent(cButton);
        }
        resourceLayout.addComponent(rButton);
        resourceList.add(resource);
      }
    }
  }
View Full Code Here

  // Selects one initial category, in practice randomly
  public void selectFirstCategory() {
    try {
      final String catId = categoryResources.keySet().iterator().next();
      final LinkedList<Item> res = categoryResources.get(catId);
      final Layout l = categoryLayouts.get(catId);
      final Button catB = (Button) l.getComponentIterator().next();
      setSelectedResources(res);
      catB.setStyleName("selected-link");
    } catch (final Exception e) {
      e.printStackTrace(System.err);
    }
View Full Code Here

  }

  private void resetStyles() {
    for (final Iterator<Layout> it = categoryLayouts.values().iterator(); it
        .hasNext();) {
      final Layout lo = it.next();
      for (final Iterator<?> bit = lo.getComponentIterator(); bit
          .hasNext();) {
        final Button b = (Button) bit.next();
        if (b.getData() instanceof Item) {
          b.setStyleName("link");
        } else {
View Full Code Here

        }

    }

    private static boolean hasNonRelativeWidthComponent(Form form) {
        Layout layout = form.getLayout();
        Layout footer = form.getFooter();

        if (layout != null && !hasRelativeWidth(layout)) {
            return true;
        }
        if (footer != null && !hasRelativeWidth(footer)) {
View Full Code Here

        }

    }

    private static boolean hasNonRelativeWidthComponent(Form form) {
        Layout layout = form.getLayout();
        Layout footer = form.getFooter();

        if (layout != null && !hasRelativeWidth(layout)) {
            return true;
        }
        if (footer != null && !hasRelativeWidth(footer)) {
View Full Code Here

        }

    }

    private static boolean hasNonRelativeWidthComponent(Form form) {
        Layout layout = form.getLayout();
        Layout footer = form.getFooter();

        if (layout != null && !hasRelativeWidth(layout)) {
            return true;
        }
        if (footer != null && !hasRelativeWidth(footer)) {
View Full Code Here

        }

    }

    private static boolean hasNonRelativeWidthComponent(Form form) {
        Layout layout = form.getLayout();
        Layout footer = form.getFooter();

        if (layout != null && !hasRelativeWidth(layout)) {
            return true;
        }
        if (footer != null && !hasRelativeWidth(footer)) {
View Full Code Here

        }

    }

    private static boolean hasNonRelativeWidthComponent(Form form) {
        Layout layout = form.getLayout();
        Layout footer = form.getFooter();

        if (layout != null && !hasRelativeWidth(layout)) {
            return true;
        }
        if (footer != null && !hasRelativeWidth(footer)) {
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Layout$AlignmentHandler

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.