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.components.InputDialog
it.polimi.ingsw.view.cli.console.graphics.ButtonsDialog
- All Implemented Interfaces:
KeyEventListener
public final class ButtonsDialog extends InputDialog
An InputDialog with one or two clickable buttons, each of them sending a value to the input manager
-
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 ButtonsDialog(java.lang.String title, java.lang.String message, Window caller, java.util.Map<java.lang.String,java.lang.String> buttons, boolean stackButtons)Default constructor -
Method Summary
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.InputDialog
canBeClosed, getInputs, getTextColor, onArrowDown, onArrowLeft, onArrowRight, onArrowUp, onCarriageReturn, onQuit, onTab, showMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Dialog
drawBackground, drawMessage, drawShadows, drawTitle, getBackgroundColor, removeMethods 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, 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
onBackspace, onPrintableKey
-
Constructor Details
-
ButtonsDialog
public ButtonsDialog(java.lang.String title, java.lang.String message, Window caller, java.util.Map<java.lang.String,java.lang.String> buttons, boolean stackButtons)Default constructorCreates a standard size inputDialog window, using the properties file, without printing it; if other dialogs are already showing, the new dialog is created at an offset from the already existing one.
The console echo is disabled as soon as the Dialog is created- Parameters:
title- the dialog titlemessage- the dialog messagecaller- the window which invoked thisbuttons- a map containing the Button text/Return value combosstackButtons- a flag which, if true, makes the dialog print the buttons like in a stack
-