Search in sources :

Example 6 with HT_Node

use of eidolons.client.cc.gui.neo.tree.HT_Node in project Eidolons by IDemiurge.

the class HT_MapBuilder method addNode.

protected int addNode(int parentX, ObjType type, int i, int sublingCount, ObjType parent) {
    addLink(parentX, type, i, sublingCount, parent);
    Point point;
    if (parent == null) {
        // getBasePoint();
        point = new PointX(getX(parentX, i, sublingCount, type, parent), getY(type, parent));
        LogMaster.log(1, "Base Node added: " + "" + "" + type.getName() + " at " + point);
    } else {
        StaticTreeLink link = getStaticLink(type);
        point = getNodePointFromLink(parentX, type, i, sublingCount, parent, link);
        LogMaster.log(1, "Node added: " + "" + type.getName() + " at " + point + " with " + link);
    }
    HT_Node node = createNode(type, defSize, parent);
    map.addNode(point, node, defSize);
    addAltBaseLinks(point, node);
    return point.x;
}
Also used : HT_Node(eidolons.client.cc.gui.neo.tree.HT_Node) PointX(main.swing.PointX)

Aggregations

HT_Node (eidolons.client.cc.gui.neo.tree.HT_Node)6 PointX (main.swing.PointX)3 ObjType (main.entity.type.ObjType)2 LINK_VARIANT (eidolons.client.cc.gui.neo.tree.logic.TreeMap.LINK_VARIANT)1 HT_View (eidolons.client.cc.gui.neo.tree.view.HT_View)1 CustomButton (eidolons.swing.components.buttons.CustomButton)1