InkPanel Class Reference

List of all members.

Public Member Functions

 InkPanel ()
 Default Catmull-Rom method.
 InkPanel (InkRenderer inkRenderer, Color bgColor)
 Choose your own renderer.
void addInk (Ink ink)
Ink addNewInk ()
void clear ()
 Remove all the ink from the ink panel.
void displayInvertedInkColor ()
List< InkgetAllInk ()
double getScale ()
void removeLastBatchOfInk ()
 Used to remove the most-recently added ink object.
void setAllInk (List< Ink > theInk)
void setRenderer (InkRenderer r)
void setScale (double theScale)

Protected Member Functions

Override void paintComponent (Graphics g)
 Redraw the ink strokes.

Protected Attributes

List< InkinkWell = Collections.synchronizedList(new LinkedList<Ink>())
 A collection of ink objects that have been added to this JPanel.

Detailed Description

Renders Ink in a JPanel using catmull-rom splines. You may swap in simpler renderers if this becomes slow. Also, this provides some customization that allows you to zoom in and out, pan, and align the ink with imagery. =)

This software is distributed under the BSD License.

Ron B Yeh (ronyeh(AT)

Definition at line 30 of file

Constructor & Destructor Documentation

InkPanel ( InkRenderer  inkRenderer,
Color  bgColor 

Choose your own renderer.


Definition at line 65 of file

Member Function Documentation

void addInk ( Ink  ink  ) 


Definition at line 73 of file

References InkPanel.inkWell.

Referenced by GestureDatabase.display().

Ink addNewInk (  ) 

the newly added Ink object.

Definition at line 82 of file

References InkPanel.inkWell.

Referenced by PenSimulator.mouseReleased().

List<Ink> getAllInk (  ) 

the reference to the ink. This is NOT a copy!

Definition at line 107 of file

References InkPanel.inkWell.

Override void paintComponent ( Graphics  g  )  [protected]

Redraw the ink strokes.

See also:

Definition at line 121 of file

References InkPanel.inkWell, InkRenderer.renderToG2D(), InkRenderer.setInk(), and InkRenderer.useInvertedInkColors().

void setAllInk ( List< Ink theInk  ) 


Definition at line 156 of file

References InkPanel.inkWell.

void setRenderer ( InkRenderer  r  ) 


Definition at line 164 of file

void setScale ( double  theScale  ) 


Definition at line 171 of file

Member Data Documentation

List<Ink> inkWell = Collections.synchronizedList(new LinkedList<Ink>()) [protected]

A collection of ink objects that have been added to this JPanel.

Feel free to access it, if you are a subclass. Make sure to call repaint though!

Definition at line 43 of file

Referenced by InkPanel.addInk(), InkPanel.addNewInk(), InkPanel.clear(), InkPanel.getAllInk(), InkPanel.paintComponent(), InkPanel.removeLastBatchOfInk(), and InkPanel.setAllInk().

The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:41 2007 for R3 Paper Toolkit by  doxygen 1.4.7