|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.Props
com.cometway.ak.Agent
com.cometway.swing.AbstractJFrameAgent
com.cometway.swing.AbstractJFrameController
public abstract class AbstractJFrameController
This class acts as an agent-based proxy for a swing JFrame. It creates an inner class called ControlledFrame whose paint method is proxied to the drawFrame method which is intended to be overridden by subclasses of this class. The createFrame method can also be overridden if more control over the JFrame is needed. This agent registers itself with the Service Manager and calls createFrame upon starting.
| Field Summary |
|---|
| Fields inherited from class com.cometway.swing.AbstractJFrameAgent |
|---|
frame, menu, menuActionListener, menuBar, windowListener |
| Fields inherited from class com.cometway.ak.Agent |
|---|
agent_id, agentController, CREATING_STATE, debugReporter, DESTROYED_STATE, DESTROYING_STATE, errorReporter, FAILED_STATE, printlnReporter, props, RUNNING_STATE, STARTING_STATE, STOPPED_STATE, STOPPING_STATE, warningReporter |
| Constructor Summary | |
|---|---|
AbstractJFrameController()
|
|
| Method Summary | |
|---|---|
protected javax.swing.JFrame |
createFrame()
Creates a JFrame that is controlled by this agent. |
abstract void |
drawFrame(java.awt.Graphics g)
Called by the JFrame controlled by this agent when its paint method is called. |
javax.swing.JFrame |
getFrame()
Returns a reference to the JFrame instance controlled by this agent. |
void |
initProps()
Initializes Props for this agent. |
void |
start()
Opens a Frame and registers this agent with the Service Manager. |
void |
stop()
Unregisters this agent with the Service Manager and closes the Frame. |
| Methods inherited from class com.cometway.swing.AbstractJFrameAgent |
|---|
closeFrame, createMenu, createMenuActionListener, createWindowListener, openFrame, setLookAndFeel, setMenuBar |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, println, register, registerService, setAgentController, setProps, toString, unregister, unregisterService, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractJFrameController()
| Method Detail |
|---|
public void initProps()
initProps in interface AgentInterfaceinitProps in class AbstractJFrameAgentpublic void start()
start in interface AgentInterfacestart in class AbstractJFrameAgentpublic void stop()
stop in interface AgentInterfacestop in class AbstractJFrameAgentprotected javax.swing.JFrame createFrame()
createFrame in class AbstractJFrameAgentpublic abstract void drawFrame(java.awt.Graphics g)
public javax.swing.JFrame getFrame()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||