|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.icore.IXAgent ix.ip2.Ip2
public class Ip2
The generic I-P2 class and application main program
Nested Class Summary | |
---|---|
class |
Ip2.AddExtensionsHandler
|
class |
Ip2.AddHandlersHandler
|
Field Summary | |
---|---|
protected AgendaViewer |
activityViewer
|
protected java.lang.String |
agentTypeName
|
protected AnnotationViewer |
annotationViewer
|
(package private) boolean |
classic
|
protected PanelController |
controller
|
protected Domain |
domain
|
protected Ip2Frame |
frame
|
protected AgendaViewer |
issueViewer
|
protected java.lang.String |
logoImage
|
protected java.lang.String |
logoLine1
|
protected java.lang.String |
logoLine2
|
protected ProcessModelManager |
modelManager
|
protected IPlanOptionManager |
optionManager
|
protected java.util.List<java.lang.Runnable> |
resetHooks
|
protected boolean |
showOptions
|
protected StateViewer |
stateViewer
|
Fields inherited from class ix.icore.IXAgent |
---|
contactManager, displayName, eventLogger, exitHooks, initialDisplayName, ipcName, ipcStrategyName, iSimTimer, mainAgent, nameListeners, startupDate, startupHooks, symbolName, textFrame |
Constructor Summary | |
---|---|
|
Ip2()
|
protected |
Ip2(boolean setAgent)
Constructor for subclasses that need to creat a second agent. |
Method Summary | |
---|---|
void |
addAboutInfo(java.util.List about)
Called to add "About" information. |
void |
addForwardingHandler(java.lang.String verb,
AgentRelationship rel,
boolean reportBack)
|
protected void |
addHandlers()
Install any built-in issue and activity handlers. |
protected void |
addHandlers(java.util.List classNames)
Add one instance of each of the specified classes as a handler for issues, activities, or both, as appropriate. |
void |
addResetHook(java.lang.Runnable hook)
Records an object that will be run when this panel is asked to reset. |
void |
addTest(TestElement test)
Adds the specified test to the main frame's "Test" menu. |
protected void |
addTestMenuItems()
Called when the main frame is set up to add items to the frame menu bar's "Test" menu. |
void |
addTool(ToolController tc)
Records the tool and adds an entry to the main frame's "Tools" menu. |
void |
clearAllButState()
|
void |
clearModel()
Remove everything in the model in the current context. |
protected void |
completeStartup()
Called in the AWT event thread to make the main GUI frame visible and perform any additional setup that ought to be done in that thread. |
protected void |
do_reloadViewers()
|
java.lang.Object |
ensureTool(java.lang.String toolName)
Returns the tool of the specified name, causing it to be created if it does not already exist. |
java.util.SortedSet |
getActivityPatternSyntaxes()
|
java.lang.String |
getAgentTypeName()
|
PanelController |
getController()
|
Domain |
getDomain()
|
Ip2Frame |
getFrame()
|
Ip2ModelManager |
getIp2ModelManager()
|
ProcessModelManager |
getModelManager()
|
IPlanOptionManager |
getOptionManager()
|
Plan |
getPlan()
|
void |
handleInput(IPC.InputMessage message)
Handles external input in the form of an IPC.InputMessage that contains an object such as an Issue, Activity, or Report. |
void |
handleInputDirectly(IPC.InputMessage message)
|
void |
handleNewActivity(Activity activity)
Handles new activities from external sources. |
void |
handleNewChatMessage(ChatMessage message)
Handles new chat messages. |
void |
handleNewConstraint(Constraint constraint)
Handles new constraints from external sources. |
void |
handleNewIssue(Issue issue)
Handles new issues from external sources. |
void |
handleNewReport(Report report)
Handles new reports from external sources. |
protected void |
initOptions()
|
boolean |
isReloadingViewers()
|
void |
loadDomain(Domain dom)
|
protected void |
loadInitialPlan()
|
void |
loadPlan()
|
void |
loadPlan(Plan plan)
|
void |
loadPlan(java.lang.String resourceName)
|
static void |
main(java.lang.String[] argv)
Main program. |
protected AgendaViewer |
makeActivityViewer()
Called to create the activity viewer. |
protected AnnotationViewer |
makeAnnotationViewer()
Called to create the annotation viewer. |
protected PanelController |
makeController()
Called to create this agent's controller. |
protected Ip2Frame |
makeIp2Frame()
Called to make the main user interface frame. |
protected AgendaViewer |
makeIssueViewer()
Called to create the issue viewer. |
javax.swing.JPanel |
makeLogoPanel()
Makes the LogoPanel for the application's main frame. |
protected ProcessModelManager |
makeModelManager()
Called to create this agent's model-manager. |
protected StateViewer |
makeStateViewer()
Called to create the state viewer. |
protected java.lang.Object |
makeViewer(java.lang.String parameterName,
java.lang.Class defaultClass)
Utility use to construct viewers. |
protected void |
processCommandLineArguments()
Command-line argument processing for arguments used by all versions of I-P2. |
protected void |
readDomain(Domain domain)
Read in any initial domain descriptions. |
void |
readDomain(Domain domain,
java.lang.String resourceName)
Adds definitions to a domain. |
void |
reloadViewers()
|
void |
reset()
Called to restore the initial state. |
void |
resetAllButState()
|
void |
resetViewers()
|
void |
savePlanAs()
|
void |
startup()
Completes basic I-P2 setup and initialization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Domain domain
protected ProcessModelManager modelManager
protected PanelController controller
protected IPlanOptionManager optionManager
protected java.util.List<java.lang.Runnable> resetHooks
protected Ip2Frame frame
boolean classic
protected AgendaViewer activityViewer
protected AgendaViewer issueViewer
protected StateViewer stateViewer
protected AnnotationViewer annotationViewer
protected java.lang.String agentTypeName
protected java.lang.String logoLine1
protected java.lang.String logoLine2
protected java.lang.String logoImage
protected boolean showOptions
Constructor Detail |
---|
public Ip2()
protected Ip2(boolean setAgent)
Method Detail |
---|
public static void main(java.lang.String[] argv)
public java.lang.String getAgentTypeName()
public PanelController getController()
public ProcessModelManager getModelManager()
public Ip2ModelManager getIp2ModelManager()
public Domain getDomain()
public Plan getPlan()
public IPlanOptionManager getOptionManager()
public Ip2Frame getFrame()
public java.util.SortedSet getActivityPatternSyntaxes()
protected ProcessModelManager makeModelManager()
protected PanelController makeController()
protected void processCommandLineArguments()
processCommandLineArguments
in class IXAgent
IFUtil.adjustLookAndFeel()
,
IPC.makeCommunicationStrategy(String methodName)
,
ContactManager.processCommandLineArguments()
,
Debug.on
,
Parameters
public void startup()
startup
in class IXAgent
protected void completeStartup()
Ip2Frame.becomeVisible()
protected void initOptions()
public void reset()
public void resetViewers()
public void resetAllButState()
public void clearModel()
public void clearAllButState()
public void addResetHook(java.lang.Runnable hook)
protected Ip2Frame makeIp2Frame()
Ip2Frame.setUp()
is later called to do most of the work.
public void addAboutInfo(java.util.List about)
protected AgendaViewer makeActivityViewer()
protected AgendaViewer makeIssueViewer()
protected StateViewer makeStateViewer()
protected AnnotationViewer makeAnnotationViewer()
protected java.lang.Object makeViewer(java.lang.String parameterName, java.lang.Class defaultClass)
parameterName
- the name of a paramter whose value,
if given, is a class name.defaultClass
- the class to use if the parameter was
not given.
Parameters.getClass(String, Class)
public void reloadViewers()
public boolean isReloadingViewers()
protected void do_reloadViewers()
protected void readDomain(Domain domain)
public void readDomain(Domain domain, java.lang.String resourceName)
public void loadDomain(Domain dom)
public javax.swing.JPanel makeLogoPanel()
protected void loadInitialPlan()
public void loadPlan()
public void loadPlan(java.lang.String resourceName)
public void loadPlan(Plan plan)
public void savePlanAs()
public void handleInput(IPC.InputMessage message)
IXAgent
handleNewIssue
,
handleNewReport
, etc as appropriate.
handleInput
in class IXAgent
public void handleInputDirectly(IPC.InputMessage message)
public void handleNewIssue(Issue issue)
handleNewIssue
in class IXAgent
public void handleNewActivity(Activity activity)
handleNewActivity
in class IXAgent
public void handleNewConstraint(Constraint constraint)
handleNewConstraint
in class IXAgent
public void handleNewReport(Report report)
handleNewReport
in class IXAgent
public void handleNewChatMessage(ChatMessage message)
handleNewChatMessage
in class IXAgent
public void addTool(ToolController tc)
addTool
in class IXAgent
PanelFrame.addTool(ToolController)
public java.lang.Object ensureTool(java.lang.String toolName)
ensureTool
in class IXAgent
java.lang.IllegalArgumentException
- if there's no tool of the
specified name.protected void addTestMenuItems()
Parameters
,
PanelFrame.addTests(String)
public void addTest(TestElement test)
protected void addHandlers(java.util.List classNames)
PanelController.addHandler(ItemHandler handler)
protected void addHandlers()
public void addForwardingHandler(java.lang.String verb, AgentRelationship rel, boolean reportBack)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |