FileDocCategorySizeDatePackage
SpacerLFImpl.javaAPI DocphoneME MR2 API (J2ME)5057Wed May 02 18:00:20 BST 2007javax.microedition.lcdui

SpacerLFImpl

public class SpacerLFImpl extends ItemLFImpl implements SpacerLF
This is the look & feel implementation for Spacer.

Fields Summary
Spacer
spacer
Spacer associated with this Look & Feel
Constructors Summary
SpacerLFImpl(Spacer spacer)
Creates Look & Feel object for Spacer.

param
spacer

        super(spacer);
	this.spacer = spacer;
    
Methods Summary
protected intgetInnerBounds(int dimension)
Overrides ItemLFImpl's getInnerBounds so that extra padding is not added

param
dimension
return
the inner bounds.

	return bounds[dimension];
    
protected intgetLockedHeight()
Returns the locked height of the Spacer, or -1 if it's not locked. Overrides Item's getLockedHeight which returns lockedHeight plus padding

	return spacer.lockedHeight;
    
protected intgetLockedWidth()
Returns the locked width of the Spacer, or -1 if it's not locked. Overrides Item's getLockedWidth which returns lockedWidth plus padding

	return spacer.lockedWidth; 
    
voidlCallPaint(Graphics g, int w, int h)
Paint the content of this Item

param
g the Graphics object to be used for rendering the item
param
w current width of the item in pixels
param
h current height of the item in pixels

        /*
         * There's no reason to erase anything because Form will erase
         * any dirty region for us
         */
    
intlGetAdornedMinimumHeight()
Used by the Form Layout to set the size of this Item

return
the minimum height that includes cell spacing

	return lGetMinimumHeight();
    
intlGetAdornedMinimumWidth()
Used by the Form Layout to set the size of this Item

return
the minimum width that includes cell spacing

	return lGetMinimumWidth();
    
intlGetAdornedPreferredHeight(int width)
Used by the Form Layout to set the size of Items. Spacer should add no padding around itself

param
width the tentative content width in pixels
return
the preferred height

	return lGetPreferredHeight(width);
    
intlGetAdornedPreferredWidth(int height)
Used by the Form Layout to set the size of Items. Spacer should add no padding around itself

param
height the tentative content height in pixels
return
the preferred width

	return lGetPreferredWidth(height);
    
public intlGetMinimumHeight()
Get the minimum height of this Item

return
the minimum height

        return spacer.height;
    
public intlGetMinimumWidth()
Get the minimum width of this Item

return
the minimum width

        return spacer.width;
    
public intlGetPreferredHeight(int w)
Get the preferred height of this Item

param
w the tentative content width in pixels, or -1 if a tentative width has not been computed
return
the preferred height

        return spacer.height;
    
public intlGetPreferredWidth(int h)
Get the preferred width of this Item

param
h the tentative content height in pixels, or -1 if a tentative height has not been computed
return
the preferred width

        return spacer.width;
    
public voidlSetMinimumSize(int minWidth, int minHeight)
Notifies Look & Feel of a minimum size change in the Spacer.

param
minWidth - the new minimum width
param
minHeight - the new minimum height

        lRequestInvalidate(true, true);