standup.clouds
Class STANDUPShape

java.lang.Object
  extended by standup.clouds.STANDUPShape
Direct Known Subclasses:
STANDUPShapeCloudButton

public class STANDUPShape
extends Object

A STANDUPShape is an element that has a background image, can optionally be highlighted, and has space for a CloudLabel. The image is provided as a filename that is assumed to be acceptable by GUIGraphicsHandler.getGUIImage(), but together with it is a specification of the BubbleLabel 'canvas' in terms of width, height, xoffset and yoffset, defined in relative terms to the image width and height!

Author:
Ruli Manurung

Field Summary
(package private)  Dimension dimension
           
protected  BufferedImage img
          The default background image of this STANDUPShape
protected  BufferedImage imgHighlighted
          The 'highlighted' background image of this STANDUPShape, i.e.
(package private)  Point location
           
(package private)  Dimension maxDimension
           
protected  ShapeDetails shapeDetails
          ShapeDetails for this shape.
 
Constructor Summary
STANDUPShape(Point p, Dimension d, Dimension md, ShapeDetails shd)
           
STANDUPShape(Point p, Dimension d, ShapeDetails shd)
           
 
Method Summary
(package private)  boolean contains(int pointx, int pointy)
           
(package private)  Dimension getBubbleLabelCanvasDimension()
           
(package private)  Dimension getDimension()
          specific constructor for talking head -- point and dimension are calculated from height TODO this is so different, it shouldn't be a MyShape, really...
(package private)  Point getLocation()
           
(package private)  Dimension getMaximumBubbleLabelCanvasDimension()
          This Dimension is used for laying out the BubbleLabel.
(package private)  ShapeDetails getShapeDetails()
           
(package private)  void myDraw(Graphics2D g2)
           
(package private)  void myDrawHighlighted(Graphics2D g2)
           
(package private)  void setImages()
           
(package private)  void setLocation(Point newlocation)
           
(package private)  void setSize(Dimension newdimension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

img

protected BufferedImage img
The default background image of this STANDUPShape


imgHighlighted

protected BufferedImage imgHighlighted
The 'highlighted' background image of this STANDUPShape, i.e. when it is focussed


shapeDetails

protected final ShapeDetails shapeDetails
ShapeDetails for this shape.


dimension

Dimension dimension

maxDimension

final Dimension maxDimension

location

Point location
Constructor Detail

STANDUPShape

STANDUPShape(Point p,
             Dimension d,
             ShapeDetails shd)

STANDUPShape

STANDUPShape(Point p,
             Dimension d,
             Dimension md,
             ShapeDetails shd)
Method Detail

setImages

void setImages()

getDimension

Dimension getDimension()
specific constructor for talking head -- point and dimension are calculated from height TODO this is so different, it shouldn't be a MyShape, really...

Parameters:
height -
imageFile -
imageFileHighlighted -
shtype -
comp -

getBubbleLabelCanvasDimension

Dimension getBubbleLabelCanvasDimension()

getMaximumBubbleLabelCanvasDimension

Dimension getMaximumBubbleLabelCanvasDimension()
This Dimension is used for laying out the BubbleLabel. We can't use getBubbleLabelCanvasDimension() because we don't know the dimensions -- it may be (0,0) for all we know!

Returns:
Dimensions for laying out the BubbleLabel

getLocation

Point getLocation()

contains

boolean contains(int pointx,
                 int pointy)

myDraw

void myDraw(Graphics2D g2)

myDrawHighlighted

void myDrawHighlighted(Graphics2D g2)

setLocation

void setLocation(Point newlocation)

setSize

void setSize(Dimension newdimension)

getShapeDetails

ShapeDetails getShapeDetails()