public class MainModel extends Object implements GestureEventListener
| Modifier and Type | Field and Description |
|---|---|
static String |
GESTURE_SET |
Hashtable<String,GestureClass> |
gestureClassesTable |
| Constructor and Description |
|---|
MainModel(Configuration conf,
Configuration gestConf)
Constructs a new main model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMapping(GestureToActionMapping gm)
Adds a gesture-action mapping
|
void |
clearData()
Clear the list models and the mapping tables
|
void |
configureInputDevice() |
Configuration |
getConfiguration()
Returns the Configuration
|
GestureActionManager |
getEventManager()
Returns the event manager
|
Configuration |
getGestureConfiguration()
Get GestureConfiguration
|
SortedListModel<GestureClass> |
getGestureListModel()
Returns the model for the gesture List
|
GestureSet |
getGestureSet()
Returns the gesture set
|
String |
getGestureSetFileName()
Returns the project file
|
SortedListModel<GestureToActionMapping> |
getMappingListModel()
Returns the model for the mapping List
|
Hashtable<GestureClass,GestureToActionMapping> |
getMappings() |
File |
getProjectFile()
Returns the project file
|
String |
getProjectName()
Adds the gesture set to the gesture main model
|
void |
handleChunks(List<?> chunks) |
void |
handleGesture(Gesture<?> gesture) |
void |
initRecogniser(GestureSet gestureSet) |
void |
loadData(StorageEngine engine)
Loads the data.
|
void |
loadGestureSet(GestureSet gestureSet)
Adds the gesture set to the gesture main model
|
boolean |
minimizeAsStartup()
Application should be minimized
|
boolean |
needSave()
Should project be saved?
|
void |
removeMapping(GestureToActionMapping gm)
Removes a gesture-action mapping
|
void |
resetInputDevice()
Configure Input Client
|
void |
setConfiguration(Configuration c)
Set the configuration
|
void |
setGestureConfiguration(Configuration conf)
Set GestureConfiguration
|
void |
setGestureSetFileName(String name)
Set the project name
|
void |
setNeedSave(boolean b)
Set toBeSaved flag
|
void |
setProjectFile(File f)
Set the project file
|
void |
setProjectName(String name)
Set the project name
|
public Hashtable<String,GestureClass> gestureClassesTable
public static final String GESTURE_SET
public MainModel(Configuration conf, Configuration gestConf)
engine - the storage engine used by the storage manager.public void loadData(StorageEngine engine)
engine - the storage engine used by the storage manager.public void loadGestureSet(GestureSet gestureSet)
gestureSet - the gesture set to be added.public void clearData()
public void setProjectFile(File f)
f - the xml file in which the project is savedpublic void setProjectName(String name)
name - the name of the projectpublic File getProjectFile()
public void setGestureSetFileName(String name)
name - the name of the projectpublic String getGestureSetFileName()
public String getProjectName()
gestureSet - the gesture set to be added.public GestureSet getGestureSet()
public Hashtable<GestureClass,GestureToActionMapping> getMappings()
public void addMapping(GestureToActionMapping gm)
gm - the mapping to be addedpublic void removeMapping(GestureToActionMapping gm)
the - mapping to be removedpublic SortedListModel<GestureClass> getGestureListModel()
public SortedListModel<GestureToActionMapping> getMappingListModel()
public GestureActionManager getEventManager()
public Configuration getConfiguration()
public void setConfiguration(Configuration c)
c - the Configuration to be setpublic void setNeedSave(boolean b)
the - new value of the flagpublic boolean needSave()
public void initRecogniser(GestureSet gestureSet)
public void resetInputDevice()
public void configureInputDevice()
public Configuration getGestureConfiguration()
public void setGestureConfiguration(Configuration conf)
public boolean minimizeAsStartup()
public void handleChunks(List<?> chunks)
handleChunks in interface GestureEventListenerpublic void handleGesture(Gesture<?> gesture)
handleGesture in interface GestureEventListenerCopyright © 2007-2012 Global Information Systems Group, ETH Zurich. All Rights Reserved.