2003-03-17 Michael Koch <konqueror@gmx.de>
* java/awt/Dialog.java (Dialog): New constructor, changed implementations, added documentation. * java/awt/ScrollPaneAdjustable.java (ScrollPaneAdjustable): Extends Object, 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. From-SVN: r64485
This commit is contained in:
parent
94833648ca
commit
2ff04cc63a
5 changed files with 269 additions and 13 deletions
|
@ -38,29 +38,135 @@ 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
|
||||
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 (ScrollPane sp, int orientation, int value, int minimum,
|
||||
int maximum, in visibleAmount, int unitIncrement,
|
||||
int blockIncrement)
|
||||
{
|
||||
super (orientation);
|
||||
this.sp = sp;
|
||||
this.orientation = orientation;
|
||||
this.value = value;
|
||||
this.minimum = minimum;
|
||||
this.maximum = maximum;
|
||||
this.visibleAmount = visibleAmount;
|
||||
this.unitIncrement = Increment;
|
||||
this.blockIncrement = Increment;
|
||||
}
|
||||
|
||||
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.class);
|
||||
}
|
||||
|
||||
public int getBlockIncrement ()
|
||||
{
|
||||
return blockIncrement;
|
||||
}
|
||||
|
||||
public int getMaximum ()
|
||||
{
|
||||
return maximum;
|
||||
}
|
||||
|
||||
public int getMinimum ()
|
||||
{
|
||||
return minimum;
|
||||
}
|
||||
|
||||
public int getOrientation ()
|
||||
{
|
||||
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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue