当前位置: 首页>>代码示例>>Java>>正文


Java GCInterface.getImage方法代码示例

本文整理汇总了Java中org.pentaho.di.core.gui.GCInterface.getImage方法的典型用法代码示例。如果您正苦于以下问题:Java GCInterface.getImage方法的具体用法?Java GCInterface.getImage怎么用?Java GCInterface.getImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.gui.GCInterface的用法示例。


在下文中一共展示了GCInterface.getImage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadValues

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
private JobInformationValues loadValues(ReportSubjectLocation location) throws KettleException {
	
	// Load the job
	//
	JobMeta jobMeta = loadJob(location);
	
	Point min = jobMeta.getMinimum();
	Point area = jobMeta.getMaximum();
	area.x+=30;
	area.y+=30;
	int iconsize = 32;
	
	ScrollBarInterface bar = new ScrollBarInterface() {
		public void setThumb(int thumb) {}
		public int getSelection() { return 0; }
	};
	
	// Paint the transformation...
	//
	GCInterface gc = new SwingGC(null, area, iconsize, 50, 20);
	JobPainter painter = new JobPainter(gc, jobMeta, area, bar, bar, null, null, null, new ArrayList<AreaOwner>(), new ArrayList<JobEntryCopy>(), iconsize, 1, 0, 0, true, "FreeSans", 10);
	painter.setMagnification(0.25f);
	painter.drawJob();
    BufferedImage bufferedImage = (BufferedImage)gc.getImage();
    int newWidth=bufferedImage.getWidth()-min.x;
    int newHeigth=bufferedImage.getHeight()-min.y;
    BufferedImage image = new BufferedImage(newWidth, newHeigth, bufferedImage.getType());
    image.getGraphics().drawImage(
    		bufferedImage, 
    		0, 0, newWidth, newHeigth, 
    		min.x, min.y, min.x+newWidth, min.y+newHeigth, 
    		null
    	);

    JobInformationValues values = new JobInformationValues();
    values.jobMeta = jobMeta;
    values.image = image;
    
	return values;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:41,代码来源:JobInformation.java

示例2: getTransformationImage

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
public Image getTransformationImage(Device device, int x, int y, float magnificationFactor) {

    GCInterface gc = new SWTGC(device, new Point(x, y), iconsize);

    TransPainter transPainter = new TransPainter( gc,
    		transMeta, new Point(x, y), new SwtScrollBar(hori), new SwtScrollBar(vert), candidate, drop_candidate,
    		selectionRegion, 
    		areaOwners, 
    		mouseOverSteps,
			PropsUI.getInstance().getIconSize(),
			PropsUI.getInstance().getLineWidth(),
			PropsUI.getInstance().getCanvasGridSize(), 
			PropsUI.getInstance().getShadowSize(), 
			PropsUI.getInstance().isAntiAliasingEnabled(),
			PropsUI.getInstance().getNoteFont().getName(),
			PropsUI.getInstance().getNoteFont().getHeight(),
			trans,
			PropsUI.getInstance().isIndicateSlowTransStepsEnabled()
    	);
    
    transPainter.setMagnification(magnificationFactor);
    transPainter.setStepLogMap(stepLogMap);
    transPainter.setStartHopStep(startHopStep);
    transPainter.setEndHopLocation(endHopLocation);
    transPainter.setNoInputStep(noInputStep);
    transPainter.setEndHopStep(endHopStep);
    transPainter.setCandidateHopType(candidateHopType);
    transPainter.setStartErrorHopStep(startErrorHopStep);
    transPainter.setShowTargetStreamsStep(showTargetStreamsStep);
    
    transPainter.buildTransformationImage();
    
    Image img = (Image)gc.getImage();

    gc.dispose();
    return img;
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:TransGraph.java

示例3: getTransformationImage

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
public Image getTransformationImage( Device device, int x, int y, float magnificationFactor ) {

    GCInterface gc = new SWTGC( device, new Point( x, y ), iconsize );

    int gridSize =
      PropsUI.getInstance().isShowCanvasGridEnabled() ? PropsUI.getInstance().getCanvasGridSize() : 1;

    TransPainter transPainter =
      new TransPainter( gc, transMeta, new Point( x, y ), new SwtScrollBar( hori ), new SwtScrollBar( vert ),
        candidate, drop_candidate, selectionRegion, areaOwners, mouseOverSteps,
        PropsUI.getInstance().getIconSize(), PropsUI.getInstance().getLineWidth(), gridSize,
        PropsUI.getInstance().getShadowSize(), PropsUI.getInstance()
        .isAntiAliasingEnabled(), PropsUI.getInstance().getNoteFont().getName(), PropsUI.getInstance()
        .getNoteFont().getHeight(), trans, PropsUI.getInstance().isIndicateSlowTransStepsEnabled() );

    transPainter.setMagnification( magnificationFactor );
    transPainter.setStepLogMap( stepLogMap );
    transPainter.setStartHopStep( startHopStep );
    transPainter.setEndHopLocation( endHopLocation );
    transPainter.setNoInputStep( noInputStep );
    transPainter.setEndHopStep( endHopStep );
    transPainter.setCandidateHopType( candidateHopType );
    transPainter.setStartErrorHopStep( startErrorHopStep );
    transPainter.setShowTargetStreamsStep( showTargetStreamsStep );

    transPainter.buildTransformationImage();

    Image img = (Image) gc.getImage();

    gc.dispose();
    return img;
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:33,代码来源:TransGraph.java

示例4: loadValues

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
private TransformationInformationValues loadValues(ReportSubjectLocation location) throws KettleException {
	
	// Load the transformation
	//
	TransMeta transMeta = loadTransformation(location);
	
	Point min = transMeta.getMinimum();
	Point area = transMeta.getMaximum();
	area.x+=100;
	area.y+=100;
	int iconsize = 32;
	
	ScrollBarInterface bar = new ScrollBarInterface() {
		public void setThumb(int thumb) {}
		public int getSelection() { return 0; }
	};
	
	// Paint the transformation...
	//
	GCInterface gc = new SwingGC(null, area, iconsize, 50, 20);
	TransPainter painter = new TransPainter(gc, transMeta, area, bar, bar, null, null, null, new ArrayList<AreaOwner>(), new ArrayList<StepMeta>(), 
	    iconsize, 1, 0, 0, true, "FreeSans", 10);
   painter.setMagnification(0.5f);
   painter.setTranslationX(min.x);
   painter.setTranslationX(min.y);
  painter.buildTransformationImage();
  BufferedImage bufferedImage = (BufferedImage)gc.getImage();
  int newWidth=bufferedImage.getWidth()-min.x;
  int newHeigth=bufferedImage.getHeight()-min.y;
  BufferedImage image = new BufferedImage(newWidth, newHeigth, bufferedImage.getType());
  image.getGraphics().drawImage(
    		bufferedImage, 
    		0, 0, newWidth, newHeigth, 
    		min.x, min.y, min.x+newWidth, min.y+newHeigth, 
    		null
    	);

  TransformationInformationValues values = new TransformationInformationValues();
  values.transMeta = transMeta;
  values.image = image;
    
	return values;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:44,代码来源:TransformationInformation.java

示例5: getJobImage

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
public Image getJobImage(Device device, int x, int y, float magnificationFactor) {
   GCInterface gc = new SWTGC(device, new Point(x, y), iconsize);

   JobPainter jobPainter = new JobPainter( gc,
   		jobMeta, new Point(x, y), new SwtScrollBar(hori), new SwtScrollBar(vert), hop_candidate, drop_candidate,
   		selectionRegion, 
   		areaOwners, 
   		mouseOverEntries,
		PropsUI.getInstance().getIconSize(),
		PropsUI.getInstance().getLineWidth(),
		PropsUI.getInstance().getCanvasGridSize(), 
		PropsUI.getInstance().getShadowSize(), 
		PropsUI.getInstance().isAntiAliasingEnabled(),
		PropsUI.getInstance().getNoteFont().getName(),
		PropsUI.getInstance().getNoteFont().getHeight()
   	);

   jobPainter.setMagnification(magnificationFactor);
   jobPainter.setEntryLogMap(entryLogMap);
   jobPainter.setStartHopEntry(startHopEntry);
   jobPainter.setEndHopLocation(endHopLocation);
   jobPainter.setEndHopEntry(endHopEntry);
   jobPainter.setNoInputEntry(noInputEntry);
   if (job!=null) {
   	jobPainter.setJobEntryResults(job.getJobEntryResults());
   } else {
   	jobPainter.setJobEntryResults(new ArrayList<JobEntryResult>());
   }
   
   List<JobEntryCopy> activeJobEntries = new ArrayList<JobEntryCopy>();
   if (job!=null) {
   	if (job.getActiveJobEntryJobs().size()>0) {
   	  activeJobEntries.addAll( job.getActiveJobEntryJobs().keySet() );
   	}
   	if (job.getActiveJobEntryTransformations().size()>0) {
   	  activeJobEntries.addAll( job.getActiveJobEntryTransformations().keySet() );
   	}
   }
   jobPainter.setActiveJobEntries(activeJobEntries);
   
   jobPainter.drawJob();
   
   return (Image) gc.getImage();
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:45,代码来源:JobGraph.java

示例6: getJobImage

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
public Image getJobImage( Device device, int x, int y, float magnificationFactor ) {
  GCInterface gc = new SWTGC( device, new Point( x, y ), iconsize );

  int gridSize =
      PropsUI.getInstance().isShowCanvasGridEnabled() ? PropsUI.getInstance().getCanvasGridSize() : 1;

  JobPainter jobPainter =
    new JobPainter(
      gc, jobMeta, new Point( x, y ), new SwtScrollBar( hori ), new SwtScrollBar( vert ), hop_candidate,
      drop_candidate, selectionRegion, areaOwners, mouseOverEntries, PropsUI.getInstance().getIconSize(),
      PropsUI.getInstance().getLineWidth(), gridSize, PropsUI
        .getInstance().getShadowSize(), PropsUI.getInstance().isAntiAliasingEnabled(), PropsUI
        .getInstance().getNoteFont().getName(), PropsUI.getInstance().getNoteFont().getHeight() );

  jobPainter.setMagnification( magnificationFactor );
  jobPainter.setEntryLogMap( entryLogMap );
  jobPainter.setStartHopEntry( startHopEntry );
  jobPainter.setEndHopLocation( endHopLocation );
  jobPainter.setEndHopEntry( endHopEntry );
  jobPainter.setNoInputEntry( noInputEntry );
  if ( job != null ) {
    jobPainter.setJobEntryResults( job.getJobEntryResults() );
  } else {
    jobPainter.setJobEntryResults( new ArrayList<JobEntryResult>() );
  }

  List<JobEntryCopy> activeJobEntries = new ArrayList<>();
  if ( job != null ) {
    if ( job.getActiveJobEntryJobs().size() > 0 ) {
      activeJobEntries.addAll( job.getActiveJobEntryJobs().keySet() );
    }
    if ( job.getActiveJobEntryTransformations().size() > 0 ) {
      activeJobEntries.addAll( job.getActiveJobEntryTransformations().keySet() );
    }
  }
  jobPainter.setActiveJobEntries( activeJobEntries );

  jobPainter.drawJob();

  return (Image) gc.getImage();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:42,代码来源:JobGraph.java

示例7: loadValues

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
private TransformationInformationValues loadValues( ReportSubjectLocation location ) throws KettleException {

    // Load the transformation
    //
    TransMeta transMeta = loadTransformation( location );

    Point min = transMeta.getMinimum();
    Point area = transMeta.getMaximum();
    area.x += 100;
    area.y += 100;
    int iconsize = 32;

    ScrollBarInterface bar = new ScrollBarInterface() {
      public void setThumb( int thumb ) {
      }

      public int getSelection() {
        return 0;
      }
    };

    // Paint the transformation...
    //
    GCInterface gc = new SwingGC( null, area, iconsize, 50, 20 );
    List<AreaOwner> areaOwners = new ArrayList<AreaOwner>();
    TransPainter painter =
      new TransPainter(
        gc, transMeta, area, bar, bar, null, null, null, areaOwners, new ArrayList<StepMeta>(), iconsize, 1,
        0, 0, true, "FreeSans", 10 );
    painter.setMagnification( 0.5f );
    painter.setTranslationX( min.x );
    painter.setTranslationY( min.y );
    painter.buildTransformationImage();
    BufferedImage bufferedImage = (BufferedImage) gc.getImage();
    int newWidth = bufferedImage.getWidth() - min.x;
    int newHeigth = bufferedImage.getHeight() - min.y;
    BufferedImage image = new BufferedImage( newWidth, newHeigth, bufferedImage.getType() );
    image.getGraphics().drawImage(
      bufferedImage, 0, 0, newWidth, newHeigth, min.x, min.y, min.x + newWidth, min.y + newHeigth, null );

    TransformationInformationValues values = new TransformationInformationValues();
    values.transMeta = transMeta;
    values.image = image;
    values.areaOwners = areaOwners;

    return values;
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:48,代码来源:TransformationInformation.java

示例8: loadValues

import org.pentaho.di.core.gui.GCInterface; //导入方法依赖的package包/类
private JobInformationValues loadValues( ReportSubjectLocation location ) throws KettleException {

    // Load the job
    //
    JobMeta jobMeta = loadJob( location );

    Point min = jobMeta.getMinimum();
    Point area = jobMeta.getMaximum();
    area.x += 30;
    area.y += 30;
    int iconsize = 32;

    ScrollBarInterface bar = new ScrollBarInterface() {
      public void setThumb( int thumb ) {
      }

      public int getSelection() {
        return 0;
      }
    };

    // Paint the transformation...
    //
    GCInterface gc = new SwingGC( null, area, iconsize, 50, 20 );
    List<AreaOwner> areaOwners = new ArrayList<AreaOwner>();
    JobPainter painter =
      new JobPainter(
        gc, jobMeta, area, bar, bar, null, null, null, areaOwners, new ArrayList<JobEntryCopy>(), iconsize, 1,
        0, 0, true, "FreeSans", 10 );
    painter.setMagnification( 0.25f );
    painter.drawJob();
    BufferedImage bufferedImage = (BufferedImage) gc.getImage();
    int newWidth = bufferedImage.getWidth() - min.x;
    int newHeigth = bufferedImage.getHeight() - min.y;
    BufferedImage image = new BufferedImage( newWidth, newHeigth, bufferedImage.getType() );
    image.getGraphics().drawImage(
      bufferedImage, 0, 0, newWidth, newHeigth, min.x, min.y, min.x + newWidth, min.y + newHeigth, null );

    JobInformationValues values = new JobInformationValues();
    values.jobMeta = jobMeta;
    values.image = image;
    values.areaOwners = areaOwners;

    return values;
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:46,代码来源:JobInformation.java


注:本文中的org.pentaho.di.core.gui.GCInterface.getImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。