SEdit
Class StructureAgent

java.lang.Object
  extended byAgent
      extended bySEdit.StructureAgent
Direct Known Subclasses:
FormalismStructureAgent

public class StructureAgent
extends Agent

See Also:
Serialized Form

Field Summary
 Object clipboard
           
static String DATE
           
protected  String fileName
           
protected  Formalism formalism
           
 StructureBean gui
           
protected  AgentAddress recipient
           
protected  Structure structure
           
static String VERSION
           
 
Constructor Summary
StructureAgent()
           
StructureAgent(Formalism f)
          Create a StructureAgent with a formalism
StructureAgent(Formalism f, String _fileName)
          Create a StructureAgent which has to load its content from a file.
 
Method Summary
 void activate()
           
 boolean askMessageBoxEmpty()
          glue code
 void close()
           
 void doBroadcastMessage(String g, String r, Message m)
          glue code
 SElement doCommand(Command c)
           
 void doKillAgent(AbstractAgent a)
          glue code
 void doLaunchAgent(AbstractAgent a, String n, boolean gui)
           
 void doPause(int m)
          glue code
 void doSendMessage(AgentAddress a, Message m)
          glue code
 void end()
          apply the end operation to its structure before dying..
 Object getClipBoard()
           
 String getFileName()
           
 Formalism getFormalism()
          get the related formalism
 Formalism getFormalism(String s)
          get the related formalism if its name equals s
 AgentAddress getRecipient()
           
 boolean getShowElementPanel()
           
 Structure getStructure()
          get the related structure
protected  void handleMessage(SEditMessage m)
           
 void initEditor()
           
 void initGUI()
           
 void initStructure()
          Create a structure and initialize it.
 void insertClipBoard()
           
 void insertXMLFile(String fileName, boolean selected)
           
 boolean isFormalismCompatible(String fname)
          Indicates if the associated formalism is compatible with the formalism fname.
 void live()
           
 void makeLaunchAgent(String cl, String n)
          creates and launches an agent of a given class
 SArrow newArrow(boolean selected, ArrowDesc nd, String id, String fromID, String toID, String label, Hashtable properties, Point p, Hashtable graphicProperties)
          Creates a component and initialize all fields and properties.
 SComponent newComponent(boolean selected, ComponentDesc nd, String id, String label, Hashtable properties, Point p, Hashtable graphicProperties, Hashtable connectors, Hashtable placement)
          Creates a component and initialize all fields and properties.
 SNode newNode(boolean selected, NodeDesc nd, String id, String label, Hashtable properties, Point p, Hashtable graphicProperties)
          Creates a node and initialize all fields and properties.
 void println(String s)
           
 void saveXMLFile(String _fileName)
           
 LList schemeGetAgentsWithRole(String g, String r)
          Java-Scheme glue code : getAgentsWithRole
 LList schemeGetAgentsWithRole(String c, String g, String r)
           
 LList schemeGetAvailableCommunities()
          Java-Scheme glue code : getAvailableCommunities
 LList schemeGetExistingGroups()
          Java-Scheme glue code : getExistingGroups
 LList schemeGetExistingGroups(String c)
           
 LList schemeGetExistingRoles(String g)
          Java-Scheme glue code : getRoles
 LList schemeGetExistingRoles(String c, String g)
           
 LList schemeGetMyGroups()
          Java-Scheme glue code : getMyGroups
 LList schemeGetMyGroups(String c)
           
 LList schemeGetMyRoles(String g)
          Java-Scheme glue code : getRoles
 LList schemeGetMyRoles(String c, String g)
           
 LList schemeGetRoles(String g)
          Java-Scheme glue code : getRoles
 LList schemeGetRoles(String c, String g)
           
 void sendToRecipient(Message m)
           
 void setClipBoard(Object o)
           
 void setRecipient(AgentAddress ag)
           
 void setShowElementPanel(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static String VERSION

DATE

public static String DATE

gui

public StructureBean gui

clipboard

public Object clipboard

formalism

protected Formalism formalism

structure

protected Structure structure

fileName

protected String fileName

recipient

protected AgentAddress recipient
Constructor Detail

StructureAgent

public StructureAgent(Formalism f)
Create a StructureAgent with a formalism

Parameters:
f - the formalism

StructureAgent

public StructureAgent(Formalism f,
                      String _fileName)
Create a StructureAgent which has to load its content from a file. The content is loaded in 'insert' mode.


StructureAgent

public StructureAgent()
Method Detail

getFileName

public String getFileName()

getShowElementPanel

public boolean getShowElementPanel()

setShowElementPanel

public void setShowElementPanel(boolean b)

getRecipient

public AgentAddress getRecipient()

setRecipient

public void setRecipient(AgentAddress ag)

initStructure

public void initStructure()
Create a structure and initialize it.


initEditor

public void initEditor()

getStructure

public Structure getStructure()
get the related structure

Returns:
the structure

getFormalism

public Formalism getFormalism()
get the related formalism

Returns:
the formalism

getFormalism

public Formalism getFormalism(String s)
get the related formalism if its name equals s

Parameters:
s - the name of the formalism
Returns:
the formalism

isFormalismCompatible

public boolean isFormalismCompatible(String fname)
Indicates if the associated formalism is compatible with the formalism fname. By default, this test reduces to a simple equals between names

Parameters:
fname - the name of the formalism whose compatibility is tested
Returns:
true if the formalism is compatible, false otherwise

setClipBoard

public void setClipBoard(Object o)

getClipBoard

public Object getClipBoard()

insertClipBoard

public void insertClipBoard()

insertXMLFile

public void insertXMLFile(String fileName,
                          boolean selected)

saveXMLFile

public void saveXMLFile(String _fileName)

activate

public void activate()

initGUI

public void initGUI()

live

public void live()

end

public void end()
apply the end operation to its structure before dying..


close

public void close()

handleMessage

protected void handleMessage(SEditMessage m)

newComponent

public SComponent newComponent(boolean selected,
                               ComponentDesc nd,
                               String id,
                               String label,
                               Hashtable properties,
                               Point p,
                               Hashtable graphicProperties,
                               Hashtable connectors,
                               Hashtable placement)
Creates a component and initialize all fields and properties. Call an init method at the end


newNode

public SNode newNode(boolean selected,
                     NodeDesc nd,
                     String id,
                     String label,
                     Hashtable properties,
                     Point p,
                     Hashtable graphicProperties)
Creates a node and initialize all fields and properties. Call an init method at the end


newArrow

public SArrow newArrow(boolean selected,
                       ArrowDesc nd,
                       String id,
                       String fromID,
                       String toID,
                       String label,
                       Hashtable properties,
                       Point p,
                       Hashtable graphicProperties)
Creates a component and initialize all fields and properties. Calls an init method at the end


doCommand

public SElement doCommand(Command c)

sendToRecipient

public void sendToRecipient(Message m)

doPause

public void doPause(int m)
glue code


askMessageBoxEmpty

public boolean askMessageBoxEmpty()
glue code


doSendMessage

public void doSendMessage(AgentAddress a,
                          Message m)
glue code


doBroadcastMessage

public void doBroadcastMessage(String g,
                               String r,
                               Message m)
glue code


println

public void println(String s)

doKillAgent

public void doKillAgent(AbstractAgent a)
glue code


makeLaunchAgent

public void makeLaunchAgent(String cl,
                            String n)
creates and launches an agent of a given class


doLaunchAgent

public void doLaunchAgent(AbstractAgent a,
                          String n,
                          boolean gui)

schemeGetAgentsWithRole

public LList schemeGetAgentsWithRole(String g,
                                     String r)
Java-Scheme glue code : getAgentsWithRole


schemeGetAgentsWithRole

public LList schemeGetAgentsWithRole(String c,
                                     String g,
                                     String r)

schemeGetMyGroups

public LList schemeGetMyGroups()
Java-Scheme glue code : getMyGroups


schemeGetMyGroups

public LList schemeGetMyGroups(String c)

schemeGetExistingGroups

public LList schemeGetExistingGroups()
Java-Scheme glue code : getExistingGroups


schemeGetExistingGroups

public LList schemeGetExistingGroups(String c)

schemeGetRoles

public LList schemeGetRoles(String g)
Java-Scheme glue code : getRoles


schemeGetRoles

public LList schemeGetRoles(String c,
                            String g)

schemeGetExistingRoles

public LList schemeGetExistingRoles(String g)
Java-Scheme glue code : getRoles


schemeGetExistingRoles

public LList schemeGetExistingRoles(String c,
                                    String g)

schemeGetMyRoles

public LList schemeGetMyRoles(String g)
Java-Scheme glue code : getRoles


schemeGetMyRoles

public LList schemeGetMyRoles(String c,
                              String g)

schemeGetAvailableCommunities

public LList schemeGetAvailableCommunities()
Java-Scheme glue code : getAvailableCommunities



Copyright © J. Ferber, O. Gutknecht All Rights Reserved.