Commit 897db4af by Michael Koch Committed by Michael Koch

2003-03-18 Michael Koch <konqueror@gmx.de>

	* java/awt/ScrollPane.java
	(ScrollPane): Rewrote for new ScrollPaneAdjustable.
	(getViewportSize): Likewise.
	(addNotify): Likewise.
	(removeNotify): Likewise.
	* java/awt/ScrollPaneAdjustable.java
	(ScrollPaneAdjustable): No longer extends Scrollbar.
	* java/beans/beancontext/BeanContextServices.java:
	Reformated.
	(getService): Added throws TooManyListenersException;
	* java/beans/beancontext/BeanContextServicesSupport.java:
	Reformated.

From-SVN: r64538
parent 8dfa3bb0
2003-03-18 Michael Koch <konqueror@gmx.de>
* java/awt/ScrollPane.java
(ScrollPane): Rewrote for new ScrollPaneAdjustable.
(getViewportSize): Likewise.
(addNotify): Likewise.
(removeNotify): Likewise.
* java/awt/ScrollPaneAdjustable.java
(ScrollPaneAdjustable): No longer extends Scrollbar.
* java/beans/beancontext/BeanContextServices.java:
Reformated.
(getService): Added throws TooManyListenersException;
* java/beans/beancontext/BeanContextServicesSupport.java:
Reformated.
2003-03-18 Michael Koch <konqueror@gmx.de>
* java/io/BufferedOutputStream.java,
java/io/DataInput.java,
java/io/DataInputStream.java,
......
......@@ -153,8 +153,8 @@ ScrollPane(int scrollbarDisplayPolicy)
if (scrollbarDisplayPolicy != SCROLLBARS_NEVER)
{
hAdjustable = new ScrollPaneAdjustable(Scrollbar.HORIZONTAL);
vAdjustable = new ScrollPaneAdjustable(Scrollbar.VERTICAL);
hAdjustable = new ScrollPaneAdjustable (this, Scrollbar.HORIZONTAL);
vAdjustable = new ScrollPaneAdjustable (this, Scrollbar.VERTICAL);
}
wheelScrollingEnabled = true;
......@@ -215,23 +215,17 @@ getVAdjustable()
*
* @return The viewport size.
*/
public Dimension
getViewportSize()
public Dimension getViewportSize ()
{
Dimension viewsize = getSize();
Insets insets = getInsets();
viewsize.width = viewsize.width - (insets.left + insets.right);
viewsize.height = viewsize.height - (insets.top + insets.bottom);
ScrollPaneAdjustable v = (ScrollPaneAdjustable)getVAdjustable();
ScrollPaneAdjustable h = (ScrollPaneAdjustable)getHAdjustable();
if ((v != null) && v.isVisible())
viewsize.width = viewsize.width - v.getSize().width;
if ((h != null) && h.isVisible())
viewsize.height = viewsize.height - v.getSize().height;
return(viewsize);
Dimension viewsize = getSize ();
Insets insets = getInsets ();
viewsize.width = (viewsize.width
- (insets.left + insets.right)
- getVScrollbarWidth ());
viewsize.height = (viewsize.height
- (insets.top + insets.bottom)
- getHScrollbarHeight ());
return viewsize;
}
/*************************************************************************/
......@@ -347,11 +341,7 @@ addNotify()
return;
setPeer((ComponentPeer)getToolkit().createScrollPane(this));
if (hAdjustable != null)
hAdjustable.addNotify();
if (vAdjustable != null)
vAdjustable.removeNotify();
super.addNotify();
}
/*************************************************************************/
......@@ -362,11 +352,6 @@ addNotify()
public void
removeNotify()
{
if (hAdjustable != null)
hAdjustable.removeNotify();
if (vAdjustable != null)
vAdjustable.removeNotify();
super.removeNotify();
}
......
......@@ -49,7 +49,6 @@ import java.io.Serializable;
* @since 1.4
*/
public class ScrollPaneAdjustable
extends Scrollbar
implements Adjustable, Serializable
{
private static final long serialVersionUID = -3359745691033257079L;
......@@ -60,13 +59,14 @@ public class ScrollPaneAdjustable
int minimum;
int maximum;
int visibleAmount;
int unitIncrement;
int blockIncrement;
int unitIncrement = 1;
int blockIncrement = 1;
AdjustmentListener adjustmentListener;
ScrollPaneAdjustable (int orientation)
ScrollPaneAdjustable (ScrollPane sp, int orientation)
{
throw new Error ("not implemented");
this.sp = sp;
this.orientation = orientation;
}
ScrollPaneAdjustable (ScrollPane sp, int orientation, int value, int minimum,
......
......@@ -131,12 +131,14 @@ public class BeanContextServicesSupport
this (peer, lcle, true, true);
}
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle, boolean dtime)
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle,
boolean dtime)
{
this (peer, lcle, dtime, true);
}
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle, boolean dtime, boolean visible)
public BeanContextServicesSupport (BeanContextServices peer, Locale lcle,
boolean dtime, boolean visible)
{
throw new Error ("Not implemented");
}
......@@ -146,12 +148,14 @@ public class BeanContextServicesSupport
throw new Error ("Not implemented");
}
public boolean addService (Class serviceClass, BeanContextServiceProvider bcsp)
public boolean addService (Class serviceClass, BeanContextServiceProvider bcsp)
{
throw new Error ("Not implemented");
}
protected boolean addService (Class serviceClass, BeanContextServiceProvider bcsp, boolean fireEvent)
protected boolean addService (Class serviceClass,
BeanContextServiceProvider bcsp,
boolean fireEvent)
{
throw new Error ("Not implemented");
}
......@@ -167,22 +171,26 @@ public class BeanContextServicesSupport
{
throw new Error ("Not implemented");
}
protected void childJustRemovedHook (Object child, BeanContextSupport.BCSChild bcsc)
protected void childJustRemovedHook (Object child,
BeanContextSupport.BCSChild bcsc)
{
throw new Error ("Not implemented");
}
protected BeanContextSupport.BCSChild createBCSChild (Object targetChild, Object peer)
protected BeanContextSupport.BCSChild createBCSChild (Object targetChild,
Object peer)
{
throw new Error ("Not implemented");
}
protected BeanContextServicesSupport.BCSSServiceProvider createBCSSServiceProvider (Class sc, BeanContextServiceProvider bcsp)
protected BeanContextServicesSupport.BCSSServiceProvider
createBCSSServiceProvider (Class sc, BeanContextServiceProvider bcsp)
{
throw new Error ("Not implemented");
}
protected final void fireServiceAdded (BeanContextServiceAvailableEvent bcssae)
protected final void fireServiceAdded (BeanContextServiceAvailableEvent bcssae)
{
throw new Error ("Not implemented");
}
......@@ -192,12 +200,14 @@ public class BeanContextServicesSupport
throw new Error ("Not implemented");
}
protected final void fireServiceRevoked (BeanContextServiceRevokedEvent bcsre)
protected final void
fireServiceRevoked (BeanContextServiceRevokedEvent bcsre)
{
throw new Error ("Not implemented");
}
protected final void fireServiceRevoked (Class serviceClass, boolean revokeNow)
protected final void fireServiceRevoked (Class serviceClass,
boolean revokeNow)
{
throw new Error ("Not implemented");
}
......@@ -207,7 +217,8 @@ public class BeanContextServicesSupport
throw new Error ("Not implemented");
}
protected static final BeanContextServicesListener getChildBeanContextServicesListener (Object child)
protected static final BeanContextServicesListener
getChildBeanContextServicesListener (Object child)
{
throw new Error ("Not implemented");
}
......@@ -222,7 +233,9 @@ public class BeanContextServicesSupport
throw new Error ("Not implemented");
}
public Object getService (BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
public Object getService (BeanContextChild child, Object requestor,
Class serviceClass, Object serviceSelector,
BeanContextServiceRevokedListener bcsrl)
throws TooManyListenersException
{
throw new Error ("Not implemented");
......@@ -248,17 +261,20 @@ public class BeanContextServicesSupport
throw new Error ("Not implemented");
}
public void releaseService (BeanContextChild child, Object requestor, Object service)
public void releaseService (BeanContextChild child, Object requestor,
Object service)
{
throw new Error ("Not implemented");
}
public void removeBeanContextServicesListener (BeanContextServicesListener bcsl)
public void
removeBeanContextServicesListener (BeanContextServicesListener bcsl)
{
throw new Error ("Not implemented");
}
public void revokeService (Class serviceClass, BeanContextServiceProvider bcsp, boolean revokeCurrentServicesNow)
public void revokeService (Class serviceClass, BeanContextServiceProvider bcsp,
boolean revokeCurrentServicesNow)
{
throw new Error ("Not implemented");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment