Class 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.JFrame m_kFrame
      Local JFrame
      private Application m_kParent
      Parent Application
      private java.util.Hashtable<java.lang.String,​java.util.Vector<UserConstant>> m_kShaderMap
      HashTable maps Shader parameters to the Shader name:
      private boolean ms_bInit
      Initialize the interface once.
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      ApplicationGUI()
      Constructs an ApplicationGUI object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent kEvent)
      Called when the user changes one of the Shader parameters.
      private void AddUserVariable​(java.lang.String kShaderName, UserConstant kVar)
      Adds a user-parameter to the shader with the specified shader name.
      void AddUserVariables​(Program kProgram)
      Adds the User-Defined variables from the input Program to the use-interface.
      void close()
      Closes the ApplicationGUI frame, and clears all data members.
      void Display()
      Displays the Application Shader GUI
      void dispose()
      Delete memory.
      void setParent​(Application kParent)
      Sets the parent Application
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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
    • Constructor Detail

      • ApplicationGUI

        public ApplicationGUI()
        Constructs an ApplicationGUI object.
    • 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:
        actionPerformed in interface java.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