public abstract class PlugIn
extends java.lang.Object
implements java.util.Observer
Modifier and Type | Field and Description |
---|---|
static int |
ADDED |
static java.lang.String |
CHANGED |
protected java.lang.String |
classReference |
protected Project |
project |
static int |
REMOVED |
Constructor and Description |
---|
PlugIn(Project currProject)
Constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addJMenu(javax.swing.JMenu myMenu)
This method can be used in order to add an individual menu.
|
protected void |
addJMenu(javax.swing.JMenu myMenu,
int indexPosition)
This method can be used in order to add an individual menu
at a specified index position of the menu bar.
|
protected void |
addJMenuItemComponent(javax.swing.JMenu menu2add,
javax.swing.JComponent myMenuItemComponent)
This method can be used in order to add an
individual JMmenuItem to the given menu.
|
protected void |
addJMenuItemComponent(javax.swing.JMenu menu2add,
javax.swing.JComponent myMenuItemComponent,
int indexPosition)
This method can be used in order to add an individual JMmenuItem
at a specified index position of the given menu.
|
protected void |
addJToolbarComponent(javax.swing.JComponent myComponent)
This method can be used in order to add an
individual menu button to the toolbar.
|
protected void |
addJToolbarComponent(javax.swing.JComponent myComponent,
int indexPosition)
This method can be used in order to add an individual menu button
a specified index position of the toolbar.
|
protected void |
addOntologyClassVisualisation(OntologyClassVisualisation ontologyClassVisualisation)
Adds a OntologyClassVisualisation to the global settings.
|
protected void |
addProjectWindowTab(ProjectWindowTab projectWindowTab)
This method can be used in order to add a customized Tab to the project window.
|
protected void |
addProjectWindowTab(ProjectWindowTab projectWindowTab,
int indexPosition)
This method can be used in order to add a customized Tab to the project window at the specified index position.
|
void |
afterPlugOut()
This method will be invoked just after the onPlugOut() method
was executed.
|
java.lang.String |
getClassReference()
Returns the class reference of the current
PlugIn . |
jade.core.ProfileImpl |
getJadeProfile(jade.core.ProfileImpl jadeContainerProfile)
Overriding his method allows to extend/change the currently
used Profile JADE container.
|
abstract java.lang.String |
getName()
Returns the name of the current
PlugIn . |
boolean |
hasValidPreconditionForMasExecution()
Checks for valid precondition before the MAS execution.
|
void |
onMasWasTerminated()
Will be executed, if the Multi-Agent System was terminated.
|
void |
onMasWillBeExecuted()
Will be executed, if the Multi-Agent System is about to start.
|
void |
onPlugIn()
This method be called if the plug-in is loaded into the project.
|
protected void |
onPlugInAdded(PlugIn plugIn)
On plug in added.
|
protected void |
onPlugInRemoved(PlugIn plugIn)
On plug in removed.
|
void |
onPlugOut()
This method will be called if the plug-in will be removed from the
project, means immediately before the project will be closed.
|
protected void |
onPrepareForSaving()
On notification to do the preparations to save a project or simulation setup.
|
protected void |
onProjectChangedAgentStartConfiguration()
On project changed agent start configuration.
|
protected void |
onProjectChangedEnvironmentModel()
On project changed environment model.
|
protected void |
onProjectChangedJadeConfiguration()
On project changed jade configuration.
|
protected void |
onProjectChangedProjectDescription()
On project changed project description.
|
protected void |
onProjectChangedProjectName()
On project changed project name.
|
protected void |
onProjectChangedProjectOntology()
On project changed project ontology.
|
protected void |
onProjectChangedProjectResources()
On project changed project resources.
|
protected void |
onProjectChangedProjectView()
On project changed project view.
|
protected void |
onProjectChangedTimeModelConfiguration()
On project changed TimeModel configuration.
|
protected void |
onProjectSaved(boolean isExcludeSetup)
On project saved.
|
protected void |
onSimSetupAddNew(SimulationSetup simSetup)
Will be invoked, if a new
SimulationSetup was created. |
protected void |
onSimSetupCopy(SimulationSetup simSetup)
Will be invoked, if a
SimulationSetup was copied. |
protected void |
onSimSetupLoad(SimulationSetup simSetup)
Will be invoked, if a
SimulationSetup was loaded. |
protected void |
onSimSetupPrepareSaving(SimulationSetup simSetup)
Will be invoked, before a
SimulationSetup will be saved |
protected void |
onSimSetupRemove(SimulationSetup simSetup)
Will be invoked, if a
SimulationSetup was removed. |
protected void |
onSimSetupRename(SimulationSetup simSetup)
Will be invoked, if a
SimulationSetup was renamed. |
protected void |
onSimSetupSaved(SimulationSetup simSetup)
Will be invoked, if a
SimulationSetup was saved |
void |
setClassReference(java.lang.String classReference)
Sets the class reference of this PugIn.
|
void |
update(java.util.Observable observable,
java.lang.Object updateObject)
AgentGUI uses the observer pattern to inform about changes
within the project.
|
protected void |
updateFromObserver(java.util.Observable observable,
java.lang.Object updateObject)
In order to perceive individual informations from the
Project Observer
(observer pattern), this method should be used in the extended class.
!!! |
public static final java.lang.String CHANGED
public static final int ADDED
public static final int REMOVED
protected Project project
protected java.lang.String classReference
public PlugIn(Project currProject)
currProject
- the current projectpublic void setClassReference(java.lang.String classReference)
classReference
- the classReference to setpublic java.lang.String getClassReference()
PlugIn
.String
public abstract java.lang.String getName()
PlugIn
.public void onPlugIn()
public void onPlugOut()
public void afterPlugOut()
protected void addJMenu(javax.swing.JMenu myMenu)
myMenu
- the my menuprotected void addJMenu(javax.swing.JMenu myMenu, int indexPosition)
myMenu
- the my menuindexPosition
- the index positionprotected void addJMenuItemComponent(javax.swing.JMenu menu2add, javax.swing.JComponent myMenuItemComponent)
menu2add
- the menu2addmyMenuItemComponent
- the my menu item componentprotected void addJMenuItemComponent(javax.swing.JMenu menu2add, javax.swing.JComponent myMenuItemComponent, int indexPosition)
menu2add
- the menu2addmyMenuItemComponent
- the my menu item componentindexPosition
- the index positionprotected void addJToolbarComponent(javax.swing.JComponent myComponent)
myComponent
- the my componentprotected void addJToolbarComponent(javax.swing.JComponent myComponent, int indexPosition)
myComponent
- the my componentindexPosition
- the index positionprotected void addProjectWindowTab(ProjectWindowTab projectWindowTab)
projectWindowTab
- the project window tabprotected void addProjectWindowTab(ProjectWindowTab projectWindowTab, int indexPosition)
projectWindowTab
- the project window tabindexPosition
- the index position (greater one)protected void addOntologyClassVisualisation(OntologyClassVisualisation ontologyClassVisualisation)
classNameOfOntologyClassVisualisation
- the class name of an OntologyClassVisualisationOntologyClassVisualisation
,
OntologyClassWidget
,
OntologyClassEditorJPanel
,
GlobalInfo
,
GlobalInfo#registerOntologyClassVisualisation(String)
,
GlobalInfo#isRegisteredOntologyClassVisualisation(String)
,
OntologyInstanceViewer
public final void update(java.util.Observable observable, java.lang.Object updateObject)
update
in interface java.util.Observer
observable
- the observableupdateObject
- the update objectProject
,
SimulationSetup
,
CHANGED
,
ADDED
,
REMOVED
,
PlugInNotification
protected void updateFromObserver(java.util.Observable observable, java.lang.Object updateObject)
Project
Observer
(observer pattern), this method should be used in the extended class.
!!! Do NOT override the update method directly !!observable
- the observableupdateObject
- the update objectprotected void onPrepareForSaving()
protected void onProjectSaved(boolean isExcludeSetup)
isExcludeSetup
- indicator that reports, if the setup was excluded from the save operationprotected void onProjectChangedProjectName()
protected void onProjectChangedProjectDescription()
protected void onProjectChangedEnvironmentModel()
protected void onProjectChangedAgentStartConfiguration()
protected void onProjectChangedTimeModelConfiguration()
protected void onProjectChangedProjectResources()
protected void onProjectChangedJadeConfiguration()
protected void onProjectChangedProjectOntology()
protected void onProjectChangedProjectView()
protected void onSimSetupAddNew(SimulationSetup simSetup)
SimulationSetup
was created.simSetup
- the new SimulationSetup
protected void onSimSetupCopy(SimulationSetup simSetup)
SimulationSetup
was copied.simSetup
- the copied SimulationSetup
protected void onSimSetupLoad(SimulationSetup simSetup)
SimulationSetup
was loaded.simSetup
- the loaded SimulationSetup
protected void onSimSetupRemove(SimulationSetup simSetup)
SimulationSetup
was removed.simSetup
- the current SimulationSetup
protected void onSimSetupRename(SimulationSetup simSetup)
SimulationSetup
was renamed.simSetup
- the current SimulationSetup
protected void onSimSetupPrepareSaving(SimulationSetup simSetup)
SimulationSetup
will be savedsimSetup
- the current SimulationSetup
protected void onSimSetupSaved(SimulationSetup simSetup)
SimulationSetup
was savedsimSetup
- the current SimulationSetup
protected void onPlugInRemoved(PlugIn plugIn)
plugIn
- the plug inprotected void onPlugInAdded(PlugIn plugIn)
plugIn
- the plug inpublic jade.core.ProfileImpl getJadeProfile(jade.core.ProfileImpl jadeContainerProfile)
jadeContainerProfile
- The profile to CHANGEpublic boolean hasValidPreconditionForMasExecution()
public void onMasWillBeExecuted()
public void onMasWasTerminated()