4189647 - Dimension2D.Float/.Double

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

4189647 - Dimension2D.Float/.Double

Philip Gust

Sometimes it's convenient to work with size and origin.  Our graphics system adds some operations on Rectangle2D.Float/Double including the ability to construct one using a Point2D and a Dimension2D, and the ability to ask for size and origin of a Rectangle2D.Float/Double separate from bounds.  We had to implement our own equivalent to Dimension2D.Float/Double because one wasn't provided in Java2D.  I'd also suggest adding the constructors and the size/origin enquiry functions as appropriate to Java2D shape classes.  We find them to be very useful.

> Hi Ben,
> Since it was only used for doing component layouts (in integer
> it wasn't really needed anywhere, though I suppose that this begs
> question as to why Dimension2D was created in the first place. 
> (scratches head, doesn't remember).
>Do you have a use case for it now?
> LOUD, Ben wrote:
>> I was just wondering, is there any reason why there are no Float
and Double subclasses of Dimension2D? I'm suprised such a simple thing
was never included.
>> Thats all. Thanks!
>> "Warning:
>> The information contained in this email and any attached
files is
>> confidential to BAE Systems Australia. If you are not the
>> recipient, any use, disclosure or copying of this email or
>> attachments is expressly prohibited.  If you have
received this email
>> in error, please notify us immediately. VIRUS: Every care
has been
>> taken to ensure this email and its attachments are virus
>> however, any loss or damage incurred in using this email is
not the
>> sender's responsibility.  It is your responsibility to
ensure virus
>> checks are completed before installing any data sent in this
email to
>> your computer."

Philip Gust
Nouveau Systems, Inc.

phone: +1 650 961-7992
fax:   +1 520 843-7217

mailto: [hidden email]

Nouveau Systems products seamlessly integrate collaboration, information management, processes automation, and capture of mission-critical knowledge.  To learn how Nouveau Systems products can help your organization drive innovation, visit: http://www.NouveauSystems.com