Examples of Padding


Examples of com.eagerlogic.cubee.client.style.styles.Padding

                }

                @Override
                public Integer calculate() {
                    int res = clientWidthProperty().get();
                    Padding padding = textBox.paddingProperty().get();
                    Border border = textBox.borderProperty().get();
                    if (padding != null) {
                        res = res - padding.getLeftPadding() - padding.getRightPadding();
                    }
                    if (border != null) {
                        res = res - border.getLeftBorderSize() - border.getRightBorderSize();
                    }
                    return res;
                }
            });
            textBox.heightProperty().bind(new AExpression<Integer>() {
               
                {
                    bind(clientHeightProperty(), textBox.paddingProperty(), textBox.borderProperty());
                }

                @Override
                public Integer calculate() {
                    int res = clientHeightProperty().get();
                    Padding padding = textBox.paddingProperty().get();
                    Border border = textBox.borderProperty().get();
                    if (padding != null) {
                        res = (res - padding.getTopPadding()) - padding.getBottomPadding();
                    }
                    if (border != null) {
                        res = (res - border.getTopBorderSize()) - border.getBottomBorderSize();
                    }
                    return res;
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

    if (rendered) {
      if (buttonEl.selectNode("img") != null) {
        buttonEl.selectNode("img").remove();
      }
      if (icon != null) {
        buttonEl.setPadding(new Padding(7, 0, 7, 28));
        Element e = (Element) icon.createElement().cast();
        buttonEl.insertFirst(e);
        El.fly(e).makePositionable(true);
        String align = "b-b";
        if (getIconAlign() == IconAlign.BOTTOM) {
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

  public void setIcon(AbstractImagePrototype icon) {
    if (rendered) {
      El oldIcon = buttonEl.selectNode(".x-taskbutton-icon");
      if (oldIcon != null) {
        oldIcon.remove();
        buttonEl.setPadding(new Padding(7, 0, 7, 0));
      }
      if (icon != null) {
        buttonEl.setPadding(new Padding(7, 0, 7, 20));
        Element e = (Element) icon.createElement().cast();
        e.setClassName("x-taskbutton-icon");
        buttonEl.insertFirst(e);
        El.fly(e).makePositionable(true);
        String align = "b-b";
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

    panel.setLayout(new BorderLayout());

    lcwest = new ContentPanel();
    lcwest.setHeaderVisible(false);
    VBoxLayout westLayout = new VBoxLayout();
    westLayout.setPadding(new Padding(5));
    westLayout.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCH);
    lcwest.setLayout(westLayout);
    BorderLayoutData west = new BorderLayoutData(LayoutRegion.WEST, 150, 100, 250);
    west.setMargins(new Margins(5));
    west.setSplit(true);

    panel.add(lcwest, west);

    lccenter = new ContentPanel();
    lccenter.setHeaderVisible(false);
    lccenter.setLayout(new FitLayout());
    lccenter.add(new Html(
        "<p style=\"padding:10px;color:#556677;font-size:11px;\">Select a configuration on the left</p>"));
    BorderLayoutData center = new BorderLayoutData(LayoutRegion.CENTER);
    center.setMargins(new Margins(5));
    panel.add(lccenter, center);

    VBoxLayoutData vBoxData = new VBoxLayoutData(5, 5, 5, 5);
    vBoxData.setFlex(1);

    lcwest.add(createToggleButton("Spaced", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.LEFT);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        VBoxLayoutData flex = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        flex.setFlex(1);
        c.add(new Text(), flex);
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Multi-Spaced", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.LEFT);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        VBoxLayoutData flex = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        flex.setFlex(1);
        c.add(new Text(), flex);
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Text(), flex);
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Text(), flex);
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: left", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.LEFT);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: center", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: right", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.RIGHT);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: stretch", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCH);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: stretchmax", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCHMAX);
        c.setLayout(layout);

        c.add(new Button(button1Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button2Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button3Text), new VBoxLayoutData(new Margins(0, 0, 5, 0)));
        c.add(new Button(button4Text), new VBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Flex: All even", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
        c.setLayout(layout);

        VBoxLayoutData flex = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        flex.setFlex(1);
        c.add(new Button(button1Text), flex);
        c.add(new Button(button2Text), flex);
        c.add(new Button(button3Text), flex);

        VBoxLayoutData flex2 = new VBoxLayoutData(new Margins(0));
        flex2.setFlex(1);
        c.add(new Button(button4Text), flex2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Flex: ratio", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
        c.setLayout(layout);

        VBoxLayoutData flex = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        flex.setFlex(1);
        c.add(new Button(button1Text), flex);
        c.add(new Button(button2Text), flex);
        c.add(new Button(button3Text), flex);

        VBoxLayoutData flex2 = new VBoxLayoutData(new Margins(0));
        flex2.setFlex(3);
        c.add(new Button(button4Text), flex2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Flex + Stretch", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCH);
        c.setLayout(layout);

        VBoxLayoutData flex = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        flex.setFlex(1);
        c.add(new Button(button1Text), flex);
        c.add(new Button(button2Text), flex);
        c.add(new Button(button3Text), flex);

        VBoxLayoutData flex2 = new VBoxLayoutData(new Margins(0));
        flex2.setFlex(3);
        c.add(new Button(button4Text), flex2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Pack: start", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
        layout.setPack(BoxLayoutPack.START);
        c.setLayout(layout);

        VBoxLayoutData layoutData = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        c.add(new Button(button1Text), layoutData);
        c.add(new Button(button2Text), layoutData);
        c.add(new Button(button3Text), layoutData);

        VBoxLayoutData layoutData2 = new VBoxLayoutData(new Margins(0));
        c.add(new Button(button4Text), layoutData2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Pack: center", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
        layout.setPack(BoxLayoutPack.CENTER);
        c.setLayout(layout);

        VBoxLayoutData layoutData = new VBoxLayoutData(new Margins(0, 0, 5, 0));
        c.add(new Button(button1Text), layoutData);
        c.add(new Button(button2Text), layoutData);
        c.add(new Button(button3Text), layoutData);

        VBoxLayoutData layoutData2 = new VBoxLayoutData(new Margins(0));
        c.add(new Button(button4Text), layoutData2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Pack: end", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        VBoxLayout layout = new VBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
        layout.setPack(BoxLayoutPack.END);
        c.setLayout(layout);

        VBoxLayoutData layoutData = new VBoxLayoutData(new Margins(0, 0, 5, 0));
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

    panel.setLayout(new BorderLayout());

    lcwest = new ContentPanel();
    lcwest.setHeaderVisible(false);
    VBoxLayout westLayout = new VBoxLayout();
    westLayout.setPadding(new Padding(5));
    westLayout.setVBoxLayoutAlign(VBoxLayoutAlign.STRETCH);
    lcwest.setLayout(westLayout);
    BorderLayoutData west = new BorderLayoutData(LayoutRegion.WEST, 150, 100, 250);
    west.setMargins(new Margins(5));
    west.setSplit(true);

    panel.add(lcwest, west);

    lccenter = new ContentPanel();
    lccenter.setHeaderVisible(false);
    lccenter.setLayout(new FitLayout());
    lccenter.add(new Html(
        "<p style=\"padding:10px;color:#556677;font-size:11px;\">Select a configuration on the left</p>"));
    BorderLayoutData center = new BorderLayoutData(LayoutRegion.CENTER);
    center.setMargins(new Margins(5));
    panel.add(lccenter, center);

    VBoxLayoutData vBoxData = new VBoxLayoutData(5, 5, 5, 5);
    vBoxData.setFlex(1);

    lcwest.add(createToggleButton("Spaced", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }

        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.TOP);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        flex.setFlex(1);
        c.add(new Text(), flex);
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Multi-Spaced", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.TOP);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        flex.setFlex(1);
        c.add(new Text(), flex);
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Text(), flex);
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Text(), flex);
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: top", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.TOP);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: middle", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: bottom", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.BOTTOM);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: stretch", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.STRETCH);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Align: stretchmax", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.STRETCHMAX);
        c.setLayout(layout);

        c.add(new Button(button1Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button2Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button3Text), new HBoxLayoutData(new Margins(0, 5, 0, 0)));
        c.add(new Button(button4Text), new HBoxLayoutData(new Margins(0)));

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Flex: All even", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
        c.setLayout(layout);

        HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        flex.setFlex(1);
        c.add(new Button(button1Text), flex);
        c.add(new Button(button2Text), flex);
        c.add(new Button(button3Text), flex);

        HBoxLayoutData flex2 = new HBoxLayoutData(new Margins(0));
        flex2.setFlex(1);
        c.add(new Button(button4Text), flex2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Flex: ratio", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
        c.setLayout(layout);

        HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        flex.setFlex(1);
        c.add(new Button(button1Text), flex);
        c.add(new Button(button2Text), flex);
        c.add(new Button(button3Text), flex);

        HBoxLayoutData flex2 = new HBoxLayoutData(new Margins(0));
        flex2.setFlex(3);
        c.add(new Button(button4Text), flex2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Flex + Stretch", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.STRETCH);
        c.setLayout(layout);

        HBoxLayoutData flex = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        flex.setFlex(1);
        c.add(new Button(button1Text), flex);
        c.add(new Button(button2Text), flex);
        c.add(new Button(button3Text), flex);

        HBoxLayoutData flex2 = new HBoxLayoutData(new Margins(0));
        flex2.setFlex(3);
        c.add(new Button(button4Text), flex2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Pack: start", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
        layout.setPack(BoxLayoutPack.START);
        c.setLayout(layout);

        HBoxLayoutData layoutData = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        c.add(new Button(button1Text), layoutData);
        c.add(new Button(button2Text), layoutData);
        c.add(new Button(button3Text), layoutData);

        HBoxLayoutData layoutData2 = new HBoxLayoutData(new Margins(0));
        c.add(new Button(button4Text), layoutData2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Pack: center", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
        layout.setPack(BoxLayoutPack.CENTER);
        c.setLayout(layout);

        HBoxLayoutData layoutData = new HBoxLayoutData(new Margins(0, 5, 0, 0));
        c.add(new Button(button1Text), layoutData);
        c.add(new Button(button2Text), layoutData);
        c.add(new Button(button3Text), layoutData);

        HBoxLayoutData layoutData2 = new HBoxLayoutData(new Margins(0));
        c.add(new Button(button4Text), layoutData2);

        addToCenter(c);
      }

    }), vBoxData);

    lcwest.add(createToggleButton("Pack: end", new Listener<ButtonEvent>() {

      public void handleEvent(ButtonEvent ce) {
        if (!ce.<ToggleButton> getComponent().isPressed()) {
          return;
        }
        LayoutContainer c = new LayoutContainer();
        HBoxLayout layout = new HBoxLayout();
        layout.setPadding(new Padding(5));
        layout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
        layout.setPack(BoxLayoutPack.END);
        c.setLayout(layout);

        HBoxLayoutData layoutData = new HBoxLayoutData(new Margins(0, 5, 0, 0));
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

    if (rendered) {
      if (buttonEl.selectNode("img") != null) {
        buttonEl.selectNode("img").remove();
      }
      if (icon != null) {
        buttonEl.setPadding(new Padding(7, 0, 7, 28));
        Element e = (Element) icon.createElement().cast();
        buttonEl.insertFirst(e);
        El.fly(e).makePositionable(true);
        String align = "b-b";
        if (getIconAlign() == IconAlign.BOTTOM) {
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

  public void setIcon(AbstractImagePrototype icon) {
    if (rendered) {
      El oldIcon = buttonEl.selectNode(".x-taskbutton-icon");
      if (oldIcon != null) {
        oldIcon.remove();
        buttonEl.setPadding(new Padding(7, 0, 7, 0));
      }
      if (icon != null) {
        buttonEl.setPadding(new Padding(7, 0, 7, 20));
        Element e = (Element) icon.createElement().cast();
        e.setClassName("x-taskbutton-icon");
        buttonEl.insertFirst(e);
        El.fly(e).makePositionable(true);
        String align = "b-b";
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

        viewport = new Viewport();
        viewport.setLayout(new RowLayout(Orientation.VERTICAL));
        // title panel
        topPanel = new ContentPanel();
        HBoxLayout titleLayout = new HBoxLayout();
        titleLayout.setPadding(new Padding(5));
        titleLayout.setHBoxLayoutAlign(HBoxLayoutAlign.TOP);
        topPanel.setLayout(titleLayout);
        topPanel.setHeight(25);
        topPanel.setHeaderVisible(false);
        topPanel.setBorders(false);
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

        westPanel.setHeading(textMessages.tags());
        ContentPanel centerPanel = new ContentPanel(new FillLayout());
        centerPanel.setHeading(textMessages.passwords());
       
        HBoxLayout northLayout = new HBoxLayout()
        northLayout.setPadding(new Padding(5))
        northLayout.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE)
        northLayout.setPack(BoxLayoutPack.CENTER)
        northPanel.setLayout(northLayout)

        searchTextBox = new TextField<String>();
View Full Code Here

Examples of com.extjs.gxt.ui.client.util.Padding

    if (rendered) {
      if (buttonEl.selectNode("img") != null) {
        buttonEl.selectNode("img").remove();
      }
      if (icon != null) {
        buttonEl.setPadding(new Padding(7, 0, 7, 28));
        Element e = (Element) icon.createElement().cast();
        buttonEl.insertFirst(e);
        El.fly(e).makePositionable(true);
        String align = "b-b";
        if (getIconAlign() == IconAlign.BOTTOM) {
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.