public class TransientComponent extends FocusableComponent
Modifier and Type | Field and Description |
---|---|
protected FixedComponent |
component
Component to be displayed when clicked.
|
protected PanelManager |
manager
Panel manager to be used.
|
protected Toggleable |
toggle
Toggleable that can be toggled by the user. |
description, renderer, title
Constructor and Description |
---|
TransientComponent(java.lang.String title,
java.lang.String description,
Renderer renderer,
Toggleable toggle,
FixedComponent component,
PanelManager manager)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
handleButton(Context context,
int button)
Handle a mouse button state change.
|
void |
render(Context context)
Render the component, by drawing an active box, if the boolean is true, and an inactive one, if the boolean is false.
|
enter, exit, getHeight, getTitle, handleFocus, handleKey, handleScroll, hasFocus, releaseFocus, updateFocus
protected Toggleable toggle
Toggleable
that can be toggled by the user.protected FixedComponent component
protected PanelManager manager
public TransientComponent(java.lang.String title, java.lang.String description, Renderer renderer, Toggleable toggle, FixedComponent component, PanelManager manager)
title
- the title for this componentdescription
- the description for this componentrenderer
- the renderer for this componenttoggle
- the Toggleable
to be used by the usercomponent
- component to be opened when clickedmanager
- the PanelManager
to be used by this componentpublic void render(Context context)
render
in interface Component
render
in class FocusableComponent
context
- the Context
for the componentpublic void handleButton(Context context, int button)
handleButton
in interface Component
handleButton
in class FocusableComponent
context
- the Context
for the componentbutton
- the button that changed its stateInterface.LBUTTON
,
Interface.RBUTTON