/** * Computes the maximum size for the given list of components, using this * form spec and the specified measure. * <p> * * Invoked by FormLayout to determine the size of one of my elements * * @param container * the layout container * @param components * the list of components to measure * @param minMeasure * the measure used to determine the minimum size * @param prefMeasure * the measure used to determine the preferred size * @param defaultMeasure * the measure used to determine the default size * @return the maximum size in pixels */ final int maximumSize(Container container, List components, FormLayout.Measure minMeasure, FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure) { return size.maximumSize(container, components, minMeasure, prefMeasure, defaultMeasure); }
/** * Returns a parseable string representation of this bounded size. * * @return a String that can be parsed by the Forms parser * * @since 1.2 */ public String encode() { StringBuffer buffer = new StringBuffer("["); if (lowerBound != null) { buffer.append(lowerBound.encode()); buffer.append(','); } buffer.append(basis.encode()); if (upperBound != null) { buffer.append(','); buffer.append(upperBound.encode()); } buffer.append(']'); return buffer.toString(); }
/** * Describes if this Size can be compressed, if container space gets scarce. * Used by the FormLayout size computations in {@code #compressedSizes} * to check whether a column or row can be compressed or not.<p> * * BoundedSizes are compressible if the base Size is compressible. * * @return {@code true} if and only if the basis is compressible * * @since 1.1 */ @Override public boolean compressible() { return getBasis().compressible(); }
/** * Describes if this Size can be compressed, if container space gets scarce. * Used by the FormLayout size computations in <code>#compressedSizes</code> * to check whether a column or row can be compressed or not.<p> * * BoundedSizes are compressible if the base Size is compressible. * * @return <code>true</code> if and only if the basis is compressible * * @since 1.1 */ public boolean compressible() { return getBasis().compressible(); }
/** * Computes the maximum size for the given list of components, using * this form spec and the specified measure.<p> * * Invoked by FormLayout to determine the size of one of my elements * * @param container the layout container * @param components the list of components to measure * @param minMeasure the measure used to determine the minimum size * @param prefMeasure the measure used to determine the preferred size * @param defaultMeasure the measure used to determine the default size * @return the maximum size in pixels */ final int maximumSize(Container container, List components, FormLayout.Measure minMeasure, FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure) { return size.maximumSize(container, components, minMeasure, prefMeasure, defaultMeasure); }
public String columnPut(String key, Size value) { return columnPut(key, value.encode()); }
FormSpec formSpec = (FormSpec) formSpecs.get(i); sizes[i] = prefSizes[i]; if (formSpec.getSize().compressible()) { sizes[i] -= (int) Math.round((prefSizes[i] - minSizes[i])
/** * Computes the maximum size for the given list of components, using * this form spec and the specified measure.<p> * * Invoked by FormLayout to determine the size of one of my elements * * @param container the layout container * @param components the list of components to measure * @param minMeasure the measure used to determine the minimum size * @param prefMeasure the measure used to determine the preferred size * @param defaultMeasure the measure used to determine the default size * @return the maximum size in pixels */ final int maximumSize(Container container, List components, FormLayout.Measure minMeasure, FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure) { return size.maximumSize(container, components, minMeasure, prefMeasure, defaultMeasure); }
/** * Returns a parseable string representation of this bounded size. * * @return a String that can be parsed by the Forms parser * * @since 1.2 */ @Override public String encode() { StringBuffer buffer = new StringBuffer("["); if (lowerBound != null) { buffer.append(lowerBound.encode()); buffer.append(','); } buffer.append(basis.encode()); if (upperBound != null) { buffer.append(','); buffer.append(upperBound.encode()); } buffer.append(']'); return buffer.toString(); }
FormSpec formSpec = (FormSpec) formSpecs.get(i); sizes[i] = prefSizes[i]; if (formSpec.getSize().compressible()) { sizes[i] -= (int) Math.round((prefSizes[i] - minSizes[i])
int size = basis.maximumSize(container, components, minMeasure, prefMeasure, defaultMeasure); if (lowerBound != null) { size = Math.max(size, lowerBound.maximumSize(container, components, minMeasure, prefMeasure, defaultMeasure)); size = Math.min(size, upperBound.maximumSize(container, components, minMeasure, prefMeasure, defaultMeasure));
public String columnPut(String key, Size value) { return columnPut(key, value.encode()); }
FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure) { int size = basis.maximumSize(container, components, minMeasure, defaultMeasure); if (lowerBound != null) { size = Math.max(size, lowerBound.maximumSize( container, components, size = Math.min(size, upperBound.maximumSize( container, components,
public String rowPut(String key, Size value) { return rowPut(key, value.encode()); }
FormLayout.Measure prefMeasure, FormLayout.Measure defaultMeasure) { int size = basis.maximumSize(container, components, minMeasure, defaultMeasure); if (lowerBound != null) { size = Math.max(size, lowerBound.maximumSize( container, components, size = Math.min(size, upperBound.maximumSize( container, components,
public String rowPut(String key, Size value) { return rowPut(key, value.encode()); }
buffer.append(":"); buffer.append(size.encode()); if (resizeWeight == NO_GROW) {
buffer.append(":"); buffer.append(size.encode()); if (resizeWeight == NO_GROW) {