本文整理汇总了Java中org.pentaho.di.job.entry.JobEntryCopy.getLocation方法的典型用法代码示例。如果您正苦于以下问题:Java JobEntryCopy.getLocation方法的具体用法?Java JobEntryCopy.getLocation怎么用?Java JobEntryCopy.getLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.job.entry.JobEntryCopy
的用法示例。
在下文中一共展示了JobEntryCopy.getLocation方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getJobEntryCopy
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public JobEntryCopy getJobEntryCopy(int x, int y, int iconsize) {
int i, s;
s = nrJobEntries();
for (i = s - 1; i >= 0; i--) // Back to front because drawing goes
// from start to end
{
JobEntryCopy je = getJobEntry(i);
Point p = je.getLocation();
if (p != null) {
if (x >= p.x && x <= p.x + iconsize && y >= p.y && y <= p.y + iconsize) {
return je;
}
}
}
return null;
}
示例2: getLine
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
protected int[] getLine(JobEntryCopy fs, JobEntryCopy ts) {
if (fs == null || ts == null)
return null;
Point from = fs.getLocation();
Point to = ts.getLocation();
offset = getOffset();
int x1 = from.x + iconsize / 2;
int y1 = from.y + iconsize / 2;
int x2 = to.x + iconsize / 2;
int y2 = to.y + iconsize / 2;
return new int[] { x1, y1, x2, y2 };
}
示例3: selectInRect
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
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);
}
}
示例4: getSelectedLocations
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public Point[] getSelectedLocations() {
int sels = nrSelected();
Point retval[] = new Point[sels];
for (int i = 0; i < sels; i++) {
JobEntryCopy si = getSelected(i);
Point p = si.getLocation();
retval[i] = new Point(p.x, p.y); // explicit copy of location
}
return retval;
}
示例5: selectInRect
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void selectInRect(JobMeta jobMeta, 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);
}
}
示例6: dupeJobEntry
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void dupeJobEntry(JobMeta jobMeta, JobEntryCopy jobEntry)
{
if (jobEntry==null)
return;
if (jobEntry.isStart())
{
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(Messages.getString("Spoon.Dialog.OnlyUseStartOnce.Message"));
mb.setText(Messages.getString("Spoon.Dialog.OnlyUseStartOnce.Title"));
mb.open();
return;
}
JobEntryCopy dupejge = (JobEntryCopy) jobEntry.clone();
dupejge.setNr(jobMeta.findUnusedNr(dupejge.getName()));
if (dupejge.isDrawn())
{
Point p = jobEntry.getLocation();
dupejge.setLocation(p.x + 10, p.y + 10);
}
jobMeta.addJobEntry(dupejge);
spoon.refreshGraph();
spoon.refreshTree();
spoon.setShellText();
}
示例7: getSelectedLocations
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public Point[] getSelectedLocations() {
List<JobEntryCopy> selectedEntries = getSelectedEntries();
Point retval[] = new Point[selectedEntries.size()];
for (int i = 0; i < retval.length; i++) {
JobEntryCopy si = selectedEntries.get(i);
Point p = si.getLocation();
retval[i] = new Point(p.x, p.y); // explicit copy of location
}
return retval;
}
示例8: getLine
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
protected int[] getLine(JobEntryCopy fs, JobEntryCopy ts) {
if (fs == null || ts == null)
return null;
Point from = fs.getLocation();
Point to = ts.getLocation();
int x1 = from.x + iconsize / 2;
int y1 = from.y + iconsize / 2;
int x2 = to.x + iconsize / 2;
int y2 = to.y + iconsize / 2;
return new int[] { x1, y1, x2, y2 };
}
示例9: dupeJobEntry
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
public void dupeJobEntry(JobMeta jobMeta, JobEntryCopy jobEntry)
{
if (jobEntry==null)
return;
if (jobEntry.isStart())
{
MessageBox mb = new MessageBox(spoon.getShell(), SWT.OK | SWT.ICON_INFORMATION);
mb.setMessage(BaseMessages.getString(PKG, "Spoon.Dialog.OnlyUseStartOnce.Message")); //$NON-NLS-1$
mb.setText(BaseMessages.getString(PKG, "Spoon.Dialog.OnlyUseStartOnce.Title")); //$NON-NLS-1$
mb.open();
return;
}
JobEntryCopy dupejge = (JobEntryCopy) jobEntry.clone();
dupejge.setNr(jobMeta.findUnusedNr(dupejge.getName()));
if (dupejge.isDrawn())
{
Point p = jobEntry.getLocation();
dupejge.setLocation(p.x + 10, p.y + 10);
}
jobMeta.addJobEntry(dupejge);
spoon.refreshGraph();
spoon.refreshTree();
spoon.setShellText();
}
示例10: drawJobEntryCopy
import org.pentaho.di.job.entry.JobEntryCopy; //导入方法依赖的package包/类
protected void drawJobEntryCopy(GC gc, JobEntryCopy je) {
if (!je.isDrawn())
return;
Point pt = je.getLocation();
int x, y;
if (pt != null) {
x = pt.x;
y = pt.y;
} else {
x = 50;
y = 50;
}
String name = je.getName();
if (je.isSelected())
gc.setLineWidth(3);
else
gc.setLineWidth(1);
Image im = getIcon(je);
if (im != null) // Draw the icon!
{
Rectangle bounds = new Rectangle(im.getBounds().x, im.getBounds().y, im.getBounds().width, im.getBounds().height);
gc.drawImage(im, 0, 0, bounds.width, bounds.height, offset.x + x, offset.y + y, iconsize, iconsize);
}
gc.setBackground(GUIResource.getInstance().getColorWhite());
gc.drawRectangle(offset.x + x - 1, offset.y + y - 1, iconsize + 1, iconsize + 1);
//gc.setXORMode(true);
Point textsize = new Point(gc.textExtent("" + name).x, gc.textExtent("" + name).y);
gc.setBackground(GUIResource.getInstance().getColorBackground());
gc.setLineWidth(1);
int xpos = offset.x + x + (iconsize / 2) - (textsize.x / 2);
int ypos = offset.y + y + iconsize + 5;
gc.setForeground(GUIResource.getInstance().getColorBlack());
gc.drawText(name, xpos, ypos, true);
}