public static class DownloadSourceSizingPolicy.AdjustableDownloadSizePolicy extends java.lang.Object implements DownloadSourceSizingPolicy
Mind that using a preferred component size is not possible in this case, since the preference entry needs to have a onstant default value.
DownloadSourceSizingPolicy.AdjustableDownloadSizePolicy, DownloadSourceSizingPolicy.FixedDownloadSourceSizePolicy
Modifier and Type | Field and Description |
---|---|
private java.util.function.IntSupplier |
minHeight |
private AbstractProperty<java.lang.Integer> |
preference |
Constructor and Description |
---|
AdjustableDownloadSizePolicy(AbstractProperty<java.lang.Integer> preference)
|
AdjustableDownloadSizePolicy(AbstractProperty<java.lang.Integer> preference,
java.util.function.IntSupplier minHeight)
|
Modifier and Type | Method and Description |
---|---|
int |
getComponentHeight()
Gets the height of the download source panel.
|
boolean |
isHeightAdjustable()
Check whether the user should be allowed to adjust the height of this download source panel
|
void |
storeHeight(int height)
Stores the height
|
private final AbstractProperty<java.lang.Integer> preference
private java.util.function.IntSupplier minHeight
public AdjustableDownloadSizePolicy(AbstractProperty<java.lang.Integer> preference)
preference
- The preference to usepublic AdjustableDownloadSizePolicy(AbstractProperty<java.lang.Integer> preference, java.util.function.IntSupplier minHeight)
preference
- The preference to useminHeight
- A supplier that gives the minimum height of the component. Must be positive or 0.public int getComponentHeight()
DownloadSourceSizingPolicy
getComponentHeight
in interface DownloadSourceSizingPolicy
public boolean isHeightAdjustable()
DownloadSourceSizingPolicy
isHeightAdjustable
in interface DownloadSourceSizingPolicy
true
if the height should be adjustablepublic void storeHeight(int height)
DownloadSourceSizingPolicy
storeHeight
in interface DownloadSourceSizingPolicy
height
- the height in pixel