Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.Orientation


    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


    public int getPreferredHeight(int width) {
        BoxPane boxPane = (BoxPane)getComponent();

        int preferredHeight = 0;

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

        int n = boxPane.getLength();

        int width = getWidth();
        int height = getHeight();

        Orientation orientation = boxPane.getOrientation();
        if (orientation == Orientation.HORIZONTAL) {
            int preferredWidth = getPreferredWidth(fill ? height : -1);

            // Determine the starting x-coordinate
            int x = 0;
View Full Code Here

        int previousHeight = getHeight();

        super.setSize(width, height);

        SplitPane splitPane = (SplitPane)getComponent();
        Orientation orientation = splitPane.getOrientation();

        if (splitPane.getResizeMode() == SplitPane.ResizeMode.PRIMARY_REGION
            && ((previousWidth != width && orientation == Orientation.HORIZONTAL)
            || (previousHeight != height && orientation == Orientation.VERTICAL))) {
            SplitPane.Region primaryRegion = splitPane.getPrimaryRegion();
View Full Code Here

        @Override
        public void paint(Graphics2D graphics) {
            SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();

            Orientation orientation = splitPane.getOrientation();

            int width = getWidth();
            int height = getHeight();

            int imageWidth, imageHeight;
View Full Code Here

        public boolean mouseMove(Component component, int x, int y) {
            boolean consumed = super.mouseMove(component, x, y);

            if (Mouse.getCapturer() == component) {
                SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();
                Orientation orientation = splitPane.getOrientation();

                // Calculate the would-be new split location
                int splitLocation;
                float splitRatio;
                if (orientation == Orientation.HORIZONTAL) {
View Full Code Here

            SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();

            if (button == Mouse.Button.LEFT
                && !splitPane.isLocked()) {
                Orientation orientation = splitPane.getOrientation();

                if (useShadow) {
                    // Add the shadow to the split pane and lay it out
                    shadow = new SplitterShadow();
                    splitPane.add(shadow);
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

    public int getPreferredHeight(int width) {
        BoxPane boxPane = (BoxPane)getComponent();

        int preferredHeight = 0;

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

        int n = boxPane.getLength();

        int width = getWidth();
        int height = getHeight();

        Orientation orientation = boxPane.getOrientation();
        if (orientation == Orientation.HORIZONTAL) {
            int preferredWidth = getPreferredWidth(fill ? height : -1);

            // Determine the starting x-coordinate
            int x = 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.