public final class LayoutConstraintsDescriptor extends Object implements org.softsmithy.lib.beans.Bean
Modifier and Type | Field and Description |
---|---|
static double |
FLEXIBLE_PREF
The default value for flexible heights or widths.
|
static String |
PREF_HEIGHT_PROPERTY_NAME
The name of the 'prefHeight' property.
|
static String |
PREF_WIDTH_PROPERTY_NAME
The name of the 'prefWidth' property.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
boolean |
equals(Object obj) |
static LayoutConstraintsDescriptor |
flexible()
Gets a LayoutConstraintsDescriptor with a flexible width and a flexible height.
|
static LayoutConstraintsDescriptor |
getLayoutConstraints(double prefWidth,
double prefHeight)
Gets a LayoutConstraintsDescriptor with the specified preferred width and preferred height.
|
double |
getPrefHeight()
Gets the preferred height of the Docking Area.
|
double |
getPrefWidth()
Gets the preferred width of the Docking Area.
|
int |
hashCode() |
static boolean |
isFlexible(double size)
Checks if a size is negative and thus considered flexible.
|
static boolean |
isPreferred(double size)
Checks if a size is non-negative and thus considered preferred.
|
static LayoutConstraintsDescriptor |
prefHeight(double prefHeight)
Gets a LayoutConstraintsDescriptor with the specified preferred height and a flexible width.
|
static LayoutConstraintsDescriptor |
prefWidth(double prefWidth)
Gets a LayoutConstraintsDescriptor with the specified preferred width and a flexible height.
|
void |
removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) |
void |
setPrefHeight(double prefHeight)
Sets the preferred height of the Docking Area.
|
void |
setPrefWidth(double prefWidth)
Sets the preferred width of the Docking Area.
|
String |
toString() |
public static final String PREF_WIDTH_PROPERTY_NAME
getPrefWidth()
,
Constant Field Valuespublic static final String PREF_HEIGHT_PROPERTY_NAME
getPrefHeight()
,
Constant Field Valuespublic static final double FLEXIBLE_PREF
isFlexible(double)
,
Constant Field Valuespublic static LayoutConstraintsDescriptor getLayoutConstraints(double prefWidth, double prefHeight)
prefWidth
- the preferred width of the Docking Area. Can be negative to indicate a flexible width.prefHeight
- the preferred height of the Docking Area. Can be negative to indicate a flexible height.public static LayoutConstraintsDescriptor prefWidth(double prefWidth)
prefWidth
- the preferred width of the Docking Area. Can be negative to indicate a flexible width.public static LayoutConstraintsDescriptor prefHeight(double prefHeight)
prefHeight
- the preferred height of the Docking Area. Can be negative to indicate a flexible height.public static LayoutConstraintsDescriptor flexible()
public double getPrefWidth()
public void setPrefWidth(double prefWidth)
prefWidth
- the preferred width of the Docking Area. Can be negative to indicate a flexible width.public double getPrefHeight()
public void setPrefHeight(double prefHeight)
prefHeight
- the preferred height of the Docking Area. Can be negative to indicate a flexible height.public static boolean isFlexible(double size)
size
- the sizepublic static boolean isPreferred(double size)
size
- the sizepublic void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
addPropertyChangeListener
in interface org.softsmithy.lib.beans.Bean
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
removePropertyChangeListener
in interface org.softsmithy.lib.beans.Bean
Copyright © 2012–2019 Drombler. All rights reserved.