|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.davisor.graphics.BoxModelAttributes
BoxModelAttributes represents a generic set of box model attributes. These attributes are base on CSS2 box model.
Each attribute can be set
| Field Summary | |
static int |
BOTTOM
|
static int |
DEFAULT
|
static int |
HORIZONTAL
|
static int |
LEFT
|
protected java.lang.String |
M_name
|
protected java.lang.Object[] |
M_values
|
static int |
RIGHT
|
static int |
SIZE
|
static int |
TOP
|
static int |
VERTICAL
|
| Constructor Summary | |
BoxModelAttributes(BoxModelAttributes bma)
Deep copy constructor. |
|
BoxModelAttributes(java.lang.String name)
Constructs a new BoxModelAttributes instance with a name. |
|
BoxModelAttributes(java.lang.String name,
java.lang.Object def,
java.lang.Object vertical,
java.lang.Object horizontal,
java.lang.Object top,
java.lang.Object right,
java.lang.Object bottom,
java.lang.Object left)
Constructs a new BoxModelAttributes instance and sets all the attribute values. |
|
| Method Summary | |
com.davisor.core.Dupable |
dup()
Duplicates this object. |
boolean |
equals(java.lang.Object object)
Test if these box model attributes equal to given box model attributes. |
java.lang.Object |
getBottomValue()
Return the value for the bottom attribute. |
java.lang.Object |
getLeftValue()
Return the value for the left attribute. |
java.lang.Object |
getRightValue()
Return the value for the right attribute. |
java.lang.Object |
getTopValue()
Return the value for the top attribute. |
java.lang.Object |
getValue(int attribute)
Returns the value associated to the exact attibute index. |
void |
setValue(int attribute,
java.lang.Object value)
Sets the value for the given attribute. |
void |
setValues(java.lang.Object def)
Sets the common default value. |
void |
setValues(java.lang.Object vertical,
java.lang.Object horizontal)
Sets the horizontal and vertical default values. |
void |
setValues(java.lang.Object top,
java.lang.Object horizontal,
java.lang.Object bottom)
Sets the horizontal and vertical default values. |
void |
setValues(java.lang.Object top,
java.lang.Object right,
java.lang.Object bottom,
java.lang.Object left)
Sets the horizontal and vertical default values. |
void |
setValues(java.lang.Object def,
java.lang.Object vertical,
java.lang.Object horizontal,
java.lang.Object top,
java.lang.Object right,
java.lang.Object bottom,
java.lang.Object left)
Set all the values. |
java.lang.String |
toString()
Gets an XML String representation of this object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static int DEFAULT
public static int VERTICAL
public static int HORIZONTAL
public static int TOP
public static int RIGHT
public static int BOTTOM
public static int LEFT
public static int SIZE
protected java.lang.Object[] M_values
protected java.lang.String M_name
| Constructor Detail |
public BoxModelAttributes(java.lang.String name)
name - attributes name (may be null)
public BoxModelAttributes(java.lang.String name,
java.lang.Object def,
java.lang.Object vertical,
java.lang.Object horizontal,
java.lang.Object top,
java.lang.Object right,
java.lang.Object bottom,
java.lang.Object left)
name - attributes name (may be null)def - default value for all attributes and defaults (may be null)vertical - default value for top and bottom attributes (may be null)horizontal - default value for right and left attributes
(may be null)top - value for top attribute (may be null)right - value for right attribute (may be null)bottom - value for bottom attribute (may be null)left - value for left attribute (may be null)public BoxModelAttributes(BoxModelAttributes bma)
dup()| Method Detail |
public boolean equals(java.lang.Object object)
public java.lang.String toString()
public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupablepublic java.lang.Object getBottomValue()
public java.lang.Object getLeftValue()
public java.lang.Object getRightValue()
public java.lang.Object getTopValue()
public java.lang.Object getValue(int attribute)
attribute - index of the attribute (DEFAULT,HORIZONTAL,...)
public void setValue(int attribute,
java.lang.Object value)
attribute - index of the attribute (DEFAULT,HORIZONTAL,...)value - attribute value (may be null)
public void setValues(java.lang.Object def,
java.lang.Object vertical,
java.lang.Object horizontal,
java.lang.Object top,
java.lang.Object right,
java.lang.Object bottom,
java.lang.Object left)
def - default value for all attributes and defaults (may be null)vertical - default value for top and bottom attributes (may be null)horizontal - default value for right and left attributes
(may be null)top - value for top attribute (may be null)right - value for right attribute (may be null)bottom - value for bottom attribute (may be null)left - value for left attribute (may be null)setValue(int, java.lang.Object)public void setValues(java.lang.Object def)
def - default value for all attributes and defaults (may be null)
public void setValues(java.lang.Object vertical,
java.lang.Object horizontal)
E.g. margin : 1em 2em -- top & bottom = 1em, right & left = 2em
vertical - default value for top and bottom attributes (may be null)horizontal - default value for right and left attributes
(may be null)
public void setValues(java.lang.Object top,
java.lang.Object horizontal,
java.lang.Object bottom)
E.g. margin : 1em 2em 3em -- top=1em, right=2em, bottom=3em, left=2em
top - value for top attribute (may be null)horizontal - default value for right and left attributes
(may be null)bottom - value for bottom attribute (may be null)
public void setValues(java.lang.Object top,
java.lang.Object right,
java.lang.Object bottom,
java.lang.Object left)
E.g. margin : 1em 2em 3em -- top=1em, right=2em, bottom=3em, left=2em
top - value for top attribute (may be null)right - value for right attribute (may be null)bottom - value for bottom attribute (may be null)left - value for left attribute (may be null)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||