private PipelineComponent component;
private PointType type;
- private boolean fixed = true;
- private boolean rotate = false;
- private boolean reverse = false;
- private boolean deletable = true;
- private boolean sub = false;
+ private boolean isFixed = true;
+ private boolean isRotate = false;
+ private boolean isReverse = false;
+ private boolean isDeletable = true;
+ private boolean isSizeChange = false;
+ private boolean isSub = false;
public PipeControlPoint(PipelineComponent component) {
this.component = component;
@GetPropertyValue(name="Fixed",tabId="Debug",value="fixed")
public boolean isFixed() {
- return fixed;
+ return isFixed;
}
public void setFixed(boolean fixed) {
- this.fixed = fixed;
+ this.isFixed = fixed;
}
@GetPropertyValue(name="Rotate",tabId="Debug",value="rotate")
public boolean isRotate() {
- return rotate;
+ return isRotate;
}
public void setRotate(boolean rotate) {
- this.rotate = rotate;
+ this.isRotate = rotate;
}
@GetPropertyValue(name="Reverse",tabId="Debug",value="reverse")
public boolean isReverse() {
- return reverse;
+ return isReverse;
}
public void setReverse(boolean reverse) {
- this.reverse = reverse;
+ this.isReverse = reverse;
}
public void setSub(boolean sub) {
- this.sub = sub;
+ this.isSub = sub;
}
@GetPropertyValue(name="Deletable",tabId="Debug",value="deletable")
public boolean isDeletable() {
- return deletable;
+ return isDeletable;
}
public void setDeletable(boolean deletable) {
- this.deletable = deletable;
+ this.isDeletable = deletable;
}
public boolean isPathLegEnd() {
}
public boolean isDirected() {
- return fixed && isEnd();
+ return isFixed && isEnd();
}
public boolean isNonDirected() {
- return !fixed && isEnd();
+ return !isFixed && isEnd();
}
public boolean isVariableLength() {
- return !fixed && isInline();
+ return !isFixed && isInline();
}
public boolean isVariableAngle() {
- return !fixed && isTurn();
+ return !isFixed && isTurn();
}
public boolean isBranchEnd() {
- return deletable && isEnd();
+ return isDeletable && isEnd();
}
public boolean isOffset() {
}
public boolean isDualSub() {
- return parent != null && sub;
+ return parent != null && isSub;
}
public boolean isDualInline() {
}
public boolean isSizeChange() {
- if (children.size() == 0)
- return false;
- if (!isDualInline())
- return false;
- return getPipeRun() != children.get(0).getPipeRun();
+ return isSizeChange;
+// if (children.size() == 0)
+// return false;
+// if (!isDualInline())
+// return false;
+// return getPipeRun() != children.get(0).getPipeRun();
}
+
+ public void setSizeChange(boolean isSizeChange) {
+ this.isSizeChange = isSizeChange;
+ }
private PipeControlPoint next;
public void setNext(PipeControlPoint next) {
if (isEnd() && previous != null && next != null)
throw new RuntimeException("End control points are allowed to have only one connection");
+ if (next == this)
+ throw new RuntimeException("Cannot connect to self");
if (this.next == next)
return;
if (DEBUG) System.out.println(this + " next " + next);
this.next = next;
if (component != null) {
- if (parent == null || sub)
+ if (parent == null || isSub)
component.setNext(next != null ? next.component : null);
else
component.setBranch0(next != null ? next.component : null);
public void setPrevious(PipeControlPoint previous) {
if (isEnd() && next != null && previous != null)
throw new RuntimeException("End control points are allowed to have only one connection");
+ if (previous == this)
+ throw new RuntimeException("Cannot connect to self");
if (this.previous == previous)
return;
if (DEBUG) System.out.println(this + " previous " + previous);
this.previous = previous;
if (component != null) {
- if (parent == null || sub)
+ if (parent == null || isSub)
component.setPrevious(previous != null ? previous.component : null);
else
component.setBranch0(previous != null ? previous.component : null);
ocp.removeComponent();
sccp.removeComponent();
- p1.remChild(ocp);
- p2.remChild(sccp);
+ if (p1 != null)
+ p1.remChild(ocp);
+ if (p2 != null)
+ p2.remChild(sccp);
// TODO : now we assume that this is size change, and we do
if (ocp.next != null)
sccp.setNext(null);
sccp.setPrevious(null);
- checkRemove(p1);
- checkRemove(p2);
+ if (p1 != null)
+ checkRemove(p1);
+ if (p2 != null)
+ checkRemove(p2);
}
private void removeSubPoints() {