This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Re: Patch: more AWT code
- To: tromey at redhat dot com
- Subject: Re: Patch: more AWT code
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Wed, 03 Jan 2001 14:32:39 +1300
- CC: Java Patch List <java-patches at sourceware dot cygnus dot com>
- References: <87itnx8osl.fsf@creche.redhat.com>
Hmm. Lots of these methods don't exist, according to the JDK 1.3 docs. What spec were you
working from? I suspect the peer should be mantaining Adjustable objects that provide this
functionality, which client code can access with getVAdjustable()/getHAdjustable().
regards
[ bryce ]
Tom Tromey wrote:
>
> + public int getBlockIncrement ()
> + {
> + return block;
> + }
> +
> + public int getMaximum ()
> + {
> + Dimension child_d = component[0].getPreferredSize ();
> + Dimension our_d = getViewportSize ();
> +
> + int xmax = Math.max (0, child_d.width - our_d.width);
> + int ymax = Math.max (0, child_d.height - our_d.height);
> +
> + return (orient == Adjustable.HORIZONTAL) ? xmax : ymax;
> + }
> +
> + public int getMinimum ()
> + {
> + return 0;
> + }
> +
> + public int getOrientation ()
> + {
> + return orient;
> + }