queued.sdk.java.examples
Class OpenMediaSdkGui

java.lang.Object
  extended byqueued.sdk.java.examples.OpenMediaSdkGui

public class OpenMediaSdkGui
extends java.lang.Object

Graphical user interface for the Queued Inetraction Java code examples.

All of the widgets needed by the examples are created before the GUI is displayed, but this interface enables them only if they are needed by the example that is being run.


Field Summary
 java.awt.Color activeBackgroundColor
           
 java.awt.Font activeFont
           
 java.awt.Font bold
           
 java.awt.Color configurationEventColor
           
 boolean createDetailedIxnEventMessages
           
 boolean createDetailedQueueEventMessages
           
 boolean createDetailedServiceEventMessages
           
 java.awt.Color darkFadedGreen
           
 java.awt.Color errorColor
           
static java.lang.String errorStyle
           
 java.awt.Color inactiveColor
           
 java.awt.Color interactionEventColor
           
static java.lang.String interactionEventStyle
           
 javax.swing.JLabel interactionIDLabel
           
 javax.swing.JButton leaveButton
           
 java.awt.Color lightWeakGreen
           
 javax.swing.JButton lockButton
           
 boolean logIxnEvents
           
 boolean logQueueEvents
           
 boolean logServiceEvents
           
 javax.swing.JFrame mainGuiWindow
           
 javax.swing.JButton modeButton
           
 javax.swing.JLabel modeLabel
           
 boolean needIxnWidget
           
 boolean needQueueWidget
           
 boolean needSupervisorWidget
           
 java.awt.Color obscureDullGreen
           
 java.awt.Color obscureWeakGreen
           
 java.awt.Color paleWeakBlue
           
 java.awt.Color paleWeakCyan
           
 java.awt.Color paleWeakGreen
           
 java.awt.Color paleWeakRed
           
 java.awt.Color paleWeakYellow
           
 javax.swing.JButton propButton
           
 javax.swing.JTextField propNameTextField
           
 javax.swing.JTextField propValueTextField
           
 javax.swing.JButton pullButton
           
 java.awt.Color queueEventColor
           
static java.lang.String queueEventStyle
           
 java.awt.Color selectedLineColor
           
 java.awt.Color serviceEventColor
           
static java.lang.String serviceEventStyle
           
 javax.swing.JButton stopProcessingButton
           
 javax.swing.JButton unlockButton
           
 
Constructor Summary
OpenMediaSdkGui(java.lang.String windowTitle, java.lang.String exampleType)
          OpenMediaSdkGui constructor.
 
Method Summary
 void activateIxnRowSelection(javax.swing.event.ListSelectionListener rowListener)
          Sets a selection listener for the Interactions table.
 void activateQueueRowSelection(javax.swing.event.ListSelectionListener rowListener)
          Sets a selection listener for the Queues table.
 void clearInteractions(java.lang.String queueName)
          Clears the interaction table associated with a queue.
 void clearIxnProperties()
          Returns interaction properties.
 java.lang.String getInteractionNameAt(java.lang.String queueName, int row)
          Gets the ID of an interaction in the Interactions table.
 java.util.Map getIxnProperties(java.lang.String queueName, java.lang.String ID)
          Returns interaction properties.
 java.lang.String getQueueNameAt(int row)
          Gets the name of a queue in the Queues table.
 java.lang.String getString(boolean toGet)
          Gets a string for a boolean.
 void removeIxn(java.lang.String queueName, java.lang.String id)
          Removes an interaction from the Interactions table.
 void removeIxnProperties(java.lang.String queueName, java.lang.String ID)
          Removes interaction properties.
 void removeQueue(java.lang.String name)
          Removes a queue from the Queues table.
 void setAnnex(java.lang.String queueName, java.util.Map data)
          Updates the Annex tree (Queue information) with new queue data to display.
 void setIxn(java.lang.String queueName, java.lang.String ID, java.lang.String media, java.lang.String type, java.lang.String subtype, java.lang.String status, java.util.Map properties)
          Adds or updates a line of an Interaction table.
 void setQueue(java.lang.String name, boolean monitored, java.lang.String number)
          Adds or updates a line of the Queues table.
 void setService(java.lang.String type, java.lang.String status)
          Adds or updates a line of the Services table.
 void switchIxnTable(java.lang.String queueName)
          Displays the interaction table associated with a queue.
 void switchPropertyTree(java.lang.String queueName, java.lang.String ID)
          Updates the Properties tree with interaction data to display.
 void writeLogMessage(java.lang.String eventString, java.lang.String eventStyle)
          Inserts the log message with the accurate style in the log panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

obscureWeakGreen

public java.awt.Color obscureWeakGreen

darkFadedGreen

public java.awt.Color darkFadedGreen

obscureDullGreen

public java.awt.Color obscureDullGreen

paleWeakCyan

public java.awt.Color paleWeakCyan

lightWeakGreen

public java.awt.Color lightWeakGreen

paleWeakGreen

public java.awt.Color paleWeakGreen

paleWeakYellow

public java.awt.Color paleWeakYellow

paleWeakBlue

public java.awt.Color paleWeakBlue

paleWeakRed

public java.awt.Color paleWeakRed

activeBackgroundColor

public java.awt.Color activeBackgroundColor

inactiveColor

public java.awt.Color inactiveColor

configurationEventColor

public java.awt.Color configurationEventColor

queueEventColor

public java.awt.Color queueEventColor

errorColor

public java.awt.Color errorColor

interactionEventColor

public java.awt.Color interactionEventColor

serviceEventColor

public java.awt.Color serviceEventColor

selectedLineColor

public java.awt.Color selectedLineColor

bold

public java.awt.Font bold

activeFont

public java.awt.Font activeFont

needQueueWidget

public boolean needQueueWidget

needIxnWidget

public boolean needIxnWidget

needSupervisorWidget

public boolean needSupervisorWidget

mainGuiWindow

public javax.swing.JFrame mainGuiWindow

logServiceEvents

public boolean logServiceEvents

createDetailedServiceEventMessages

public boolean createDetailedServiceEventMessages

logQueueEvents

public boolean logQueueEvents

createDetailedQueueEventMessages

public boolean createDetailedQueueEventMessages

logIxnEvents

public boolean logIxnEvents

createDetailedIxnEventMessages

public boolean createDetailedIxnEventMessages

serviceEventStyle

public static java.lang.String serviceEventStyle

interactionEventStyle

public static java.lang.String interactionEventStyle

queueEventStyle

public static java.lang.String queueEventStyle

errorStyle

public static java.lang.String errorStyle

modeButton

public javax.swing.JButton modeButton

modeLabel

public javax.swing.JLabel modeLabel

propNameTextField

public javax.swing.JTextField propNameTextField

propValueTextField

public javax.swing.JTextField propValueTextField

propButton

public javax.swing.JButton propButton

lockButton

public javax.swing.JButton lockButton

unlockButton

public javax.swing.JButton unlockButton

pullButton

public javax.swing.JButton pullButton

leaveButton

public javax.swing.JButton leaveButton

stopProcessingButton

public javax.swing.JButton stopProcessingButton

interactionIDLabel

public javax.swing.JLabel interactionIDLabel
Constructor Detail

OpenMediaSdkGui

public OpenMediaSdkGui(java.lang.String windowTitle,
                       java.lang.String exampleType)
OpenMediaSdkGui constructor. Creates an OpenMediaSdkGui instance according to the given example type.

Parameters:
windowTitle - The title of the GUI window for the example that is currently being run.
exampleType - The type of code example being executed.
Method Detail

activateQueueRowSelection

public void activateQueueRowSelection(javax.swing.event.ListSelectionListener rowListener)
Sets a selection listener for the Queues table.


activateIxnRowSelection

public void activateIxnRowSelection(javax.swing.event.ListSelectionListener rowListener)
Sets a selection listener for the Interactions table.


setService

public void setService(java.lang.String type,
                       java.lang.String status)
Adds or updates a line of the Services table.


setQueue

public void setQueue(java.lang.String name,
                     boolean monitored,
                     java.lang.String number)
Adds or updates a line of the Queues table.


getQueueNameAt

public java.lang.String getQueueNameAt(int row)
Gets the name of a queue in the Queues table.


removeQueue

public void removeQueue(java.lang.String name)
Removes a queue from the Queues table.


setAnnex

public void setAnnex(java.lang.String queueName,
                     java.util.Map data)
Updates the Annex tree (Queue information) with new queue data to display.


getString

public java.lang.String getString(boolean toGet)
Gets a string for a boolean.


getInteractionNameAt

public java.lang.String getInteractionNameAt(java.lang.String queueName,
                                             int row)
Gets the ID of an interaction in the Interactions table.


removeIxn

public void removeIxn(java.lang.String queueName,
                      java.lang.String id)
Removes an interaction from the Interactions table.


setIxn

public void setIxn(java.lang.String queueName,
                   java.lang.String ID,
                   java.lang.String media,
                   java.lang.String type,
                   java.lang.String subtype,
                   java.lang.String status,
                   java.util.Map properties)
Adds or updates a line of an Interaction table.


getIxnProperties

public java.util.Map getIxnProperties(java.lang.String queueName,
                                      java.lang.String ID)
Returns interaction properties.


removeIxnProperties

public void removeIxnProperties(java.lang.String queueName,
                                java.lang.String ID)
Removes interaction properties.


clearIxnProperties

public void clearIxnProperties()
Returns interaction properties.


switchPropertyTree

public void switchPropertyTree(java.lang.String queueName,
                               java.lang.String ID)
Updates the Properties tree with interaction data to display.


switchIxnTable

public void switchIxnTable(java.lang.String queueName)
Displays the interaction table associated with a queue.

Parameters:
queueName - the name of the queue

clearInteractions

public void clearInteractions(java.lang.String queueName)
Clears the interaction table associated with a queue.

Parameters:
queueName - the name of the queue.

writeLogMessage

public void writeLogMessage(java.lang.String eventString,
                            java.lang.String eventStyle)
Inserts the log message with the accurate style in the log panel.