|
|||||||||
| 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
public abstract class AbstractJFrameAgent
This abstract Agent contains basic functionality useable by an agent that manages a JFrame. Methods in this abstract implementation can be overridden to create and manage any subclass of JFrame. Convenience methods are provided for handling menus and the menubar, as well as the Look and Feel used by Swing.
| Field Summary | |
|---|---|
protected javax.swing.JFrame |
frame
|
protected javax.swing.JMenu[] |
menu
|
protected java.awt.event.ActionListener |
menuActionListener
|
protected javax.swing.JMenuBar |
menuBar
|
protected java.awt.event.WindowListener |
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 | |
|---|---|
AbstractJFrameAgent()
|
|
| Method Summary | |
|---|---|
protected void |
closeFrame()
Closes the JFrame managed by this agent. |
protected javax.swing.JFrame |
createFrame()
Creates the JFrame instance managed by this agent. |
protected javax.swing.JMenu |
createMenu(java.lang.String[] menuData)
Creates a JMenu from the specified String array of menu data. |
protected java.awt.event.ActionListener |
createMenuActionListener()
Creates the ActionListener for handling menu events. |
protected java.awt.event.WindowListener |
createWindowListener()
Creates the WindowListener for handling window events. |
void |
initProps()
Initializes the Props for this agent. |
protected void |
openFrame()
Creates, initializes, and opens a JFrame instance managed by this agent. |
protected void |
setLookAndFeel()
The Look and Feel can be specified globally by specifying the lnf_classname Props. |
protected void |
setMenuBar(java.lang.String[][] menuBarDesc)
Creates and sets the JMenuBar for this frame using an array of menu description String arrays. |
void |
start()
Initializes this agent and pens the JFrame managed by this agent. |
void |
stop()
Closes the JFrame managed by this agent, and stops this agent. |
| 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 |
| Field Detail |
|---|
protected javax.swing.JFrame frame
protected javax.swing.JMenuBar menuBar
protected javax.swing.JMenu[] menu
protected java.awt.event.WindowListener windowListener
protected java.awt.event.ActionListener menuActionListener
| Constructor Detail |
|---|
public AbstractJFrameAgent()
| Method Detail |
|---|
public void initProps()
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class Agentpublic void stop()
stop in interface AgentInterfacestop in class Agentprotected void closeFrame()
protected javax.swing.JMenu createMenu(java.lang.String[] menuData)
protected java.awt.event.ActionListener createMenuActionListener()
protected java.awt.event.WindowListener createWindowListener()
protected javax.swing.JFrame createFrame()
protected void openFrame()
protected void setMenuBar(java.lang.String[][] menuBarDesc)
protected void setLookAndFeel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||