use of org.pentaho.di.core.gui.AreaOwner.AreaType in project pentaho-kettle by pentaho.
the class TransGraph method addStepMouseOverDelayTimer.
private synchronized void addStepMouseOverDelayTimer(final StepMeta stepMeta) {
//
if (mouseOverSteps.contains(stepMeta)) {
return;
}
mouseOverSteps.add(stepMeta);
DelayTimer delayTimer = new DelayTimer(500, new DelayListener() {
@Override
public void expired() {
mouseOverSteps.remove(stepMeta);
delayTimers.remove(stepMeta);
showTargetStreamsStep = null;
asyncRedraw();
}
}, new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
Point cursor = getLastMove();
if (cursor != null) {
AreaOwner areaOwner = getVisibleAreaOwner(cursor.x, cursor.y);
if (areaOwner != null) {
AreaType areaType = areaOwner.getAreaType();
if (areaType == AreaType.STEP_ICON) {
StepMeta selectedStepMeta = (StepMeta) areaOwner.getOwner();
return selectedStepMeta == stepMeta;
} else if (areaType != null && areaType.belongsToTransContextMenu()) {
StepMeta selectedStepMeta = (StepMeta) areaOwner.getParent();
return selectedStepMeta == stepMeta;
} else if (areaOwner.getExtensionAreaType() != null) {
return true;
}
}
}
return false;
}
});
new Thread(delayTimer).start();
delayTimers.put(stepMeta, delayTimer);
}
use of org.pentaho.di.core.gui.AreaOwner.AreaType in project pentaho-kettle by pentaho.
the class JobGraph method addEntryMouseOverDelayTimer.
private synchronized void addEntryMouseOverDelayTimer(final JobEntryCopy jobEntryCopy) {
//
if (mouseOverEntries.contains(jobEntryCopy)) {
return;
}
mouseOverEntries.add(jobEntryCopy);
DelayTimer delayTimer = new DelayTimer(500, new DelayListener() {
public void expired() {
mouseOverEntries.remove(jobEntryCopy);
delayTimers.remove(jobEntryCopy);
asyncRedraw();
}
}, new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
Point cursor = getLastMove();
if (cursor != null) {
AreaOwner areaOwner = getVisibleAreaOwner(cursor.x, cursor.y);
if (areaOwner != null && areaOwner.getAreaType() != null) {
AreaType areaType = areaOwner.getAreaType();
if (areaType == AreaType.JOB_ENTRY_ICON || areaType.belongsToJobContextMenu()) {
JobEntryCopy selectedJobEntryCopy = (JobEntryCopy) areaOwner.getOwner();
return selectedJobEntryCopy == jobEntryCopy;
}
}
}
return false;
}
});
new Thread(delayTimer).start();
delayTimers.put(jobEntryCopy, delayTimer);
}
Aggregations