|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.util.SimpleRenderable
com.threerings.opengl.util.SimpleOverlay
com.threerings.opengl.gui.Root
public abstract class Root
Connects the BUI system into the JME scene graph.
| Field Summary | |
|---|---|
static String |
DEFAULT_CURSOR
The name of the default cursor config. |
| Constructor Summary | |
|---|---|
Root(GlContext ctx)
|
|
| Method Summary | |
|---|---|
void |
addGlobalEventListener(EventListener listener)
Registers a listener that will be notified of all events prior to their being dispatched normally. |
void |
addTickParticipant(Tickable participant)
Adds a tick participant to the list. |
void |
addWindow(Window window)
Registers a top-level window with the input system. |
void |
addWindow(Window window,
boolean topLayer)
Registers a top-level window with the input system. |
void |
clearDrag()
Clears out any drag operation in progress. |
void |
dispose()
Releases the resources held by this root. |
Clipboard |
getClipboard()
Returns a reference to the clipboard. |
String |
getClipboardText()
Returns the text in the clipboard, or null for none. |
abstract int |
getDisplayHeight()
Returns the height of the display area. |
abstract int |
getDisplayWidth()
Returns the width of the display area. |
Component |
getFocus()
Returns the component that currently has the focus, or null. |
int |
getModifiers()
Returns the current set of event modifiers. |
int |
getMouseX()
Returns the x coordinate of the mouse cursor. |
int |
getMouseY()
Returns the y coordinate of the mouse cursor. |
com.threerings.openal.Sound |
getSound(String path)
Retrieves an instance of the sound at the specified path from the sound group. |
com.threerings.openal.SoundGroup |
getSoundGroup()
Returns the sound group to use for feedback effects. |
long |
getTickStamp()
Returns the current timestamp used to stamp event times. |
float |
getTooltipTimeout()
Returns the tool tip timeout. |
Window |
getTopWindow()
Returns a reference to the topmost window, or null if there are no windows. |
Window |
getWindow(int index)
Returns the window at the specified index. |
int |
getWindowCount()
Returns the total number of windows added to this node. |
boolean |
isDragging()
Checks whether a drag operation is in progress. |
boolean |
isOnTop(Window window)
Returns true if the specified window is on top. |
void |
moveToTop(Window window)
Ensures that the specified window is on top. |
void |
playSound(String path)
Plays a sound by path. |
void |
popDefaultEventTarget(Component component)
Pops the default event target off the stack. |
void |
pushDefaultEventTarget(Component component)
Configures a component to receive all events that are not sent to some other component. |
void |
removeAllWindows()
Removes all windows from the root node. |
void |
removeGlobalEventListener(EventListener listener)
Removes a global event listener registration. |
void |
removeTickParticipant(Tickable participant)
Removes a tick participant from the list. |
void |
removeWindow(Window window)
Removes a window from participation in the input system. |
void |
requestFocus(Component component)
Requests that the specified component be given the input focus. |
void |
resortWindows()
Called when an added window's layer is changed. |
void |
rootInvalidated(Component root)
This is called by a window or a scroll pane when it has become invalid. |
void |
setClipboardText(String text)
Sets the text in the clipboard. |
void |
setCursor(Cursor cursor)
Sets the cursor to display (or null to use the default cursor). |
void |
setModalShade(Color4f color)
Sets the color of the shade behind the first active modal window. |
void |
setMouseDown(int button)
Sets the mouse as being pressed at the current position. |
void |
setMousePosition(int x,
int y)
Sets the mouse position. |
void |
setMouseUp(int button)
Sets the mouse as being released at the current position. |
void |
setTooltipPreferredWidth(int width)
Sets the preferred width of tooltip windows. |
void |
setTooltipTimeout(float seconds)
Configures the number of seconds that the mouse must rest over a component to trigger a tooltip. |
void |
startDrag(TransferHandler handler,
Component source,
int action)
Initiates a drag operation. |
void |
tick(float elapsed)
Updates the state of this object based on the elapsed time in seconds. |
void |
tipTextChanged(Component component)
A large component that changes its tooltip while it is the hover component in the normal course of events can call this method to force an update to the tooltip window. |
String |
toString()
Generates a string representation of this instance. |
| Methods inherited from class com.threerings.opengl.util.SimpleOverlay |
|---|
composite |
| Methods inherited from class com.threerings.opengl.util.SimpleRenderable |
|---|
enqueue, getStates |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_CURSOR
| Constructor Detail |
|---|
public Root(GlContext ctx)
| Method Detail |
|---|
public void dispose()
public com.threerings.openal.SoundGroup getSoundGroup()
public void playSound(String path)
public com.threerings.openal.Sound getSound(String path)
public long getTickStamp()
public int getModifiers()
public Clipboard getClipboard()
public String getClipboardText()
null for none.
public void setClipboardText(String text)
public void addWindow(Window window)
public void addWindow(Window window,
boolean topLayer)
topLayer - if true, will set the window layer to the top most layer if it's current
layer is less than that.public boolean isOnTop(Window window)
public void moveToTop(Window window)
public Window getTopWindow()
null if there are no windows.
public void resortWindows()
public void removeAllWindows()
public void removeWindow(Window window)
public void addTickParticipant(Tickable participant)
public void removeTickParticipant(Tickable participant)
public void setTooltipTimeout(float seconds)
public float getTooltipTimeout()
setTooltipTimeout(float) for details.
public void setTooltipPreferredWidth(int width)
public void addGlobalEventListener(EventListener listener)
public void removeGlobalEventListener(EventListener listener)
public void rootInvalidated(Component root)
public void pushDefaultEventTarget(Component component)
public void popDefaultEventTarget(Component component)
public void requestFocus(Component component)
public Component getFocus()
public int getWindowCount()
public Window getWindow(int index)
public abstract int getDisplayWidth()
public abstract int getDisplayHeight()
public void setCursor(Cursor cursor)
null to use the default cursor).
public void setMousePosition(int x,
int y)
@Beta public void setMouseDown(int button)
@Beta public void setMouseUp(int button)
public int getMouseX()
public int getMouseY()
public String toString()
toString in class Objectpublic void tipTextChanged(Component component)
public void setModalShade(Color4f color)
public void startDrag(TransferHandler handler,
Component source,
int action)
public void clearDrag()
public boolean isDragging()
public void tick(float elapsed)
Tickable
tick in interface Tickable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||