Package com.starpoints.painter.editor
Class PainterShopEditor
- java.lang.Object
-
- com.starpoints.painter.PainterBase
-
- com.starpoints.painter.editor.PainterShopEditor
-
- All Implemented Interfaces:
InputController,Painter
public class PainterShopEditor extends PainterBase implements InputController
Painter for shop editing in editor.
-
-
Field Summary
-
Fields inherited from class com.starpoints.painter.PainterBase
area, areas, bigFont, controller, DEBUG, gameInfo, medFont, mouseArea, offset, oldMouseArea, options, smallFont, state, verysmallFont, xfactor, yfactor
-
-
Constructor Summary
Constructors Constructor Description PainterShopEditor()
-
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 the painter is active.booleankeyPressed(KeyEvent e)Reacts to key events.booleanmouseClicked(MouseEvent e)Reacts to mouse events.booleanmouseMoved(MouseEvent e)Reacts to mouse move events from the gui.voidpaint(Graphics g, GameState state)Paints the shop images.-
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:
- 620.
-
getBaseHeight
public int getBaseHeight()
Gets the base height of this painter.- Specified by:
getBaseHeightin interfacePainter- Overrides:
getBaseHeightin classPainterBase- Returns:
- 526.
-
isActive
public boolean isActive()
Checks, if the painter is active.- Specified by:
isActivein interfacePainter- Overrides:
isActivein classPainterBase- Returns:
- true, if selected level is a shop.
-
paint
public void paint(Graphics g, GameState state)
Paints the shop images.- Specified by:
paintin interfacePainter- Specified by:
paintin classPainterBase- Parameters:
g- The Graphics.state- GameState.
-
keyPressed
public boolean keyPressed(KeyEvent e)
Description copied from interface:InputControllerReacts to key events.- Specified by:
keyPressedin interfaceInputController- Parameters:
e- The key event.- Returns:
- true, if the event is handled by this InputController.
-
mouseClicked
public boolean mouseClicked(MouseEvent e)
Description copied from interface:InputControllerReacts to mouse events.- Specified by:
mouseClickedin interfaceInputController- Parameters:
e- The mouse event.- Returns:
- true, if the event is handled by this InputController.
-
mouseMoved
public boolean mouseMoved(MouseEvent e)
Description copied from interface:InputControllerReacts to mouse move events from the gui.- Specified by:
mouseMovedin interfaceInputController- Parameters:
e- The mouse event.- Returns:
- true, if the event is handled by this InputController.
-
-