Rectangle2DChangeStrategy, which might be parameterized such that only
rectangles of a defined ratio are created. This parameterization happens during construction. Subclasses must
implement the ratio handling themselves! This class only holds the parameters.
| Modifier and Type | Field and Description |
|---|---|
| private final double | ratio
The currently used ratio. |
| private final boolean | ratioFixed
Indicates whether the current selection must have a fixed ratio. |
| Access | Constructor and Description |
|---|---|
| protected | AbstractRatioRespectingChangeStrategy(boolean
indicates whether the ratio will be fixed ratioFixed, double defines the fixed ratio ratio)Creates a change strategy which respects the specified |
| Modifier and Type | Method and Description |
|---|---|
| protected final double | |
| protected final boolean | Returns: true if the ratio is fixed; false otherwiseIndicates whether the ratio is fixed. |
| ratio | back to summary |
|---|---|
| private final double ratio The currently used ratio. Should only be used if 'ratioFixed' is true. | |
| ratioFixed | back to summary |
|---|---|
| private final boolean ratioFixed Indicates whether the current selection must have a fixed ratio. If so, 'ratio' can be used. | |
| AbstractRatioRespectingChangeStrategy | back to summary |
|---|---|
| protected AbstractRatioRespectingChangeStrategy(boolean ratioFixed, double ratio) Creates a change strategy which respects the specified
| |
| getRatio | back to summary |
|---|---|
| protected final double getRatio() The current ratio. Can only be called without exception when
| |
| isRatioFixed | back to summary |
|---|---|
| protected final boolean isRatioFixed() Indicates whether the ratio is fixed. If so, the ratio can be accessed with
| |