org.jocl.cloth
Class ClothApplicationGUI

java.lang.Object
  extended by org.jocl.cloth.ClothApplicationGUI

 class ClothApplicationGUI
extends java.lang.Object

The main user interface class for the cloth simulation application


Nested Class Summary
(package private) static interface ClothApplicationGUI.SimulationType
          Interface describing a selectable simulation type and the associated simulation factory
 
Constructor Summary
ClothApplicationGUI(ClothApplication clothApplication)
          Creates the main user interface for the simulator.
 
Method Summary
protected  java.lang.String getDataPath()
          Return the path to the default input data directory
protected  java.util.List<ClothApplicationGUI.SimulationType> getSimulationTypes()
          Returns the list of supported simulation types
(package private)  ClothData loadClothDataInBackground(java.lang.String fileName)
          Executes ClothApplicationSetup.loadClothData(String) in a background task, showing a modal dialog while the task is running.
(package private)  ClothData optimizeClothDataInBackground(ClothData clothData)
          Executes ClothOptimizer.optimize(ClothData) in a background task, showing a modal dialog while the task is running.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClothApplicationGUI

ClothApplicationGUI(ClothApplication clothApplication)
Creates the main user interface for the simulator.

Parameters:
clothApplication - The cloth application main class
Method Detail

getDataPath

protected java.lang.String getDataPath()
Return the path to the default input data directory

Returns:
he path to the default input data directory

getSimulationTypes

protected java.util.List<ClothApplicationGUI.SimulationType> getSimulationTypes()
Returns the list of supported simulation types

Returns:
The list of supported simulation types

optimizeClothDataInBackground

ClothData optimizeClothDataInBackground(ClothData clothData)
Executes ClothOptimizer.optimize(ClothData) in a background task, showing a modal dialog while the task is running.

Parameters:
clothData - The ClothData to optimize
Returns:
The optimized cloth data, or null of the task did not complete normally.

loadClothDataInBackground

ClothData loadClothDataInBackground(java.lang.String fileName)
Executes ClothApplicationSetup.loadClothData(String) in a background task, showing a modal dialog while the task is running.

Parameters:
fileName - The file name
Returns:
The cloth data, or null of the task did not complete normally.