java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.relayirc.swingui.ChatApp
- All Implemented Interfaces:
- javax.accessibility.Accessible, org.relayirc.chatengine.ChatEngineListener, org.relayirc.chatengine.IChatApp, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
- public class ChatApp
- extends javax.swing.JFrame
- implements org.relayirc.chatengine.IChatApp, org.relayirc.chatengine.ChatEngineListener
Main class of the Relay-JFC chat application.
| Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
|
Constructor Summary |
ChatApp()
Construct a chat application. |
| Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getPreferredSize, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
| Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.awt.Window |
addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getGraphicsConfiguration, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
_chatApp
private static ChatApp _chatApp
_appname
private static final java.lang.String _appname
- See Also:
- Constant Field Values
_appversion
private static final java.lang.String _appversion
- See Also:
- Constant Field Values
_styles
private static ChatApp._StyleContext _styles
_engine
protected org.relayirc.chatengine.IChatEngine _engine
_options
private org.relayirc.chatengine.ChatOptions _options
_mdiPanel
private org.relayirc.swingutil.MDIPanel _mdiPanel
_framesByPanel
private java.util.Hashtable _framesByPanel
_vertSplitter
private javax.swing.JSplitPane _vertSplitter
_console
private ChatConsole _console
_favorites
private FavoritesFrame _favorites
_dockConsole
private boolean _dockConsole
_menubar
private ChatApp._MenuBar _menubar
_toolbar
private ChatApp._ToolBar _toolbar
_statusBar
private org.relayirc.swingutil.StatusBar _statusBar
_statusBarEnabled
private boolean _statusBarEnabled
_connectAction
private ChatApp._ConnectAction _connectAction
_disconnectAction
private ChatApp._DisconnectAction _disconnectAction
_setupAction
private ChatApp._SetupAction _setupAction
_joinAction
private ChatApp._JoinAction _joinAction
_exitAction
private ChatApp._ExitAction _exitAction
_cascadeAction
private ChatApp._CascadeAction _cascadeAction
_tilehAction
private ChatApp._TileHAction _tilehAction
_tilevAction
private ChatApp._TileVAction _tilevAction
_aboutAction
private ChatApp._AboutAction _aboutAction
_listAction
private ChatApp._ListAction _listAction
_serverListAction
private ChatApp._ServerListAction _serverListAction
addIcon
public static javax.swing.ImageIcon addIcon
aboutIcon
public static javax.swing.ImageIcon aboutIcon
cancelIcon
public static javax.swing.ImageIcon cancelIcon
channelIcon
public static javax.swing.ImageIcon channelIcon
closedFolderIcon
public static javax.swing.ImageIcon closedFolderIcon
colorsIcon
public static javax.swing.ImageIcon colorsIcon
connectIcon
public static javax.swing.ImageIcon connectIcon
disconnectIcon
public static javax.swing.ImageIcon disconnectIcon
favoriteIcon
public static javax.swing.ImageIcon favoriteIcon
fontIcon
public static javax.swing.ImageIcon fontIcon
helpIcon
public static javax.swing.ImageIcon helpIcon
joinChannelIcon
public static javax.swing.ImageIcon joinChannelIcon
okIcon
public static javax.swing.ImageIcon okIcon
openFolderIcon
public static javax.swing.ImageIcon openFolderIcon
setupIcon
public static javax.swing.ImageIcon setupIcon
removeIcon
public static javax.swing.ImageIcon removeIcon
saveIcon
public static javax.swing.ImageIcon saveIcon
searchIcon
public static javax.swing.ImageIcon searchIcon
tileHorizontalIcon
public static javax.swing.ImageIcon tileHorizontalIcon
tileVerticalIcon
public static javax.swing.ImageIcon tileVerticalIcon
tileCascadeIcon
public static javax.swing.ImageIcon tileCascadeIcon
userIcon
public static javax.swing.ImageIcon userIcon
serverIcon
public static javax.swing.ImageIcon serverIcon
ChatApp
public ChatApp()
- Construct a chat application.
main
public static void main(java.lang.String[] args)
- Main method for the Relay-JFC chat application.
run
public void run()
- The main application thread, for internal use only.
cascade
public void cascade()
- Arrange windows in cascade formation.
closeApp
public void closeApp()
- Disconnect from the IRC server, save options and exit applicatin.
connect
public void connect(org.relayirc.chatengine.Server server)
- Connect to the specified chat server. If already connected to that
then say so and do nothing. If already connected to a different
prompt user if it is OK to disconnect and reconnect to the specified server.
connect
public void connect()
- Present connection dialog to user and allow connection.
createActions
private void createActions()
createIcons
private void createIcons()
display
public void display(java.lang.String str)
- Display text on the main console.
dock
public void dock(org.relayirc.swingutil.MDIClientPanel panel)
- To dock/undock a MDIClientPanel, first set the panel's dock state then
call this function to register that dock state. Simply calls the
MDIPanel.registerDockState() method for the specified panel.
getChatApp
public static ChatApp getChatApp()
- Returns the one-and-only chat application object (a singleton).
getAppName
public java.lang.String getAppName()
- Returns the name of the chat application.
- Specified by:
getAppName in interface org.relayirc.chatengine.IChatApp
getAppVersion
public java.lang.String getAppVersion()
- Returns the version of the chat application.
- Specified by:
getAppVersion in interface org.relayirc.chatengine.IChatApp
getChatStyle
public static javax.swing.text.Style getChatStyle(java.lang.String st)
setChatFont
public static void setChatFont(java.awt.Font font)
getEngine
public org.relayirc.chatengine.IChatEngine getEngine()
- Description copied from interface:
org.relayirc.chatengine.IChatApp
- Get application's chat engine
- Specified by:
getEngine in interface org.relayirc.chatengine.IChatApp
setEngine
public void setEngine(org.relayirc.chatengine.IChatEngine eng)
getOptions
public org.relayirc.chatengine.ChatOptions getOptions()
- Description copied from interface:
org.relayirc.chatengine.IChatApp
- Get application's options
- Specified by:
getOptions in interface org.relayirc.chatengine.IChatApp
setStatusBarEnabled
public void setStatusBarEnabled(boolean flag)
setShowConsole
public void setShowConsole(boolean show)
initGUI
public void initGUI()
layoutGUI
public void layoutGUI()
listChannels
public void listChannels()
loadLookAndFeel
public void loadLookAndFeel(java.lang.String name)
- Load a Swing pluggable look and feel specified by name
onChannelJoin
public void onChannelJoin(org.relayirc.chatengine.ChatEngineEvent event)
- Create channel window for this new channel
- Specified by:
onChannelJoin in interface org.relayirc.chatengine.ChatEngineListener
onChannelPart
public void onChannelPart(org.relayirc.chatengine.ChatEngineEvent event)
- Does nothing as channel objects take care of parting.
- Specified by:
onChannelPart in interface org.relayirc.chatengine.ChatEngineListener
onConnection
public void onConnection(org.relayirc.chatengine.ChatEngineEvent event)
- Description copied from interface:
org.relayirc.chatengine.ChatEngineListener
- Engine has connected to IRC server.
- Specified by:
onConnection in interface org.relayirc.chatengine.ChatEngineListener
onDisconnection
public void onDisconnection(org.relayirc.chatengine.ChatEngineEvent event)
- Description copied from interface:
org.relayirc.chatengine.ChatEngineListener
- Engine has disconnected from IRC server.
- Specified by:
onDisconnection in interface org.relayirc.chatengine.ChatEngineListener
onStatus
public void onStatus(org.relayirc.chatengine.ChatEngineEvent event)
- Description copied from interface:
org.relayirc.chatengine.ChatEngineListener
- Status message from engine.
- Specified by:
onStatus in interface org.relayirc.chatengine.ChatEngineListener
removeChatPanel
public void removeChatPanel(ChatChannelPanel panel)
shutdown
public void shutdown()
showJoinChannelDlg
public void showJoinChannelDlg()
showServerListDlg
public void showServerListDlg()
tileHorizontal
public void tileHorizontal()
tileVertical
public void tileVertical()