GraphLab Project

graphlab.ui
Class UIUtils

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

public class UIUtils
extends java.lang.Object

Author:
Azin Azadi

Constructor Summary
UIUtils()
           
 
Method Summary
static void exit()
           
static java.awt.Component getComponent(BlackBoard b, java.lang.String id)
           
static java.lang.String getComponentVariableKeyNameInBlackBoard(java.lang.String componentId)
          This method gives a standard way to name the awt.components that are in the black board.
static GBasicCellEditor getEditorFor(java.lang.Object value)
           
static GFrame getGFrame(BlackBoard b)
          returns the GFrame object that mapped to the blackboard.
static java.awt.Component getRendererFor(java.lang.Object value)
           
static UI getUI(BlackBoard blackboard)
           
static java.lang.String getUIEventKey(java.lang.String id)
           
static void registerEditor(java.lang.Class clazz, GBasicCellEditor editor)
           
static void registerHyperLinkHandler(java.lang.String protocol, HyperlinkHandler h)
           
static void registerRenderer(java.lang.Class clazz, GBasicCellRenderer viewer)
           
static void setComponent(BlackBoard b, java.lang.String id, java.awt.Component c)
           
static GAttrFrame showEditDialog(NotifiableAttributeSet input, boolean modal)
           
static ObjectViewer showObject(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIUtils

public UIUtils()
Method Detail

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)

getComponentVariableKeyNameInBlackBoard

public static java.lang.String getComponentVariableKeyNameInBlackBoard(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

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.


getUI

public static UI getUI(BlackBoard blackboard)
Returns:
the UI instance which is currently running in the given blackboard environment

getUIEventKey

public static java.lang.String getUIEventKey(java.lang.String id)

exit

public static void exit()

showEditDialog

public static GAttrFrame showEditDialog(NotifiableAttributeSet input,
                                        boolean modal)
See Also:
GAttrFrame.showEditDialog(graphlab.platform.attribute.NotifiableAttributeSet,boolean)

showObject

public static ObjectViewer showObject(java.lang.Object o)
See Also:
ObjectViewer

registerRenderer

public static void registerRenderer(java.lang.Class clazz,
                                    GBasicCellRenderer viewer)
See Also:
GCellRenderer.registerRenderer(Class,graphlab.ui.components.gpropertyeditor.GBasicCellRenderer)

registerEditor

public static void registerEditor(java.lang.Class clazz,
                                  GBasicCellEditor editor)
See Also:
GCellEditor.registerEditor(Class,graphlab.ui.components.gpropertyeditor.GBasicCellEditor)

getEditorFor

public static GBasicCellEditor getEditorFor(java.lang.Object value)
See Also:
GCellEditor.getEditorFor(Object)

getRendererFor

public static java.awt.Component getRendererFor(java.lang.Object value)
See Also:
GCellRenderer.getRendererFor(Object)

registerHyperLinkHandler

public static void registerHyperLinkHandler(java.lang.String protocol,
                                            HyperlinkHandler h)
See Also:
GHTMLPageComponent.registerHyperLinkHandler(java.lang.String,graphlab.graph.ui.HyperlinkHandler)

GraphLab Project