Package com.starpoints.event
Interface InputController
-
- All Known Subinterfaces:
AdditionalOptions
- All Known Implementing Classes:
PainterConfirmMenu
,PainterControlButtons
,PainterEditorHelp
,PainterEditorMenu
,PainterEditorProps
,PainterFieldEditor
,PainterFlashAnimation
,PainterFlashAnimationEditor
,PainterFlashAnimationInfoMenu
,PainterFlashAnimationItemProps
,PainterFlashAnimationItems
,PainterFlashAnimationPlanets
,PainterGameFinishedAnimation
,PainterGameMenu
,PainterGraphicSoundOptions
,PainterKeyboard
,PainterKeyboardOptions
,PainterLeagueBoard
,PainterLeagueOptions
,PainterLeaguePlayers
,PainterLevelColors
,PainterLevelEnemies
,PainterLevelFogs
,PainterLevelInfoMenu
,PainterLevelItems
,PainterLevelOverview
,PainterLevelProps
,PainterLevelSetsMenu
,PainterMainMenu
,PainterMenu
,PainterMenuHorizontal
,PainterMenuKeyboard
,PainterNetworkMenu
,PainterOptions
,PainterSavedGamesMenu
,PainterSet
,PainterShop
,PainterShopEditor
,PainterShopInfoMenu
,PainterShopItemProps
,PainterShopItems
,PainterShopProps
,PainterSkinSelection
,PainterTabbedMenu
,PainterThingProps
public interface InputController
Interface for keyboard and mouse input controller. Mouse and Keyboard events passed to the StarpointController instance are passed to the current painter set which are responsible for their specific event handling.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Rectangle
getArea()
Gets the gui area of for transforming mouse event coordinates.double
getXFactor()
Gets the x scaling factor for transforming mouse event coordinates.double
getYFactor()
Gets the y scaling factor for transforming mouse event coordinates.boolean
keyPressed(KeyEvent e)
Reacts to key events.boolean
mouseClicked(MouseEvent e)
Reacts to mouse events.boolean
mouseMoved(MouseEvent e)
Reacts to mouse move events from the gui.void
setController(StarpointController controller)
Sets the reference to the Controller.
-
-
-
Method Detail
-
keyPressed
boolean keyPressed(KeyEvent e)
Reacts to key events.- Parameters:
e
- The key event.- Returns:
- true, if the event is handled by this InputController.
-
mouseClicked
boolean mouseClicked(MouseEvent e)
Reacts to mouse events.- Parameters:
e
- The mouse event.- Returns:
- true, if the event is handled by this InputController.
-
mouseMoved
boolean mouseMoved(MouseEvent e)
Reacts to mouse move events from the gui.- Parameters:
e
- The mouse event.- Returns:
- true, if the event is handled by this InputController.
-
getXFactor
double getXFactor()
Gets the x scaling factor for transforming mouse event coordinates.- Returns:
- the xfactor
-
getYFactor
double getYFactor()
Gets the y scaling factor for transforming mouse event coordinates.- Returns:
- the yfactor
-
getArea
Rectangle getArea()
Gets the gui area of for transforming mouse event coordinates.- Returns:
- The area of this InputController.
-
setController
void setController(StarpointController controller)
Sets the reference to the Controller.- Parameters:
controller
- The Controller.
-
-