The Dendrogrammer Code Documentation

dendrogrammer  1.0.0

The Dendrogrammer > dendrogrammer > Gui

Class Gui

The Gui class. A reference to the instance of this class can be passed to any class that needs to interact with the user or output onto the page.

It has methods for displaying various dialogs and outputing messages. Also I have tried to gather in here any references to the DOM page elements such as specific divs or buttons. This is so as too isolate the rest of the code from these references. Instead the rest of the code accesses the buttons/divs via the gui attribute to which they are assigned.

Important Gui attributes:
-leafSearchURL - the destination for the search link in the groups dialogs
-mobile - true if a mobile OS is detected. This affects the display behaviour of dialogs.
-ieVersion - holds IE version number or -1 if not IE. (Ended up not using this)
-isIEvLessThan9 - true if IE AND version less than 9 else false.(Ended up not using this)

Some tunable attributes affecting dialog display behaviour:
-maxDialogHt
-maxMessageLengthToScroll - Beyond this and dialogs are ht limited and scroll.

Attributes referring to names of DOM objects which need accessed by the application:
-groupsTab, thresholdField, groupNoField, canvasContainer, largestMergeHtDiv, leafNodesDiv.

The constructor:
-Calls this.bindTabEvents() to set up the group tab event.
-Calls the jQuery tabs() method to invoke the tabs effect behaviour on the page
-Calls the jQuery button() method to invoke the button styling and behaviour on the page

Constructor

Gui ( )

Methods

bindButtonFunctions

void bindButtonFunctions ( dendrogramIn , guiIn )
Attach functions to Gui buttons
Parameters:
dendrogramIn <Dendrogram object> the dendrogram object with all its functions
guiIn <Gui object > the gui object passed is required in as the "this" keyword refernces the event rather diring a click.
Returns: void

bindTabEvents

void bindTabEvents ( )
Attach functions to Gui tab events
Returns: void

clearGroupNotifer

void clearGroupNotifer ( )
Clears groups from the tab notifyer
Returns: void

getThresholdVal

number getThresholdVal ( )
Get the current value of the threshold
Returns: number
the value of the threshold

notifyGroupFormation

void notifyGroupFormation ( message , groupListIn )
Notifies the user the groups have been formed via a dialog Activates the pulsating Groups tab
Parameters:
message <string> the message to be shown in the dialog
groupListIn <GroupList object> the group list to be output
Returns: void

showDataDisplay

void showDataDisplay ( h , n )
Show the given values in the gui element for displaying those. used for showning facts about the current loaded data set
Parameters:
h <number> the value to show in largestMergeHtDiv
n <number> the value to show in leafNodesDiv
Returns: void

showMessage

void showMessage ( message , title )
Show the message dialog using the dialog groups div with an OK button
Parameters:
message <string> the message to be shown in the dialog
title <string> the title of the dialog
Returns: void

showMessageWithLink

void showMessageWithLink ( message , title , urlString )
Show the message dialog using the dialog groups div with an OK button include a hyperlink at the front of the message
Parameters:
message <object> - the message to be shown in the dialog
title <string> the title of the dialog
urlString <string> the url for the link
Returns: void

showNoOfGroups

void showNoOfGroups ( valIn )
Show the given value in the gui element for displaying no of groups.
Parameters:
valIn <number> the value to show
Returns: void

showThreshold

void showThreshold ( valIn )
Show the value of the threshold adjuster in the gui element for displaying that.
Parameters:
valIn <number> the value to show
Returns: void


Copyright © 2011 Yahoo! Inc. All rights reserved.