rero.gui.background

Class BackgroundUtil

public class BackgroundUtil extends Object

Field Summary
static intBG_DEFAULT
static intBG_IMAGE
static intBG_SOLID
static intBG_TRANSPARENT
static intSTYLE_CENTER
static intSTYLE_FILL
static intSTYLE_STRETCHED
static intSTYLE_TILE
Method Summary
static voiddrawBackground(Component source, Graphics g, BackgroundProperties bgConfig)
static voiddrawImageCentered(Component source, Graphics g, BackgroundProperties properties)
static voiddrawImageFill(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 voiddrawImageStretched(Component source, Graphics g, BackgroundProperties properties)
static voiddrawImageTiled(Component source, Graphics g, BackgroundProperties properties)
static voiddrawSafeBackground(Component source, Graphics g, BackgroundProperties bgProperties)
static voiddrawTintedTransparency(Component source, Graphics g, BackgroundProperties bgProperties)
static ImagegetManagedImage(Component source, String file, float tint, Color solid)
gets a managed image with the specified alpha tinting and all that jazz

Field Detail

BG_DEFAULT

public static final int BG_DEFAULT

BG_IMAGE

public static final int BG_IMAGE

BG_SOLID

public static final int BG_SOLID

BG_TRANSPARENT

public static final int BG_TRANSPARENT

STYLE_CENTER

public static final int STYLE_CENTER

STYLE_FILL

public static final int STYLE_FILL

STYLE_STRETCHED

public static final int STYLE_STRETCHED

STYLE_TILE

public static final int STYLE_TILE

Method Detail

drawBackground

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

drawImageCentered

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

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

drawImageStretched

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

drawImageTiled

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

drawSafeBackground

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

drawTintedTransparency

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

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