mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Autolayout
This commit is contained in:
+8
-9
@@ -23,7 +23,6 @@ import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Alexander Lobas
|
||||
@@ -86,10 +85,10 @@ public abstract class TreeEditOperation extends AbstractEditOperation {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<RadComponent> children = myContainer.getChildren();
|
||||
int index = children.indexOf(myTarget) + (myInsertBefore ? -1 : 1);
|
||||
if (0 <= index && index < children.size()) {
|
||||
return !myComponents.contains(children.get(index));
|
||||
Object[] children = myContainer.getTreeChildren();
|
||||
int index = ArrayUtil.indexOf(children, myTarget) + (myInsertBefore ? -1 : 1);
|
||||
if (0 <= index && index < children.length) {
|
||||
return !myComponents.contains(children[index]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -104,10 +103,10 @@ public abstract class TreeEditOperation extends AbstractEditOperation {
|
||||
execute(myTarget);
|
||||
}
|
||||
else {
|
||||
List<RadComponent> children = myContainer.getChildren();
|
||||
int index = children.indexOf(myTarget) + 1;
|
||||
if (index < children.size()) {
|
||||
execute(children.get(index));
|
||||
Object[] children = myContainer.getTreeChildren();
|
||||
int index = ArrayUtil.indexOf(children, myTarget) + 1;
|
||||
if (index < children.length) {
|
||||
execute((RadComponent)children[index]);
|
||||
}
|
||||
else {
|
||||
execute(null);
|
||||
|
||||
Reference in New Issue
Block a user