jfreerails.client.view
Class DialogueBoxController
java.lang.Object
jfreerails.client.view.DialogueBoxController
- All Implemented Interfaces:
- WorldListListener
public class DialogueBoxController
- extends java.lang.Object
- implements WorldListListener
This class is responsible for displaying dialogue boxes, adding borders to
them as appropriate, and returning focus to the last focus owner after a
dialogue box has been closed. It is also responsible for adding components
that need to update in response to moves to the MoveChainFork. Currently
dialogue boxes are not separate windows. Instead, they are drawn on the modal
layer of the main JFrames LayerPlane. This allows dialogue boxes with
transparent regions to be used.
- Author:
- lindsal8, smackay
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
closeButton
private final javax.swing.JButton closeButton
selectEngine
private SelectEngineJPanel selectEngine
glassPanel
private final MyGlassPanel glassPanel
newspaper
private NewsPaperJPanel newspaper
selectWagons
private SelectWagonsJPanel selectWagons
showControls
private HtmlJPanel showControls
about
private HtmlJPanel about
how2play
private HtmlJPanel how2play
javaProperties
private HtmlJPanel javaProperties
terrainInfo
private TerrainInfoJPanel terrainInfo
stationInfo
private StationInfoJPanel stationInfo
trainDialogueJPanel
private TrainDialogueJPanel trainDialogueJPanel
world
private ReadOnlyWorld world
modelRoot
private ModelRootImpl modelRoot
vl
private RenderersRoot vl
defaultFocusOwner
private java.awt.Component defaultFocusOwner
frame
private final javax.swing.JFrame frame
dialogueJInternalFrame
private javax.swing.JInternalFrame dialogueJInternalFrame
closeCurrentDialogue
private final javax.swing.Action closeCurrentDialogue
- Use this Action to close a dialogue without performing any other
action.
selectEngineAction
private final javax.swing.Action selectEngineAction
trainDetailsButtonActionListener
private final java.awt.event.ActionListener trainDetailsButtonActionListener
selectWagonsAction
private final javax.swing.Action selectWagonsAction
DialogueBoxController
public DialogueBoxController(javax.swing.JFrame frame,
ModelRootImpl mr)
setup
public void setup(ModelRootImpl mr,
RenderersRoot vl)
- Called when a new game is started or a game is loaded.
Be extremely careful with the references of objects allocated in this
method to avoid memory leaks - see bug 967677 (OutOfMemoryError after
starting several new games).
showSaveGame
public void showSaveGame()
showSelectSavedGame2Load
public void showSelectSavedGame2Load()
showTrainOrders
public void showTrainOrders()
showSelectEngine
public void showSelectEngine()
showGameControls
public void showGameControls()
showIncomeStatement
public void showIncomeStatement()
showBalanceSheet
public void showBalanceSheet()
showReportBug
public void showReportBug()
showBrokerScreen
public void showBrokerScreen()
showExitDialog
public void showExitDialog()
showAbout
public void showAbout()
showHow2Play
public void showHow2Play()
showJavaProperties
public void showJavaProperties()
showSelectWagons
public void showSelectWagons()
showTerrainInfo
public void showTerrainInfo(int terrainType)
showTerrainInfo
public void showTerrainInfo(int x,
int y)
showStationInfo
public void showStationInfo(int stationNumber)
showTrainOrders
public void showTrainOrders(int trainId)
showTrainList
public void showTrainList()
showNetworthGraph
public void showNetworthGraph()
showLeaderBoard
public void showLeaderBoard()
showContent
public void showContent(javax.swing.JComponent component)
closeContent
public void closeContent()
setDefaultFocusOwner
public void setDefaultFocusOwner(java.awt.Component defaultFocusOwner)
showStationOrTerrainInfo
public void showStationOrTerrainInfo(int x,
int y)
listUpdated
public void listUpdated(KEY key,
int index,
FreerailsPrincipal principal)
- Specified by:
listUpdated
in interface WorldListListener
itemAdded
public void itemAdded(KEY key,
int index,
FreerailsPrincipal principal)
- Specified by:
itemAdded
in interface WorldListListener
itemRemoved
public void itemRemoved(KEY key,
int index,
FreerailsPrincipal principal)
- Specified by:
itemRemoved
in interface WorldListListener