ch.sahits.game.graphic.layout
Class TextInput
java.lang.Object
ch.sahits.game.graphic.layout.AbstractSahitsComponent
ch.sahits.game.graphic.layout.AbstractEditableSahitsComponent<String>
ch.sahits.game.graphic.layout.TextInput
- All Implemented Interfaces:
- ISahitsComponent, IUpdatableComponent
public class TextInput
- extends AbstractEditableSahitsComponent<String>
- implements IUpdatableComponent
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
size
private int size
updateCouter
private int updateCouter
hasFocus
private boolean hasFocus
drawCarret
private boolean drawCarret
metric
private final FontMetrics metric
TEXT_INSET
private final int TEXT_INSET
- See Also:
- Constant Field Values
TextInput
public TextInput(FontMetrics fm)
setSize
public void setSize(int size)
paint
public void paint(Graphics g)
- Description copied from interface:
ISahitsComponent
- Draw the component with the appropriate graphic context.
Before calling this method make sure it is appropriately initialized.
- Specified by:
paint in interface ISahitsComponent
getPreferredSize
public Dimension getPreferredSize()
- Description copied from interface:
ISahitsComponent
- Retrieve the preferred size of the component.
- Specified by:
getPreferredSize in interface ISahitsComponent
- Returns:
gameRender
public void gameRender(Graphics gScr)
- Description copied from interface:
IUpdatableComponent
- Force the panel to render itself.
- Specified by:
gameRender in interface IUpdatableComponent
- Parameters:
gScr - Graphics used for the rendering
gameUpdate
public void gameUpdate()
- Description copied from interface:
IUpdatableComponent
- Force the panel to update its state.
- Specified by:
gameUpdate in interface IUpdatableComponent
testClick
public void testClick(Point p)
- Description copied from interface:
IUpdatableComponent
- Test if there was a mouse click on the component
- Specified by:
testClick in interface IUpdatableComponent
testKeyPress
public void testKeyPress(KeyEvent e)
- Description copied from interface:
IUpdatableComponent
- Check the updatable components if the key press was in one of them
- Specified by:
testKeyPress in interface IUpdatableComponent
updateValue
private void updateValue(String s)
Copyright © 2011 Sahits GmbH. All Rights Reserved.