0N/A/*
2362N/A * Copyright (c) 1996, 2003, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
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 *
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 *
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.
0N/A *
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
2362N/A * questions.
0N/A */
0N/A
0N/Apackage java.awt;
0N/A
0N/Aimport java.awt.event.*;
0N/A
0N/A/**
0N/A * The interface for objects which have an adjustable numeric value
0N/A * contained within a bounded range of values.
0N/A *
0N/A * @author Amy Fowler
0N/A * @author Tim Prinzing
0N/A */
0N/A
0N/Apublic interface Adjustable {
0N/A
0N/A /**
0N/A * Indicates that the <code>Adjustable</code> has horizontal orientation.
0N/A */
0N/A public static final int HORIZONTAL = 0;
0N/A
0N/A /**
0N/A * Indicates that the <code>Adjustable</code> has vertical orientation.
0N/A */
0N/A public static final int VERTICAL = 1;
0N/A
0N/A /**
0N/A * Indicates that the <code>Adjustable</code> has no orientation.
0N/A */
0N/A public static final int NO_ORIENTATION = 2;
0N/A
0N/A /**
0N/A * Gets the orientation of the adjustable object.
0N/A * @return the orientation of the adjustable object;
0N/A * either <code>HORIZONTAL</code>, <code>VERTICAL</code>,
0N/A * or <code>NO_ORIENTATION</code>
0N/A */
0N/A int getOrientation();
0N/A
0N/A /**
0N/A * Sets the minimum value of the adjustable object.
0N/A * @param min the minimum value
0N/A */
0N/A void setMinimum(int min);
0N/A
0N/A /**
0N/A * Gets the minimum value of the adjustable object.
0N/A * @return the minimum value of the adjustable object
0N/A */
0N/A int getMinimum();
0N/A
0N/A /**
0N/A * Sets the maximum value of the adjustable object.
0N/A * @param max the maximum value
0N/A */
0N/A void setMaximum(int max);
0N/A
0N/A /**
0N/A * Gets the maximum value of the adjustable object.
0N/A * @return the maximum value of the adjustable object
0N/A */
0N/A int getMaximum();
0N/A
0N/A /**
0N/A * Sets the unit value increment for the adjustable object.
0N/A * @param u the unit increment
0N/A */
0N/A void setUnitIncrement(int u);
0N/A
0N/A /**
0N/A * Gets the unit value increment for the adjustable object.
0N/A * @return the unit value increment for the adjustable object
0N/A */
0N/A int getUnitIncrement();
0N/A
0N/A /**
0N/A * Sets the block value increment for the adjustable object.
0N/A * @param b the block increment
0N/A */
0N/A void setBlockIncrement(int b);
0N/A
0N/A /**
0N/A * Gets the block value increment for the adjustable object.
0N/A * @return the block value increment for the adjustable object
0N/A */
0N/A int getBlockIncrement();
0N/A
0N/A /**
0N/A * Sets the length of the proportional indicator of the
0N/A * adjustable object.
0N/A * @param v the length of the indicator
0N/A */
0N/A void setVisibleAmount(int v);
0N/A
0N/A /**
0N/A * Gets the length of the proportional indicator.
0N/A * @return the length of the proportional indicator
0N/A */
0N/A int getVisibleAmount();
0N/A
0N/A /**
0N/A * Sets the current value of the adjustable object. If
0N/A * the value supplied is less than <code>minimum</code>
0N/A * or greater than <code>maximum</code> - <code>visibleAmount</code>,
0N/A * then one of those values is substituted, as appropriate.
0N/A * <p>
0N/A * Calling this method does not fire an
0N/A * <code>AdjustmentEvent</code>.
0N/A *
0N/A * @param v the current value, between <code>minimum</code>
0N/A * and <code>maximum</code> - <code>visibleAmount</code>
0N/A */
0N/A void setValue(int v);
0N/A
0N/A /**
0N/A * Gets the current value of the adjustable object.
0N/A * @return the current value of the adjustable object
0N/A */
0N/A int getValue();
0N/A
0N/A /**
0N/A * Adds a listener to receive adjustment events when the value of
0N/A * the adjustable object changes.
0N/A * @param l the listener to receive events
0N/A * @see AdjustmentEvent
0N/A */
0N/A void addAdjustmentListener(AdjustmentListener l);
0N/A
0N/A /**
0N/A * Removes an adjustment listener.
0N/A * @param l the listener being removed
0N/A * @see AdjustmentEvent
0N/A */
0N/A void removeAdjustmentListener(AdjustmentListener l);
0N/A
0N/A}