cmlog.gui
Class Disp

java.lang.Object
  extended bycmlog.gui.Disp
All Implemented Interfaces:
org.eclipse.swt.events.ControlListener, java.util.EventListener, org.eclipse.swt.internal.SWTEventListener

public class Disp
extends java.lang.Object
implements org.eclipse.swt.events.ControlListener


Field Summary
static org.eclipse.swt.widgets.Display display
          Reference to window manager's SWT display
 int IDLE
          type is set to IDLE when display is simply connected
 int QUERYING
          type is set to QUERYING when display is in query mode
 org.eclipse.swt.widgets.Shell shell
          New window for GUI contents
 int UPDATING
          type is set to UPDATING when display is in update mode
 
Constructor Summary
Disp(Config config, int initnumrow, int type, Jcmlog jcm)
          Constructor
 
Method Summary
 void connect(java.lang.String host, int port)
          Perform connect action.
 void controlMoved(org.eclipse.swt.events.ControlEvent arg0)
           
 void controlResized(org.eclipse.swt.events.ControlEvent arg0)
           
 void disconnect()
          Performe disconnect operation.
 void doQuery(java.util.Date from, java.util.Date to, int numitems, boolean getall, java.lang.String qstr, boolean removeold)
          Doing query
 void exit()
          Perform exit action.
 Config getConfigObject()
          Return configuration object.
 DataHandler getDataHandler()
           
 Disp getDisp()
           
 Jcmlog getParentWindow()
          Return parent window of this display.
 org.eclipse.swt.widgets.Shell getShell()
           
 org.eclipse.swt.widgets.Table getTable()
          Return table object to upper window.
 int getType()
          Get type of this display.
 void popupErrorDialog(java.lang.String message)
          Display Error Message
 void popupInfoDialog(java.lang.String message, java.lang.String shellTitle)
          Display Info Message
 void popupWarningDialog(java.lang.String message)
          Display Warning Message
 void removeAll()
          Remove all items inside the table.
 void saveConfig()
          Save current settings.
 void setParentWindow(Jcmlog parent)
          Set parent window of this display.
 void setType(int type)
          Set type of this display.
 void startUpdating(java.lang.String selection)
          Start monitoring incoming messages.
 void stopQuery()
          Stop a query
 void stopUpdating()
          Stop monitoring incoming messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

public static org.eclipse.swt.widgets.Display display
Reference to window manager's SWT display


shell

public org.eclipse.swt.widgets.Shell shell
New window for GUI contents


UPDATING

public final int UPDATING
type is set to UPDATING when display is in update mode

See Also:
Constant Field Values

QUERYING

public final int QUERYING
type is set to QUERYING when display is in query mode

See Also:
Constant Field Values

IDLE

public final int IDLE
type is set to IDLE when display is simply connected

See Also:
Constant Field Values
Constructor Detail

Disp

public Disp(Config config,
            int initnumrow,
            int type,
            Jcmlog jcm)
Constructor

Parameters:
config - Configuration object
initnumrow - Initial number of rows table contains
type - Either IDLE, UPDATING, or QUERYING
jcm - Overall GUI object
Method Detail

getDisp

public Disp getDisp()
Returns:
Overall GUI display object

getShell

public org.eclipse.swt.widgets.Shell getShell()
Returns:
Overall window of all content displayed

getDataHandler

public DataHandler getDataHandler()
Returns:
Overall data handler object

getTable

public org.eclipse.swt.widgets.Table getTable()
Return table object to upper window.


getParentWindow

public Jcmlog getParentWindow()
Return parent window of this display.


setParentWindow

public void setParentWindow(Jcmlog parent)
Set parent window of this display.


getConfigObject

public Config getConfigObject()
Return configuration object.


popupErrorDialog

public void popupErrorDialog(java.lang.String message)
Display Error Message


popupWarningDialog

public void popupWarningDialog(java.lang.String message)
Display Warning Message


popupInfoDialog

public void popupInfoDialog(java.lang.String message,
                            java.lang.String shellTitle)
Display Info Message


getType

public int getType()
Get type of this display.


setType

public void setType(int type)
Set type of this display.


startUpdating

public void startUpdating(java.lang.String selection)
Start monitoring incoming messages.


stopUpdating

public void stopUpdating()
Stop monitoring incoming messages.


doQuery

public void doQuery(java.util.Date from,
                    java.util.Date to,
                    int numitems,
                    boolean getall,
                    java.lang.String qstr,
                    boolean removeold)
Doing query


stopQuery

public void stopQuery()
Stop a query


removeAll

public void removeAll()
Remove all items inside the table.


exit

public void exit()
Perform exit action.


connect

public void connect(java.lang.String host,
                    int port)
Perform connect action.


disconnect

public void disconnect()
Performe disconnect operation.


saveConfig

public void saveConfig()
Save current settings.


controlMoved

public void controlMoved(org.eclipse.swt.events.ControlEvent arg0)
Specified by:
controlMoved in interface org.eclipse.swt.events.ControlListener

controlResized

public void controlResized(org.eclipse.swt.events.ControlEvent arg0)
Specified by:
controlResized in interface org.eclipse.swt.events.ControlListener