public abstract class HUDComponent extends java.lang.Object implements FixedComponent
| Modifier and Type | Field and Description |
|---|---|
protected java.awt.Point |
position
Current position;
|
protected Renderer |
renderer
The
Renderer for this component. |
protected java.lang.String |
title
The caption of this component.
|
| Constructor and Description |
|---|
HUDComponent(java.lang.String title,
Renderer renderer,
java.awt.Point position) |
| Modifier and Type | Method and Description |
|---|---|
void |
enter(Context context)
Do nothing.
|
void |
exit(Context context)
Do nothing.
|
java.awt.Point |
getPosition(Interface inter)
Get the component position.
|
java.lang.String |
getTitle()
Get the caption of the component.
|
void |
handleButton(Context context,
int button)
Do nothing.
|
void |
handleKey(Context context,
int scancode)
Do nothing.
|
void |
handleScroll(Context context,
int diff)
Do nothing.
|
void |
loadConfig(Interface inter,
PanelConfig config)
Loads the component state
|
void |
releaseFocus()
Do nothing.
|
void |
render(Context context)
Set component height.
|
void |
saveConfig(Interface inter,
PanelConfig config)
Saves the component state
|
void |
setPosition(Interface inter,
java.awt.Point position)
Set the component position.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWidthprotected java.lang.String title
protected java.awt.Point position
public HUDComponent(java.lang.String title,
Renderer renderer,
java.awt.Point position)
public java.lang.String getTitle()
Componentpublic void render(Context context)
public void handleButton(Context context, int button)
handleButton in interface Componentcontext - the Context for the componentbutton - the button that changed its stateInterface.LBUTTON,
Interface.RBUTTONpublic void handleKey(Context context, int scancode)
public void handleScroll(Context context, int diff)
handleScroll in interface Componentcontext - the Context for the componentdiff - the amount by which the wheel was movedpublic void enter(Context context)
public void exit(Context context)
public void releaseFocus()
releaseFocus in interface Componentpublic java.awt.Point getPosition(Interface inter)
getPosition in interface FixedComponentinter - current interfacepublic void setPosition(Interface inter, java.awt.Point position)
setPosition in interface FixedComponentinter - current interfaceposition - new positionpublic void saveConfig(Interface inter, PanelConfig config)
FixedComponentsaveConfig in interface FixedComponentinter - current interfaceconfig - configuration to usepublic void loadConfig(Interface inter, PanelConfig config)
FixedComponentloadConfig in interface FixedComponentinter - current interfaceconfig - configuration to use