Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4131816

API review changes for java.awt package

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.2.0
    • 1.2.0
    • client-libs
    • None
    • 2d
    • 1.2beta4
    • sparc
    • solaris_2.5.1
    • Not verified

      New Class java.awt.RenderingHints
      =================================

      Add a new class to encapsulate the concept of the rendering hints in
      an extensible and encapsulatable manner (see separate RFE for class
      definition).




      Class java.awt.Color
      ====================

      Add a RenderingHints object to the createContext method as per the
      updated Paint interface:

      createContext(ColorModel cm,
      Rectangle deviceBounds,
      Rectangle2D userBounds,
      AffineTransform xform,
      RenderingHints hints)

      Remove the getRGBA() method which was redundant with the getRGB() method:

      getRGBA() => deleted





      Class java.awt.Graphics2D
      =========================

      Add a boolean return value to one of the new drawImage variants:

      public boolean drawImage(Image img,
      AffineTransform xform,
      ImageObserver obs)

      Change the signature of the drawRenderableImage method (remove the
      renderHints and renderHintsObserved arguments):

      public void drawRenderableImage(RenderableImage img,
      AffineTransform xform,
      Hashtable renderHints,
      Hashtable renderHintsObserved)
      becomes => public void drawRenderableImage(RenderableImage img,
      AffineTransform xform)

      (Modify any methods that refer to the StyledString object as per the
       change request being separately prepared for the font APIs.)

      (Remove the drawString method that takes TextLayout argument as per
       the change request being separately prepared for the font APIs.)

      Change the name of the rendering hint methods:

      setRenderingHints() => setRenderingHint()
      getRenderingHints() => getRenderingHint()

      Add a method to set and get all of the rendering hints in one call:

      public RenderingHints getRenderingHints()
      public void setRenderingHints(RenderingHints hints)




      Class java.awt.GraphicsConfiguration
      ====================================

      Remove the empty public constructor (the class is totally abstract) by
      creating a protected one:

      protected GraphicsConfiguration() {}




      Class java.awt.GraphicsDevice
      =============================

      Remove the empty public constructor (the class is totally abstract) by
      creating a protected one:

      protected GraphicsDevice() {}




      Class java.awt.GraphicsEnvironment
      ==================================

      Remove the public method (make the ImagingLib an internal interface):

      public ImagingLib getImagingLib()

      (Modify the methods to return lists of fonts as per the change request
       being separately prepared for the font APIs.)

      Move the method to get a PrinterJob object to a static
      method on the PrinterJob class:

      public PrinterJob getPrinterJob() =>
      public static PrinterJob PrinterJob.getPrinterJob()

            flar Jim Graham
            flar Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: