java.lang.Object
it.polimi.ingsw.view.cli.console.graphics.components.Rectangle
it.polimi.ingsw.view.cli.console.graphics.components.WindowItem
it.polimi.ingsw.view.cli.console.graphics.components.Window
it.polimi.ingsw.view.cli.console.graphics.components.Dialog
it.polimi.ingsw.view.cli.console.graphics.MessageDialog
- All Implemented Interfaces:
KeyEventListener
public final class MessageDialog extends Dialog
A dialog showing an error message and a button to close it
-
Field Summary
Fields inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Dialog
message, titleFields inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Window
background, cli, enableInputOnReturn, returnToFields inherited from class it.polimi.ingsw.view.cli.console.graphics.components.WindowItem
activeItems, id, parent, passiveItems -
Constructor Summary
Constructors Constructor Description MessageDialog(java.lang.String message, Window caller)Default constructorMessageDialog(java.lang.String message, Window caller, int width, int height, CursorPosition initCoord) -
Method Summary
Modifier and Type Method Description voidonCarriageReturn()Removes the message dialogvoidonQuit()Removes the message dialogMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Dialog
canBeClosed, drawBackground, drawMessage, drawShadows, drawTitle, getBackgroundColor, remove, showMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Window
addToBackground, getCli, getReturnToMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.WindowItem
addActiveItem, addPassiveItem, currentActiveItem, getID, getParent, hideShadows, maxStringLength, nextActiveItem, previousActiveItemMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Rectangle
drawBorders, findCenter, getColor, getHeight, getInitCoord, getTextColor, getWidth, hideBorders, loadPropertiesFileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.polimi.ingsw.view.cli.console.KeyEventListener
onArrowDown, onArrowLeft, onArrowRight, onArrowUp, onBackspace, onPrintableKey, onTab
-
Constructor Details
-
MessageDialog
Default constructorCreates a custom size dialog screen and prints it in the middle of the scene; if other dialogs are already showing, the new dialog is created at an offset from the already existing one
- Parameters:
message- the error message
-
MessageDialog
public MessageDialog(java.lang.String message, Window caller, int width, int height, CursorPosition initCoord)
-
-
Method Details
-
onCarriageReturn
public void onCarriageReturn()Removes the message dialog- See Also:
Dialog.remove()
-
onQuit
public void onQuit()Removes the message dialog
-