org.rr0.is.presentation.view.report.applet.draw
Class DrawShape

Direct Known Subclasses:
ArcShape, OvalShape, PathShape, PolygonShape, RectangleShape

public abstract class DrawShape
implements Cloneable

A shape that can be manipulated in a DrawView.

Author:
Jerôme Beau
Version: 24 oct. 2003 19:35:03

Field Summary
 private intalphaMask
           
 protected doubleangle
           
 protected Rectanglebounds
           
 private Colorcolor
           
 private intcolorMask
           
 private DirectColorModelcolorModel
           
 protected Componentcomponent
           
 final static intCORNER_SIZE
           
 final static intHALF_CORNER_SIZE
           
 private ImagehaloImage
           
 private doublehaloScale
           
 protected booleanselected
           
 private inttransparency
           

Constructor Summary
DrawShape(Component component)
           

Method Summary
 Objectclone()
           
 protected abstract voidcompute()
           
 RectanglegetBounds()
          Return the bounding box of the shape.
 ColorgetColor()
           
 intgetHeight()
           
 DimensiongetSize()
           
 intgetTransparency()
           
 intgetWidth()
           
 intgetX()
           
 intgetY()
           
 booleanisSelected()
           
 voidpaint(Graphics g, Rectangle bounds)
           
 abstract voidpaint(Graphics g, Color color, Rectangle bounds)
           
 voidpaint(Graphics g)
           
 private voidpaintHalo(Graphics g, Rectangle bounds)
           
 protected voidpaintSelection(Graphics g, Rectangle bounds)
           
 private voidpaintTransparent(Graphics g, Rectangle bounds, int transparency)
           
 voidscale(double scaleFactor)
           
 voidscaleHeight(double heightRatio)
           
 voidscaleWidth(double widthRatio)
           
 voidsetAngle(double angle)
           
 voidsetColor(Color green)
           
 voidsetHaloScale(double haloScale)
           
 voidsetHeight(int height)
           
 voidsetLocation(int x, int y)
           
 voidsetSelected(boolean b)
           
 voidsetTransparency(int alpha)
           
 voidsetWidth(int width)
           
 voidsetX(int x)
           
 voidsetY(int y)
           
 StringtoUUDF()
           

Field Detail

alphaMask

private int alphaMask

angle

protected double angle

bounds

protected Rectangle bounds

color

private Color color

colorMask

private int colorMask

colorModel

private DirectColorModel colorModel

component

protected Component component

CORNER_SIZE

public final static int CORNER_SIZE

HALF_CORNER_SIZE

public final static int HALF_CORNER_SIZE

haloImage

private Image haloImage

haloScale

private double haloScale

selected

protected boolean selected

transparency

private int transparency
Constructor Detail

DrawShape

public DrawShape(Component component)
Method Detail

clone

public Object clone()
throws java.lang.CloneNotSupportedException

compute

protected abstract void compute()

getBounds

public Rectangle getBounds()
Return the bounding box of the shape.

getColor

public Color getColor()

getHeight

public int getHeight()

getSize

public Dimension getSize()

getTransparency

public int getTransparency()

getWidth

public int getWidth()

getX

public int getX()

getY

public int getY()

isSelected

public boolean isSelected()

paint

public void paint(Graphics g, Rectangle bounds)

paint

public abstract void paint(Graphics g, Color color, Rectangle bounds)

paint

public void paint(Graphics g)

paintHalo

private void paintHalo(Graphics g, Rectangle bounds)

paintSelection

protected void paintSelection(Graphics g, Rectangle bounds)

paintTransparent

private void paintTransparent(Graphics g, Rectangle bounds, int transparency)

scale

public void scale(double scaleFactor)

scaleHeight

public void scaleHeight(double heightRatio)

scaleWidth

public void scaleWidth(double widthRatio)

setAngle

public void setAngle(double angle)

setColor

public void setColor(Color green)

setHaloScale

public void setHaloScale(double haloScale)

setHeight

public void setHeight(int height)

setLocation

public void setLocation(int x, int y)

setSelected

public void setSelected(boolean b)

setTransparency

public void setTransparency(int alpha)

setWidth

public void setWidth(int width)

setX

public void setX(int x)

setY

public void setY(int y)

toUUDF

public String toUUDF()

Association Links

to Class java.awt.Rectangle

to Class java.awt.Color

to Class java.awt.Component

to Class java.awt.image.DirectColorModel

to Class java.awt.Image