/*
* 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.
*/
/**
* Provides the Synth L&F UI delegate for
* {@link javax.swing.JScrollBar}.
*
* @author Scott Violet
* @since 1.7
*/
implements PropertyChangeListener, SynthUI {
private boolean validMinimumThumbSize;
return new SynthScrollBarUI();
}
/**
* @inheritDoc
*/
protected void installDefaults() {
super.installDefaults();
}
}
/**
* @inheritDoc
*/
protected void configureScrollBarColors() {
}
"ScrollBar.minimumThumbSize");
if (minimumThumbSize == null) {
minimumThumbSize = new Dimension();
validMinimumThumbSize = false;
}
else {
validMinimumThumbSize = true;
}
"ScrollBar.maximumThumbSize");
if (maximumThumbSize == null) {
}
// handle scaling for sizeVarients for special case components. The
// components are based on Apples LAF
"JComponent.sizeVariant");
scrollBarWidth *= 1.15;
incrGap *= 1.15;
decrGap *= 1.15;
scrollBarWidth *= 0.857;
incrGap *= 0.857;
decrGap *= 0.857;
scrollBarWidth *= 0.714;
incrGap *= 0.714;
decrGap *= 0.714;
}
}
}
}
}
/**
* @inheritDoc
*/
protected void installListeners() {
super.installListeners();
}
/**
* @inheritDoc
*/
protected void uninstallListeners() {
super.uninstallListeners();
}
/**
* @inheritDoc
*/
protected void uninstallDefaults(){
trackStyle = null;
thumbStyle = null;
super.uninstallDefaults();
}
/**
* @inheritDoc
*/
}
}
}
style = thumbStyle;
}
state);
}
c.isEnabled()) {
return MOUSE_OVER;
}
return SynthLookAndFeel.getComponentState(c);
}
/**
* @inheritDoc
*/
public boolean getSupportsAbsolutePositioning() {
"ScrollBar.allowsAbsolutePositioning", false);
return value;
}
/**
* Notifies this UI delegate to repaint the specified component.
* This method paints the component background, then calls
* the {@link #paint(SynthContext,Graphics)} method.
*
* <p>In general, this method does not need to be overridden by subclasses.
* All Look and Feel rendering code should reside in the {@code paint} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/
}
/**
* Paints the specified component according to the Look and Feel.
* <p>This method is not used by Synth Look and Feel.
* Painting is handled by the {@link #paint(SynthContext,Graphics)} method.
*
* @param g the {@code Graphics} object used for painting
* @param c the component being painted
* @see #paint(SynthContext,Graphics)
*/
}
/**
* Paints the specified component.
*
* @param context context for the component being painted
* @param g the {@code Graphics} object used for painting
* @see #update(Graphics,JComponent)
*/
}
/**
* @inheritDoc
*/
int y, int w, int h) {
}
/**
* Paints the scrollbar track.
*
* @param context context for the component being painted
* @param g {@code Graphics} object used for painting
* @param trackBounds bounding box for the track
*/
}
/**
* Paints the scrollbar thumb.
*
* @param context context for the component being painted
* @param g {@code Graphics} object used for painting
* @param thumbBounds bounding box for the thumb
*/
}
/**
* A vertical scrollbar's preferred width is the maximum of
* preferred widths of the (non <code>null</code>)
* and the minimum width of the thumb. The preferred height is the
* sum of the preferred heights of the same parts. The basis for
* the preferred size of a horizontal scrollbar is similar.
* <p>
* The <code>preferredSize</code> is only computed once, subsequent
* calls to this method just return a cached size.
*
* @param c the <code>JScrollBar</code> that's delegating this method to us
* @return the preferred size of a Basic JScrollBar
* @see #getMaximumSize
* @see #getMinimumSize
*/
}
/**
* @inheritDoc
*/
if (!validMinimumThumbSize) {
} else {
}
}
return minimumThumbSize;
}
/**
* @inheritDoc
*/
public boolean contains(int x, int y) {
//adjust the height by decrGap
//Note: decrGap is negative!
} else {
//adjust the width by decrGap
//Note: decrGap is negative!
}
}
return super.contains(x, y);
}
};
return synthArrowButton;
}
/**
* @inheritDoc
*/
public boolean contains(int x, int y) {
//adjust the height and y by incrGap
//Note: incrGap is negative!
y += incrGap;
} else {
//adjust the width and x by incrGap
//Note: incrGap is negative!
x += incrGap;
}
}
return super.contains(x, y);
}
};
return synthArrowButton;
}
/**
* @inheritDoc
*/
if (isThumbRollover() != active) {
super.setThumbRollover(active);
}
}
private void updateButtonDirections() {
}
else {
}
}
//
// PropertyChangeListener
//
if (SynthLookAndFeel.shouldUpdateStyle(e)) {
}
if ("orientation" == propertyName) {
}
else if ("componentOrientation" == propertyName) {
}
}
}