A dimension object that uses micro-points as units of measurement.
| Method from org.jfree.report.util.geom.StrictDimension Detail: |
public Object clone() {
try
{
return super.clone();
}
catch (CloneNotSupportedException e)
{
throw new InternalError("Clone must always be supported.");
}
}
Creates a copy of this object. This method is guaranteed to never throw
a CloneNotSupportedException. |
public boolean equals(Object o) {
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
final StrictDimension that = (StrictDimension) o;
if (height != that.height)
{
return false;
}
if (width != that.width)
{
return false;
}
return true;
}
Checks whether the given object is a StrictDimension instance convering the
same area as this dimension. |
public long getHeight() {
return height;
}
Returns the height of this dimension object. |
public StrictDimension getLockedInstance() {
if (locked)
{
return this;
}
final StrictDimension retval = (StrictDimension) clone();
retval.locked = true;
return retval;
}
Returns a copy of this dimension which cannot be modified anymore. |
public StrictDimension getUnlockedInstance() {
final StrictDimension retval = (StrictDimension) clone();
retval.locked = false;
return retval;
}
Returns a copy of this dimension which can be modified later. |
public long getWidth() {
return width;
}
Returns the width of this dimension object. |
public int hashCode() {
int result = (int) (width ^ (width > > > 32));
result = 29 * result + (int) (height ^ (height > > > 32));
return result;
}
Computes the hashcode for this dimension. |
public boolean isLocked() {
return locked;
}
Checks whether this instance is locked. |
public void setHeight(long height) {
if (locked)
{
throw new IllegalStateException("This object is locked");
}
this.height = height;
}
Updates the height of this dimension object. |
public void setSize(long width,
long height) {
if (locked)
{
throw new IllegalStateException("This object is locked");
}
this.width = width;
this.height = height;
}
Sets the size of this Dimension object to the specified width and
height. |
public void setWidth(long width) {
if (locked)
{
throw new IllegalStateException("This object is locked");
}
this.width = width;
}
Updates the width of this dimension object. |
public String toString() {
return "org.jfree.report.util.geom.StrictDimension{" +
"width=" + width +
", height=" + height +
'}";
}
Returns a String representation of this dimension object. |