Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.lucane.client
Class Plugin  view Plugin download Plugin.java

java.lang.Object
  extended byorg.lucane.client.Plugin
All Implemented Interfaces:
java.util.EventListener, java.lang.Runnable, java.awt.event.WindowListener

public abstract class Plugin
extends java.lang.Object
implements java.lang.Runnable, java.awt.event.WindowListener

Every plugin has to extend this class and redefine its abstract methods. See the tutorial on writing extensions and the sources of the various plugins for more infiormations.


Field Summary
protected  java.util.ResourceBundle bundle
           
protected  boolean starter
           
 
Constructor Summary
Plugin()
           
 
Method Summary
 void exit()
          Allows the Client to know when to quit.
abstract  void follow()
          Used by the PluginLoader when a plugin is loaded after a network query.
 java.lang.String getAuthor()
          Allow you to know who made these beatiful bugs :-P
 java.lang.String getCategory()
          Where to put the plugin in the MainInterface
 java.lang.String getDirectory()
          Return the plugin's base directory
 java.lang.String getEmail()
          Where to complain or send feedback.
 java.lang.String getIcon()
          Associate a picture with a plugin for ever move userfriendliness
 java.lang.String getName()
          Used by the PluginLoader
 java.lang.String getTitle()
          The title to show
 java.lang.String getToolTip()
          Used in the MainInterface.
 java.lang.String getVersion()
          Used by the PluginLoader to check if new versions needs to be downloaded
abstract  Plugin init(org.lucane.common.ConnectInfo[] friends, boolean starter)
          Used by the PluginLoader to initialize the plugin with adequate parameters
abstract  void load(org.lucane.common.ObjectConnection oc, org.lucane.common.ConnectInfo who, java.lang.String data)
          Used by the PluginLoader to load a plugin previously initialized with a command String and a Socket to communicate with.
 void run()
          Mandatory to be run as a new Thread
 void setLocale(java.lang.String lang)
          Internationalization
abstract  void start()
          Used when a plugin is started (ie.
 java.lang.String tr(java.lang.String origin)
          Translation
 void windowActivated(java.awt.event.WindowEvent e)
          This method is called when a window is activated.
 void windowClosed(java.awt.event.WindowEvent e)
          This method is called when the window is closed.
 void windowClosing(java.awt.event.WindowEvent e)
          Useful to exit() properly.
 void windowDeactivated(java.awt.event.WindowEvent e)
          This method is called when the window is deactivated.
 void windowDeiconified(java.awt.event.WindowEvent e)
          This method is called when the window is deiconified.
 void windowIconified(java.awt.event.WindowEvent e)
          This method is called when the window is iconified.
 void windowOpened(java.awt.event.WindowEvent e)
          This method is called when the window is made visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

starter

protected boolean starter

bundle

protected java.util.ResourceBundle bundle
Constructor Detail

Plugin

public Plugin()
Method Detail

getName

public java.lang.String getName()
Used by the PluginLoader


getVersion

public java.lang.String getVersion()
Used by the PluginLoader to check if new versions needs to be downloaded


getAuthor

public java.lang.String getAuthor()
Allow you to know who made these beatiful bugs :-P


getEmail

public java.lang.String getEmail()
Where to complain or send feedback.


getToolTip

public java.lang.String getToolTip()
Used in the MainInterface.


getIcon

public java.lang.String getIcon()
Associate a picture with a plugin for ever move userfriendliness


getCategory

public java.lang.String getCategory()
Where to put the plugin in the MainInterface


getTitle

public java.lang.String getTitle()
The title to show


init

public abstract Plugin init(org.lucane.common.ConnectInfo[] friends,
                            boolean starter)
Used by the PluginLoader to initialize the plugin with adequate parameters


load

public abstract void load(org.lucane.common.ObjectConnection oc,
                          org.lucane.common.ConnectInfo who,
                          java.lang.String data)
Used by the PluginLoader to load a plugin previously initialized with a command String and a Socket to communicate with.


start

public abstract void start()
Used when a plugin is started (ie. not loaded afeter a network request). For example, it is called when a user wants to send a mesage to another. It allows the plugin developpeur to ask for other parameters interactively.


follow

public abstract void follow()
Used by the PluginLoader when a plugin is loaded after a network query.


exit

public void exit()
Allows the Client to know when to quit.


run

public void run()
Mandatory to be run as a new Thread

Specified by:
run in interface java.lang.Runnable

setLocale

public void setLocale(java.lang.String lang)
Internationalization


tr

public java.lang.String tr(java.lang.String origin)
Translation


windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Useful to exit() properly. Must be used as WindowListener for graphical plugins. Example : JFrame jf = new JFrame(); jf.addWindowListener(this);

Specified by:
windowClosing in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when a window is activated. Only Frames and Dialogs can be active, and the active window always contains the component with focus.

Specified by:
windowActivated in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is closed.

Specified by:
windowClosed in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is deactivated.

Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is deiconified.

Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is iconified.

Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Description copied from interface: java.awt.event.WindowListener
This method is called when the window is made visible.

Specified by:
windowOpened in interface java.awt.event.WindowListener

getDirectory

public java.lang.String getDirectory()
Return the plugin's base directory