Remove unused code
FEA: ItEr65OTS04CorreccionsRecursosLimitantes
This commit is contained in:
parent
a2f359013e
commit
2cbbc2ee42
2 changed files with 1 additions and 89 deletions
|
|
@ -20,17 +20,9 @@
|
|||
|
||||
package org.navalplanner.web.limitingresources;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.Date;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.zkoss.ganttz.data.Dependency;
|
||||
import org.zkoss.ganttz.data.DependencyType;
|
||||
import org.zkoss.ganttz.data.constraint.Constraint;
|
||||
import org.zkoss.ganttz.data.constraint.Constraint.IConstraintViolationListener;
|
||||
import org.zkoss.zk.au.out.AuInvoke;
|
||||
import org.zkoss.zk.ui.ext.AfterCompose;
|
||||
import org.zkoss.zul.impl.XulElement;
|
||||
|
||||
/**
|
||||
|
|
@ -38,8 +30,7 @@ import org.zkoss.zul.impl.XulElement;
|
|||
* @author Francisco Javier Moran Rúa <jmoran@igalia.com>
|
||||
* @author Lorenzo Tilve Álvaro <ltilve@igalia.com>
|
||||
*/
|
||||
public class LimitingDependencyComponent extends XulElement implements
|
||||
AfterCompose {
|
||||
public class LimitingDependencyComponent extends XulElement {
|
||||
|
||||
private QueueTask source;
|
||||
|
||||
|
|
@ -47,10 +38,6 @@ public class LimitingDependencyComponent extends XulElement implements
|
|||
|
||||
private DependencyType type;
|
||||
|
||||
// private Dependency dependency;
|
||||
|
||||
private IConstraintViolationListener<Date> violationListener;
|
||||
|
||||
public LimitingDependencyComponent(QueueTask source, QueueTask destination,
|
||||
DependencyType type) {
|
||||
this(source, destination);
|
||||
|
|
@ -62,36 +49,6 @@ public class LimitingDependencyComponent extends XulElement implements
|
|||
Validate.notNull(destination);
|
||||
this.source = source;
|
||||
this.destination = destination;
|
||||
// this.dependency = dependency;
|
||||
violationListener = new IConstraintViolationListener<Date>() {
|
||||
|
||||
@Override
|
||||
public void constraintViolated(Constraint<Date> constraint,
|
||||
Date value) {
|
||||
// TODO mark graphically dependency as violated
|
||||
}
|
||||
|
||||
@Override
|
||||
public void constraintSatisfied(Constraint<Date> constraint,
|
||||
Date value) {
|
||||
// TODO mark graphically dependency as not violated
|
||||
|
||||
}
|
||||
};
|
||||
// this.dependency.addConstraintViolationListener(violationListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCompose() {
|
||||
PropertyChangeListener listener = new PropertyChangeListener() {
|
||||
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
redrawDependency();
|
||||
}
|
||||
};
|
||||
// this.source.getTask().addFundamentalPropertiesChangeListener(listener);
|
||||
// this.destination.getTask().addFundamentalPropertiesChangeListener(listener);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -129,13 +86,6 @@ public class LimitingDependencyComponent extends XulElement implements
|
|||
response("zoomChanged", new AuInvoke(this, "draw"));
|
||||
}
|
||||
|
||||
public boolean contains(QueueTask task) {
|
||||
return false;
|
||||
// Task sourceTask = getSource().getTask();
|
||||
// Task destinationTask = getDestination().getTask();
|
||||
// return task.equals(sourceTask) || task.equals(destinationTask);
|
||||
}
|
||||
|
||||
public QueueTask getSource() {
|
||||
return source;
|
||||
}
|
||||
|
|
@ -144,20 +94,8 @@ public class LimitingDependencyComponent extends XulElement implements
|
|||
return destination;
|
||||
}
|
||||
|
||||
// public Dependency getDependency() {
|
||||
// return dependency;
|
||||
// }
|
||||
|
||||
public DependencyType getDependencyType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public boolean hasSameSourceAndDestination(Dependency dependency) {
|
||||
return false;
|
||||
// Task sourceTask = source.getTask();
|
||||
// Task destinationTask = destination.getTask();
|
||||
// return sourceTask.equals(dependency.getSource())
|
||||
// && destinationTask.equals(dependency.getDestination());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ import org.apache.commons.logging.Log;
|
|||
import org.apache.commons.logging.LogFactory;
|
||||
import org.zkoss.ganttz.DependencyList;
|
||||
import org.zkoss.ganttz.TaskComponent;
|
||||
import org.zkoss.ganttz.data.Dependency;
|
||||
import org.zkoss.ganttz.timetracker.TimeTracker;
|
||||
import org.zkoss.ganttz.timetracker.TimeTrackerComponent;
|
||||
import org.zkoss.ganttz.timetracker.zoom.IZoomLevelChangedListener;
|
||||
|
|
@ -103,13 +102,6 @@ public class LimitingDependencyList extends XulElement implements AfterCompose {
|
|||
return panel.getTimeTrackerComponent();
|
||||
}
|
||||
|
||||
|
||||
// private boolean isInPage() {
|
||||
// return getParent() != null && getGanttPanel() != null
|
||||
// && getGanttPanel().getParent() != null;
|
||||
// }
|
||||
|
||||
|
||||
public void redrawDependenciesConnectedTo(TaskComponent taskComponent) {
|
||||
redrawDependencyComponents(getDependencyComponentsConnectedTo(taskComponent));
|
||||
}
|
||||
|
|
@ -139,22 +131,4 @@ public class LimitingDependencyList extends XulElement implements AfterCompose {
|
|||
}
|
||||
}
|
||||
|
||||
public void taskRemoved(QueueTask task) {
|
||||
for (LimitingDependencyComponent dependencyComponent : LimitingDependencyList.this
|
||||
.getLimitingDependencyComponents()) {
|
||||
if (dependencyComponent.contains(task)) {
|
||||
this.removeChild(dependencyComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void remove(Dependency dependency) {
|
||||
for (LimitingDependencyComponent dependencyComponent : LimitingDependencyList.this
|
||||
.getLimitingDependencyComponents()) {
|
||||
if (dependencyComponent.hasSameSourceAndDestination(dependency)) {
|
||||
this.removeChild(dependencyComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue