See on Tõrva Gümnaasiumi vana veebilehe arhiiv. Uus veebileht: https://torva.edu.ee/

IRCApplication (PJIRC project)

Lisamaterjalide loend

Algne fail: vana_veeb/pjirc/doc/javadoc/irc/IRCApplication.html.

========== START OF NAVBAR ==========
=========== END OF NAVBAR ===========
======== START OF CLASS DATA ========

irc
Class IRCApplication

java.lang.Object
  |
  +--irc.IRCObject
        |
        +--irc.IRCApplication
All Implemented Interfaces:
java.awt.event.ActionListener, AWTSourceListener, DCCListener, java.util.EventListener, IdentListener, PixxMDIInterfaceListener, ServerListener, java.awt.event.WindowListener

public class IRCApplication
extends IRCObject
implements ServerListener, DCCListener, IdentListener, PixxMDIInterfaceListener, java.awt.event.WindowListener, AWTSourceListener, java.awt.event.ActionListener

The IRC Application. This is the main class of PJIRC.


Field Summary
 
Fields inherited from class irc.IRCObject
_ircConfiguration
 
Fields inherited from interface irc.ident.IdentListener
IDENT_DEFAULT, IDENT_ERROR, IDENT_NOT_FOUND, IDENT_OK
 
Constructor Summary
IRCApplication(IRCConfiguration config, StartupConfiguration startupConfig, java.awt.Container source)
          Create a new IRCApplication.
 
Method Summary
 void aboutTriggered(PixxMDIInterface mdi)
          The about button has been triggered.
 void actionPerformed(java.awt.event.ActionEvent evt)
           
 void activated(AWTSource source)
          The source has been activated.
 void activeChanged(AWTSource source, PixxMDIInterface mdi)
          The active source has changed.
 java.lang.String[] cannotUseRequestedNicknames()
          The nickname(s) provided to this server for registration cannot be used for any reason.
 void chanListCreated(ChanList list)
          A new channel list has been created.
 void chanListRemoved(ChanList list)
          An existing channel list has been removed.
 void channelCreated(Channel chan)
          A new channel has been created.
 void channelRemoved(Channel chan)
          An existing channel has been removed.
 void connect()
          Connect to the server, using the given on-connect commands.
 boolean connected()
          Test wether connected or not.
 void connectTriggered(PixxMDIInterface mdi)
          The connect button has been triggered.
 void DCCChatCreated(DCCChat chat, java.lang.Boolean bbring)
          A new DCCChat has been created.
 void DCCChatRemoved(DCCChat chat)
          A DCCChat has been removed.
 boolean DCCChatRequest(java.lang.String nick)
          A new DCCChat is requested.
 void DCCFileCreated(DCCFile file)
          A DCCFile has been created.
 void DCCFileRemoved(DCCFile file)
          A DCCFile has been removed.
 java.io.File DCCFileRequest(java.lang.String nick, java.lang.String fileName, java.lang.Integer size)
          A new DCC reception is requested.
 void disconnect()
          Disconnect from the server.
 void eventOccured(AWTSource source)
          An event has occured.
 java.lang.String getFieldText()
          Get the current textfield text.
 void helpTriggered(PixxMDIInterface mdi)
          The help button has been triggered.
 void identLeaving(java.lang.String message)
          The ident server is leaving.
 void identRequested(java.lang.String source, java.lang.Integer result, java.lang.String reply)
          The ident server has received a request.
 void identRunning(java.lang.Integer port)
          The ident server is running.
 void init()
          Init the application.
static void main(java.lang.String[] args)
           
 void queryCreated(Query query, java.lang.Boolean blocal)
          A new query has been created.
 void queryRemoved(Query query)
          An existing query has been removed.
 void requestSourceFocus()
          Request the active source to gain focus.
 void sendString(java.lang.String str)
          Send the given string to the current source interpretor.
 void serverConnected()
          The server connected.
 void serverDisconnected()
          The server disconnected.
 void setFieldText(java.lang.String txt)
          Set the current textfield text.
 void titleChanged(AWTSource source)
          This source title has changed.
 void uninit()
          Uninit the application.
 void validateText()
          Validate the current textfield text, as if user pressed return key.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent e)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class irc.IRCObject
getColor, getIRCConfiguration, getText, getText, getText, getText, getTimeStamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRCApplication

public IRCApplication(IRCConfiguration config,
                      StartupConfiguration startupConfig,
                      java.awt.Container source)
Create a new IRCApplication.

Parameters:
config - the IRC configuration.
startupConfig - the startup configuration.
source - a container in wich the application will display. Maybe null. If null, a new Frame will be opened.

Method Detail

init

public void init()
Init the application.


uninit

public void uninit()
Uninit the application.


connect

public void connect()
Connect to the server, using the given on-connect commands.


disconnect

public void disconnect()
Disconnect from the server.


connected

public boolean connected()
Test wether connected or not.

Returns:
true if the application is connected to the server, false otherwise.


channelCreated

public void channelCreated(Channel chan)
Description copied from interface: ServerListener
A new channel has been created.

Specified by:
channelCreated in interface ServerListener
Parameters:
chan - channel created.


channelRemoved

public void channelRemoved(Channel chan)
Description copied from interface: ServerListener
An existing channel has been removed.

Specified by:
channelRemoved in interface ServerListener
Parameters:
chan - remove channel.


queryCreated

public void queryCreated(Query query,
                         java.lang.Boolean blocal)
Description copied from interface: ServerListener
A new query has been created.

Specified by:
queryCreated in interface ServerListener
Parameters:
query - create query.
blocal - true if this query was created at our initiative, and not from a server event.


queryRemoved

public void queryRemoved(Query query)
Description copied from interface: ServerListener
An existing query has been removed.

Specified by:
queryRemoved in interface ServerListener
Parameters:
query - removed query.


chanListCreated

public void chanListCreated(ChanList list)
Description copied from interface: ServerListener
A new channel list has been created.

Specified by:
chanListCreated in interface ServerListener
Parameters:
list - the created channel list.


chanListRemoved

public void chanListRemoved(ChanList list)
Description copied from interface: ServerListener
An existing channel list has been removed.

Specified by:
chanListRemoved in interface ServerListener
Parameters:
list - the removed chanlist.


DCCChatCreated

public void DCCChatCreated(DCCChat chat,
                           java.lang.Boolean bbring)
Description copied from interface: DCCListener
A new DCCChat has been created.

Specified by:
DCCChatCreated in interface DCCListener
Parameters:
chat - the DCCChat.
bbring - true if the chat has been created following a local user action, and not following a remote request.


DCCChatRemoved

public void DCCChatRemoved(DCCChat chat)
Description copied from interface: DCCListener
A DCCChat has been removed.

Specified by:
DCCChatRemoved in interface DCCListener
Parameters:
chat - the DCCChat.


DCCFileCreated

public void DCCFileCreated(DCCFile file)
Description copied from interface: DCCListener
A DCCFile has been created.

Specified by:
DCCFileCreated in interface DCCListener
Parameters:
file - the DCCFile.


DCCFileRemoved

public void DCCFileRemoved(DCCFile file)
Description copied from interface: DCCListener
A DCCFile has been removed.

Specified by:
DCCFileRemoved in interface DCCListener
Parameters:
file - the DCCFile.


DCCFileRequest

public java.io.File DCCFileRequest(java.lang.String nick,
                                   java.lang.String fileName,
                                   java.lang.Integer size)
Description copied from interface: DCCListener
A new DCC reception is requested.

Specified by:
DCCFileRequest in interface DCCListener
Parameters:
nick - the source nick.
fileName - the file to transfert.
size - the file size.
Returns:
the local destination file.


DCCChatRequest

public boolean DCCChatRequest(java.lang.String nick)
Description copied from interface: DCCListener
A new DCCChat is requested.

Specified by:
DCCChatRequest in interface DCCListener
Parameters:
nick - the requesting nick.
Returns:
true if the request is accepted, false otherwise.


serverConnected

public void serverConnected()
Description copied from interface: ServerListener
The server connected.

Specified by:
serverConnected in interface ServerListener


serverDisconnected

public void serverDisconnected()
Description copied from interface: ServerListener
The server disconnected.

Specified by:
serverDisconnected in interface ServerListener


identRequested

public void identRequested(java.lang.String source,
                           java.lang.Integer result,
                           java.lang.String reply)
Description copied from interface: IdentListener
The ident server has received a request.

Specified by:
identRequested in interface IdentListener
Parameters:
source - the request source.
result - the request result.
reply - the replied result.


identRunning

public void identRunning(java.lang.Integer port)
Description copied from interface: IdentListener
The ident server is running.

Specified by:
identRunning in interface IdentListener
Parameters:
port - port on wich the server is running.


identLeaving

public void identLeaving(java.lang.String message)
Description copied from interface: IdentListener
The ident server is leaving.

Specified by:
identLeaving in interface IdentListener
Parameters:
message - leaving message.


activeChanged

public void activeChanged(AWTSource source,
                          PixxMDIInterface mdi)
Description copied from interface: PixxMDIInterfaceListener
The active source has changed.

Specified by:
activeChanged in interface PixxMDIInterfaceListener
Parameters:
source - the new active source.
mdi - the mdi.


titleChanged

public void titleChanged(AWTSource source)
Description copied from interface: AWTSourceListener
This source title has changed.

Specified by:
titleChanged in interface AWTSourceListener
Parameters:
source - the source whose title has changed.


eventOccured

public void eventOccured(AWTSource source)
Description copied from interface: AWTSourceListener
An event has occured.

Specified by:
eventOccured in interface AWTSourceListener
Parameters:
source - the source on whose event has occured.


activated

public void activated(AWTSource source)
Description copied from interface: AWTSourceListener
The source has been activated.

Specified by:
activated in interface AWTSourceListener
Parameters:
source - the activated source.


connectTriggered

public void connectTriggered(PixxMDIInterface mdi)
Description copied from interface: PixxMDIInterfaceListener
The connect button has been triggered.

Specified by:
connectTriggered in interface PixxMDIInterfaceListener
Parameters:
mdi - the mdi.


aboutTriggered

public void aboutTriggered(PixxMDIInterface mdi)
Description copied from interface: PixxMDIInterfaceListener
The about button has been triggered.

Specified by:
aboutTriggered in interface PixxMDIInterfaceListener
Parameters:
mdi - the mdi.


helpTriggered

public void helpTriggered(PixxMDIInterface mdi)
Description copied from interface: PixxMDIInterfaceListener
The help button has been triggered.

Specified by:
helpTriggered in interface PixxMDIInterfaceListener
Parameters:
mdi - the mdi.


windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

requestSourceFocus

public void requestSourceFocus()
Request the active source to gain focus.


sendString

public void sendString(java.lang.String str)
Send the given string to the current source interpretor.

Parameters:
str - string to send to the interpretor.


setFieldText

public void setFieldText(java.lang.String txt)
Set the current textfield text.


getFieldText

public java.lang.String getFieldText()
Get the current textfield text.

Returns:
the current textfield text.


validateText

public void validateText()
Validate the current textfield text, as if user pressed return key.


cannotUseRequestedNicknames

public java.lang.String[] cannotUseRequestedNicknames()
Description copied from interface: ServerListener
The nickname(s) provided to this server for registration cannot be used for any reason.

Specified by:
cannotUseRequestedNicknames in interface ServerListener
Returns:
an array of alternative nicknames.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

main

public static void main(java.lang.String[] args)