Java Code Examples for java.awt.ScrollPane#getHAdjustable()
The following examples show how to use
java.awt.ScrollPane#getHAdjustable() .
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: ScrollPaneWheelScroller.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
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 2
Source File: ScrollPaneWheelScroller.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
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 3
Source File: ScrollPaneWheelScroller.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
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: ScrollPaneWheelScroller.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
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 5
Source File: ScrollPaneWheelScroller.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
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 Bytecoder with Apache License 2.0 | 4 votes |
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 |
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: ScrollPaneWheelScroller.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
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 9
Source File: ScrollPaneWheelScroller.java From hottub with GNU General Public License v2.0 | 4 votes |
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 10
Source File: ScrollPaneWheelScroller.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
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 openjdk-8 with GNU General Public License v2.0 | 4 votes |
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 |
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 jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
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: ScrollPaneWheelScroller.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
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; } } } }