Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Orientation


    public int getPreferredWidth(int height) {
        FillPane fillPane = (FillPane)getComponent();

        int preferredWidth = 0;

        Orientation orientation = fillPane.getOrientation();
        if (orientation == Orientation.HORIZONTAL) {
            // Include padding in constraint
            if (height != -1) {
                height = Math.max(height - (padding.top + padding.bottom), 0);
            }
View Full Code Here


    public int getPreferredHeight(int width) {
        FillPane fillPane = (FillPane)getComponent();

        int preferredHeight = 0;

        Orientation orientation = fillPane.getOrientation();
        if (orientation == Orientation.HORIZONTAL) {
            // Preferred height is the maximum preferred height of all components
            for (int i = 0, n = fillPane.getLength(); i < n; i++) {
                Component component = fillPane.get(i);
View Full Code Here

        int height = getHeight();
        if (width <= 0)
            width = getPreferredWidth(-1);
        if (height <= 0)
            height = getPreferredHeight(-1);
        Orientation orientation = fillPane.getOrientation();
        if (orientation == Orientation.HORIZONTAL) {
            // Determine the starting x-coordinate
            int x = padding.left;
            int totalWidth = width - (padding.left + padding.right);
            if (n > 1)
View Full Code Here

    }

    @Override
    public int getPreferredHeight(int width) {
        Ruler ruler = (Ruler)getComponent();
        Orientation orientation = ruler.getOrientation();

        return (orientation == Orientation.HORIZONTAL) ? 20 : 0;
    }
View Full Code Here

    }

    @Override
    public int getPreferredWidth(int height) {
        Ruler ruler = (Ruler)getComponent();
        Orientation orientation = ruler.getOrientation();

        return (orientation == Orientation.VERTICAL) ? 20 : 0;
    }
View Full Code Here

        graphics.fillRect(0, 0, width, height);

        graphics.setColor(Color.BLACK);
        graphics.drawRect(0, 0, width - 1, height - 1);

        Orientation orientation = ruler.getOrientation();
        switch (orientation) {
            case HORIZONTAL: {
                for (int i = 0, n = width / 5 + 1; i < n; i++) {
                    int x = i * 5;

 
View Full Code Here

    }

    @Override
    public int getPreferredHeight(int width) {
        Ruler ruler = (Ruler)getComponent();
        Orientation orientation = ruler.getOrientation();

        return (orientation == Orientation.HORIZONTAL) ? 20 : 0;
    }
View Full Code Here

    }

    @Override
    public int getPreferredWidth(int height) {
        Ruler ruler = (Ruler)getComponent();
        Orientation orientation = ruler.getOrientation();

        return (orientation == Orientation.VERTICAL) ? 20 : 0;
    }
View Full Code Here

        graphics.fillRect(0, 0, width, height);

        graphics.setColor(Color.BLACK);
        graphics.drawRect(0, 0, width - 1, height - 1);

        Orientation orientation = ruler.getOrientation();
        switch (orientation) {
            case HORIZONTAL: {
                for (int i = 0, n = width / 5 + 1; i < n; i++) {
                    int x = i * 5;

 
View Full Code Here

    public int getPreferredWidth(int height) {
        BoxPane boxPane = (BoxPane)getComponent();

        int preferredWidth = 0;

        Orientation orientation = boxPane.getOrientation();
        if (orientation == Orientation.HORIZONTAL) {
            // Include padding in constraint
            if (height != -1) {
                height = Math.max(height - (padding.top + padding.bottom), 0);
            }
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.Orientation

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.