gzz.media.impl
Class PermanentTextScroll

java.lang.Object
  |
  +--gzz.media.impl.PermanentTextScroll
All Implemented Interfaces:
ScrollBlock, ScrollBlockManager.MediaserverScrollBlock, TextScrollBlock

public class PermanentTextScroll
extends java.lang.Object
implements TextScrollBlock, ScrollBlockManager.MediaserverScrollBlock

A text scroll block loaded from somewhere.


Field Summary
 
Fields inherited from interface gzz.media.TextScrollBlock
rcsid
 
Constructor Summary
PermanentTextScroll(Mediaserver ms, Mediaserver.Id msid)
           
PermanentTextScroll(java.lang.String text)
           
 
Method Summary
 TextSpan append(char ch)
           
 TextSpan append(java.lang.String s)
           
 boolean equals(java.lang.Object o)
           
 char[] getCharArray()
          Get the internal character array of this scrollblock.
 Span getCurrent()
          Get the current contents of this block as a single span of the appropriate type.
 java.lang.String getID()
          Get the globally unique identifier of this block.
 Span getSpan(int offs1, int offs2)
          Get a span that represents the given range inside this scrollblock.
 int hashCode()
           
 boolean isFinalized()
          Whether this block has been finalized or whether more can be appended.
protected  void load()
           
 Mediaserver.Id saveOrGetId(Mediaserver ms)
          Get the Mediaserver id of this block; save when not saved yet.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermanentTextScroll

public PermanentTextScroll(java.lang.String text)

PermanentTextScroll

public PermanentTextScroll(Mediaserver ms,
                           Mediaserver.Id msid)
Method Detail

getID

public java.lang.String getID()
Description copied from interface: ScrollBlock
Get the globally unique identifier of this block. XXX Exact semantics, tmp ids

Specified by:
getID in interface ScrollBlock

saveOrGetId

public Mediaserver.Id saveOrGetId(Mediaserver ms)
Description copied from interface: ScrollBlockManager.MediaserverScrollBlock
Get the Mediaserver id of this block; save when not saved yet.

Specified by:
saveOrGetId in interface ScrollBlockManager.MediaserverScrollBlock

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

load

protected final void load()

append

public TextSpan append(char ch)
                throws gzz.errors.ImmutableException
Specified by:
append in interface TextScrollBlock
gzz.errors.ImmutableException

append

public TextSpan append(java.lang.String s)
                throws gzz.errors.ImmutableException
Specified by:
append in interface TextScrollBlock
gzz.errors.ImmutableException

getCurrent

public Span getCurrent()
Description copied from interface: ScrollBlock
Get the current contents of this block as a single span of the appropriate type.

Specified by:
getCurrent in interface ScrollBlock

getSpan

public Span getSpan(int offs1,
                    int offs2)
Description copied from interface: TextScrollBlock
Get a span that represents the given range inside this scrollblock. Equivalent to getCurrent().subSpan(offs1,offs2).

Specified by:
getSpan in interface TextScrollBlock
Parameters:
offs1 - The offset the span should start at.
offs2 - The one-past-end offset.

isFinalized

public boolean isFinalized()
Description copied from interface: ScrollBlock
Whether this block has been finalized or whether more can be appended.

Specified by:
isFinalized in interface ScrollBlock

getCharArray

public char[] getCharArray()
Description copied from interface: TextScrollBlock
Get the internal character array of this scrollblock. This is used for speeding up drawing strings from a TextScrollBlock by being able to give a scrollblock and two offsets to the drawing routines.

THE RETURNED CHARACTER ARRAY MUST NOT BE MODIFIED UNDER ANY CIRCUMSTANCES.

Specified by:
getCharArray in interface TextScrollBlock