siuying.gm.app.gmailer4j.controller
Class GMMainFrameController

java.lang.Object
  extended by siuying.gm.app.gmailer4j.controller.GMMainFrameController

public class GMMainFrameController
extends java.lang.Object

Control the main frame of gmailer

Version:
0.3.24
Author:
siuying

Field Summary
static int LAYOUT_HORIZONTAL
           
static int LAYOUT_VERTICAL
           
 
Constructor Summary
GMMainFrameController()
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener listener)
           
 javax.swing.JFrame addConversationSubFrame(GMConversation conv)
           
 void addMouseListener(java.awt.event.MouseListener listener)
           
 void dispose()
           
 void expandTree()
          Expand the tree in the frame
 bsh.util.JConsole getConsole()
           
 javax.swing.JFrame getConversationSubFrame(GMConversation conv)
           
 javax.swing.JFrame getFrame()
          get main frame
 int getLayout()
          get current display layout
 java.lang.String getMessages()
           
 java.lang.String getSearchString()
           
 javax.swing.JFrame[] getSubFrames()
          return list of subframes
 ThreadsTableModel getThreadsTableModel()
           
 boolean isConversationSubFrameOpened(GMConversation conv)
          check if a conversation sub frame is opened firstly it check if the Map contains the key then it iterate through the key set, and check for each conversation
 boolean isShowContent()
           
 void removeConversationSubFrame(GMConversation conv)
           
 void resetDivider()
          If there exist a divider location stored in preference, it reset divider to that locations, otherwise load defaults
 void setBottomPanel(javax.swing.JPanel content)
           
 void setLayout(int layout)
          set current display layout to specified one
 void setLeftPanel(javax.swing.JComponent content)
           
 void setLogonStatus(int status)
           
 void setMessages(java.lang.String shortMsg, java.lang.String longMsg)
          Set the message of status bar and the progress bar shortMsg is used to update progress bar longMsg is used to update status bar if any of them is null, that section is not updated
 void setRightPanel(javax.swing.JComponent content)
           
 void setSearchEnabled(boolean status)
           
 void setSearchString(java.lang.String search_string)
           
 void setSelectedMailboxButton(int idx)
           
 void setShowContent(boolean show)
           
 void setTableModel(ThreadsTableModel model)
          Set the TableModel in the frame to that specified
 void setTreeModel(javax.swing.tree.TreeModel model)
          Set the TreeModel in the frame to that specified
 void show()
           
 void showConsole()
           
 void updateComponentTreeUI()
           
protected  void updateLayout()
          update the layout of the frame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LAYOUT_HORIZONTAL

public static int LAYOUT_HORIZONTAL

LAYOUT_VERTICAL

public static int LAYOUT_VERTICAL
Constructor Detail

GMMainFrameController

public GMMainFrameController()
Method Detail

dispose

public void dispose()

setSearchEnabled

public void setSearchEnabled(boolean status)

getSearchString

public java.lang.String getSearchString()

setSearchString

public void setSearchString(java.lang.String search_string)

setSelectedMailboxButton

public void setSelectedMailboxButton(int idx)

show

public void show()

showConsole

public void showConsole()

getConsole

public bsh.util.JConsole getConsole()

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)

resetDivider

public void resetDivider()
If there exist a divider location stored in preference, it reset divider to that locations, otherwise load defaults


setTableModel

public void setTableModel(ThreadsTableModel model)
Set the TableModel in the frame to that specified

Parameters:
model - TableModel

getThreadsTableModel

public ThreadsTableModel getThreadsTableModel()

setTreeModel

public void setTreeModel(javax.swing.tree.TreeModel model)
Set the TreeModel in the frame to that specified

Parameters:
model - TreeModel

expandTree

public void expandTree()
Expand the tree in the frame


setBottomPanel

public void setBottomPanel(javax.swing.JPanel content)

setLeftPanel

public void setLeftPanel(javax.swing.JComponent content)

setRightPanel

public void setRightPanel(javax.swing.JComponent content)

getLayout

public int getLayout()
get current display layout


getFrame

public javax.swing.JFrame getFrame()
get main frame


updateComponentTreeUI

public void updateComponentTreeUI()

setLayout

public void setLayout(int layout)
set current display layout to specified one


isShowContent

public boolean isShowContent()

setShowContent

public void setShowContent(boolean show)

updateLayout

protected void updateLayout()
update the layout of the frame

See Also:
Utils.executeTask(Runnable command)

setLogonStatus

public void setLogonStatus(int status)

setMessages

public void setMessages(java.lang.String shortMsg,
                        java.lang.String longMsg)
Set the message of status bar and the progress bar shortMsg is used to update progress bar longMsg is used to update status bar if any of them is null, that section is not updated

Parameters:
shortMsg - String
longMsg - String

getMessages

public java.lang.String getMessages()

isConversationSubFrameOpened

public boolean isConversationSubFrameOpened(GMConversation conv)
check if a conversation sub frame is opened firstly it check if the Map contains the key then it iterate through the key set, and check for each conversation


addConversationSubFrame

public javax.swing.JFrame addConversationSubFrame(GMConversation conv)

removeConversationSubFrame

public void removeConversationSubFrame(GMConversation conv)

getConversationSubFrame

public javax.swing.JFrame getConversationSubFrame(GMConversation conv)

getSubFrames

public javax.swing.JFrame[] getSubFrames()
return list of subframes

Returns:
the subframe of this mainframe