|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
javax.swing.JApplet
org.vizzini.ui.AbstractApp
org.vizzini.ui.game.AbstractGameUISwing
public abstract class AbstractGameUISwing
Provides base functionality for Swing game user interfaces in the game framework.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JApplet |
---|
JApplet.AccessibleJApplet |
Nested classes/interfaces inherited from class java.applet.Applet |
---|
Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class javax.swing.JApplet |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
AbstractGameUISwing()
Construct this object. |
Method Summary | |
---|---|
protected void |
assignAgentListener(IAgent agent)
Assign listeners to the given agent. |
void |
assignAgentListeners(Iterator agentIterator)
Assign listeners using the given agents. |
void |
audioActionPerformed(ActionEvent event)
Callback for the audio action. |
void |
busy(BusyEvent event)
Respond to busy events. |
protected void |
checkActions()
Check the action enabled states. |
protected boolean |
checkForFileOverwrite(File file)
Return true if it's OK to overwrite the given file. |
void |
concede(ConcedeEvent event)
Respond to concede events. |
void |
concedeActionPerformed(ActionEvent event)
Callback for the concede action. |
protected StatusBar |
createStatusBar()
Create the status bar. |
protected void |
fillAdditionalEditMenuItems(JMenu fileMenu)
Fill in additional edit menu items. |
protected void |
fillAdditionalFileMenuItems(JMenu fileMenu)
Fill in additional file menu items. |
protected void |
fillAdditionalHelpMenuItems(JMenu helpMenu)
Fill in additional help menu items. |
protected void |
fillAdditionalMenus(JMenuBar menuBar,
Container container)
Fill in additional menus. |
protected void |
fillAdditionalOptionsMenuItems(JMenu optionsMenu)
Fill in additional options menu items. |
protected void |
fillAdditionalViewMenuItems(JMenu viewMenu)
Fill in additional view menu items. |
protected void |
fillMenuBar()
Create the menu bar. |
protected void |
fillToolBar()
Fill the tool bar. |
void |
gameChange(GameEvent event)
Respond to game events. |
IEnvironmentUI |
getEnvironmentUI()
Return the environment user interface component. |
protected JFileChooser |
getFileChooser()
Return the file chooser, creating it if necessary. |
IGame |
getGame()
Return the game component. |
protected GameUISupport |
getGameUISupport()
Return the game UI support object. |
protected Properties |
getProperties()
Return the configuration properties. |
protected StatusManager |
getStatusManager()
Return the status manager. |
void |
init()
Initialize this applet. |
boolean |
isAudioOn()
Return true if audio is on. |
protected boolean |
isConcedeAvailable()
Return true if the Concede action is available. |
void |
newActionPerformed(ActionEvent event)
Callback for the new action. |
void |
openActionPerformed(ActionEvent event)
Callback for the open action. |
protected void |
removeAgentListener(IAgent agent)
Remove listeners using the given agent. |
void |
removeAgentListeners(Iterator agentIterator)
Remove listeners using the given agents. |
void |
saveActionPerformed(ActionEvent event)
Callback for the save action. |
void |
saveAsActionPerformed(ActionEvent event)
Callback for the save as action. |
void |
setAudioOn(boolean isAudioOn)
Set the audio on flag. |
void |
showStatusBarActionPerformed(ActionEvent event)
Callback for the show status bar action. |
void |
showToolBarActionPerformed(ActionEvent event)
Perform the show tool bar action. |
void |
start()
Start this applet. |
void |
stateChange(StateEvent event)
Respond to state events. |
void |
stop()
Stop this applet. |
boolean |
useToolBar()
Return true if a tool bar is desired. |
Methods inherited from class org.vizzini.ui.AbstractApp |
---|
aboutActionPerformed, cleanup, doMain, getAppName, getFrame, getInitialDimension, getMenuBar, getMenuBarContainer, macOSXRegistration, onlineHelpActionPerformed, preferencesActionPerformed, quitActionPerformed, setCursorBusy, usePreferencesMenu, useSplashScreen |
Methods inherited from class javax.swing.JApplet |
---|
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.applet.Applet |
---|
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractGameUISwing()
Method Detail |
---|
public void assignAgentListeners(Iterator agentIterator)
agentIterator
- Agent iterator.public void audioActionPerformed(ActionEvent event)
event
- Action event.public void busy(BusyEvent event)
busy
in interface IBusyListener
event
- Busy event.public void concede(ConcedeEvent event)
concede
in interface IConcedeListener
event
- Concede event.public void concedeActionPerformed(ActionEvent event)
public void gameChange(GameEvent event)
gameChange
in interface IGameListener
event
- Game event.public IEnvironmentUI getEnvironmentUI()
getEnvironmentUI
in interface IGameUI
public IGame getGame()
getGame
in interface IGameUI
public void init()
init
in interface IGameUI
init
in class AbstractApp
public boolean isAudioOn()
public void newActionPerformed(ActionEvent event)
public void openActionPerformed(ActionEvent event)
event
- Action event.public void removeAgentListeners(Iterator agentIterator)
agentIterator
- Agent iterator.public void saveActionPerformed(ActionEvent event)
event
- Action event.public void saveAsActionPerformed(ActionEvent event)
event
- Action event.public void setAudioOn(boolean isAudioOn)
public void showStatusBarActionPerformed(ActionEvent event)
event
- Action event.public void showToolBarActionPerformed(ActionEvent event)
event
- Action event.public void start()
start
in interface IGameUI
start
in class Applet
public void stateChange(StateEvent event)
stateChange
in interface IStateListener
public void stop()
stop
in class Applet
public boolean useToolBar()
protected void assignAgentListener(IAgent agent)
agent
- Agent.protected void checkActions()
checkActions
in class AbstractApp
protected boolean checkForFileOverwrite(File file)
protected StatusBar createStatusBar()
protected void fillAdditionalEditMenuItems(JMenu fileMenu)
fileMenu
- File menu.protected void fillAdditionalFileMenuItems(JMenu fileMenu)
fileMenu
- File menu.protected void fillAdditionalHelpMenuItems(JMenu helpMenu)
helpMenu
- Help menu.protected void fillAdditionalMenus(JMenuBar menuBar, Container container)
menuBar
- Menu bar.container
- Menu bar container.protected void fillAdditionalOptionsMenuItems(JMenu optionsMenu)
optionsMenu
- Options menu.protected void fillAdditionalViewMenuItems(JMenu viewMenu)
viewMenu
- View menu.protected void fillMenuBar()
protected void fillToolBar()
protected JFileChooser getFileChooser()
protected GameUISupport getGameUISupport()
protected Properties getProperties()
protected StatusManager getStatusManager()
protected boolean isConcedeAvailable()
protected void removeAgentListener(IAgent agent)
agent
- Agent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |