net.refractions.udig.tools.edit.animation
Class MessageBubble

java.lang.Object
  extended by AbstractDrawCommand
      extended by net.refractions.udig.tools.edit.animation.MessageBubble

public class MessageBubble
extends AbstractDrawCommand

Creates a semi transparent bubble (OSX like) that show a message to the user and disappears after a few seconds.

Since:
1.1.0
Author:
Jesse

Constructor Summary
MessageBubble(int x, int y, java.lang.String message, short delay)
           
 
Method Summary
 java.awt.Color getBubbleColor()
          Returns the color used to draw the Message Bubble
 short getFrameInterval()
           
 java.awt.Color getTextColor()
          Returns the color used to draw the Message
 java.awt.Rectangle getValidArea()
           
 boolean hasNext()
           
 void nextFrame()
           
 void run(IProgressMonitor monitor)
           
 void setBubbleColor(java.awt.Color bubbleColor)
          Sets the color used to draw the Message Bubble.
 void setHorizontalBorder(int horizontalBorder)
          Sets the space between the edge of the bubble and the text.
 void setHorizontalCornerArc(int horizontalCornerArc)
          Sets the horizontal Arc of the bubble corners for the four edges.
 void setTextColor(java.awt.Color textColor)
          Sets the color used to draw the Message.
 void setValid(boolean valid)
           
 void setVerticalBorder(int verticalBorder)
          Sets the space between the edge of the bubble and the text.
 void setVerticalCornerArc(int verticalCornerArc)
          Sets the vertical Arc of the bubble corners for the four edges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageBubble

public MessageBubble(int x,
                     int y,
                     java.lang.String message,
                     short delay)
Parameters:
x - upperLeft of message
y - upperLeft of message
message - message to display
delay - the length of time to show the message
Method Detail

getFrameInterval

public short getFrameInterval()

hasNext

public boolean hasNext()

nextFrame

public void nextFrame()

run

public void run(IProgressMonitor monitor)
         throws java.lang.Exception
Throws:
java.lang.Exception

getValidArea

public java.awt.Rectangle getValidArea()

setHorizontalBorder

public void setHorizontalBorder(int horizontalBorder)
Sets the space between the edge of the bubble and the text. Default = 10 pixels

Parameters:
horizontalBorder - border along the x-axis. In pixels.

setVerticalBorder

public void setVerticalBorder(int verticalBorder)
Sets the space between the edge of the bubble and the text. Default = 10 pixels

Parameters:
verticalBorder - border along the y-axis. In pixels.

setHorizontalCornerArc

public void setHorizontalCornerArc(int horizontalCornerArc)
Sets the horizontal Arc of the bubble corners for the four edges. Default is 15 pixels.

Parameters:
horizontalCornerArc - the horizontal Arc of the bubble corners for the four edges in pixels.

setVerticalCornerArc

public void setVerticalCornerArc(int verticalCornerArc)
Sets the vertical Arc of the bubble corners for the four edges. Default is 15 pixels.

Parameters:
verticalCornerArc - the vertical Arc of the bubble corners for the four edges in pixels.

getBubbleColor

public java.awt.Color getBubbleColor()
Returns the color used to draw the Message Bubble

Returns:
the color used to draw the Message Bubble

setBubbleColor

public void setBubbleColor(java.awt.Color bubbleColor)
Sets the color used to draw the Message Bubble. Default is Color(0,0,0,167);

Parameters:
bubbleColor - the new color to use

getTextColor

public java.awt.Color getTextColor()
Returns the color used to draw the Message

Returns:
the color used to draw the Message

setTextColor

public void setTextColor(java.awt.Color textColor)
Sets the color used to draw the Message. Default is Color(200,200,200,167);

Parameters:
bubbleColor - the new color to use

setValid

public void setValid(boolean valid)