Class ApplicationGUI
- java.lang.Object
-
- WildMagic.LibApplications.OpenGLApplication.ApplicationGUI
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.io.Serializable,java.util.EventListener
public class ApplicationGUI extends java.lang.Object implements java.awt.event.ActionListener, java.io.Serializable- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.JFramem_kFrameLocal JFrameprivate Applicationm_kParentParent Applicationprivate java.util.Hashtable<java.lang.String,java.util.Vector<UserConstant>>m_kShaderMapHashTable maps Shader parameters to the Shader name:private booleanms_bInitInitialize the interface once.private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ApplicationGUI()Constructs an ApplicationGUI object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent kEvent)Called when the user changes one of the Shader parameters.private voidAddUserVariable(java.lang.String kShaderName, UserConstant kVar)Adds a user-parameter to the shader with the specified shader name.voidAddUserVariables(Program kProgram)Adds the User-Defined variables from the input Program to the use-interface.voidclose()Closes the ApplicationGUI frame, and clears all data members.voidDisplay()Displays the Application Shader GUIvoiddispose()Delete memory.voidsetParent(Application kParent)Sets the parent Application
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_kShaderMap
private java.util.Hashtable<java.lang.String,java.util.Vector<UserConstant>> m_kShaderMap
HashTable maps Shader parameters to the Shader name:
-
ms_bInit
private boolean ms_bInit
Initialize the interface once.
-
m_kParent
private Application m_kParent
Parent Application
-
m_kFrame
private javax.swing.JFrame m_kFrame
Local JFrame
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent kEvent)
Called when the user changes one of the Shader parameters. The corresponding UserConstant variable is found and the updated value is passed to the rendering system.- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
kEvent- the triggering event.
-
AddUserVariables
public void AddUserVariables(Program kProgram)
Adds the User-Defined variables from the input Program to the use-interface.- Parameters:
kProgram- Program containing User-Defined shader parameters that will be added to the user-interface.
-
close
public void close()
Closes the ApplicationGUI frame, and clears all data members.
-
Display
public void Display()
Displays the Application Shader GUI
-
dispose
public void dispose()
Delete memory.
-
setParent
public void setParent(Application kParent)
Sets the parent Application- Parameters:
kParent- the parent Application.
-
AddUserVariable
private void AddUserVariable(java.lang.String kShaderName, UserConstant kVar)Adds a user-parameter to the shader with the specified shader name. A label and text field user-interface components are created for the shader parameter.- Parameters:
kShaderName- the name of the Shader to which the parameter belongs.kVar- the UserConstant shader parameter
-
-