|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--agentland.gui.GuiMaker
This is the object that should be used for passing GUIs around (well, children of this object). On one hand, by passing gui maker rather than a gui object itself, you avoid serialization problems with awt elements in Java. On the other hand, this object provides the gui itself with many useful abstractions. Created: Sun Dec 10 13:26:16 2000
Field Summary | |
protected Container |
container
|
protected GuiFamily |
family
|
protected String |
familyClassName
|
protected String |
familyName
|
protected GuiManagerAgent |
host
|
protected String |
name
|
protected AgentID |
parent
|
protected boolean |
visible
|
Constructor Summary | |
GuiMaker()
|
|
GuiMaker(String name,
AgentID parent)
Creates a new GuiMaker instance. |
Method Summary | |
void |
addSpy(String name)
Allows the gui to subscribe to secrets from the outside world |
boolean |
equals(Object o)
|
Container |
getContainer()
If a gui has been produced already, returns currently active Container. |
String |
getFamily()
|
GuiFamily |
getFamilyObject()
|
abstract Container |
getGui()
Has to be overriden by children; this is where you produce the object to be displayed. |
String |
getName()
|
AgentID |
getParent()
Get the value of parent. |
int |
hashCode()
|
void |
hideMe()
Makes a call to the underlying GuiManger asking it to hide this gui |
protected void |
init()
This method gets called when the GuiMaker arrives at the GuiManager and can start connecting itself to the rest of the world. |
void |
installed()
Called when the container element is first installed by its owning family (so it can do things like have sub- components request focus.) |
void |
killMe()
Causes this gui to be killed and discarded |
void |
log(int level,
String msg)
|
void |
log(String msg)
|
void |
log(String level,
String msg)
|
void |
notify(String name,
Serializable details)
Allows the guis to send out notifications |
Agent |
reliesOn(AgentID aid)
Uses the host to perform the reliesOn call |
Agent |
reliesOn(String occ)
Uses the host to perform the reliesOn call |
void |
setFamily(String family)
|
void |
setFamilyClass(String className)
|
void |
setHost(GuiManagerAgent a,
GuiFamily fam)
|
void |
setName(String name)
|
void |
setParent(AgentID v)
Set the value of parent. |
void |
showMe()
Makes a call to the underlying GuiManger asking it to make this gui visible |
void |
tell(Secret secret)
Allows the gui to receive secrets from the outside world |
String |
toString()
|
boolean |
visible()
Returns true if the maker thinks its gui should be on display right now; false if the gui can be hidden. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected String name
protected String familyName
protected GuiManagerAgent host
protected GuiFamily family
protected String familyClassName
protected AgentID parent
protected Container container
protected boolean visible
Constructor Detail |
public GuiMaker()
public GuiMaker(String name, AgentID parent)
GuiMaker
instance.name
- the name of this gui object -- it will be used as a
title for the window or frame that this gui object gets put inparent
- parent is the agent that this gui is controlling;Method Detail |
public AgentID getParent()
public void setParent(AgentID v)
v
- Value to assign to parent.public String getName()
getName
in interface GuiElement
public void setName(String name)
public String getFamily()
public void setFamily(String family)
public void setFamilyClass(String className)
public GuiFamily getFamilyObject()
public final void setHost(GuiManagerAgent a, GuiFamily fam)
protected void init()
public abstract Container getGui()
public Container getContainer()
getContainer
in interface GuiElement
public void installed()
installed
in interface GuiElement
public Agent reliesOn(AgentID aid)
public Agent reliesOn(String occ)
public void log(String msg)
public void log(int level, String msg)
public void log(String level, String msg)
public void tell(Secret secret)
secret
- a Secret
valuepublic void notify(String name, Serializable details)
public void addSpy(String name)
name
- name of the secretpublic void showMe()
public void hideMe()
public boolean visible()
public void killMe()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |