com.threerings.chat
Class ComicChatOverlay.BubbleGlyph

java.lang.Object
  extended by com.threerings.media.AbstractMedia
      extended by com.threerings.media.animation.Animation
          extended by com.threerings.chat.ChatGlyph
              extended by com.threerings.chat.ComicChatOverlay.BubbleGlyph
All Implemented Interfaces:
Shape
Enclosing class:
ComicChatOverlay

protected static class ComicChatOverlay.BubbleGlyph
extends ChatGlyph

A glyph of a particlar chat bubble


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.media.animation.Animation
Animation.AnimCompletedOp, Animation.AnimStartedOp
 
Field Summary
protected  int _agelevel
          The age level of the bubble, used to pick the background color.
protected  Shape _sansTail
          The shape of this chat bubble, without the tail.
protected  Name _speaker
          The name of the speaker.
 
Fields inherited from class com.threerings.chat.ChatGlyph
_alpha, _background, _bornStamp, _dim, _icon, _ipos, _label, _lifetime, _lpos, _outline, _owner, _shape, _type, ALPHA, ANIM_TIME, histIndex
 
Fields inherited from class com.threerings.media.animation.Animation
_finished
 
Fields inherited from class com.threerings.media.AbstractMedia
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER
 
Constructor Summary
ComicChatOverlay.BubbleGlyph(SubtitleChatOverlay owner, int type, long lifetime, Shape shape, Label label, Point labelpos, Shape sansTail, Name speaker, Color outline)
          Construct a chat bubble glyph.
 
Method Summary
protected  Color getBackground()
           
 Rectangle getBubbleBounds()
          Get the bounds of this bubble, sans tail space.
 Shape getBubbleTerritory()
          Get the screen real estate that this bubble has reserved and doesn't want to let any other bubbles take.
 boolean isSpeaker(Name player)
          Is the specified player the speaker of this bubble?
 void removeTail()
          Remove the tail on this bubble, if any.
 void setAgeLevel(int agelevel)
           
 void viewDidScroll(int dx, int dy)
          Called when the view has scrolled.
 
Methods inherited from class com.threerings.chat.ChatGlyph
fastForward, getShape, getType, jiggleBounds, paint, render, setDim, setLocation, tick, translate
 
Methods inherited from class com.threerings.media.animation.Animation
addAnimationObserver, didFinish, isFinished, removeAnimationObserver, reset, willFinish, willStart
 
Methods inherited from class com.threerings.media.AbstractMedia
addObserver, contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, queueNotification, removeObserver, renderCompareTo, setRenderOrder, shutdown, toString, toString, viewLocationDidChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_sansTail

protected Shape _sansTail
The shape of this chat bubble, without the tail.


_speaker

protected Name _speaker
The name of the speaker.


_agelevel

protected int _agelevel
The age level of the bubble, used to pick the background color.

Constructor Detail

ComicChatOverlay.BubbleGlyph

public ComicChatOverlay.BubbleGlyph(SubtitleChatOverlay owner,
                                    int type,
                                    long lifetime,
                                    Shape shape,
                                    Label label,
                                    Point labelpos,
                                    Shape sansTail,
                                    Name speaker,
                                    Color outline)
Construct a chat bubble glyph.

Parameters:
sansTail - the chat bubble shape without the tail.
Method Detail

setAgeLevel

public void setAgeLevel(int agelevel)

viewDidScroll

public void viewDidScroll(int dx,
                          int dy)
Description copied from class: ChatGlyph
Called when the view has scrolled. The default implementation adjusts the glyph to remain in the same position relative to the view rather than allowing it to scroll with the view.

Overrides:
viewDidScroll in class ChatGlyph

getBackground

protected Color getBackground()
Overrides:
getBackground in class ChatGlyph

getBubbleTerritory

public Shape getBubbleTerritory()
Get the screen real estate that this bubble has reserved and doesn't want to let any other bubbles take.


getBubbleBounds

public Rectangle getBubbleBounds()
Get the bounds of this bubble, sans tail space.


isSpeaker

public boolean isSpeaker(Name player)
Is the specified player the speaker of this bubble?


removeTail

public void removeTail()
Remove the tail on this bubble, if any.