com.davisor.graphics
Class IndirectAnnotatedPaint

java.lang.Object
  extended bycom.davisor.graphics.IndirectAnnotatedPaint
All Implemented Interfaces:
com.davisor.core.Annotated, AnnotatedPaint, java.awt.Paint, java.awt.Transparency
Direct Known Subclasses:
AnnotatedPaintValue

public class IndirectAnnotatedPaint
extends java.lang.Object
implements AnnotatedPaint

IndirectAnnotatedPaint assosiates annotation to a Paint.

Since:
JDK1.3

Field Summary
protected  int M_channelIndex
          Annotation channel index assosiated with the wrapped paint.
protected  short M_contextIndex
          Annotation context index assosiated with the wrapped paint.
protected  long M_elementIndex
          Annotation element index assosiated with the wrapped paint.
protected  java.lang.String M_id
          Annotation description assosiated with the wrapped paint.
protected  java.awt.Paint M_paint
          Underlying paint.
protected  java.util.Properties M_properties
          Annotation attributes associated with the wrapped paint.
 
Fields inherited from interface java.awt.Transparency
BITMASK, OPAQUE, TRANSLUCENT
 
Constructor Summary
IndirectAnnotatedPaint(IndirectAnnotatedPaint iap)
          Shallow copy constructor.
IndirectAnnotatedPaint(java.awt.Paint paint, com.davisor.core.Annotated annotation)
          Creates a new annotated paint.
IndirectAnnotatedPaint(java.awt.Paint paint, java.util.Properties properties, long elementIndex, int channelIndex, short contextIndex)
          Constructs an annotated paint from a paint and annotation string.
IndirectAnnotatedPaint(java.awt.Paint paint, java.util.Properties properties, long elementIndex, int channelIndex, short contextIndex, java.lang.String id)
          Deprecated. explicit identity strings are obsolete
 
Method Summary
 java.awt.PaintContext createContext(java.awt.image.ColorModel cm, java.awt.Rectangle deviceBounds, java.awt.geom.Rectangle2D userBounds, java.awt.geom.AffineTransform xform, java.awt.RenderingHints hints)
           
 boolean equals(java.lang.Object o)
          Tests if given object is equal to this.
 java.lang.String getAddress()
          Deprecated. Use getProperty(java.lang.String) instead (with arg "href")
 int getChannelIndex()
          Returns the channel index of this paint.
 short getContextIndex()
          Returns the context index of this paint.
 java.lang.String getDescription()
          Deprecated. Use getProperty(java.lang.String) instead (with arg "alt")
 long getElementIndex()
          Returns the element index of this paint.
 java.lang.String getID()
          Returns the identity of this paint.
 java.awt.Paint getPaint()
          Returns the actual Paint
 java.util.Properties getProperties()
          Returns the annotation attributes.
 java.lang.String getProperty(java.lang.String name)
          Returns the value of the asked annotation attribute or null.
 java.util.Set getPropertyNames()
          Returns the property names as a java.util.Set.
 java.lang.String getTarget()
          Deprecated. Use getProperty(java.lang.String) instead (with arg "target")
 int getTransparency()
          Returns the type of this Transparency.
 int hashCode()
          Computes this object hash code.
 java.lang.String toString()
          Gets the string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

M_channelIndex

protected int M_channelIndex
Annotation channel index assosiated with the wrapped paint.


M_contextIndex

protected short M_contextIndex
Annotation context index assosiated with the wrapped paint.


M_elementIndex

protected long M_elementIndex
Annotation element index assosiated with the wrapped paint.


M_id

protected java.lang.String M_id
Annotation description assosiated with the wrapped paint.


M_paint

protected java.awt.Paint M_paint
Underlying paint.


M_properties

protected java.util.Properties M_properties
Annotation attributes associated with the wrapped paint.

Constructor Detail

IndirectAnnotatedPaint

public IndirectAnnotatedPaint(IndirectAnnotatedPaint iap)
Shallow copy constructor.

Parameters:
iap - source data

IndirectAnnotatedPaint

public IndirectAnnotatedPaint(java.awt.Paint paint,
                              com.davisor.core.Annotated annotation)
Creates a new annotated paint.

Parameters:
paint - paint to be annotated
annotation - annotation information the paint is to be annotated with

IndirectAnnotatedPaint

public IndirectAnnotatedPaint(java.awt.Paint paint,
                              java.util.Properties properties,
                              long elementIndex,
                              int channelIndex,
                              short contextIndex)
Constructs an annotated paint from a paint and annotation string.

Parameters:
paint - paint to be annotated
properties - annotation attributes (may be null)
elementIndex - annotation element index
channelIndex - annotation channel index
contextIndex - annotation context index

IndirectAnnotatedPaint

public IndirectAnnotatedPaint(java.awt.Paint paint,
                              java.util.Properties properties,
                              long elementIndex,
                              int channelIndex,
                              short contextIndex,
                              java.lang.String id)
Deprecated. explicit identity strings are obsolete

Constructs an annotated paint from a paint and annotation string.

Parameters:
paint - paint to be annotated
properties - annotation attributes (may be null)
elementIndex - annotation element index
channelIndex - annotation channel index
contextIndex - annotation context index
id - paint identity (may be null)
Method Detail

getAddress

public java.lang.String getAddress()
Deprecated. Use getProperty(java.lang.String) instead (with arg "href")

Gets the annotation address assosiated to this object.

Specified by:
getAddress in interface com.davisor.core.Annotated

getDescription

public java.lang.String getDescription()
Deprecated. Use getProperty(java.lang.String) instead (with arg "alt")

Gets the annotation description assosiated to this object.

Specified by:
getDescription in interface com.davisor.core.Annotated

getChannelIndex

public int getChannelIndex()
Returns the channel index of this paint.

Specified by:
getChannelIndex in interface com.davisor.core.Annotated

getContextIndex

public short getContextIndex()
Returns the context index of this paint.

Specified by:
getContextIndex in interface com.davisor.core.Annotated

getElementIndex

public long getElementIndex()
Returns the element index of this paint.

Specified by:
getElementIndex in interface com.davisor.core.Annotated

getID

public java.lang.String getID()
Returns the identity of this paint.

Specified by:
getID in interface com.davisor.core.Annotated

getProperties

public java.util.Properties getProperties()
Returns the annotation attributes. May return null.

Specified by:
getProperties in interface com.davisor.core.Annotated

getProperty

public java.lang.String getProperty(java.lang.String name)
Returns the value of the asked annotation attribute or null.

Specified by:
getProperty in interface com.davisor.core.Annotated

getPropertyNames

public java.util.Set getPropertyNames()
Returns the property names as a java.util.Set.


getTarget

public java.lang.String getTarget()
Deprecated. Use getProperty(java.lang.String) instead (with arg "target")

Gets the annotation target frame assosiated to this object.

Specified by:
getTarget in interface com.davisor.core.Annotated

equals

public boolean equals(java.lang.Object o)
Tests if given object is equal to this.


hashCode

public int hashCode()
Computes this object hash code.


toString

public java.lang.String toString()
Gets the string representation of this object.


createContext

public java.awt.PaintContext createContext(java.awt.image.ColorModel cm,
                                           java.awt.Rectangle deviceBounds,
                                           java.awt.geom.Rectangle2D userBounds,
                                           java.awt.geom.AffineTransform xform,
                                           java.awt.RenderingHints hints)
Specified by:
createContext in interface java.awt.Paint

getTransparency

public int getTransparency()
Returns the type of this Transparency.

Specified by:
getTransparency in interface java.awt.Transparency

getPaint

public java.awt.Paint getPaint()
Returns the actual Paint



Copyright © 2001-2004 Davisor Oy. All Rights Reserved.