mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 03:30:44 +00:00
@@ -22,52 +22,52 @@ import java.util.List;
|
||||
|
||||
public class StartDragTreeItem extends TreeItem {
|
||||
|
||||
public GraphTargetItem target;
|
||||
public GraphTargetItem lockCenter;
|
||||
public GraphTargetItem constrain;
|
||||
public GraphTargetItem y2;
|
||||
public GraphTargetItem x2;
|
||||
public GraphTargetItem y1;
|
||||
public GraphTargetItem x1;
|
||||
public GraphTargetItem target;
|
||||
public GraphTargetItem lockCenter;
|
||||
public GraphTargetItem constrain;
|
||||
public GraphTargetItem y2;
|
||||
public GraphTargetItem x2;
|
||||
public GraphTargetItem y1;
|
||||
public GraphTargetItem x1;
|
||||
|
||||
public StartDragTreeItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.target = target;
|
||||
this.lockCenter = lockCenter;
|
||||
this.constrain = constrain;
|
||||
this.y2 = y2;
|
||||
this.x2 = x2;
|
||||
this.y1 = y1;
|
||||
this.x1 = x1;
|
||||
}
|
||||
public StartDragTreeItem(GraphSourceItem instruction, GraphTargetItem target, GraphTargetItem lockCenter, GraphTargetItem constrain, GraphTargetItem x1, GraphTargetItem y1, GraphTargetItem x2, GraphTargetItem y2) {
|
||||
super(instruction, PRECEDENCE_PRIMARY);
|
||||
this.target = target;
|
||||
this.lockCenter = lockCenter;
|
||||
this.constrain = constrain;
|
||||
this.y2 = y2;
|
||||
this.x2 = x2;
|
||||
this.y1 = y1;
|
||||
this.x1 = x1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(ConstantPool constants) {
|
||||
boolean hasConstrains = true;
|
||||
if (constrain instanceof DirectValueTreeItem) {
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Long) {
|
||||
if (((long) (Long) ((DirectValueTreeItem) constrain).value) == 0) {
|
||||
hasConstrains = false;
|
||||
@Override
|
||||
public String toString(ConstantPool constants) {
|
||||
boolean hasConstrains = true;
|
||||
if (constrain instanceof DirectValueTreeItem) {
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Long) {
|
||||
if (((long) (Long) ((DirectValueTreeItem) constrain).value) == 0) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Boolean) {
|
||||
if (((boolean) (Boolean) ((DirectValueTreeItem) constrain).value) == false) {
|
||||
hasConstrains = false;
|
||||
if (((DirectValueTreeItem) constrain).value instanceof Boolean) {
|
||||
if (((boolean) (Boolean) ((DirectValueTreeItem) constrain).value) == false) {
|
||||
hasConstrains = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return hilight("startDrag(") + target.toString(constants) + hilight(",") + lockCenter.toString(constants) + (hasConstrains ? hilight(",") + x1.toString(constants) + hilight(",") + y1.toString(constants) + hilight(",") + x2.toString(constants) + hilight(",") + y2.toString(constants) : "") + hilight(")");
|
||||
}
|
||||
}
|
||||
return hilight("startDrag(") + target.toString(constants) + hilight(",") + lockCenter.toString(constants) + (hasConstrains ? hilight(",") + x1.toString(constants) + hilight(",") + y1.toString(constants) + hilight(",") + x2.toString(constants) + hilight(",") + y2.toString(constants) : "") + hilight(")");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> getNeededSources() {
|
||||
List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> ret = super.getNeededSources();
|
||||
ret.addAll(target.getNeededSources());
|
||||
ret.addAll(constrain.getNeededSources());
|
||||
ret.addAll(x1.getNeededSources());
|
||||
ret.addAll(x2.getNeededSources());
|
||||
ret.addAll(y1.getNeededSources());
|
||||
ret.addAll(y2.getNeededSources());
|
||||
return ret;
|
||||
}
|
||||
@Override
|
||||
public List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> getNeededSources() {
|
||||
List<com.jpexs.decompiler.flash.graph.GraphSourceItemPos> ret = super.getNeededSources();
|
||||
ret.addAll(target.getNeededSources());
|
||||
ret.addAll(constrain.getNeededSources());
|
||||
ret.addAll(x1.getNeededSources());
|
||||
ret.addAll(x2.getNeededSources());
|
||||
ret.addAll(y1.getNeededSources());
|
||||
ret.addAll(y2.getNeededSources());
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user