canvas
Interface CanvasComponent

All Known Subinterfaces:
RotatingCanvasComponent
All Known Implementing Classes:
DrawingPane, PictureComponent, ShapeComponent, StringComponent

public interface CanvasComponent

This interface should be implemented by any objects that Can be added to and manipulated by DrawingPanes.


Method Summary
 int getHeight()
          Returns the height of the component
 int getWidth()
          Returns the width of the component
 void moveTo(double x, double y)
          Moves the component to the given coordinates
 void redraw()
          Calls Component.repaint() in a thread-safe way.
 void resizeTo(double width, double height)
          Resizes the component to the given dimensions
 void setFeedbackText(String text)
          If possible, sets the text at the bottom of the window that this component is displayed in.
 void smoothMove(double x, double y, int milliseconds)
          Smoothly moves this component to the given coordinates over the time interval given.
 void smoothResize(double width, double height, int milliseconds)
          Smoothly resizes this component to the given dimensions over the time interval given.
 

Method Detail

redraw

public void redraw()
Calls Component.repaint() in a thread-safe way. The component is re-drawn on the screen. This is especially useful for PictureComponent objects.


resizeTo

public void resizeTo(double width,
                     double height)
Resizes the component to the given dimensions


smoothResize

public void smoothResize(double width,
                         double height,
                         int milliseconds)
Smoothly resizes this component to the given dimensions over the time interval given.


moveTo

public void moveTo(double x,
                   double y)
Moves the component to the given coordinates


smoothMove

public void smoothMove(double x,
                       double y,
                       int milliseconds)
Smoothly moves this component to the given coordinates over the time interval given.


getWidth

public int getWidth()
Returns the width of the component


getHeight

public int getHeight()
Returns the height of the component


setFeedbackText

public void setFeedbackText(String text)
If possible, sets the text at the bottom of the window that this component is displayed in.