File |
Line |
at\ac\tuwien\vitalab\hrcrm\pdf\name\NamesPdfView.java |
37
|
at\ac\tuwien\vitalab\hrcrm\pdf\party\PartyPdfView.java |
37
|
this.generateTableBody( partyTypes, table );
document.add( table );
}
/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings( "unchecked" )
protected void buildPdfMetadata( Map model, Document document, HttpServletRequest request ) {
document.addCreationDate();
document.addAuthor( "HR-CRM Service" );
document.addTitle( "All Available Party Names" );
}
private Table generateTableStub( T object ) throws Exception {
Table table = new Table( object.getClass().getDeclaredFields().length );
table.setWidth( 90 );
table.setBorderWidth( 1 );
table.setBorderColor( Color.BLACK );
table.setBackgroundColor( Color.LIGHT_GRAY );
table.setPadding( 3 );
return table;
}
private void generateTableHeader( final T object, final Table table ) throws Exception {
Field[] fields = object.getClass().getDeclaredFields();
for( Field field : fields ) {
field.setAccessible( true );
table.addCell( field.getName().toUpperCase() );
}
}
private void generateTableBody( final List<PartyType> partyTypes, final Table table ) throws Exception {
|
File |
Line |
at\ac\tuwien\vitalab\hrcrm\pdf\address\AddressPdfView.java |
50
|
at\ac\tuwien\vitalab\hrcrm\pdf\name\NamesPdfView.java |
51
|
document.addTitle( "All Available Party Names" );
}
private Table generateTableStub( T object ) throws Exception {
Table table = new Table( object.getClass().getDeclaredFields().length );
table.setWidth( 90 );
table.setBorderWidth( 1 );
table.setBorderColor( Color.BLACK );
table.setBackgroundColor( Color.LIGHT_GRAY );
table.setPadding( 3 );
return table;
}
private void generateTableHeader( final T object, final Table table ) throws Exception {
Field[] fields = object.getClass().getDeclaredFields();
for( Field field : fields ) {
field.setAccessible( true );
table.addCell( field.getName().toUpperCase() );
}
}
private void generateTableBody( final List<PartyNameType> partyNameTypes, final Table table ) throws Exception {
|