summaryrefslogtreecommitdiff
path: root/java/awt/ScrollPaneAdjustable.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2003-03-17 16:28:49 +0000
committerMichael Koch <konqueror@gmx.de>2003-03-17 16:28:49 +0000
commitbb2a5d4481521f972621bec41884b9fd8576dc0d (patch)
treed9dc6c7ea7841c52ec0647b0bea0d74e3a07579d /java/awt/ScrollPaneAdjustable.java
parent24fe8c517dbc04e29ee1b92c5a8850d9cebc91fe (diff)
downloadclasspath-bb2a5d4481521f972621bec41884b9fd8576dc0d.tar.gz
2003-03-17 Michael Koch <konqueror@gmx.de>
* java/beans/Beans.java: Explicitely import classes not packages. * java/beans/FeatureDescriptor.java (preferred): New member variable. (isPreferred): New method. (setPreferred): New method. * java/beans/PropertyEditorManager.java: Explicitely import used classes. * java/beans/beancontext/BeanContextChild.java: Added line wrapping. * java/beans/beancontext/BeanContextChildSupport.java: Reindented. * java/beans/beancontext/BeanContextEvent.java: Reindented. 2003-03-17 Michael Koch <konqueror@gmx.de> * java/awt/Dialog.java (Dialog): New constructor, changed implementations, added documentation. * java/awt/ScrollPaneAdjustable.java (ScrollPaneAdjustable): Implements Adjustable and Serializable. (serialVersionUID): New member variable. (sp): New member variable. (orientation): New member variable. (value): New member variable. (minimum): New member variable. (maximum): New member variable. (visibleAmount): New member variable. (unitIncrement): New member variable. (blockIncrement): New member variable. (AdjustmentListener): New member variable. (ScrollPaneAdjustable): New implementation. (addAdjustmentListener): New method. (removeAdjustmentListener): New method. (getAdjustmentListeners): New method. (getBlockIncrement): New method. (getMaximum): New method. (getMinimum): New method. (getOrientation): New method. (getUnitIncrement): New method. (getValue): New method. (getVisibleAmount): New method. (setBlockIncrement): New method. (setMaximum): Implemented. (setMinimum): Implemented. (setUnitIncrement): New method. (setValue): New method. (setVisibleAmount): Implemented. (paramString): New stubbed method. * java/awt/Window.java (show): Call setVisible(). (hide): Call setVisible(). (processEvent): Add cases for WINDOW_GAINED_FOCUS, WINDOW_LOST_FOCUS and WINDOW_STATE_CHANGED. (processWindowFocusEvent): New method. (processWindowStateEvent): New method. (postEvent): Deprecated. (applyResourceBundle): Deprecated. * java/awt/datatransfer/DataFlavor.java (DataFlavor): Doesn't thow ClassNotFoundException.
Diffstat (limited to 'java/awt/ScrollPaneAdjustable.java')
-rw-r--r--java/awt/ScrollPaneAdjustable.java119
1 files changed, 116 insertions, 3 deletions
diff --git a/java/awt/ScrollPaneAdjustable.java b/java/awt/ScrollPaneAdjustable.java
index 152f4d6e5..2307e5905 100644
--- a/java/awt/ScrollPaneAdjustable.java
+++ b/java/awt/ScrollPaneAdjustable.java
@@ -38,29 +38,142 @@ exception statement from your version. */
package java.awt;
+import java.awt.event.AdjustmentListener;
+import java.io.Serializable;
+
/**
* Need this class since the serialization spec for ScrollPane
* uses it.
*
* @author Aaron M. Renn (arenn@urbanophile.com)
+ * @since 1.4
*/
-class ScrollPaneAdjustable extends Scrollbar
+public class ScrollPaneAdjustable
+ extends Scrollbar
+ implements Adjustable, Serializable
{
- public ScrollPaneAdjustable (int orientation)
+ private static final long serialVersionUID = -3359745691033257079L;
+
+ ScrollPane sp;
+ int orientation;
+ int value;
+ int minimum;
+ int maximum;
+ int visibleAmount;
+ int unitIncrement;
+ int blockIncrement;
+ AdjustmentListener adjustmentListener;
+
+ ScrollPaneAdjustable (int orientation)
+ {
+ throw new Error ("not implemented");
+ }
+
+ ScrollPaneAdjustable (ScrollPane sp, int orientation, int value, int minimum,
+ int maximum, int visibleAmount, int unitIncrement,
+ int blockIncrement)
+ {
+ this.sp = sp;
+ this.orientation = orientation;
+ this.value = value;
+ this.minimum = minimum;
+ this.maximum = maximum;
+ this.visibleAmount = visibleAmount;
+ this.unitIncrement = unitIncrement;
+ this.blockIncrement = blockIncrement;
+ }
+
+ public void addAdjustmentListener (AdjustmentListener listener)
+ {
+ AWTEventMulticaster.add (adjustmentListener, listener);
+ }
+
+ public void removeAdjustmentListener (AdjustmentListener listener)
+ {
+ AWTEventMulticaster.remove (adjustmentListener, listener);
+ }
+
+ public AdjustmentListener[] getAdjustmentListeners ()
+ {
+ return (AdjustmentListener[]) AWTEventMulticaster.getListeners
+ (adjustmentListener, AdjustmentListener.class);
+ }
+
+ public int getBlockIncrement ()
+ {
+ return blockIncrement;
+ }
+
+ public int getMaximum ()
+ {
+ return maximum;
+ }
+
+ public int getMinimum ()
+ {
+ return minimum;
+ }
+
+ public int getOrientation ()
{
- super (orientation);
+ return orientation;
}
+ public int getUnitIncrement ()
+ {
+ return unitIncrement;
+ }
+
+ public int getValue ()
+ {
+ return value;
+ }
+
+ public int getVisibleAmount ()
+ {
+ return visibleAmount;
+ }
+
+ public void setBlockIncrement (int blockIncrement)
+ {
+ this.blockIncrement = blockIncrement;
+ }
+
public void setMaximum (int maximum)
{
+ this.maximum = maximum;
}
public void setMinimum (int minimum)
{
+ this.minimum = minimum;
}
+ public void setUnitIncrement (int unitIncrement)
+ {
+ this.unitIncrement = unitIncrement;
+ }
+
+ public void setValue (int value)
+ {
+ this.value = value;
+
+ if (value < minimum)
+ minimum = value;
+
+ if (value > maximum)
+ maximum = value;
+ }
+
public void setVisibleAmount (int visibleAmount)
{
+ this.visibleAmount = visibleAmount;
}
+
+ public String paramString ()
+ {
+ throw new Error ("not implemented");
+ }
+
} // class ScrollPaneAdjustable