| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final int | |
| private static final double | |
| private final double[] | |
| private final double[] | |
| private final ConstrainedColumnResize. | |
| private final double[] | |
| private final ResizeFeaturesBase | |
| private final double[] | |
| private final BitSet | |
| private static final int | |
| private final Region | |
| private final double |
| Access | Constructor and Description |
|---|---|
| public | ResizeHelper(ResizeFeaturesBase<S> rf, double target, List<? extends TableColumnBase<?, ?>> columns, ConstrainedColumnResize.
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if sum of columns equals or greater than the target widthApplies computed column widths to the tree/table columns, snapping coordinates if required. |
| private double | |
| private static double | |
| private double | |
| private void | distribute(double delta, double[] desired)
distibuting delta (positive when growing and negative when shrinking) |
| private boolean | |
| private double | |
| private double | |
| private void | |
| private void | |
| private void | |
| private void | distributeSmallDelta(double delta, double[] desired)
for small deltas, we use a simpler, but more expensive algorithm to distribute space in small steps, each time favoring a column that is further away from its desired width. |
| private double | |
| private boolean | |
| private static boolean | |
| private int | markOppositeColumns(int ix)
updates skip bitset with columns that might be resized, and returns the number of the opposite columns |
| private double | |
| public boolean | |
| public void | |
| private void | |
| private boolean | Returns: true if no candidate has been found and the process should stopFinds the best column to grow, then increases its width by delta, which is expected to be one display pixel exactly. |
| private boolean | Returns: true if no candidate has been found and the process should stopFinds the best column to shrink, then reduces its width by delta, which is expected to be one display pixel exactly. |
| private double | |
| private double | |
| private double | |
| private double | |
| private double |
| columns | back to summary |
|---|---|
| private final List<? extends TableColumnBase<?, ?>> columns | |
| count | back to summary |
|---|---|
| private final int count | |
| EPSILON | back to summary |
|---|---|
| private static final double EPSILON | |
| max | back to summary |
|---|---|
| private final double[] max | |
| min | back to summary |
|---|---|
| private final double[] min | |
| mode | back to summary |
|---|---|
| private final ConstrainedColumnResize. | |
| pref | back to summary |
|---|---|
| private final double[] pref | |
| rf | back to summary |
|---|---|
| private final ResizeFeaturesBase<S> rf | |
| size | back to summary |
|---|---|
| private final double[] size | |
| skip | back to summary |
|---|---|
| private final BitSet skip | |
| SMALL_DELTA | back to summary |
|---|---|
| private static final int SMALL_DELTA | |
| snap | back to summary |
|---|---|
| private final Region snap | |
| target | back to summary |
|---|---|
| private final double target | |
| ResizeHelper | back to summary |
|---|---|
| public ResizeHelper(ResizeFeaturesBase<S> rf, double target, List<? extends TableColumnBase<?, ?>> columns, ConstrainedColumnResize. | |
| applySizes | back to summary |
|---|---|
| public boolean applySizes() Applies computed column widths to the tree/table columns, snapping coordinates if required.
| |
| avail | back to summary |
|---|---|
| private double avail(boolean grow, double[] desired, int ix) | |
| clip | back to summary |
|---|---|
| private static double clip(double v, double min, double max) | |
| computeAllowedDelta | back to summary |
|---|---|
| private double computeAllowedDelta(boolean expanding) returns the allowable delta for all of the opposite columns | |
| distribute | back to summary |
|---|---|
| private void distribute(double delta, double[] desired) distibuting delta (positive when growing and negative when shrinking) | |
| distributeDelta | back to summary |
|---|---|
| private boolean distributeDelta(int ix, double delta) | |
| distributeDeltaFlexHead | back to summary |
|---|---|
| private double distributeDeltaFlexHead(double delta) | |
| distributeDeltaFlexTail | back to summary |
|---|---|
| private double distributeDeltaFlexTail(double delta) | |
| distributeDeltaRemainingColumns | back to summary |
|---|---|
| private void distributeDeltaRemainingColumns(double delta) | |
| distributeLargeDelta | back to summary |
|---|---|
| private void distributeLargeDelta(double delta, double[] desired) | |
| distributeSmallDelta | back to summary |
|---|---|
| private void distributeSmallDelta(double delta) | |
| distributeSmallDelta | back to summary |
|---|---|
| private void distributeSmallDelta(double delta, double[] desired) for small deltas, we use a simpler, but more expensive algorithm to distribute space in small steps, each time favoring a column that is further away from its desired width. | |
| getAllowedDelta | back to summary |
|---|---|
| private double getAllowedDelta(int ix, boolean expanding) non-negative | |
| isCornerCase | back to summary |
|---|---|
| private boolean isCornerCase(double delta, int ix) | |
| isZero | back to summary |
|---|---|
| private static boolean isZero(double x) | |
| markOppositeColumns | back to summary |
|---|---|
| private int markOppositeColumns(int ix) updates skip bitset with columns that might be resized, and returns the number of the opposite columns | |
| resize | back to summary |
|---|---|
| private double resize(int ix, double delta) | |
| resizeColumn | back to summary |
|---|---|
| public boolean resizeColumn(TableColumnBase<?, ?> column) | |
| resizeToContentWidth | back to summary |
|---|---|
| public void resizeToContentWidth() | |
| setSkip | back to summary |
|---|---|
| private void setSkip(int from, int toExclusive) range set with limit check | |
| smallGrow | back to summary |
|---|---|
| private boolean smallGrow(double delta, double[] desired) Finds the best column to grow, then increases its width by delta, which is expected to be one display pixel exactly.
| |
| smallShrink | back to summary |
|---|---|
| private boolean smallShrink(double delta, double[] desired) Finds the best column to shrink, then reduces its width by delta, which is expected to be one display pixel exactly.
| |
| snapCeil | back to summary |
|---|---|
| private double snapCeil(double x) | |
| snapRound | back to summary |
|---|---|
| private double snapRound(double x) | |
| snapScale | back to summary |
|---|---|
| private double snapScale() implementation copied from
| |
| sum | back to summary |
|---|---|
| private double sum(double[] widths) | |
| sumSizes | back to summary |
|---|---|
| private double sumSizes() | |