@Immutable public final class ScalableSize extends Object implements IHasWidthAndHeight, Serializable
| Constructor and Description |
|---|
ScalableSize(IHasWidthAndHeight aObj) |
ScalableSize(int nWidth,
int nHeight) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ScalableSize |
getBestMatchingSize(int nMaxWidth,
int nMaxHeight)
Return the scaled width and height relative to a maximum size.
|
int |
getHeight() |
ScalableSize |
getScaledToHeight(int nNewHeight) |
ScalableSize |
getScaledToWidth(int nNewWidth) |
int |
getWidth() |
int |
hashCode() |
String |
toString() |
public ScalableSize(@Nonnull IHasWidthAndHeight aObj)
public ScalableSize(@Nonnegative int nWidth, @Nonnegative int nHeight)
@Nonnegative public int getWidth()
@Nonnegative public int getHeight()
getHeight in interface IHasHeight@Nonnull @CheckReturnValue public ScalableSize getBestMatchingSize(@Nonnegative int nMaxWidth, @Nonnegative int nMaxHeight)
nMaxWidth - Maximum width. Must be > 0.nMaxHeight - Maximum height. Must be > 0.@Nonnull @CheckReturnValue public ScalableSize getScaledToWidth(@Nonnegative int nNewWidth)
@Nonnull @CheckReturnValue public ScalableSize getScaledToHeight(@Nonnegative int nNewHeight)
Copyright © 2006–2015 phloc systems. All rights reserved.