public final class UI extends java.lang.Object implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, FocusListener
| Modifier and Type | Field and Description |
|---|---|
boolean |
bestUpdateConvergence
Deprecated.
|
int |
flag
Internal flag
|
static float |
SCALE
UI theme scaling factor, must be set prior theme loading and ui updating
|
| Constructor and Description |
|---|
UI() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDialog(Widget dialog) |
void |
closeAllDialogs()
Close all active dialogs
|
static AssetManager |
createAssets() |
void |
focusGained(FocusEvent e) |
void |
focusLost(FocusEvent e) |
static UI |
getIfCurrent()
Deprecated.
|
int |
getNumDialogs() |
Widget |
getPopup() |
boolean |
hasFocus(Widget widget) |
boolean |
isUnderPopupOrDialog(Widget widget) |
boolean |
keyPressed(KeyEvent e) |
boolean |
keyReleased(KeyEvent e) |
boolean |
mouseClicked(MouseEvent e) |
boolean |
mouseDragged(MouseEvent e) |
void |
mouseEntered(MouseEvent e) |
void |
mouseExited(MouseEvent e) |
boolean |
mouseMoved(MouseEvent e) |
boolean |
mousePressed(MouseEvent e) |
boolean |
mouseReleased(MouseEvent e) |
boolean |
mouseWheelMoved(MouseWheelEvent e) |
void |
performAction(Widget widget,
InputEvent event,
java.lang.String command) |
protected void |
processEvents(ISceneTarget sceneTarget,
Viewport viewport) |
void |
registerListeners(IComponent component) |
void |
render(IGLApi glApi,
Viewport viewport)
UI rendering |
static int |
scale(int i) |
void |
setContents(Widget contents) |
void |
setFocus(Widget widget) |
void |
setPopup(Widget popup) |
void |
update(ISceneTarget sceneTarget,
Viewport viewport,
long timePassedMS)
Update and process events of this UI (contents, popup and dialogs).
|
public static float SCALE
@Deprecated public boolean bestUpdateConvergence
public int flag
public static final int scale(int i)
@Deprecated public static UI getIfCurrent()
public static AssetManager createAssets()
public void registerListeners(IComponent component)
component - component to register the events to, usually from ISceneTargetpublic void setContents(Widget contents)
contents - widget containing the contents of this UIpublic void setPopup(Widget popup)
popup - used by widgets to show a popuppublic Widget getPopup()
public void addDialog(Widget dialog)
dialog - add a blocking dialog, will be automatically removed when not visiblepublic int getNumDialogs()
public void closeAllDialogs()
public void setFocus(Widget widget)
public boolean hasFocus(Widget widget)
public boolean isUnderPopupOrDialog(Widget widget)
public void update(ISceneTarget sceneTarget, Viewport viewport, long timePassedMS)
viewport - timePassedMS - time passed for time based animationpublic void render(IGLApi glApi, Viewport viewport)
UI renderingglApi - viewport - protected void processEvents(ISceneTarget sceneTarget, Viewport viewport)
public boolean keyPressed(KeyEvent e)
keyPressed in interface KeyListenere - the KeyEventpublic boolean keyReleased(KeyEvent e)
keyReleased in interface KeyListenere - the KeyEventpublic boolean mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenere - the MouseEventpublic boolean mousePressed(MouseEvent e)
mousePressed in interface MouseListenere - the MouseEventpublic boolean mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenere - the MouseEventpublic boolean mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenere - the MouseEventpublic boolean mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenere - the MouseEventpublic boolean mouseWheelMoved(MouseWheelEvent e)
mouseWheelMoved in interface MouseWheelListenere - the MouseWheelEventpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenere - the MouseEventpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenere - the MouseEventpublic void focusGained(FocusEvent e)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent e)
focusLost in interface FocusListenerpublic void performAction(Widget widget, InputEvent event, java.lang.String command)
Bonzai Engine 1.4.1-20200831 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2019 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com