本文整理汇总了Java中org.pentaho.di.core.gui.GCInterface.setBackground方法的典型用法代码示例。如果您正苦于以下问题:Java GCInterface.setBackground方法的具体用法?Java GCInterface.setBackground怎么用?Java GCInterface.setBackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.core.gui.GCInterface
的用法示例。
在下文中一共展示了GCInterface.setBackground方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例2: 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);
}
示例3: 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 );
}
示例4: 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 );
}
示例5: 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 );
}