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.ActiveItem
it.polimi.ingsw.view.cli.console.graphics.components.Button
it.polimi.ingsw.view.cli.console.graphics.components.ClosingButton
it.polimi.ingsw.view.cli.console.graphics.components.ReturningButton
- All Implemented Interfaces:
Toggleable
,KeyEventListener
public class ReturningButton extends ClosingButton
A clickable button which returns a String value when clicked
-
Field Summary
Fields inherited from class it.polimi.ingsw.view.cli.console.graphics.components.WindowItem
activeItems, id, parent, passiveItems
-
Constructor Summary
Constructors Constructor Description ReturningButton(InputDialog parent, CursorPosition initCoord, int width, int height, java.lang.String text, java.lang.String retVal)
Custom constructorReturningButton(InputDialog parent, CursorPosition initCoord, java.lang.String text, java.lang.String retVal)
Default constructor -
Method Summary
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.ClosingButton
onCarriageReturn
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Button
drawText, show
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.ActiveItem
enable, getBackgroundColor, onDisable
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.WindowItem
addActiveItem, addPassiveItem, currentActiveItem, drawShadows, getCli, getID, getParent, hideShadows, maxStringLength, nextActiveItem, previousActiveItem, remove
Methods inherited from class it.polimi.ingsw.view.cli.console.graphics.components.Rectangle
drawBackground, drawBorders, findCenter, getColor, getHeight, getInitCoord, getTextColor, 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
onArrowDown, onArrowLeft, onArrowRight, onArrowUp, onBackspace, onPrintableKey, onTab
-
Constructor Details
-
ReturningButton
public ReturningButton(InputDialog parent, CursorPosition initCoord, java.lang.String text, java.lang.String retVal)Default constructorCreates a new Button object, using its default properties
- Parameters:
parent
- the button container; must be an InputDialog (or subclass)initCoord
- the initial coordinates, relative to the containertext
- the button textretVal
- the value to return when clicked
-
ReturningButton
public ReturningButton(InputDialog parent, CursorPosition initCoord, int width, int height, java.lang.String text, java.lang.String retVal)Custom constructorCreates a new Button object, using custom dimensions
- Parameters:
parent
- the button container; must be an InputDialog (or subclass)initCoord
- the initial coordinates, relative to the containerwidth
- the button widthheight
- the button heighttext
- the button textretVal
- the value to return when clicked
-
-
Method Details