com.arsdigita.toolbox.rebop
Interface GenericDrawable

All Known Implementing Classes:
AbstractDrawable, BevelBox, GenericComponent, GenericImage, StyledText

public interface GenericDrawable

Interface for simple drawable objects. Implement this for objects that will be used to visually render a GenericComponent subclass.

Author:
Gavin Doughtie
See Also:
AbstractDrawable, BevelBox, StyledText

Field Summary
static String versionId
           
 
Method Summary
 void draw(Graphics g, int x, int y, int width, int height)
          This is the main GenericDrawable method implementors will define.
 int getXOffset()
           
 int getYOffset()
           
 void setXOffset(int xOffset)
          The X and Y offsets are used to offset a drawable from the location where it is told to draw.
 void setYOffset(int yOffset)
           
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Method Detail

draw

public void draw(Graphics g,
                 int x,
                 int y,
                 int width,
                 int height)
This is the main GenericDrawable method implementors will define. The other methods can typically be inherited from AbstractDrawable.

Parameters:
g - Graphics to draw on
x - horizontal location to begin drawing
y - vertical location to begin drawing
width - width of area to draw in
height - height of area to draw in

setXOffset

public void setXOffset(int xOffset)
The X and Y offsets are used to offset a drawable from the location where it is told to draw. Offsets are typically used for drawables that are inside components that form the contents of a push-down button.

Parameters:
xOffset - number of horizontal pixels to offset this drawable before drawing it.

getXOffset

public int getXOffset()

setYOffset

public void setYOffset(int yOffset)
Parameters:
yOffset - number of vertical pixels to offset this
See Also:
setXOffset(int)

getYOffset

public int getYOffset()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC