Package com.seaglasslookandfeel.component

Examples of com.seaglasslookandfeel.component.SeaGlassArrowButton


        }
        return minimumThumbSize;
    }

    protected JButton createDecreaseButton(int orientation) {
        SeaGlassArrowButton synthArrowButton = new SeaGlassArrowButton(orientation) {
            @Override
            public boolean contains(int x, int y) {
                // if there is an overlap between the track and button
                if (decrGap < 0) {
                    // FIXME Need to take RtL orientation into account.
                    if (buttonsTogether.isInState(scrollbar)) {
                        int minX = 0;
                        int minY = 0;
                        if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
                            // adjust the height by decrGap
                            // Note: decrGap is negative!
                            minY -= decrGap;
                        } else {
                            // adjust the width by decrGap
                            // Note: decrGap is negative!
                            minX -= decrGap;
                        }
                        return (x >= minX) && (x < getWidth()) && (y >= minY) && (y < getHeight());
                    } else {
                        int width = getWidth();
                        int height = getHeight();
                        if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
                            // adjust the height by decrGap
                            // Note: decrGap is negative!
                            height += decrGap;
                        } else {
                            // adjust the width by decrGap
                            // Note: decrGap is negative!
                            width += decrGap;
                        }
                        return (x >= 0) && (x < width) && (y >= 0) && (y < height);
                    }
                }
                return super.contains(x, y);
            }
        };
        synthArrowButton.setName("ScrollBar.button");
        return synthArrowButton;
    }
View Full Code Here


        synthArrowButton.setName("ScrollBar.button");
        return synthArrowButton;
    }

    protected JButton createIncreaseButton(int orientation) {
        SeaGlassArrowButton synthArrowButton = new SeaGlassArrowButton(orientation) {
            @Override
            public boolean contains(int x, int y) {
                // if there is an overlap between the track and button
                if (incrGap < 0 && !buttonsTogether.isInState(scrollbar)) {
                    int width = getWidth();
                    int height = getHeight();
                    if (scrollbar.getOrientation() == JScrollBar.VERTICAL) {
                        // adjust the height and y by incrGap
                        // Note: incrGap is negative!
                        height += incrGap;
                        y += incrGap;
                    } else {
                        // adjust the width and x by incrGap
                        // Note: incrGap is negative!
                        width += incrGap;
                        x += incrGap;
                    }
                    return (x >= 0) && (x < width) && (y >= 0) && (y < height);
                }
                return super.contains(x, y);
            }
        };
        synthArrowButton.setName("ScrollBar.button");
        return synthArrowButton;
    }
View Full Code Here

        }
    }

    @Override
    protected JButton createArrowButton() {
        SeaGlassArrowButton button = new SeaGlassArrowButton(SwingConstants.SOUTH);
        button.setName("ComboBox.arrowButton");
        button.setModel(buttonHandler);
        return button;
    }
View Full Code Here

TOP

Related Classes of com.seaglasslookandfeel.component.SeaGlassArrowButton

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.