Package com.eagerlogic.cubee.client.style.styles

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


    private ComboBox.StyleClass<ComboBox> ComboBoxStyle() {
        ComboBox.StyleClass<ComboBox> res = new ComboBox.StyleClass<ComboBox>();
        LinearGradient bg = new LinearGradient(0.0, new ColorStop(0.0, Color.WHITE), new ColorStop(1.0, Color.getRgbColor(0xf0f0f0)));
        res.getBackground().setValue(new StyleValue<ABackground>(bg));
        res.getPadding().setValue(new StyleValue<Padding>(new Padding(10, 5, 10, 5)));
        res.getBorder().setValue(new StyleValue<Border>(new Border(1, Color.LIGHT_GRAY, 0)));
        return res;
    }
View Full Code Here


        return res;
    }

    private TextBox.StyleClass<TextBox> TextBoxStyle() {
        TextBox.StyleClass<TextBox> res = new TextBox.StyleClass<TextBox>();
        res.getPadding().setValue(new StyleValue<Padding>(new Padding(5)));
        res.getBorder().setValue(new StyleValue<Border>(new Border(1, Color.LIGHT_GRAY, 0)));
        return res;
    }
View Full Code Here

        hovered.initReadonlyBind(hoveredSetter);
        padding.addChangeListener(new IChangeListener() {

            @Override
            public void onChanged(Object sender) {
                Padding p = padding.get();
                if (p == null) {
                    getElement().getStyle().setPadding(0.0, com.google.gwt.dom.client.Style.Unit.PX);
                } else {
                    p.apply(getElement());
                }
                requestLayout();
            }

        });
View Full Code Here

    private void onMeasure() {
        // calculating client bounds
        int cw = element.getClientWidth();
        int ch = element.getClientHeight();
        Padding p = padding.get();
        if (p != null) {
            cw = cw - p.getLeftPadding() - p.getRightPadding();
            ch = ch - p.getTopPadding() - p.getBottomPadding();
        }
        clientWidthSetter.set(cw);
        clientHeightSetter.set(ch);

        // calculating measured bounds
View Full Code Here

    private T[] items;

    private final Label label = new Label();

    public ComboBox() {
        this.paddingProperty().set(new Padding(5));
        this.borderProperty().set(new Border(1, Color.getRgbColor(0xc0c0c0), 0));
        this.backgroundProperty().set(new LinearGradient(0.0,
                new ColorStop(0.0, Color.getRgbColor(0xe0e0e0)),
                new ColorStop(1.0, Color.getRgbColor(0xc0c0c0))
        ));
View Full Code Here

            for (int i = getChildren().size() - 1; i >= 0; i--) {
                AComponent child = getChildren().get(i);
                if (child != null) {
                    int parentX = x;
                    int parentY = y;
                    Padding p = this.paddingProperty().get();
                    if (p != null) {
                        parentX -= p.getLeftPadding();
                        parentY -= p.getTopPadding();
                    }
                    if (child.isIntersectsPoint(parentX, parentY)) {
                        int left = child.getLeft() + child.translateXProperty().get();
                        int top = child.getTop() + child.translateYProperty().get();
                        int tcx = (int) (left + child.measuredWidthProperty().get() * child.transformCenterXProperty().get());
 
View Full Code Here

        VBox vb = new VBox();
        root.getChildren().add(vb);
        root.shadowProperty().set(new BoxShadow(2, 2, 10, 0, Color.getRgbColor(0x808080), false));
        root.borderProperty().set(new Border(1, Color.LIGHT_GRAY, 0));
        root.paddingProperty().set(new Padding(5));

        for (AMenuItem item : this.items) {
            if (item == null) {
                throw new NullPointerException("The 'items' parameter can't contains null elements.");
            }
View Full Code Here

    }

    private final Label label;

    public Button() {
        this.paddingProperty().set(new Padding(5));
        this.cursorProperty().set(ECursor.POINTER);
        this.borderProperty().set(new Border(1, Color.getRgbColor(0xc0c0c0), 0));
        this.backgroundProperty().set(new ColorBackground(Color.getRgbColor(0xf0f0f0)));

        label = new Label();
View Full Code Here

TOP

Related Classes of com.eagerlogic.cubee.client.style.styles.Padding

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.