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


Java GCInterface.fillPolygon方法代码示例

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


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

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

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

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

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


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