Java Code Examples for java.awt.ScrollPane#SCROLLBARS_NEVER

The following examples show how to use java.awt.ScrollPane#SCROLLBARS_NEVER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: java_awt_ScrollPane.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 2
Source File: java_awt_ScrollPane.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 3
Source File: ScrollPaneWheelScroller.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 4
Source File: java_awt_ScrollPane.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 5
Source File: ScrollPaneWheelScroller.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 6
Source File: ScrollPaneWheelScroller.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 7
Source File: ScrollPaneWheelScroller.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 8
Source File: java_awt_ScrollPane.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 9
Source File: java_awt_ScrollPane.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 10
Source File: ScrollPaneWheelScroller.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 11
Source File: ScrollPaneWheelScroller.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 12
Source File: ScrollPaneWheelScroller.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 13
Source File: ScrollPaneWheelScroller.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 14
Source File: java_awt_ScrollPane.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 15
Source File: ScrollPaneWheelScroller.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static Adjustable getAdjustableToScroll(ScrollPane sp) {
    int policy = sp.getScrollbarDisplayPolicy();

    // if policy is display always or never, use vert
    if (policy == ScrollPane.SCROLLBARS_ALWAYS ||
        policy == ScrollPane.SCROLLBARS_NEVER) {
        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("using vertical scrolling due to scrollbar policy");
        }
        return sp.getVAdjustable();

    }
    else {

        Insets ins = sp.getInsets();
        int vertScrollWidth = sp.getVScrollbarWidth();

        if (log.isLoggable(PlatformLogger.Level.FINER)) {
            log.finer("insets: l = " + ins.left + ", r = " + ins.right +
             ", t = " + ins.top + ", b = " + ins.bottom);
            log.finer("vertScrollWidth = " + vertScrollWidth);
        }

        // Check if scrollbar is showing by examining insets of the
        // ScrollPane
        if (ins.right >= vertScrollWidth) {
            if (log.isLoggable(PlatformLogger.Level.FINER)) {
                log.finer("using vertical scrolling because scrollbar is present");
            }
            return sp.getVAdjustable();
        }
        else {
            int horizScrollHeight = sp.getHScrollbarHeight();
            if (ins.bottom >= horizScrollHeight) {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using horiz scrolling because scrollbar is present");
                }
                return sp.getHAdjustable();
            }
            else {
                if (log.isLoggable(PlatformLogger.Level.FINER)) {
                    log.finer("using NO scrollbar becsause neither is present");
                }
                return null;
            }
        }
    }
}
 
Example 16
Source File: java_awt_ScrollPane.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 17
Source File: ScrollPaneValidateTest.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public ScrollPaneValidateTest() {
  setBounds(300, 300, 300, 300);
  pane = new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
  add(pane, BorderLayout.NORTH);
  pane.add(new InnerPanel());
}
 
Example 18
Source File: java_awt_ScrollPane.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}
 
Example 19
Source File: ScrollPaneValidateTest.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public ScrollPaneValidateTest() {
  setBounds(300, 300, 300, 300);
  pane = new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
  add(pane, BorderLayout.NORTH);
  pane.add(new InnerPanel());
}
 
Example 20
Source File: java_awt_ScrollPane.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
protected ScrollPane getObject() {
    return new ScrollPane(ScrollPane.SCROLLBARS_NEVER);
}