com.metsci.glimpse.painter.info
Class SimpleTextPainter

java.lang.Object
  extended by com.metsci.glimpse.painter.base.GlimpsePainterImpl
      extended by com.metsci.glimpse.painter.info.SimpleTextPainter
All Implemented Interfaces:
GlimpsePainter
Direct Known Subclasses:
FpsPainter

public class SimpleTextPainter
extends GlimpsePainterImpl

A painter which displays arbitrary text at a fixed pixel location on the screen.

Author:
ulman

Nested Class Summary
static class SimpleTextPainter.HorizontalPosition
           
static class SimpleTextPainter.VerticalPosition
           
 
Field Summary
 
Fields inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
BYTES_PER_FLOAT, logger
 
Constructor Summary
SimpleTextPainter()
           
 
Method Summary
 void dispose(GlimpseContext context)
          Free GPU and CPU memory associated with this this GlimpsePainter.
 int getPadding()
           
 SimpleTextPainter setBackgroundColor(float[] backgroundColor)
           
 SimpleTextPainter setColor(float[] rgba)
           
 SimpleTextPainter setColor(float r, float g, float b, float a)
           
 SimpleTextPainter setFont(java.awt.Font font)
           
 SimpleTextPainter setFont(java.awt.Font font, boolean antialias)
           
 SimpleTextPainter setFont(int size, boolean bold)
           
 SimpleTextPainter setFont(int size, boolean bold, boolean antialias)
           
 SimpleTextPainter setHorizontalPosition(SimpleTextPainter.HorizontalPosition hPos)
           
 void setLookAndFeel(LookAndFeel laf)
          Sets display options for the painter based on the provided LookAndFeel.
 SimpleTextPainter setPadding(int padding)
           
 SimpleTextPainter setPaintBackground(boolean paintBackground)
           
 SimpleTextPainter setSizeText(java.lang.String sizeText)
           
 SimpleTextPainter setText(java.lang.String text)
           
 SimpleTextPainter setVerticalPosition(SimpleTextPainter.VerticalPosition vPos)
           
 
Methods inherited from class com.metsci.glimpse.painter.base.GlimpsePainterImpl
isDisposed, isVisible, paintTo, setErrorHandling, setVisible
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTextPainter

public SimpleTextPainter()
Method Detail

setPaintBackground

public SimpleTextPainter setPaintBackground(boolean paintBackground)

setBackgroundColor

public SimpleTextPainter setBackgroundColor(float[] backgroundColor)

setHorizontalPosition

public SimpleTextPainter setHorizontalPosition(SimpleTextPainter.HorizontalPosition hPos)

setVerticalPosition

public SimpleTextPainter setVerticalPosition(SimpleTextPainter.VerticalPosition vPos)

setFont

public SimpleTextPainter setFont(java.awt.Font font)

setFont

public SimpleTextPainter setFont(java.awt.Font font,
                                 boolean antialias)

setFont

public SimpleTextPainter setFont(int size,
                                 boolean bold)

setFont

public SimpleTextPainter setFont(int size,
                                 boolean bold,
                                 boolean antialias)

setSizeText

public SimpleTextPainter setSizeText(java.lang.String sizeText)

setText

public SimpleTextPainter setText(java.lang.String text)

setPadding

public SimpleTextPainter setPadding(int padding)

setColor

public SimpleTextPainter setColor(float[] rgba)

setColor

public SimpleTextPainter setColor(float r,
                                  float g,
                                  float b,
                                  float a)

getPadding

public int getPadding()

setLookAndFeel

public void setLookAndFeel(LookAndFeel laf)
Description copied from interface: GlimpsePainter
Sets display options for the painter based on the provided LookAndFeel.

Specified by:
setLookAndFeel in interface GlimpsePainter
Overrides:
setLookAndFeel in class GlimpsePainterImpl

dispose

public void dispose(GlimpseContext context)
Description copied from interface: GlimpsePainter
Free GPU and CPU memory associated with this this GlimpsePainter. After this call returns, the results of calling other GlimpsePainter methods besides isDisposed( ) are undefined.

Specified by:
dispose in interface GlimpsePainter
Overrides:
dispose in class GlimpsePainterImpl


Copyright © 2012 Metron, Inc.. All Rights Reserved.