Package com.starpoints.painter
Class PainterControlButtons
- java.lang.Object
-
- com.starpoints.painter.PainterBase
-
- com.starpoints.painter.PainterControlButtons
-
- All Implemented Interfaces:
InputController,Painter
public class PainterControlButtons extends PainterBase implements InputController
Painter for Touchpad.
-
-
Field Summary
-
Fields inherited from class com.starpoints.painter.PainterBase
area, areas, bigFont, controller, gameInfo, medFont, mouseArea, offset, oldMouseArea, options, smallFont, state, verysmallFont, xfactor, yfactor
-
-
Constructor Summary
Constructors Constructor Description PainterControlButtons()Creates a new PainterControlButtons.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBaseHeight()Gets the base height of this painter.intgetBaseWidth()Gets the base width of this painter.booleanisActive()Checks, if this painter is currently active and wants to handle events.booleankeyPressed(KeyEvent e)Does nothing.booleanmouseClicked(MouseEvent e)Handles mouse clicks.booleanmouseMoved(MouseEvent e)Does nothing.voidpaint(Graphics g, GameState state)Paints the touchpad.-
Methods inherited from class com.starpoints.painter.PainterBase
draw, drawShaded, drawShaded, getArea, getEditor, getHeight, getIndent, getRepaintFactor, getWidth, getXFactor, getYFactor, isInputController, onStartGame, setArea, setController, setFontSize, setLevel, setOptions, setState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.starpoints.event.InputController
getArea, getXFactor, getYFactor, setController
-
-
-
-
Method Detail
-
getBaseWidth
public int getBaseWidth()
Gets the base width of this painter.- Specified by:
getBaseWidthin interfacePainter- Overrides:
getBaseWidthin classPainterBase- Returns:
- 400.
-
getBaseHeight
public int getBaseHeight()
Gets the base height of this painter.- Specified by:
getBaseHeightin interfacePainter- Overrides:
getBaseHeightin classPainterBase- Returns:
- 400.
-
isActive
public boolean isActive()
Checks, if this painter is currently active and wants to handle events.- Specified by:
isActivein interfacePainter- Overrides:
isActivein classPainterBase- Returns:
- true, if touchpad option is on.
-
paint
public void paint(Graphics g, GameState state)
Paints the touchpad.- Specified by:
paintin interfacePainter- Specified by:
paintin classPainterBase- Parameters:
g- The graphics.state- The game state.
-
mouseClicked
public boolean mouseClicked(MouseEvent e)
Handles mouse clicks.- Specified by:
mouseClickedin interfaceInputController- Parameters:
e- The mouse event.- Returns:
- true, if button was clicked.
-
mouseMoved
public boolean mouseMoved(MouseEvent e)
Does nothing.- Specified by:
mouseMovedin interfaceInputController- Parameters:
e- The event.- Returns:
- false
-
keyPressed
public boolean keyPressed(KeyEvent e)
Does nothing.- Specified by:
keyPressedin interfaceInputController- Parameters:
e- The event.- Returns:
- false
-
-