Java Code Examples for org.apache.poi.ss.usermodel.VerticalAlignment#CENTER
The following examples show how to use
org.apache.poi.ss.usermodel.VerticalAlignment#CENTER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JRXlsExporter.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
private VerticalAlignment getVerticalAlignment(TextAlignHolder alignment) { switch (alignment.verticalAlignment) { case BOTTOM: return VerticalAlignment.BOTTOM; case MIDDLE: return VerticalAlignment.CENTER; case JUSTIFIED: return VerticalAlignment.JUSTIFY; case TOP: default: return VerticalAlignment.TOP; } }
Example 2
Source File: JRXlsMetadataExporter.java From jasperreports with GNU Lesser General Public License v3.0 | 5 votes |
private VerticalAlignment getVerticalAlignment(TextAlignHolder alignment) { switch (alignment.verticalAlignment) { case BOTTOM: return VerticalAlignment.BOTTOM; case MIDDLE: return VerticalAlignment.CENTER; case JUSTIFIED: return VerticalAlignment.JUSTIFY; case TOP: default: return VerticalAlignment.TOP; } }
Example 3
Source File: HSSFCellStyleProducer.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 5 votes |
/** * Converts the given element alignment into one of the VerticalAlignment-constants. * * @param e the JFreeReport element alignment. * @return the VerticalAlignment-Alignment. * @throws IllegalArgumentException if an Unknown JFreeReport alignment is given. */ protected static VerticalAlignment convertVerticalAlignment( final ElementAlignment e ) { if ( ElementAlignment.TOP.equals( e ) ) { return VerticalAlignment.TOP; } else if ( ElementAlignment.BOTTOM.equals( e ) ) { return VerticalAlignment.BOTTOM; } else if ( ElementAlignment.MIDDLE.equals( e ) ) { return VerticalAlignment.CENTER; } throw new IllegalArgumentException( "Invalid alignment" ); }