2362N/A * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A return "ScrollPane content";
0N/A // Create the clip window. The field "clip" must be null when 0N/A // we call winCreate, or the parent of clip will be set to itself! 0N/A // Adjustable vadj = sp.getVAdjustable(); 0N/A // vadj.setVisibleAmount(vsb.vis); 0N/A // vadj.setMaximum(vsb.max); 0N/A // vadj.setBlockIncrement(vsb.page); 0N/A // Adjustable hadj = sp.getHAdjustable(); 0N/A // hadj.setVisibleAmount(hsb.vis); 0N/A // hadj.setMaximum(hsb.max); 0N/A // hadj.setBlockIncrement(hsb.page); 0N/A // Check to see if we hid either of the scrollbars but left 0N/A // ourselves scrolled off of the top and/or right of the pane. 0N/A // If we did, we need to scroll to the top and/or right of of 0N/A // the pane to make it visible. 0N/A // Reminder: see if there is a better place to put this code. 0N/A // Get the point at which the ScrollPane is currently located 0N/A // if number of components > 0 0N/A * Scroll the contents to position x, y 0N/A // paint the whole scrollbar 0N/A // paint the whole scrollbar 0N/A * Paint the scrollpane. 0N/A // paint rectangular region between scrollbars 0N/A * Paint the horizontal scrollbar to the screen 0N/A * @param g the graphics context to draw into 0N/A * @param colors the colors used to draw the scrollbar 0N/A * @param paintAll paint the whole scrollbar if true, just the thumb if false 0N/A // SCROLLBAR is the height of scrollbar area 0N/A // but the actual scrollbar is SCROLLBAR-SPACE high; 0N/A // the rest must be filled with background color 0N/A * Paint the vertical scrollbar to the screen 0N/A * @param g the graphics context to draw into 0N/A * @param colors the colors used to draw the scrollbar 0N/A * @param paintAll paint the whole scrollbar if true, just the thumb if false 0N/A // SCROLLBAR is the width of scrollbar area 0N/A // but the actual scrollbar is SCROLLBAR-SPACE wide; 0N/A // the rest must be filled with background color 0N/A * @see java.awt.event.MouseEvent 0N/A * MouseEvent.MOUSE_CLICKED 0N/A * MouseEvent.MOUSE_PRESSED 0N/A * MouseEvent.MOUSE_RELEASED 0N/A * MouseEvent.MOUSE_MOVED 0N/A * MouseEvent.MOUSE_ENTERED 0N/A * MouseEvent.MOUSE_EXITED 0N/A * MouseEvent.MOUSE_DRAGGED 0N/A // super.handleMouseEvent(mouseEvent); 0N/A // On mouse up, pass the event through to the scrollbar to stop 0N/A // scrolling. The x & y passed do not matter. 0N/A // winReleaseCursorFocus(); 0N/A * return value from the scrollbar 0N/A * return true if the x and y position is in the verticalscrollbar 0N/A * return true if the x and y position is in the horizontal scrollbar 0N/A // do nothing. in this case we return null 0N/A * Print the native component by rendering the Motif look ourselves. 0N/A * ToDo(aim): needs to query native motif for more accurate size and 0N/A * color information. 0N/A // need to be careful to add the margins back in here because 0N/A // we're drawing the margin border, after all!