Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.awt.color.HSBPixelFormat

java.lang.Object
  |
  +--java.text.Format
        |
        +--ncsa.horizon.awt.color.PixelFormat
              |
              +--ncsa.horizon.awt.color.HSBPixelFormat

public class HSBPixelFormat
extends PixelFormat
a Format object for reading in an HSB color and opacity.

This Format supports the following formats for describing a color and its opacity:

The Object handed to format as well as the result of parsing is a 4-element byte array containing the red, green, blue, and alpha values.

See Also:
Serialized Form

Fields inherited from class ncsa.horizon.awt.color.PixelFormat
FOURCOMPONENT, HEX_0x, HEX_lb, NEWTYPE
 
Constructor Summary
HSBPixelFormat()
          construct a PixelFormat that will format colors as decimal HSB values.
HSBPixelFormat(java.text.NumberFormat format)
          contruct this Format objects to format HSB pixel values using a specified NumberFormat
 
Method Summary
java.lang.StringBuffer format(byte[] pixel, java.lang.StringBuffer buf)
          format the 4-component pixel value and append results to a buffer.
java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
           
static void main(java.lang.String[] args)
           
byte[] parsePixel(java.lang.String s, java.text.ParsePosition stat)
           
 
Methods inherited from class ncsa.horizon.awt.color.PixelFormat
format, format, parseObject, parsePixel
 
Methods inherited from class java.text.Format
clone, format, format, parseObject, parseObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

HSBPixelFormat

public HSBPixelFormat()
construct a PixelFormat that will format colors as decimal HSB values. The format values will be written to 3 decimal places.

HSBPixelFormat

public HSBPixelFormat(java.text.NumberFormat format)
contruct this Format objects to format HSB pixel values using a specified NumberFormat
Method Detail

format

public java.lang.StringBuffer format(byte[] pixel,
                           java.lang.StringBuffer buf)
format the 4-component pixel value and append results to a buffer. Subclasses should override this method to support new formats.
Overrides:
format in class PixelFormat

format

public java.lang.StringBuffer format(java.lang.Object obj,
                           java.lang.StringBuffer toAppendTo,
                           java.text.FieldPosition pos)
Overrides:
format in class PixelFormat

parsePixel

public byte[] parsePixel(java.lang.String s,
                         java.text.ParsePosition stat)
Overrides:
parsePixel in class PixelFormat

main

public static void main(java.lang.String[] args)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD