This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: more AWT code


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;
> +    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]