@Override public List<ImportValidationFeedback> verifyRule( Object subject ) { List<ImportValidationFeedback> feedback = new ArrayList<ImportValidationFeedback>(); if ( !isEnabled() ) { return feedback; } if ( !( subject instanceof JobMeta ) ) { return feedback; } JobMeta jobMeta = (JobMeta) subject; if ( jobMeta.nrNotes() == 0 ) { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.ERROR, "There is not even a single note in the job." ) ); } else { feedback.add( new ImportValidationFeedback( this, ImportValidationResultType.APPROVAL, "At least one not is present in the job." ) ); } return feedback; }
/** * Unselect all. */ public void unselectAll() { int i; for ( i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy ce = getJobEntry( i ); ce.setSelected( false ); } for ( i = 0; i < nrNotes(); i++ ) { NotePadMeta ni = getNote( i ); ni.setSelected( false ); } }
for ( int i = 0; i < nrNotes(); i++ ) { NotePadMeta ni = getNote( i ); retval.append( ni.getXML() );
/** * Select all. */ public void selectAll() { int i; for ( i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy ce = getJobEntry( i ); ce.setSelected( true ); } for ( i = 0; i < nrNotes(); i++ ) { NotePadMeta ni = getNote( i ); ni.setSelected( true ); } setChanged(); notifyObservers( "refreshGraph" ); }
/** * Gets the maximum. * * @return the maximum */ public Point getMaximum() { int maxx = 0, maxy = 0; for ( int i = 0; i < nrJobEntries(); i++ ) { JobEntryCopy entry = getJobEntry( i ); Point loc = entry.getLocation(); if ( loc.x > maxx ) { maxx = loc.x; } if ( loc.y > maxy ) { maxy = loc.y; } } for ( int i = 0; i < nrNotes(); i++ ) { NotePadMeta ni = getNote( i ); Point loc = ni.getLocation(); if ( loc.x + ni.width > maxx ) { maxx = loc.x + ni.width; } if ( loc.y + ni.height > maxy ) { maxy = loc.y + ni.height; } } return new Point( maxx + 100, maxy + 100 ); }
for ( int i = 0; i < nrNotes(); i++ ) { NotePadMeta notePadMeta = getNote( i ); Point loc = notePadMeta.getLocation();
public void selectInRect( JobMeta jobMeta, org.pentaho.di.core.gui.Rectangle rect ) { int i; for ( i = 0; i < jobMeta.nrJobEntries(); i++ ) { JobEntryCopy je = jobMeta.getJobEntry( i ); Point p = je.getLocation(); if ( ( ( p.x >= rect.x && p.x <= rect.x + rect.width ) || ( p.x >= rect.x + rect.width && p.x <= rect.x ) ) && ( ( p.y >= rect.y && p.y <= rect.y + rect.height ) || ( p.y >= rect.y + rect.height && p.y <= rect.y ) ) ) { je.setSelected( true ); } } for ( i = 0; i < jobMeta.nrNotes(); i++ ) { NotePadMeta ni = jobMeta.getNote( i ); Point a = ni.getLocation(); Point b = new Point( a.x + ni.width, a.y + ni.height ); if ( rect.contains( a.x, a.y ) && rect.contains( b.x, b.y ) ) { ni.setSelected( true ); } } }
for ( int i = 0; i < nrNotes(); i++ ) { NotePadMeta meta = getNote( i ); if ( meta.getNote() != null ) {
int nrWorks = 2 + jobMeta.nrDatabases() + jobMeta.nrNotes() + jobMeta.nrJobEntries() + jobMeta.nrJobHops(); if ( monitor != null ) { monitor.beginTask( BaseMessages.getString( PKG, "JobMeta.Monitor.SavingTransformation" ) log.logDetailed( "Saving notes to repository..." ); for ( int i = 0; i < jobMeta.nrNotes(); i++ ) { if ( monitor != null ) { monitor.subTask( BaseMessages.getString( PKG, "JobMeta.Monitor.SavingNoteNr" ) + ( i + 1 ) + "/" + jobMeta.nrNotes() );
for ( int i = 0; i < jobMeta.nrNotes(); i++ ) { NotePadMeta ni = jobMeta.getNote( i ); drawNote( ni );