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 boolean
equals(Object o)
String
getAsCSSString(ICSSWriterSettings aSettings, int nIndentLevel)
Get the contents of this object as a serialized CSS string for writing to an output.String
getBottom()
String
getLeft()
String
getRight()
String
getTop()
int
hashCode()
CSSRect
setBottom(String sBottom)
Set the bottom coordinate.CSSRect
setLeft(String sLeft)
Set the left coordinate.CSSRect
setRight(String sRight)
Set the right coordinate.CSSRect
setTop(String sTop)
Set the top coordinate.String
toString()
-
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 benull
nor empty.sRight
- Tight coordinate. May neither benull
nor empty.sBottom
- Bottom coordinate. May neither benull
nor empty.sLeft
- Left coordinate. May neither benull
nor empty.
-
-
Method Detail
-
setTop
@Nonnull public final CSSRect setTop(@Nonnull @Nonempty String sTop)
Set the top coordinate.- Parameters:
sTop
- May neither benull
nor empty.- Returns:
- this
-
getRight
@Nonnull @Nonempty public final String getRight()
- Returns:
- right part. Neither
null
nor empty.
-
setRight
@Nonnull public final CSSRect setRight(@Nonnull @Nonempty String sRight)
Set the right coordinate.- Parameters:
sRight
- May neither benull
nor empty.- Returns:
- this
-
getBottom
@Nonnull @Nonempty public final String getBottom()
- Returns:
- bottom part. Neither
null
nor empty.
-
setBottom
@Nonnull public final CSSRect setBottom(@Nonnull @Nonempty String sBottom)
Set the bottom coordinate.- Parameters:
sBottom
- May neither benull
nor empty.- Returns:
- this
-
getLeft
@Nonnull @Nonempty public final String getLeft()
- Returns:
- left part. Neither
null
nor empty.
-
setLeft
@Nonnull public final CSSRect setLeft(@Nonnull @Nonempty String sLeft)
Set the left coordinate.- Parameters:
sLeft
- May neither benull
nor empty.- Returns:
- this
-
getAsCSSString
@Nonnull @Nonempty public String getAsCSSString(@Nonnull ICSSWriterSettings aSettings, @Nonnegative int nIndentLevel)
Description copied from interface:ICSSWriteable
Get the contents of this object as a serialized CSS string for writing to an output.- Specified by:
getAsCSSString
in 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
.
-
-