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 int
getBaseHeight()
Gets the base height of this painter.int
getBaseWidth()
Gets the base width of this painter.boolean
isActive()
Checks, if the painter is active.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
paint(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:
getBaseWidth
in interfacePainter
- Overrides:
getBaseWidth
in classPainterBase
- Returns:
- 620.
-
getBaseHeight
public int getBaseHeight()
Gets the base height of this painter.- Specified by:
getBaseHeight
in interfacePainter
- Overrides:
getBaseHeight
in classPainterBase
- Returns:
- 526.
-
isActive
public boolean isActive()
Checks, if the painter is active.- Specified by:
isActive
in interfacePainter
- Overrides:
isActive
in classPainterBase
- Returns:
- true, if selected level is a shop.
-
paint
public void paint(Graphics g, GameState state)
Paints the shop images.- Specified by:
paint
in interfacePainter
- Specified by:
paint
in classPainterBase
- Parameters:
g
- The Graphics.state
- GameState.
-
keyPressed
public boolean keyPressed(KeyEvent e)
Description copied from interface:InputController
Reacts to key events.- Specified by:
keyPressed
in 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:InputController
Reacts to mouse events.- Specified by:
mouseClicked
in 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:InputController
Reacts to mouse move events from the gui.- Specified by:
mouseMoved
in interfaceInputController
- Parameters:
e
- The mouse event.- Returns:
- true, if the event is handled by this InputController.
-
-