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.SingleChoiceListDialog
it.polimi.ingsw.view.cli.console.graphics.DetailedSingleChoiceListDialog
- All Implemented Interfaces:
KeyEventListener
public final class DetailedSingleChoiceListDialog extends SingleChoiceListDialog
A dialog containing a list of possible options, each having a description, which is shown when the cursor
passes on the item
-
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 DetailedSingleChoiceListDialog(java.lang.String title, java.lang.String message, Window caller, java.util.Map<java.lang.String,java.util.LinkedList<java.lang.String>> options)Default constructor -
Method Summary
Modifier and Type Method Description voidonArrowDown()Selects the next ActiveItem on the Dialog and refreshes the detailsvoidonArrowLeft()Selects the previous ActiveItem on the Dialog and refreshes the detailsvoidonArrowRight()Selects the next ActiveItem on the Dialog and refreshes the detailsvoidonArrowUp()Selects the previous ActiveItem on the Dialog and refreshes the detailsvoidonTab()Selects the next ActiveItem on the Dialog and refreshes the detailsvoidshow()Draws itself and the details paneMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.InputDialog
canBeClosed, getInputs, getTextColor, onCarriageReturn, onQuitMethods 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
-
DetailedSingleChoiceListDialog
public DetailedSingleChoiceListDialog(java.lang.String title, java.lang.String message, Window caller, java.util.Map<java.lang.String,java.util.LinkedList<java.lang.String>> options)Default constructorCreates a DetailedListChoiceDialog, which dimensions are adapted on the options provided; 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 thisoptions- the options to show and their details
-
-
Method Details
-
show
public void show()Draws itself and the details pane- Overrides:
showin classInputDialog
-
onArrowRight
public void onArrowRight()Selects the next ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowRightin interfaceKeyEventListener- Overrides:
onArrowRightin classInputDialog
-
onArrowLeft
public void onArrowLeft()Selects the previous ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowLeftin interfaceKeyEventListener- Overrides:
onArrowLeftin classInputDialog
-
onTab
public void onTab()Selects the next ActiveItem on the Dialog and refreshes the details- Specified by:
onTabin interfaceKeyEventListener- Overrides:
onTabin classInputDialog
-
onArrowUp
public void onArrowUp()Selects the previous ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowUpin interfaceKeyEventListener- Overrides:
onArrowUpin classInputDialog
-
onArrowDown
public void onArrowDown()Selects the next ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowDownin interfaceKeyEventListener- Overrides:
onArrowDownin classInputDialog
-