Package com.helger.css.decl
Class CSSRect
java.lang.Object
com.helger.css.decl.CSSRect
- All Implemented Interfaces:
ICSSWriteable
Represents a single CSS rectangle
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAsCSSString(ICSSWriterSettings aSettings, int nIndentLevel) Get the contents of this object as a serialized CSS string for writing to an output.final Stringfinal StringgetLeft()final StringgetRight()final StringgetTop()inthashCode()final CSSRectSet the bottom coordinate.final CSSRectSet the left coordinate.final CSSRectSet the right coordinate.final CSSRectSet the top coordinate.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.css.ICSSWriteable
getAsCSSString, getAsCSSString
-
Constructor Details
-
CSSRect
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 Details
-
getTop
- Returns:
- top part. Neither
nullnor empty.
-
setTop
Set the top coordinate.- Parameters:
sTop- May neither benullnor empty.- Returns:
- this
-
getRight
- Returns:
- right part. Neither
nullnor empty.
-
setRight
Set the right coordinate.- Parameters:
sRight- May neither benullnor empty.- Returns:
- this
-
getBottom
- Returns:
- bottom part. Neither
nullnor empty.
-
setBottom
Set the bottom coordinate.- Parameters:
sBottom- May neither benullnor empty.- Returns:
- this
-
getLeft
- Returns:
- left part. Neither
nullnor empty.
-
setLeft
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.
-
equals
-
hashCode
public int hashCode() -
toString
-