Examples of Orientation


Examples of org.apache.pivot.wtk.Orientation

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

            if (Mouse.getCapturer() == component) {
                ScrollBar scrollBar = (ScrollBar)TerraScrollBarSkin.this.getComponent();
                Orientation orientation = scrollBar.getOrientation();

                // Calculate the new scroll bar value
                int pixelValue;
                if (orientation == Orientation.HORIZONTAL) {
                    pixelValue = component.getX() - scrollUpButton.getWidth() + x - dragOffset;
View Full Code Here

Examples of org.apache.pivot.wtk.Orientation

        public boolean mouseDown(Component component, Mouse.Button button, int x, int y) {
            boolean consumed = super.mouseDown(component, button, x, y);

            if (button == Mouse.Button.LEFT) {
                ScrollBar scrollBar = (ScrollBar)TerraScrollBarSkin.this.getComponent();
                Orientation orientation = scrollBar.getOrientation();

                dragOffset = (orientation == Orientation.HORIZONTAL ? x : y);
                Mouse.capture(component);
                consumed = true;
            }
View Full Code Here

Examples of org.apache.pivot.wtk.Orientation

        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

Examples of org.apache.pivot.wtk.Orientation

        @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

Examples of org.apache.pivot.wtk.Orientation

        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

Examples of org.apache.pivot.wtk.Orientation

            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

Examples of org.apache.pivot.wtk.Orientation

    }

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

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

Examples of org.apache.pivot.wtk.Orientation

    }

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

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

Examples of org.apache.pivot.wtk.Orientation

        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

Examples of org.apache.pivot.wtk.Orientation

        updateFillPaneState();
    }

    private void updateFillPaneState() {
        Orientation orientation = null;
        if (horizontalOrientationButton.isSelected()) {
            orientation = Orientation.HORIZONTAL;
        } else if (verticalOrientationButton.isSelected()) {
            orientation = Orientation.VERTICAL;
        }
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.