net.ctdp.rfdynhud.render
Class DrawnStringFactory

java.lang.Object
  extended by net.ctdp.rfdynhud.render.DrawnStringFactory

public class DrawnStringFactory
extends java.lang.Object


Constructor Summary
DrawnStringFactory(Widget widget)
           
 
Method Summary
 DrawnString newDrawnString(java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString.
 DrawnString newDrawnString(java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString.
 DrawnString newDrawnString(java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnString(java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnString(java.lang.String name, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString.
 DrawnString newDrawnString(java.lang.String name, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString.
 DrawnString newDrawnString(java.lang.String name, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnString(java.lang.String name, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, DrawnString xRelativeTo, DrawnString yRelativeTo, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, int x, int y, DrawnString.Alignment alignment, boolean y_at_baseline, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 DrawnString newDrawnStringIf(boolean condition, java.lang.String name, int x, int y, java.awt.Font font, boolean fontAntiAliased, java.awt.Color fontColor, java.lang.String prefix, java.lang.String postfix)
          Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawnStringFactory

public DrawnStringFactory(Widget widget)
Method Detail

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        DrawnString xRelativeTo,
                                        DrawnString yRelativeTo,
                                        int x,
                                        int y,
                                        DrawnString.Alignment alignment,
                                        boolean y_at_baseline,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor,
                                        java.lang.String prefix,
                                        java.lang.String postfix)
Creates a new DrawnString.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        DrawnString xRelativeTo,
                                        DrawnString yRelativeTo,
                                        int x,
                                        int y,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor,
                                        java.lang.String prefix,
                                        java.lang.String postfix)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        DrawnString xRelativeTo,
                                        DrawnString yRelativeTo,
                                        int x,
                                        int y,
                                        DrawnString.Alignment alignment,
                                        boolean y_at_baseline,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor)
Creates a new DrawnString.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        DrawnString xRelativeTo,
                                        DrawnString yRelativeTo,
                                        int x,
                                        int y,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        int x,
                                        int y,
                                        DrawnString.Alignment alignment,
                                        boolean y_at_baseline,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor,
                                        java.lang.String prefix,
                                        java.lang.String postfix)
Creates a new DrawnString.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        int x,
                                        int y,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor,
                                        java.lang.String prefix,
                                        java.lang.String postfix)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        int x,
                                        int y,
                                        DrawnString.Alignment alignment,
                                        boolean y_at_baseline,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor)
Creates a new DrawnString.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString.

newDrawnString

public final DrawnString newDrawnString(java.lang.String name,
                                        int x,
                                        int y,
                                        java.awt.Font font,
                                        boolean fontAntiAliased,
                                        java.awt.Color fontColor)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          DrawnString xRelativeTo,
                                          DrawnString yRelativeTo,
                                          int x,
                                          int y,
                                          DrawnString.Alignment alignment,
                                          boolean y_at_baseline,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor,
                                          java.lang.String prefix,
                                          java.lang.String postfix)
Creates a new DrawnString.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          DrawnString xRelativeTo,
                                          DrawnString yRelativeTo,
                                          int x,
                                          int y,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor,
                                          java.lang.String prefix,
                                          java.lang.String postfix)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          DrawnString xRelativeTo,
                                          DrawnString yRelativeTo,
                                          int x,
                                          int y,
                                          DrawnString.Alignment alignment,
                                          boolean y_at_baseline,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor)
Creates a new DrawnString.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          DrawnString xRelativeTo,
                                          DrawnString yRelativeTo,
                                          int x,
                                          int y,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
xRelativeTo - if this is non-null, the DrawnString.getAbsX() is computed by ( xRelativeTo.getAbsX() + xRelativeTo.maxWidth + this.getX() ), otherwise getAbsX() returns the plain getX() value.
yRelativeTo - if this is non-null, the DrawnString.getAbsY() is computed by ( xRelativeTo.getAbsY() + xRelativeTo.maxHeight + this.getY() ), otherwise getAbsY() returns the plain getY() value.
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          int x,
                                          int y,
                                          DrawnString.Alignment alignment,
                                          boolean y_at_baseline,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor,
                                          java.lang.String prefix,
                                          java.lang.String postfix)
Creates a new DrawnString.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          int x,
                                          int y,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor,
                                          java.lang.String prefix,
                                          java.lang.String postfix)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
prefix - a String, that is always drawn seamlessly to the left of the major string, that is passed to the draw() method (or null for no prefix).
postfix - a String, that is always drawn seamlessly to the right of the major string, that is passed to the draw() method (or null for no postfix).
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          int x,
                                          int y,
                                          DrawnString.Alignment alignment,
                                          boolean y_at_baseline,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor)
Creates a new DrawnString.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
alignment - the alignment
y_at_baseline - if true, the String's baseline will be placed to the getAbsY() location. Otherwise the String's upper bound will be at that y-location.
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString or null.

newDrawnStringIf

public final DrawnString newDrawnStringIf(boolean condition,
                                          java.lang.String name,
                                          int x,
                                          int y,
                                          java.awt.Font font,
                                          boolean fontAntiAliased,
                                          java.awt.Color fontColor)
Creates a new DrawnString with DrawnString.Alignment.LEFT and y_at_baseline = true.

Parameters:
condition - if this is false, null is returned.
name - (widget-local) unique name used by this factory to overwrite in the cache (can be anything)
x - the x-location
y - the y-location
font - the used font
fontAntiAliased - anti aliased font?
fontColor - the used font color
Returns:
the newly created DrawnString or null.