com.dbarnes.sgme
Class Extension

java.lang.Object
  extended by com.dbarnes.sgme.Extension

public abstract class Extension
extends java.lang.Object

Base class for custom extensions to the Simple Game Map Editor. All custom extensions to the Simple Game Map Editor must extend this class. Extensions can be used to manipulate project data in a specific manner, or to provide custom import and export functionality.

The Simple Game Map Editor object model is exposed through methods in this base class. In addition, a JFrame reference is provided for use as the parent component of any frames or dialogs created by the extension. Note that extensions should not attempt to modify the JFrame or any child components of the JFrame, as this may result in unexpected behavior.


Constructor Summary
Extension()
           
 
Method Summary
abstract  void extensionInvoked()
          Called by the Simple Game Map Editor application when the extension is invoked through the extensions menu.
 javax.swing.JFrame getFrame()
          Returns the a JFrame component for use as the parent component of any frames or dialogs created by the extension.
 Project getProject()
          Returns the current project.
 void init(Project project, javax.swing.JFrame mainFrame)
          Initializes the Extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Extension

public Extension()
Method Detail

init

public void init(Project project,
                 javax.swing.JFrame mainFrame)
Initializes the Extension.


getProject

public final Project getProject()
Returns the current project.


getFrame

public final javax.swing.JFrame getFrame()
Returns the a JFrame component for use as the parent component of any frames or dialogs created by the extension.


extensionInvoked

public abstract void extensionInvoked()
Called by the Simple Game Map Editor application when the extension is invoked through the extensions menu. Custom extensions must implement this method.



Copyright 2006-2009 Don Barnes. All Rights Reserved.