com.incrediblesoft.redjey
Class Style
java.lang.Object
com.incrediblesoft.redjey.Style
public class Style
- extends java.lang.Object
Constructor Summary |
Style(CustomFont font,
Background background,
AbstractBorder border,
java.util.Hashtable attributes)
|
Style(int marginLeft,
int marginRight,
int marginTop,
int marginBottom,
int paddingLeft,
int paddingRight,
int paddingTop,
int paddingBottom,
int paddingHorizontal,
int paddingVertical,
CustomFont font,
Background background,
AbstractBorder border,
java.util.Hashtable attributes)
Creates a new Style. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Style
public Style(int marginLeft,
int marginRight,
int marginTop,
int marginBottom,
int paddingLeft,
int paddingRight,
int paddingTop,
int paddingBottom,
int paddingHorizontal,
int paddingVertical,
CustomFont font,
Background background,
AbstractBorder border,
java.util.Hashtable attributes)
- Creates a new Style.
- Parameters:
marginLeft
- the margin in pixels to the next element on the leftmarginRight
- the margin in pixels to the next element on the rightmarginTop
- the margin in pixels to the next element on the topmarginBottom
- the margin in pixels to the next element on the bottompaddingLeft
- the padding between the left border and content in pixelspaddingRight
- the padding between the right border and content in pixelspaddingTop
- the padding between the top border and content in pixelspaddingBottom
- the padding between the bottom border and content in pixelspaddingVertical
- the vertical padding between internal elements of an itempaddingHorizontal
- the horizontal padding between internal elements of an itemfont
- the content-font for this stylebackground
- the background for this styleborder
- the border for this styleattributes
- additional attributes
Style
public Style(CustomFont font,
Background background,
AbstractBorder border,
java.util.Hashtable attributes)
getMinWidth
public int getMinWidth()
getMinHeight
public int getMinHeight()
getPreferredSize
public Dimension getPreferredSize()
getClientOffsetX
public int getClientOffsetX()
getClientOffsetY
public int getClientOffsetY()
setFont
public Style setFont(CustomFont font)
getFont
public CustomFont getFont()
setBorder
public Style setBorder(AbstractBorder border)
setBackground
public Style setBackground(Background background)
getPaddingLeft
public int getPaddingLeft()
setPaddingLeft
public void setPaddingLeft(int paddingLeft)
getPaddingTop
public int getPaddingTop()
setPaddingTop
public void setPaddingTop(int paddingTop)
getPaddingRight
public int getPaddingRight()
setPaddingRight
public void setPaddingRight(int paddingRight)
getPaddingBottom
public int getPaddingBottom()
setPaddingBottom
public void setPaddingBottom(int paddingBottom)
getPaddingVertical
public int getPaddingVertical()
setPaddingVertical
public void setPaddingVertical(int paddingVertical)
getPaddingHorizontal
public int getPaddingHorizontal()
setPaddingHorizontal
public void setPaddingHorizontal(int paddingHorizontal)
getMarginLeft
public int getMarginLeft()
setMarginLeft
public void setMarginLeft(int marginLeft)
getMarginTop
public int getMarginTop()
setMarginTop
public void setMarginTop(int marginTop)
getMarginRight
public int getMarginRight()
setMarginRight
public void setMarginRight(int marginRight)
getMarginBottom
public int getMarginBottom()
setMarginBottom
public void setMarginBottom(int marginBottom)
getAttributes
public java.util.Hashtable getAttributes()
setAttributes
public void setAttributes(java.util.Hashtable attributes)
addAttribute
public void addAttribute(java.lang.Object key,
java.lang.Object value)
tick
public void tick(int dt)
paint
public void paint(javax.microedition.lcdui.Graphics g,
int x,
int y,
int width,
int height)
clone
public Style clone()
- Clones this style. Each component must have a local copy of template's style.
Note: this method doesn't clone hashtable attributes because of fact that
Object component in CLDC doesn't have clone method.
- Overrides:
clone
in class java.lang.Object
- Returns:
- cloned style