Talk:OpenCDS CreatePlugin
From OpenFrag
Testing usage of our new syntax highlighter as per instructions here: http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi#Usage Please contact me if there are any problems or suggestions, such as colors or usage. PhycoFalcon 11:32, 13 September 2007 (CEST)
- package TestPlugin;
- import org.openfrag.OpenCDS.core.plugin.*;
- import org.openfrag.OpenCDS.core.logging.*;
- import java.awt.event.ActionListener;
- import java.awt.event.ActionEvent;
- import javax.swing.Timer;
- public class TestPlugin extends Plugin
- {
- private PluginInterface m_PluginInterface;
- /**
- * Initializes the plugin.
- */
- public void initialize(PluginInterface pluginInterface)
- {
- m_PluginInterface = pluginInterface;
- int delay = 5000; // The amount of seconds between messages.
- ActionListener performer = new ActionListener()
- {
- public void actionPerformed(ActionEvent event)
- {
- Logger.getInstance().log("TestPlugin", "Hey!");
- }
- };
- new Timer(delay, performer).start();
- }
- /**
- * Destroys the plugin.
- */
- public void destroy()
- {
- }
- }

