private void fail(int index, NumberFormatException cause) { throw new FormLayoutParseException( message(source, index, "Invalid multiplier"), cause); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, CellConstraints[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), new RowSpec(gapRow), new ColumnSpec(gapColumn), cellConstraints); }
/** * Insert the specified row into the layout. This accomodates * for the appendColumn/insertColumn API weakness in FormLayout. */ private void insertRow(int index, RowSpec rowSpec) { if(index == formLayout.getRowCount()) formLayout.appendRow(rowSpec); else formLayout.insertRow(index + 1, rowSpec); }
/** * Looks up and returns the constraints for the specified component. * A copy of the actual <code>CellConstraints</code> object is returned. * * @param component the component to be queried * @return the <code>CellConstraints</code> for the specified component * @throws NullPointerException if component is <code>null</code> or * has not been added to the container */ public CellConstraints getConstraints(Component component) { return (CellConstraints) getConstraints0(component).clone(); }
/** * 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(); }
static RowSpec[] parseRowSpecs( String encodedRowSpecs, LayoutMap layoutMap) { FormSpecParser parser = new FormSpecParser( encodedRowSpecs, "encoded column specifications", layoutMap, false); return parser.parseRowSpecs(); }
/** * Creates and returns a ConstantSize for the specified size value * in vertical dialog units. * * @param value size value in vertical dialog units * @return the associated Size instance */ static ConstantSize dluY(int value) { return new ConstantSize(value, DLUY); }
/** * Checks and answers whether this spec can grow or not. That is the case if * and only if the resize weight is != <code>NO_GROW</code>. * * @return true if it can grow, false if it can't grow */ final boolean canGrow() { return getResizeWeight() != NO_GROW; }
/** * Returns a string representation of this size object.<p> * * <strong>Note:</strong> This string representation may change * at any time. It is intended for debugging purposes. For parsing, * use {@link #encode()} instead. * * @return a string representation of this bounded size */ public String toString() { return encode(); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, CellConstraints[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), new RowSpec(gapRow), new ColumnSpec(gapColumn), cellConstraints); }
/** * Looks up and returns the constraints for the specified component. * A copy of the actualCellConstraints object is returned. * * @param component the component to be queried * @return the CellConstraints for the specified component * @throws NullPointerException if {@code component} is {@code null} * @throws IllegalStateException if {@code component} has not been * added to the container */ public CellConstraints getConstraints(Component component) { return (CellConstraints) getConstraints0(component).clone(); }
private void fail(int index, NumberFormatException cause) { throw new FormLayoutParseException( message(source, index, "Invalid multiplier"), cause); }
/** * Construct a format using the specifications and constraints specified. */ protected AbstractFormat(String rowSpecs, String columnSpecs, String gapRow, String gapColumn, CellConstraints[] cellConstraints) { this(RowSpec.decodeSpecs(rowSpecs), ColumnSpec.decodeSpecs(columnSpecs), new RowSpec(gapRow), new ColumnSpec(gapColumn), cellConstraints); }
private void fail(int index, String description) { throw new FormLayoutParseException( message(source, index, description)); }
private void fail(int index, String description) { throw new FormLayoutParseException( message(source, index, description)); }
public static void fail(String source, int index, String description) { throw new FormLayoutParseException(message(source, index, description)); }