FROG

FROG Recognizer of Gestures

GesturePanel Class Reference

Represents a single gesture. More...

Inherits javax::swing::JPanel.

List of all members.

Public Member Functions

 GesturePanel (String name, BufferedImage icon, int index, GestureGridPanel listener)
 Creates a new GesturePanel with a given name and icon, it's index in the GestureGridPanel, and the GestureGridPanel as a listener to its actions.
int getIndex ()
 Get the index of this gesture.
boolean getSelected ()
 Determine if this gesture has already been selected or not.
void setIndex (int i)
 Sets the index of this gesture.
void setSelected (boolean selected)
 Sets this panels selected state.

Protected Member Functions

void refresh (BufferedImage img)
 Replaces the gesture icon with a new one.

Detailed Description

Represents a single gesture.

Several are created by GestureGridPanel to represent an entire Session. Contains a Train, Edit, and Delete button, the gesture's icon if there is one, and the gesture's name.

Author:
Team Better Recognize

Constructor & Destructor Documentation

GesturePanel ( String  name,
BufferedImage  icon,
int  index,
GestureGridPanel  listener 
)

Creates a new GesturePanel with a given name and icon, it's index in the GestureGridPanel, and the GestureGridPanel as a listener to its actions.

Parameters:
name the name of this gesture.
icon the icon of this gesture or null if this gesture has no icon.
index this GesturePanel's position on GestureGridPanel's Vector.
listener a reference to GestureGridPanel so it may listen to Action and Mouse Events.

Member Function Documentation

int getIndex (  ) 

Get the index of this gesture.

Returns:
this panel's index

Here is the caller graph for this function:

boolean getSelected (  ) 

Determine if this gesture has already been selected or not.

Returns:
true if this gesture has been selected; false otherwise.

Here is the caller graph for this function:

void refresh ( BufferedImage  img  )  [protected]

Replaces the gesture icon with a new one.

Parameters:
img the new icon for this GesturePanel to use. A null image will remove the icon.
void setIndex ( int  i  ) 

Sets the index of this gesture.

Parameters:
i the index to be set to. If i < 0 then the index is unchanged.
void setSelected ( boolean  selected  ) 

Sets this panels selected state.

Parameters:
selected whether this panel is selected or not.

The documentation for this class was generated from the following file:
  • /Users/dev/Documents/SVN brazos.cs.tcu.edu/trunk/FROG/src/frog/gui/GesturePanel.java
 All Classes Namespaces Files Functions Variables