• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java GCInterface类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



GCInterface类属于org.pentaho.di.core.gui包,在下文中一共展示了GCInterface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: drawRemovedTweak

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
private void drawRemovedTweak(TransPainterExtension ext, StepMeta stepMeta) {
  // Now we're here, mark the step as removed: a cross over the step icon
  //
  GCInterface gc = ext.gc;
  int iconsize = ext.iconsize;
  int x = ext.x1-5;
  int y = ext.y1-5;

  gc.setLineWidth(stepMeta.isSelected() ? 4 : 3);
  gc.setForeground(EColor.CRYSTAL);
  gc.setBackground(EColor.LIGHTGRAY);
  gc.setFont(EFont.GRAPH);

  gc.drawLine(x               , y, x + iconsize / 2, y + iconsize / 2);
  gc.drawLine(x + iconsize / 2, y, x               , y + iconsize / 2);
}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:17,代码来源:DrawTweakOnStepExtensionPoint.java


示例2: TransPainter

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public TransPainter(GCInterface gc, TransMeta transMeta, 
                    Point area, 
                    ScrollBarInterface hori, ScrollBarInterface vert, 
                    TransHopMeta candidate, Point drop_candidate, Rectangle selrect,
                    List<AreaOwner> areaOwners, 
                    List<StepMeta> mouseOverSteps,     		
                    int iconsize, int linewidth, int gridsize, int shadowSize, boolean antiAliasing, 
            		String noteFontName, int noteFontHeight, Trans trans, boolean slowStepIndicatorEnabled
                    )
{
	super(gc, transMeta, area, hori, vert, drop_candidate, selrect, areaOwners,
    		iconsize, linewidth, gridsize, shadowSize, antiAliasing, 
    		noteFontName, noteFontHeight
		);
    this.transMeta      = transMeta;
    
    this.candidate      = candidate;
    
    this.mouseOverSteps  = mouseOverSteps;
    
    this.trans = trans;
    this.slowStepIndicatorEnabled = slowStepIndicatorEnabled;        
    
    stepLogMap = null;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:26,代码来源:TransPainter.java


示例3: JobPainterExtension

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public JobPainterExtension( GCInterface gc, boolean shadow, List<AreaOwner> areaOwners, JobMeta jobMeta,
  JobHopMeta jobHop, int x1, int y1, int x2, int y2, int mx, int my, Point offset ) {
  super();
  this.gc = gc;
  this.shadow = shadow;
  this.areaOwners = areaOwners;
  this.jobMeta = jobMeta;
  this.jobHop = jobHop;
  this.x1 = x1;
  this.y1 = y1;
  this.x2 = x2;
  this.y2 = y2;
  this.mx = mx;
  this.my = my;
  this.offset = offset;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:JobPainterExtension.java


示例4: TransPainterExtension

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public TransPainterExtension( GCInterface gc, boolean shadow, List<AreaOwner> areaOwners, TransMeta transMeta,
  StepMeta stepMeta, TransHopMeta transHop, int x1, int y1, int x2, int y2, int mx, int my, Point offset,
  int iconsize ) {
  super();
  this.gc = gc;
  this.shadow = shadow;
  this.areaOwners = areaOwners;
  this.transMeta = transMeta;
  this.stepMeta = stepMeta;
  this.transHop = transHop;
  this.x1 = x1;
  this.y1 = y1;
  this.x2 = x2;
  this.y2 = y2;
  this.mx = mx;
  this.my = my;
  this.offset = offset;
  this.iconsize = iconsize;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:TransPainterExtension.java


示例5: TransPainter

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public TransPainter( GCInterface gc, TransMeta transMeta, Point area, ScrollBarInterface hori,
  ScrollBarInterface vert, TransHopMeta candidate, Point drop_candidate, Rectangle selrect,
  List<AreaOwner> areaOwners, List<StepMeta> mouseOverSteps, int iconsize, int linewidth, int gridsize,
  int shadowSize, boolean antiAliasing, String noteFontName, int noteFontHeight, Trans trans,
  boolean slowStepIndicatorEnabled ) {
  super(
    gc, transMeta, area, hori, vert, drop_candidate, selrect, areaOwners, iconsize, linewidth, gridsize,
    shadowSize, antiAliasing, noteFontName, noteFontHeight );
  this.transMeta = transMeta;

  this.candidate = candidate;

  this.mouseOverSteps = mouseOverSteps;

  this.trans = trans;
  this.slowStepIndicatorEnabled = slowStepIndicatorEnabled;

  stepLogMap = null;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:TransPainter.java


示例6: callExtensionPoint

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
@Override
public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException {
  if ( !( object instanceof JobPainter ) ) {
    return;
  }
  int iconsize = PropsUI.getInstance().getIconSize();
  JobPainter painter = (JobPainter) object;
  Point offset = painter.getOffset();
  GCInterface gc = painter.getGc();
  JobMeta jobMeta = painter.getJobMeta();
  jobMeta.getJobCopies().stream().filter( je -> je.getAttribute( ATTR_GIT, ATTR_STATUS ) != null )
    .forEach( je -> {
      if ( jobMeta.getJobversion() == null ? false : jobMeta.getJobversion().startsWith( "git" ) ) {
        String status = je.getAttribute( ATTR_GIT, ATTR_STATUS );
        Point n = je.getLocation();
        String location = "org/pentaho/di/git/spoon/images/";
        if ( status.equals( REMOVED ) ) {
          location += "removed.svg";
        } else if ( status.equals( CHANGED ) ) {
          location += "changed.svg";
        } else if ( status.equals( ADDED ) ) {
          location += "added.svg";
        } else { // Unchanged
          return;
        }
        gc.drawImage( location, getClass().getClassLoader(), ( n.x + iconsize + offset.x ) - ( BasePainter.MINI_ICON_SIZE / 2 ), n.y + offset.y - ( BasePainter.MINI_ICON_SIZE / 2 ) );
      } else {
        je.getAttributesMap().remove( ATTR_GIT );
      }
    } );
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:32,代码来源:DrawDiffOnJobEntryExtensionPoint.java


示例7: callExtensionPoint

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
@Override
public void callExtensionPoint( LogChannelInterface log, Object object ) throws KettleException {
  if ( !( object instanceof TransPainter ) ) {
    return;
  }
  int iconsize = PropsUI.getInstance().getIconSize();
  TransPainter painter = (TransPainter) object;
  Point offset = painter.getOffset();
  GCInterface gc = painter.getGc();
  TransMeta transMeta = painter.getTransMeta();
  transMeta.getSteps().stream().filter( step -> step.getAttribute( ATTR_GIT, ATTR_STATUS ) != null )
    .forEach( step -> {
      if ( transMeta.getTransversion() == null ? false : transMeta.getTransversion().startsWith( "git" ) ) {
        String status = step.getAttribute( ATTR_GIT, ATTR_STATUS );
        Point n = step.getLocation();
        String location = "org/pentaho/di/git/spoon/images/";
        if ( status.equals( REMOVED ) ) {
          location += "removed.svg";
        } else if ( status.equals( CHANGED ) ) {
          location += "changed.svg";
        } else if ( status.equals( ADDED ) ) {
          location += "added.svg";
        } else { // Unchanged
          return;
        }
        gc.drawImage( location, getClass().getClassLoader(), ( n.x + iconsize + offset.x ) - ( BasePainter.MINI_ICON_SIZE / 2 ), n.y + offset.y - ( BasePainter.MINI_ICON_SIZE / 2 ) );
      } else {
        step.getAttributesMap().remove( ATTR_GIT );
      }
    } );
}
 
开发者ID:HiromuHota,项目名称:pdi-git-plugin,代码行数:32,代码来源:DrawDiffOnStepExtensionPoint.java


示例8: drawBypassedTweak

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
protected void drawBypassedTweak(TransPainterExtension ext, StepMeta stepMeta) {
  // put an arrow over the step to indicate bypass
  //
  GCInterface gc = ext.gc;
  int iconsize = ext.iconsize;
  int x = ext.x1-5;
  int y = ext.y1-5;

  int aW = iconsize/2;
  int aH = 3*iconsize/8;

  gc.setForeground(EColor.CRYSTAL);
  gc.setBackground(EColor.CRYSTAL);

  //                 C\
  //                 | \
  //    A------------B  \
  //    |                D
  //    G------------F  /
  //                 | /
  //                 E/  
  //
  int[] arrow = new int[] { 
      x, y + aH/3, // A
      x + 5 * aW / 8, y + aH/3, // B
      x + 5 * aW / 8, y,  // C
      x + aW, y + aH / 2, // D
      x + 5 * aW / 8, y + aH,  // E
      x + 5 * aW / 8, y + 2*aH/3, // F
      x, y + 2*aH/3, // G        
    };
  gc.fillPolygon(arrow);
}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:34,代码来源:DrawTweakOnStepExtensionPoint.java


示例9: drawGoldenSetMarker

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
protected void drawGoldenSetMarker( TransPainterExtension ext, StepMeta stepMeta, String testName ) {
  // Now we're here, draw a marker and indicate the name of the unit test
  //
  GCInterface gc = ext.gc;
  int iconsize = ext.iconsize;
  int x = ext.x1;
  int y = ext.y1;

  gc.setLineWidth( stepMeta.isSelected() ? 2 : 1 );
  gc.setForeground( EColor.CRYSTAL );
  gc.setBackground( EColor.LIGHTGRAY );
  gc.setFont( EFont.GRAPH );
  Point textExtent = gc.textExtent( testName );
  textExtent.x += 6; // add a tiny bit of a margin
  textExtent.y += 6;

  // Draw it at the right hand side
  //
  int arrowSize = textExtent.y;
  Point point = new Point( x + iconsize, y + ( iconsize - textExtent.y ) / 2 );

  int[] arrow = new int[] {
    point.x, point.y + textExtent.y/2,
    point.x + arrowSize, point.y,
    point.x + textExtent.x + arrowSize, point.y,
    point.x + textExtent.x + arrowSize, point.y + textExtent.y,
    point.x + arrowSize, point.y + textExtent.y,
  };

  gc.fillPolygon( arrow );
  gc.drawPolygon( arrow );
  gc.drawText( testName, point.x + arrowSize + 3, point.y + 3 );
}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:34,代码来源:DrawGoldenDataSetOnStepExtensionPoint.java


示例10: drawInputDataSetMarker

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
private void drawInputDataSetMarker( TransPainterExtension ext, StepMeta stepMeta, String dataSetName ) {
  // Now we're here, draw a marker and indicate the name of the data set name
  //
  GCInterface gc = ext.gc;
  int iconsize = ext.iconsize;
  int x = ext.x1;
  int y = ext.y1;

  gc.setLineWidth( stepMeta.isSelected() ? 2 : 1 );
  gc.setForeground( EColor.CRYSTAL );
  gc.setBackground( EColor.LIGHTGRAY );
  gc.setFont( EFont.GRAPH );
  Point textExtent = gc.textExtent( dataSetName );
  textExtent.x += 6; // add a tiny bit of a margin
  textExtent.y += 6;

  // Draw it to the left as an arrow
  //
  int arrowSize = textExtent.y;
  Point point = new Point( x - textExtent.x - arrowSize - 2, y + ( iconsize - textExtent.y ) / 2 );

  int[] arrow = new int[] {
    point.x, point.y,
    point.x + textExtent.x, point.y,
    point.x + textExtent.x + arrowSize, point.y + textExtent.y / 2,
    point.x + textExtent.x, point.y + textExtent.y,
    point.x, point.y + textExtent.y };

  gc.fillPolygon( arrow );
  gc.drawPolygon( arrow );
  gc.drawText( dataSetName, point.x + 3, point.y + 3 );

}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:34,代码来源:DrawInputDataSetOnStepExtensionPoint.java


示例11: drawGoldenSetMarker

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
protected void drawGoldenSetMarker( TransPainterExtension ext, StepMeta stepMeta, String testName ) {
  // Now we're here, draw a marker and indicate the name of the unit test
  //
  GCInterface gc = ext.gc;
  int iconsize = ext.iconsize;
  int x = ext.x1;
  int y = ext.y1;

  gc.setLineWidth( stepMeta.isSelected() ? 2 : 1 );
  gc.setForeground( EColor.CRYSTAL );
  gc.setBackground( EColor.LIGHTGRAY );
  gc.setFont( EFont.GRAPH );
  Point textExtent = gc.textExtent( testName );
  textExtent.x += 6; // add a tiny bit of a margin
  textExtent.y += 6;

  // Draw it at the right hand side
  //
  int arrowSize = textExtent.y;
  Point point = new Point( x + iconsize, y + ( iconsize - textExtent.y ) / 2 );

  int[] arrow = new int[] {
    point.x, point.y,
    point.x + textExtent.x + arrowSize, point.y,
    point.x + textExtent.x + arrowSize, point.y + textExtent.y,
    point.x, point.y + textExtent.y,
    point.x + arrowSize, point.y + textExtent.y / 2
  };

  gc.fillPolygon( arrow );
  gc.drawPolygon( arrow );
  gc.drawText( testName, point.x + arrowSize + 3, point.y + 3 );
}
 
开发者ID:mattcasters,项目名称:pentaho-pdi-dataset,代码行数:34,代码来源:DrawInputDataSetOnStepExtensionPoint.java


示例12: JobPainter

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public JobPainter(GCInterface gc, JobMeta jobMeta, Point area, ScrollBarInterface hori, ScrollBarInterface vert, JobHopMeta candidate, Point drop_candidate, Rectangle selrect, List<AreaOwner> areaOwners, List<JobEntryCopy> mouseOverEntries,
		int iconsize, int linewidth, int gridsize, int shadowSize, boolean antiAliasing, 
   		String noteFontName, int noteFontHeight) {
	super(gc, jobMeta, area, hori, vert, drop_candidate, selrect, areaOwners,
			iconsize, linewidth, gridsize, shadowSize, antiAliasing, 
       		noteFontName, noteFontHeight
		);
	this.jobMeta = jobMeta;

	this.candidate = candidate;

	this.mouseOverEntries = mouseOverEntries;

	entryLogMap = null;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:16,代码来源:JobPainter.java


示例13: 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


示例14: 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


示例15: drawLogicalModel

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
protected void drawLogicalModel(LogicalModel logicalModel, Canvas canvas, PaintEvent paintEvent) {
  getRelationshipsFromFact();
  Rectangle rect = canvas.getBounds();
  GCInterface gc = new SWTDirectGC(paintEvent.gc, new org.pentaho.di.core.gui.Point(rect.width, rect.height), 32);
  StarModelPainter painter = new StarModelPainter(gc, logicalModel, logicalRelationships, locale);
  painter.draw();
}
 
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:8,代码来源:StarModelDialog.java


示例16: JobPainter

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public JobPainter( GCInterface gc, JobMeta jobMeta, Point area, ScrollBarInterface hori,
  ScrollBarInterface vert, JobHopMeta candidate, Point drop_candidate, Rectangle selrect,
  List<AreaOwner> areaOwners, List<JobEntryCopy> mouseOverEntries, int iconsize, int linewidth, int gridsize,
  int shadowSize, boolean antiAliasing, String noteFontName, int noteFontHeight ) {
  super(
    gc, jobMeta, area, hori, vert, drop_candidate, selrect, areaOwners, iconsize, linewidth, gridsize,
    shadowSize, antiAliasing, noteFontName, noteFontHeight );
  this.jobMeta = jobMeta;

  this.candidate = candidate;

  this.mouseOverEntries = mouseOverEntries;

  entryLogMap = null;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:16,代码来源:JobPainter.java


示例17: TransPainterFlyoutExtension

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
public TransPainterFlyoutExtension( GCInterface gc, List<AreaOwner> areaOwners, TransMeta transMeta,
    StepMeta stepMeta, float translationX, float translationY, float magnification, Point area, Point offset ) {
  super();
  this.gc = gc;
  this.areaOwners = areaOwners;
  this.transMeta = transMeta;
  this.stepMeta = stepMeta;
  this.translationX = translationX;
  this.translationY = translationY;
  this.magnification = magnification;
  this.area = area;
  this.offset = offset;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:14,代码来源:TransPainterFlyoutExtension.java


示例18: testDrawTimeScaleLineInfinityLoop

import org.pentaho.di.core.gui.GCInterface; //导入依赖的package包/类
@Test( timeout = 1000 )
public void testDrawTimeScaleLineInfinityLoop() {
  GCInterface gCInterfaceMock = mock( GCInterface.class );
  when( metricsPainter.getGc() ).thenReturn( gCInterfaceMock );
  doCallRealMethod().when( metricsPainter ).drawTimeScaleLine( heightStub, pixelsPerMsStub, periodInMsStub );
  when( gCInterfaceMock.textExtent( anyString() ) ).thenReturn( mock( Point.class ) );

  metricsPainter.drawTimeScaleLine( heightStub, pixelsPerMsStub, periodInMsStub );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:10,代码来源:MetricsPainterTest.java


示例19: 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


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DeploymentBuilder类代码示例发布时间:2022-05-23
下一篇:
Java CreateJobOutput类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap