Package com.starpoints.painter
Class PainterSkinSelection
- java.lang.Object
-
- com.starpoints.painter.PainterBase
-
- com.starpoints.painter.PainterMenu
-
- com.starpoints.painter.PainterSkinSelection
-
- All Implemented Interfaces:
InputController,MenuListener,Painter
public class PainterSkinSelection extends PainterMenu implements MenuListener
Painter for options menu.
-
-
Field Summary
Fields Modifier and Type Field Description protected SelectionMenuEntrycolorMenuEntryprotected static booleanDEBUGDebug flag.protected static doubleFACTORDebug flag.protected java.util.List<PlayerFigure>figuresThe figure to enter high score for.static intHANDICAPjava.lang.String[]handicapEntriesprotected SelectionMenuEntryhandicapMenuEntrystatic Handicap[]HANDICAPSstatic intLIGHTSprotected SelectionMenuEntrylightsMenuEntryprotected TextEntryMenuEntrynameEntryMenuEntryprotected ClickMenuEntryreturnMenuEntryprotected SelectionMenuEntrystickerMenuEntryprotected LabelMenuEntrytitleMenuEntryprotected SelectionMenuEntrytypeMenuEntry-
Fields inherited from class com.starpoints.painter.PainterMenu
active, button, button_clicked, buttonCounter, buttonLeft, buttonRight, entries, finished, firstTimeOpt, hideBackground, image, listeners, numberEntries, numbers, paintCount, showButtons
-
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 PainterSkinSelection()Creates a new Skin selection painter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinishNameEntry()Informs the controller, that the name entry is finished.protected voidinitializeMenuEntries()Initializes the menu entries.booleankeyPressed(KeyEvent e)Processes keys in menu.voidmenuEmptyClick()Handles empty clicks.voidmenuEntryChanged(TextEntryMenuEntry me)Does nothing.voidmenuEntrySelected(MenuEntry me)Handles menu entry selection.voidmenuMouseOver(MenuEntry me)Handles menu mouse over events.voidmenuSelectionChanged(SelectionMenuEntry me)Handles menu selection changes.booleanmouseMoved(MouseEvent e)Handles mouse moves.voidpaint(Graphics g, GameState state)Paints the options menuprotected voidpaintMenuEntry(Graphics g, MenuEntry me)Paints a menu entry.voidsetController(StarpointController controller)Sets the reference to the Controller.voidsetFigure(PlayerFigure player)Sets the figure to select skin for.voidsetFigures(java.util.List<PlayerFigure> list)Sets the list of figures to enter names for.protected voidsetMouseArea(MouseEvent e)Sets the current mouse over area.-
Methods inherited from class com.starpoints.painter.PainterMenu
addMenuEntry, addMenuListener, draw, drawBackgroundImage, findIntegerIndex, findIntegerIndex, fireEmptyClickEvent, fireMenuEntryMouseOverEvent, fireMenuEntrySelectedEvent, fireMenuEntrySelectionChangedEvent, focusFirst, getButtonScalingFactor, getButtonXPos, getButtonYPos, getFocussedEntry, getFontSize, getLeftMouseBorder, getRightMouseBorder, handleEvent, isActive, isDownKey, isEnterKey, isFinished, isLeftKey, isRightKey, isShowingButtons, isUpKey, mouseClicked, removeMenuEntry, removeMenuListener, setActive, setFinished, setShowButtons
-
Methods inherited from class com.starpoints.painter.PainterBase
draw, drawShaded, drawShaded, getArea, getBaseHeight, getBaseWidth, getEditor, getHeight, getIndent, getRepaintFactor, getWidth, getXFactor, getYFactor, isInputController, onStartGame, setArea, 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
-
-
-
-
Field Detail
-
DEBUG
protected static final boolean DEBUG
Debug flag.- See Also:
- Constant Field Values
-
FACTOR
protected static final double FACTOR
Debug flag.- See Also:
- Constant Field Values
-
figures
protected java.util.List<PlayerFigure> figures
The figure to enter high score for.
-
HANDICAPS
public static final Handicap[] HANDICAPS
-
LIGHTS
public static final int LIGHTS
- See Also:
- Constant Field Values
-
HANDICAP
public static final int HANDICAP
- See Also:
- Constant Field Values
-
handicapEntries
public java.lang.String[] handicapEntries
-
titleMenuEntry
protected LabelMenuEntry titleMenuEntry
-
nameEntryMenuEntry
protected TextEntryMenuEntry nameEntryMenuEntry
-
colorMenuEntry
protected SelectionMenuEntry colorMenuEntry
-
typeMenuEntry
protected SelectionMenuEntry typeMenuEntry
-
stickerMenuEntry
protected SelectionMenuEntry stickerMenuEntry
-
lightsMenuEntry
protected SelectionMenuEntry lightsMenuEntry
-
handicapMenuEntry
protected SelectionMenuEntry handicapMenuEntry
-
returnMenuEntry
protected ClickMenuEntry returnMenuEntry
-
-
Method Detail
-
setController
public void setController(StarpointController controller)
Sets the reference to the Controller.- Specified by:
setControllerin interfaceInputController- Overrides:
setControllerin classPainterBase- Parameters:
controller- Controller
-
paint
public void paint(Graphics g, GameState state)
Paints the options menu- Specified by:
paintin interfacePainter- Overrides:
paintin classPainterMenu- Parameters:
g- The graphicsstate- The game state.
-
initializeMenuEntries
protected void initializeMenuEntries()
Initializes the menu entries.
-
keyPressed
public boolean keyPressed(KeyEvent e)
Processes keys in menu.- Specified by:
keyPressedin interfaceInputController- Overrides:
keyPressedin classPainterMenu- Parameters:
e- The event.- Returns:
- true, if event is handled.
-
mouseMoved
public boolean mouseMoved(MouseEvent e)
Handles mouse moves.- Specified by:
mouseMovedin interfaceInputController- Overrides:
mouseMovedin classPainterMenu- Parameters:
e- The event.- Returns:
- true, if event is handled.
-
setMouseArea
protected void setMouseArea(MouseEvent e)
Sets the current mouse over area.- Overrides:
setMouseAreain classPainterMenu- Parameters:
e- The mouse event.
-
menuSelectionChanged
public void menuSelectionChanged(SelectionMenuEntry me)
Handles menu selection changes.- Specified by:
menuSelectionChangedin interfaceMenuListener- Parameters:
me- The menu entry.
-
menuEntrySelected
public void menuEntrySelected(MenuEntry me)
Handles menu entry selection.- Specified by:
menuEntrySelectedin interfaceMenuListener- Parameters:
me- The menu entry.
-
menuMouseOver
public void menuMouseOver(MenuEntry me)
Handles menu mouse over events. Does nothing.- Specified by:
menuMouseOverin interfaceMenuListener- Parameters:
me- The menu entry.
-
menuEmptyClick
public void menuEmptyClick()
Handles empty clicks. Does nothing.- Specified by:
menuEmptyClickin interfaceMenuListener
-
paintMenuEntry
protected void paintMenuEntry(Graphics g, MenuEntry me)
Paints a menu entry.- Overrides:
paintMenuEntryin classPainterMenu- Parameters:
g- The graphics.me- The menu entry.
-
setFigure
public void setFigure(PlayerFigure player)
Sets the figure to select skin for.- Parameters:
player- The PlayerFigure.
-
finishNameEntry
protected void finishNameEntry()
Informs the controller, that the name entry is finished.
-
setFigures
public void setFigures(java.util.List<PlayerFigure> list)
Sets the list of figures to enter names for. First Figure in list- Parameters:
list- Plaer list.
-
menuEntryChanged
public void menuEntryChanged(TextEntryMenuEntry me)
Does nothing.- Specified by:
menuEntryChangedin interfaceMenuListener- Parameters:
me- The menuentry.
-
-