/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* ScrollPaneWheelScroller is a helper class for implmenenting mouse wheel
* scrolling on a java.awt.ScrollPane. It contains only static methods.
* No objects of this class may be instantiated, thus it is declared abstract.
*/
public abstract class ScrollPaneWheelScroller {
private static final PlatformLogger log = PlatformLogger.getLogger("sun.awt.ScrollPaneWheelScroller");
private ScrollPaneWheelScroller() {}
/*
* Called from ScrollPane.processMouseWheelEvent()
*/
}
int increment = 0;
}
}
}
}
/*
* Given a ScrollPane, determine which Scrollbar should be scrolled by the
* mouse wheel, if any.
*/
// if policy is display always or never, use vert
}
return sp.getVAdjustable();
}
else {
}
// Check if scrollbar is showing by examining insets of the
// ScrollPane
}
return sp.getVAdjustable();
}
else {
}
return sp.getHAdjustable();
}
else {
}
return null;
}
}
}
}
/*
* Given the info in a MouseWheelEvent and an Adjustable to scroll, return
* the amount by which the Adjustable should be adjusted. This value may
* be positive or negative.
*/
MouseWheelEvent e) {
}
}
int increment = 0;
}
}
return increment;
}
/*
* Scroll the given Adjustable by the given amount. Checks the Adjustable's
* bounds and sets the new value to the Adjustable.
*/
}
if (amount == 0) {
}
}
}
// down
return;
}
else {
return;
}
}
// to scroll up
return;
}
else {
return;
}
}
}
}