/** * Computes and returns the concrete alignment. Takes into account * the cell alignment and <i>the</i> <code>FormSpec</code> if applicable.<p> * * If this constraints object doesn't belong to a single column or row, * the <code>formSpec</code> parameter is <code>null</code>. * In this case the cell alignment is answered, but <code>DEFAULT</code> * is mapped to <code>FILL</code>.<p> * * If the cell belongs to a single column or row, we use the cell * alignment, unless it is <code>DEFAULT</code>, where the alignment * is inherited from the column or row resp. * * @param cellAlignment this cell's alignment * @param formSpec the associated column or row specification * @return the concrete alignment */ private Alignment concreteAlignment(Alignment cellAlignment, FormSpec formSpec) { return formSpec == null ? (cellAlignment == DEFAULT ? FILL : cellAlignment) : usedAlignment(cellAlignment, formSpec); }
/** * Computes and returns the concrete alignment. Takes into account * the cell alignment and <i>the</i> {@code FormSpec} if applicable.<p> * * If this constraints object doesn't belong to a single column or row, * the {@code formSpec} parameter is {@code null}. * In this case the cell alignment is answered, but {@code DEFAULT} * is mapped to {@code FILL}.<p> * * If the cell belongs to a single column or row, we use the cell * alignment, unless it is {@code DEFAULT}, where the alignment * is inherited from the column or row resp. * * @param cellAlignment this cell's alignment * @param formSpec the associated column or row specification * @return the concrete alignment */ private static Alignment concreteAlignment(Alignment cellAlignment, FormSpec formSpec) { return formSpec == null ? cellAlignment == DEFAULT ? FILL : cellAlignment : usedAlignment(cellAlignment, formSpec); }
/** * Computes and returns the concrete alignment. Takes into account the cell * alignment and <i>the</i> <code>FormSpec</code> if applicable. * <p> * * If this constraints object doesn't belong to a single column or row, the * <code>formSpec</code> parameter is <code>null</code>. In this case * the cell alignment is answered, but <code>DEFAULT</code> is mapped to * <code>FILL</code>. * <p> * * If the cell belongs to a single column or row, we use the cell alignment, * unless it is <code>DEFAULT</code>, where the alignment is inherited * from the column or row resp. * * @param cellAlignment * this cell's aligment * @param formSpec * the associated column or row specification * @return the concrete alignment */ private Alignment concreteAlignment(Alignment cellAlignment, FormSpec formSpec) { return formSpec == null ? (cellAlignment == DEFAULT ? FILL : cellAlignment) : usedAlignment(cellAlignment, formSpec); }