@Override public void draw( Graphics2D graphics2D, Rectangle2D rectangle2D ) { try { ReportSubjectLocation location = (ReportSubjectLocation) dataRow.get( "location" ); if ( location.isTransformation() ) { TransformationInformation ti = TransformationInformation.getInstance(); ti.drawImage( graphics2D, rectangle2D, location, pixelateImages ); } else { JobInformation ji = JobInformation.getInstance(); ji.drawImage( graphics2D, rectangle2D, location, pixelateImages ); } } catch ( Exception e ) { throw new RuntimeException( "Unable to draw image onto report", e ); } }
public void putAll( final DataRow dataRow ) { if ( dataRow == null ) { throw new NullPointerException(); } final String[] names = dataRow.getColumnNames(); for ( int i = 0; i < names.length; i++ ) { final String name = names[i]; put( name, dataRow.get( name ) ); } }
/** * Checks whether the value contained in the column has changed since the last advance-operation. * * @param name * the name of the column. * @return true, if the value has changed, false otherwise. */ public boolean isChanged( final String name ) { return wrappedDataRow.isChanged( name ); }
public int getColumnCount() { if ( parent == null ) { return 0; } return parent.getColumnNames().length; }
public String getColumnName( final int col ) { if ( parent == null ) { return null; } final String[] columnNames = parent.getColumnNames(); return columnNames[col]; }
public Object get( final String col ) { if ( parent == null ) { return null; } return parent.get( col ); }
/** * Writes the contents of the dataRow into the CSVRow. * * @param dr * the dataRow which should be written * @param row * the CSVRow used to collect the RowData. */ private void writeDataRow( final DataRow dr, final CSVRow row ) { final String[] names = dr.getColumnNames(); final int length = names.length; for ( int i = 0; i < length; i++ ) { final Object o = dr.get( names[i] ); row.append( o ); } }
public boolean isChanged( final String name ) { if ( parent == null ) { return false; } return parent.isChanged( name ); }
public String[] getColumnNames() { return parent.getColumnNames(); } }
public boolean isQueryExecutable( final String query, final DataRow parameters ) { final Object o = parameters.get( query ); return o instanceof TableModel; }
public StaticDataRow( final DataRow dataRow ) { if ( dataRow == null ) { throw new NullPointerException(); } synchronized ( dataRow ) { final String[] columnNames = dataRow.getColumnNames(); final int columnCount = columnNames.length; this.names = columnNames.clone(); final HashMap<String, Object> values = new HashMap<String, Object>(); for ( int i = 0; i < columnCount; i++ ) { final String name = columnNames[i]; values.put( name, dataRow.get( name ) ); } this.values = Collections.unmodifiableMap( values ); } }
public boolean isChanged( final String name ) { return dataRow.isChanged( name ); }
public String[] getColumnNames() { return wrappedDataRow.getColumnNames(); } }
protected int calculateQueryLimit( final DataRow parameters ) { final Object queryLimit = parameters.get( DataFactory.QUERY_LIMIT ); if ( queryLimit instanceof Number ) { final Number i = (Number) queryLimit; return i.intValue(); } return -1; }
public ImportedVariablesDataRow( final MasterDataRow innerRow ) { if ( innerRow == null ) { throw new NullPointerException(); } final DataRow globalView = innerRow.getGlobalView(); final String[] names = globalView.getColumnNames(); final int cols = names.length; this.dataAttributes = new HashMap<String, DataAttributes>(); this.outerNames = new String[cols]; this.innerNames = outerNames; final Object[] values = new Object[cols]; final DataSchema dataSchema = innerRow.getDataSchema(); for ( int i = 0; i < cols; i++ ) { final String name = names[i]; if ( name == null ) { throw new IllegalStateException( "Every column must have a name." ); } outerNames[i] = name; values[i] = globalView.get( name ); dataAttributes.put( name, dataSchema.getAttributes( name ) ); } setData( outerNames, values ); }
public boolean isChanged( final String name ) { if ( DESIGN_TIME.equals( name ) ) { return false; } if ( QUERY_LIMIT.equals( name ) ) { return false; } return parent.isChanged( name ); } }
public String[] getColumnNames() { if ( dataRow == null ) { throw new IllegalStateException( "Not connected" ); } return dataRow.getColumnNames(); }
protected int calculateQueryTimeOut( final DataRow parameters ) { final Object queryTimeOut = parameters.get( DataFactory.QUERY_TIMEOUT ); if ( queryTimeOut instanceof Number ) { final Number i = (Number) queryTimeOut; return i.intValue(); } return -1; }
public static void refreshDataRow( final DataRow dataRow, final MasterDataRowChangeHandler changeHandler ) { final String[] columnNames = dataRow.getColumnNames(); final MasterDataRowChangeEvent event = changeHandler.getReusableEvent(); event.reuse( MasterDataRowChangeEvent.COLUMN_UPDATED, "", null ); for ( int i = 0; i < columnNames.length; i++ ) { final String columnName = columnNames[i]; if ( columnName != null ) { final Object columnValue = dataRow.get( columnName ); event.setColumnName( columnName ); event.setColumnValue( columnValue ); changeHandler.dataRowChanged( event ); } } }
public boolean isGroupChange( final DataRow dataRow ) { final String fieldName = getField(); if ( fieldName == null ) { return false; } if ( dataRow.isChanged( fieldName ) ) { return true; } return false; }