graphlab.ui
Class UI

java.lang.Object
  extended by graphlab.ui.UI

public class UI
extends java.lang.Object

this class is the base class of UI actions, it contains the methods to load UserInterfaces from XML it contains the methods to access different parts of a UI...

Author:
Azin Azadi

Field Summary
 java.util.HashMap<java.lang.String,AbstractAction> actions
           
static java.lang.String name
           
 
Constructor Summary
UI(BlackBoard bb, boolean visible)
          constructor
 
Method Summary
 void addXML(java.lang.String XMLFilePath, java.lang.Class resClass)
          fek mikonam ke in add xml kare plugin ha ro rah bendaze, vali hala kheili ghatiam, in tarif methoda ro ehtemalan taghir baies dad.
 void addXMLFromString(java.lang.String XMLString, java.lang.Class resClass)
           
static java.lang.String extractHelpPlugin(BlackBoard blackboard, Plugger plugger, java.lang.String index, java.lang.String dest, java.lang.String filter)
           
static java.awt.Component getComponent(BlackBoard b, java.lang.String id)
           
static java.lang.String getComponentVariableNameInBlackBoard(java.lang.String componentId)
          This method gives a standard way to name the awt.components that are in the black board.
 GFrame getGFrame()
           
static GFrame getGFrame(BlackBoard b)
          returns the GFrame object that mapped to the blackboard.
static UI getUI(BlackBoard blackboard)
           
static Event getUIEvent(java.lang.String id)
           
 void loadXML(java.lang.String XMLFilePath, java.lang.Class resClass)
           
 void loadXML(java.lang.String XMLFilePath, java.lang.Class resClass, GFrame frame, Configuration conf)
           
static void setComponent(BlackBoard b, java.lang.String id, java.awt.Component c)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public static final java.lang.String name
See Also:
Constant Field Values

actions

public java.util.HashMap<java.lang.String,AbstractAction> actions
Constructor Detail

UI

public UI(BlackBoard bb,
          boolean visible)
constructor

Parameters:
bb -
visible -
Method Detail

addXML

public void addXML(java.lang.String XMLFilePath,
                   java.lang.Class resClass)
            throws java.io.IOException,
                   org.xml.sax.SAXException
fek mikonam ke in add xml kare plugin ha ro rah bendaze, vali hala kheili ghatiam, in tarif methoda ro ehtemalan taghir baies dad.

Parameters:
XMLFilePath -
Throws:
java.io.IOException
org.xml.sax.SAXException

loadXML

public void loadXML(java.lang.String XMLFilePath,
                    java.lang.Class resClass)
             throws java.io.IOException,
                    org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

addXMLFromString

public void addXMLFromString(java.lang.String XMLString,
                             java.lang.Class resClass)
                      throws java.io.IOException,
                             org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

loadXML

public void loadXML(java.lang.String XMLFilePath,
                    java.lang.Class resClass,
                    GFrame frame,
                    Configuration conf)
             throws java.io.IOException,
                    org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

getUIEvent

public static Event getUIEvent(java.lang.String id)

getComponent

public static java.awt.Component getComponent(BlackBoard b,
                                              java.lang.String id)

setComponent

public static void setComponent(BlackBoard b,
                                java.lang.String id,
                                java.awt.Component c)

getComponentVariableNameInBlackBoard

public static java.lang.String getComponentVariableNameInBlackBoard(java.lang.String componentId)
This method gives a standard way to name the awt.components that are in the black board. when in XML we give an id to a component, when we want to fetch it from blackboard we should use this method to have its exact name in black board which is stored in a Variable

Parameters:
componentId - the id of component which is given via XML
Returns:
the name of Variable in the blackboard which the component can be accessed

extractHelpPlugin

public static java.lang.String extractHelpPlugin(BlackBoard blackboard,
                                                 Plugger plugger,
                                                 java.lang.String index,
                                                 java.lang.String dest,
                                                 java.lang.String filter)

getGFrame

public static GFrame getGFrame(BlackBoard b)
returns the GFrame object that mapped to the blackboard. the returned GFrame contains all menus, sidebars, toolbars and ... of the User Interface.


getGFrame

public GFrame getGFrame()

getUI

public static UI getUI(BlackBoard blackboard)