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, title
Fields inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Window
background, cli, enableInputOnReturn, returnTo
Fields 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 void
onArrowDown()
Selects the next ActiveItem on the Dialog and refreshes the detailsvoid
onArrowLeft()
Selects the previous ActiveItem on the Dialog and refreshes the detailsvoid
onArrowRight()
Selects the next ActiveItem on the Dialog and refreshes the detailsvoid
onArrowUp()
Selects the previous ActiveItem on the Dialog and refreshes the detailsvoid
onTab()
Selects the next ActiveItem on the Dialog and refreshes the detailsvoid
show()
Draws itself and the details paneMethods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.InputDialog
canBeClosed, getInputs, getTextColor, onCarriageReturn, onQuit
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Dialog
drawBackground, drawMessage, drawShadows, drawTitle, getBackgroundColor, remove
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Window
addToBackground, getCli, getReturnTo
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.WindowItem
addActiveItem, addPassiveItem, currentActiveItem, getID, getParent, hideShadows, maxStringLength, nextActiveItem, previousActiveItem
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Rectangle
drawBorders, findCenter, getColor, getHeight, getInitCoord, getWidth, hideBorders, loadPropertiesFile
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
show
in classInputDialog
-
onArrowRight
public void onArrowRight()Selects the next ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowRight
in interfaceKeyEventListener
- Overrides:
onArrowRight
in classInputDialog
-
onArrowLeft
public void onArrowLeft()Selects the previous ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowLeft
in interfaceKeyEventListener
- Overrides:
onArrowLeft
in classInputDialog
-
onTab
public void onTab()Selects the next ActiveItem on the Dialog and refreshes the details- Specified by:
onTab
in interfaceKeyEventListener
- Overrides:
onTab
in classInputDialog
-
onArrowUp
public void onArrowUp()Selects the previous ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowUp
in interfaceKeyEventListener
- Overrides:
onArrowUp
in classInputDialog
-
onArrowDown
public void onArrowDown()Selects the next ActiveItem on the Dialog and refreshes the details- Specified by:
onArrowDown
in interfaceKeyEventListener
- Overrides:
onArrowDown
in classInputDialog
-