com.threerings.opengl.gui
Class ChatOverlay

java.lang.Object
  extended by com.threerings.opengl.gui.Component
      extended by com.threerings.opengl.gui.Container
          extended by com.threerings.opengl.gui.ChatOverlay
All Implemented Interfaces:
ConfigUpdateListener<ManagedConfig>, com.threerings.crowd.chat.client.ChatDisplay

public class ChatOverlay
extends Container
implements com.threerings.crowd.chat.client.ChatDisplay

A chat display for use as a HUD element.


Field Summary
 
Fields inherited from class com.threerings.opengl.gui.Component
DEFAULT, DISABLED, HOVER
 
Constructor Summary
ChatOverlay(GlContext ctx)
          Creates a new chat overlay.
 
Method Summary
 void clear()
           
 boolean displayMessage(com.threerings.crowd.chat.data.ChatMessage msg, boolean alreadyDisplayed)
           
 Component getHitComponent(int mx, int my)
          Returns the component "hit" by the specified mouse coordinates which might be this component or any of its children.
 void setBundle(String bundle)
          Sets the bundle to use to translate chat messsages.
 void setEnabled(boolean enabled)
          Sets this components enabled state.
 void setPreferredWidth(int width)
          Sets the preferred width for the text area.
 void setSystemColors(Color4f info, Color4f feedback, Color4f attention)
          Sets the colors to use for system chat messages.
 void validate()
          Instructs this component to lay itself out and then mark itself as valid.
 
Methods inherited from class com.threerings.opengl.gui.Container
add, add, add, add, getComponent, getComponentCount, getComponentIndex, getLayoutManager, remove, remove, removeAll, replace, setAlpha, setHoverable, setLayoutManager
 
Methods inherited from class com.threerings.opengl.gui.Component
acceptsFocus, addListener, boundsToString, configUpdated, contains, createDefaultTooltipComponent, createDefaultTooltipComponent, dispatchEvent, getAbsoluteX, getAbsoluteY, getAlpha, getBackground, getBorder, getBounds, getColor, getContext, getCursor, getFocusTarget, getHeight, getInsets, getParent, getPreferredSize, getProperty, getState, getStyleConfigs, getTooltipText, getTooltipTimeout, getTooltipWindowStyle, getTransferHandler, getWidth, getX, getY, hasFocus, invalidate, isAdded, isEnabled, isHoverable, isShowing, isTooltipRelativeToMouse, isValid, isVisible, removeAllListeners, removeAllListeners, removeListener, render, requestFocus, scrollRectToVisible, setBackground, setBounds, setCursor, setLocation, setParent, setPreferredSize, setPreferredSize, setProperty, setSize, setStyleConfig, setStyleConfig, setStyleConfig, setStyleConfigs, setTooltipRelativeToMouse, setTooltipText, setTransferHandler, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChatOverlay

public ChatOverlay(GlContext ctx)
Creates a new chat overlay.

Method Detail

setBundle

public void setBundle(String bundle)
Sets the bundle to use to translate chat messsages.


setPreferredWidth

public void setPreferredWidth(int width)
Sets the preferred width for the text area.


setSystemColors

public void setSystemColors(Color4f info,
                            Color4f feedback,
                            Color4f attention)
Sets the colors to use for system chat messages.


clear

public void clear()
Specified by:
clear in interface com.threerings.crowd.chat.client.ChatDisplay

displayMessage

public boolean displayMessage(com.threerings.crowd.chat.data.ChatMessage msg,
                              boolean alreadyDisplayed)
Specified by:
displayMessage in interface com.threerings.crowd.chat.client.ChatDisplay

setEnabled

public void setEnabled(boolean enabled)
Description copied from class: Component
Sets this components enabled state. A component that is not enabled should not respond to user interaction and should render itself in such a way as not to afford user interaction.

Overrides:
setEnabled in class Container

getHitComponent

public Component getHitComponent(int mx,
                                 int my)
Description copied from class: Component
Returns the component "hit" by the specified mouse coordinates which might be this component or any of its children. This method should return null if the supplied mouse coordinates are outside the bounds of this component.

Overrides:
getHitComponent in class Container

validate

public void validate()
Description copied from class: Component
Instructs this component to lay itself out and then mark itself as valid.

Overrides:
validate in class Container


Copyright © 2011. All Rights Reserved.