Package com.helger.css.decl
Class CSSRect
- java.lang.Object
-
- com.helger.css.decl.CSSRect
-
- All Implemented Interfaces:
ICSSWriteable
@NotThreadSafe public class CSSRect extends Object implements ICSSWriteable
Represents a single CSS rectangle- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetAsCSSString(ICSSWriterSettings aSettings, int nIndentLevel)Get the contents of this object as a serialized CSS string for writing to an output.StringgetBottom()StringgetLeft()StringgetRight()StringgetTop()inthashCode()CSSRectsetBottom(String sBottom)Set the bottom coordinate.CSSRectsetLeft(String sLeft)Set the left coordinate.CSSRectsetRight(String sRight)Set the right coordinate.CSSRectsetTop(String sTop)Set the top coordinate.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.css.ICSSWriteable
getAsCSSString, getAsCSSString
-
-
-
-
Constructor Detail
-
CSSRect
public CSSRect(@Nonnull CSSRect aOther)
Copy constructor- Parameters:
aOther- The object to copy the data from. May not benull.
-
CSSRect
public CSSRect(@Nonnull @Nonempty String sTop, @Nonnull @Nonempty String sRight, @Nonnull @Nonempty String sBottom, @Nonnull @Nonempty String sLeft)
Constructor- Parameters:
sTop- Top coordinate. May neither benullnor empty.sRight- Tight coordinate. May neither benullnor empty.sBottom- Bottom coordinate. May neither benullnor empty.sLeft- Left coordinate. May neither benullnor empty.
-
-
Method Detail
-
setTop
@Nonnull public final CSSRect setTop(@Nonnull @Nonempty String sTop)
Set the top coordinate.- Parameters:
sTop- May neither benullnor empty.- Returns:
- this
-
getRight
@Nonnull @Nonempty public final String getRight()
- Returns:
- right part. Neither
nullnor empty.
-
setRight
@Nonnull public final CSSRect setRight(@Nonnull @Nonempty String sRight)
Set the right coordinate.- Parameters:
sRight- May neither benullnor empty.- Returns:
- this
-
getBottom
@Nonnull @Nonempty public final String getBottom()
- Returns:
- bottom part. Neither
nullnor empty.
-
setBottom
@Nonnull public final CSSRect setBottom(@Nonnull @Nonempty String sBottom)
Set the bottom coordinate.- Parameters:
sBottom- May neither benullnor empty.- Returns:
- this
-
getLeft
@Nonnull @Nonempty public final String getLeft()
- Returns:
- left part. Neither
nullnor empty.
-
setLeft
@Nonnull public final CSSRect setLeft(@Nonnull @Nonempty String sLeft)
Set the left coordinate.- Parameters:
sLeft- May neither benullnor empty.- Returns:
- this
-
getAsCSSString
@Nonnull @Nonempty public String getAsCSSString(@Nonnull ICSSWriterSettings aSettings, @Nonnegative int nIndentLevel)
Description copied from interface:ICSSWriteableGet the contents of this object as a serialized CSS string for writing to an output.- Specified by:
getAsCSSStringin interfaceICSSWriteable- Parameters:
aSettings- The settings to be used to format the output. May not benull.nIndentLevel- The current indentation level- Returns:
- The content of this object as CSS string. Never
null.
-
-