rero.gui.background
Class BackgroundUtil

java.lang.Object
  extended byrero.gui.background.BackgroundUtil

public class BackgroundUtil
extends Object


Field Summary
static int BG_DEFAULT
           
static int BG_IMAGE
           
static int BG_SOLID
           
static int BG_TRANSPARENT
           
static int STYLE_CENTER
           
static int STYLE_FILL
           
static int STYLE_STRETCHED
           
static int STYLE_TILE
           
 
Constructor Summary
BackgroundUtil()
           
 
Method Summary
static void drawBackground(Component source, Graphics g, BackgroundProperties bgConfig)
           
static void drawImageCentered(Component source, Graphics g, BackgroundProperties properties)
           
static void drawImageFill(Component source, Graphics g, BackgroundProperties properties)
          draws the image to fill the specified component, hardware scaling is pretty damned fast but we still cache the scaled image anyways just to be safe
static void drawImageStretched(Component source, Graphics g, BackgroundProperties properties)
           
static void drawImageTiled(Component source, Graphics g, BackgroundProperties properties)
           
static void drawSafeBackground(Component source, Graphics g, BackgroundProperties bgProperties)
           
static void drawTintedTransparency(Component source, Graphics g, BackgroundProperties bgProperties)
           
static Image getManagedImage(Component source, String file, float tint, Color solid)
          gets a managed image with the specified alpha tinting and all that jazz
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_TILE

public static final int STYLE_TILE
See Also:
Constant Field Values

STYLE_CENTER

public static final int STYLE_CENTER
See Also:
Constant Field Values

STYLE_FILL

public static final int STYLE_FILL
See Also:
Constant Field Values

STYLE_STRETCHED

public static final int STYLE_STRETCHED
See Also:
Constant Field Values

BG_DEFAULT

public static final int BG_DEFAULT
See Also:
Constant Field Values

BG_SOLID

public static final int BG_SOLID
See Also:
Constant Field Values

BG_TRANSPARENT

public static final int BG_TRANSPARENT
See Also:
Constant Field Values

BG_IMAGE

public static final int BG_IMAGE
See Also:
Constant Field Values
Constructor Detail

BackgroundUtil

public BackgroundUtil()
Method Detail

drawBackground

public static void drawBackground(Component source,
                                  Graphics g,
                                  BackgroundProperties bgConfig)

drawTintedTransparency

public static void drawTintedTransparency(Component source,
                                          Graphics g,
                                          BackgroundProperties bgProperties)

drawSafeBackground

public static void drawSafeBackground(Component source,
                                      Graphics g,
                                      BackgroundProperties bgProperties)

drawImageFill

public static void drawImageFill(Component source,
                                 Graphics g,
                                 BackgroundProperties properties)
draws the image to fill the specified component, hardware scaling is pretty damned fast but we still cache the scaled image anyways just to be safe


drawImageCentered

public static void drawImageCentered(Component source,
                                     Graphics g,
                                     BackgroundProperties properties)

drawImageStretched

public static void drawImageStretched(Component source,
                                      Graphics g,
                                      BackgroundProperties properties)

drawImageTiled

public static void drawImageTiled(Component source,
                                  Graphics g,
                                  BackgroundProperties properties)

getManagedImage

public static Image getManagedImage(Component source,
                                    String file,
                                    float tint,
                                    Color solid)
gets a managed image with the specified alpha tinting and all that jazz