|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.ip2.ObjectWhiteboard
public class ObjectWhiteboard
Nested Class Summary | |
---|---|
(package private) class |
ObjectWhiteboard.Fact
What we need to know about world-state entries ("facts"). |
(package private) class |
ObjectWhiteboard.HtmlAnalyser
The variation on HtmlTableWalker used by the
analyseHTML
method. |
(package private) static class |
ObjectWhiteboard.NewRowDialog
A modal dialog that requests the information needed to create a new row in the table. |
(package private) class |
ObjectWhiteboard.ResetHook
|
(package private) static class |
ObjectWhiteboard.ViewHtmlStringWriter
The type of HtmlStringWriter used when constructing the HTML table that describes an ObjectView. |
(package private) class |
ObjectWhiteboard.WhiteboardFrame
An ObjectWhiteboard's GUI. |
Field Summary | |
---|---|
(package private) java.lang.Object |
BLANK
|
(package private) ObjectWhiteboard.WhiteboardFrame |
frame
|
(package private) java.util.Map |
fromPattern
|
(package private) java.util.Map |
fromTD
|
(package private) static boolean |
hasBeenVisible
|
(package private) Ip2 |
ip2
|
(package private) Ip2ModelManager |
mm
|
(package private) java.util.SortedMap |
nameToViewMap
|
(package private) java.util.SortedSet |
objects
|
(package private) java.util.List |
properties
|
(package private) StructuralEquality |
structEqual
|
(package private) ObjectView |
view
|
Constructor Summary | |
---|---|
|
ObjectWhiteboard(Ip2 ip2)
Create a viewer for the indicated agent. |
protected |
ObjectWhiteboard(Ip2 ip2,
java.util.SortedMap nameToViews)
Create a viewer for the indicated agent with references to any existing views. |
Method Summary | |
---|---|
(package private) void |
addObject(Symbol name)
|
(package private) void |
addObject(Symbol name,
java.lang.Object type)
|
(package private) void |
analyseHTML(java.util.Map state,
javax.swing.text.html.HTMLDocument doc)
Sets up connections between the world state and the HTML. |
(package private) void |
clearFacts()
|
(package private) ObjectWhiteboard.Fact |
getFact(javax.swing.text.Element elt)
|
(package private) ObjectWhiteboard.Fact |
getFact(LList pattern)
|
(package private) java.util.Collection |
getFacts()
|
(package private) Plan |
getFactsAsPlan()
|
ObjectView |
getObjectView()
|
ObjectView |
getObjectView(java.lang.String name)
|
(package private) java.lang.Object |
getPropValue(ObjectProperty prop,
java.lang.Object obj,
java.util.Map state)
|
(package private) javax.swing.text.html.HTML.Tag |
getTag(javax.swing.text.Element elt)
Returns the HTML.Tag of an Element. |
java.awt.Component |
getView(PanelFrame panelFrame)
Return the GUI component that should be placed in the agent's main user-interface frame. |
(package private) void |
loadViewContents()
Reload the current view from the agent's current world-state. |
(package private) void |
loadViewContentsSavingState()
Reload the current view without losing any editing the user may have done. |
(package private) void |
loadViews(java.lang.String viewDir)
Adds views from the indicated directory. |
(package private) java.lang.String |
makeHtmlTable(java.util.Map worldState)
Constructs an HTML table that describes the current view. |
void |
newBindings(ProcessStatusEvent event,
java.util.Map bindings)
Ignored by this viewer. |
(package private) void |
processStateDelta(java.util.Map delta,
boolean isDeletion)
|
java.util.SortedMap |
readViews(java.lang.String directoryName)
Tries to read an ObjectView from each file in the indicated directory that might contain one. |
void |
reset()
Sets the viewer back to its initial state (or a reasonable approximation). |
(package private) void |
restoreFactEditState(java.util.Map savedState)
|
(package private) java.util.Map |
saveFactEditState()
|
void |
setObjectView(ObjectView view)
|
void |
setObjectView(java.lang.String name)
|
void |
setVisible(boolean v)
|
void |
stateChange(ProcessStatusEvent event,
java.util.Map delta)
|
void |
stateDeletion(ProcessStatusEvent event,
java.util.Map delta)
|
void |
statusUpdate(ProcessStatusEvent event)
Ignored by this viewer. |
(package private) void |
submitChanges()
|
(package private) void |
whenFirstMadeVisible()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Ip2 ip2
Ip2ModelManager mm
ObjectWhiteboard.WhiteboardFrame frame
java.util.SortedMap nameToViewMap
ObjectView view
java.util.SortedSet objects
java.util.List properties
static boolean hasBeenVisible
java.util.Map fromPattern
java.util.Map fromTD
StructuralEquality structEqual
final java.lang.Object BLANK
Constructor Detail |
---|
public ObjectWhiteboard(Ip2 ip2)
protected ObjectWhiteboard(Ip2 ip2, java.util.SortedMap nameToViews)
Method Detail |
---|
public void setVisible(boolean v)
void whenFirstMadeVisible()
public java.awt.Component getView(PanelFrame panelFrame)
StateViewer
getView
in interface StateViewer
public void reset()
StateViewer
reset
in interface StateViewer
public void statusUpdate(ProcessStatusEvent event)
statusUpdate
in interface ProcessStatusListener
public void newBindings(ProcessStatusEvent event, java.util.Map bindings)
newBindings
in interface ProcessStatusListener
public void stateChange(ProcessStatusEvent event, java.util.Map delta)
stateChange
in interface ProcessStatusListener
public void stateDeletion(ProcessStatusEvent event, java.util.Map delta)
stateDeletion
in interface ProcessStatusListener
void processStateDelta(java.util.Map delta, boolean isDeletion)
public ObjectView getObjectView()
public ObjectView getObjectView(java.lang.String name)
public void setObjectView(java.lang.String name)
public void setObjectView(ObjectView view)
void addObject(Symbol name)
void addObject(Symbol name, java.lang.Object type)
void loadViewContentsSavingState()
void loadViewContents()
void loadViews(java.lang.String viewDir)
public java.util.SortedMap readViews(java.lang.String directoryName)
ObjectView
s.
java.lang.String makeHtmlTable(java.util.Map worldState)
For a description of the HTML's structure, see
HtmlTableWalker
.
ObjectWhiteboard.WhiteboardFrame.setHtml(String htmlText)
,
analyseHTML(Map state, HTMLDocument doc)
java.lang.Object getPropValue(ObjectProperty prop, java.lang.Object obj, java.util.Map state)
void analyseHTML(java.util.Map state, javax.swing.text.html.HTMLDocument doc)
ObjectWhiteboard.Fact
to connect
the world-state pattern with the HTML element, and asks
the Fact to write in the current value of the property.
The HTML must have the same structure as that created
by makeHtmlTable(Map worldState)
.
javax.swing.text.html.HTML.Tag getTag(javax.swing.text.Element elt)
ObjectWhiteboard.Fact getFact(LList pattern)
ObjectWhiteboard.Fact getFact(javax.swing.text.Element elt)
java.util.Collection getFacts()
Plan getFactsAsPlan()
void clearFacts()
void submitChanges()
java.util.Map saveFactEditState()
void restoreFactEditState(java.util.Map savedState)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |