|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.shared.ui.MarginInfo
public class MarginInfo
Describes the margin settings for each edge of a Component.
| Constructor Summary | |
|---|---|
MarginInfo(boolean enabled)
Creates a MarginInfo object with all edges set to either enabled or disabled. |
|
MarginInfo(boolean vertical,
boolean horizontal)
|
|
MarginInfo(boolean top,
boolean right,
boolean bottom,
boolean left)
Creates a MarginInfo object by having each edge specified in clockwise order (analogous to CSS). |
|
MarginInfo(int bitMask)
Creates a MarginInfo object from a bit mask. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
int |
getBitMask()
Returns the current bit mask that make up the margin settings. |
boolean |
hasAll()
Checks if this MarginInfo object has margins on all edges enabled. |
boolean |
hasBottom()
Checks if this MarginInfo object has the bottom edge margin enabled. |
int |
hashCode()
|
boolean |
hasLeft()
Checks if this MarginInfo object has the left edge margin enabled. |
boolean |
hasRight()
Checks if this MarginInfo object has the right edge margin enabled. |
boolean |
hasTop()
Checks if this MarginInfo object has the top edge margin enabled. |
void |
setMargins(boolean enabled)
Enables or disables margins on all edges simultaneously. |
void |
setMargins(boolean top,
boolean right,
boolean bottom,
boolean left)
Sets margins on all edges individually. |
void |
setMargins(MarginInfo marginInfo)
Copies margin values from another MarginInfo object. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MarginInfo(boolean enabled)
enabled - the value to set for all edgespublic MarginInfo(int bitMask)
bitMask - bits to set
public MarginInfo(boolean top,
boolean right,
boolean bottom,
boolean left)
top - enable or disable top marginright - enable or disable right marginbottom - enable or disable bottom marginleft - enable or disable left margin
public MarginInfo(boolean vertical,
boolean horizontal)
| Method Detail |
|---|
public void setMargins(boolean enabled)
enabled - if true, enables margins on all edges. If false, disables
margins on all edges.
public void setMargins(boolean top,
boolean right,
boolean bottom,
boolean left)
top - enable or disable top marginright - enable or disable right marginbottom - enable or disable bottom marginleft - enable or disable left marginpublic void setMargins(MarginInfo marginInfo)
marginInfo - another marginInfo objectpublic boolean hasAll()
public boolean hasLeft()
public boolean hasRight()
public boolean hasTop()
public boolean hasBottom()
public int getBitMask()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||