Exemple #1
0
public void Move (int xinc, int yinc)
    {
        AutoUpdateOff ();
        super.Move (xinc, yinc);
        for (int i = arrows.size()-1; i >= 0; --i) {
            ((CGArrow)arrows.elementAt(i)).MoveTail (xinc, yinc);
        }
        if (arrow != null)
            arrow.MoveHead (xinc, yinc);
        AutoUpdateOn ();
    }
Exemple #2
0
public void SetText (String text)
    {
        int width = Bbox().width;

        AutoUpdateOff ();
        super.SetText (text);
        width = Bbox().width - width;
        for (int i = arrows.size()-1; i >= 0; --i)
            ((CGArrow)arrows.elementAt(i)).MoveTail (width, 0);
        AutoUpdateOn ();
    }
Exemple #3
0
public CGNode (int x, int y, String text, FontMetrics fm, boolean iscon)
    {
	super (x, y, text, fm,
	       iscon ? Color.black : Color.white,
	       iscon ? Color.white : Color.black,
	       iscon ? Color.black : Color.white);
        super.Move (-Bbox().width/2, -Bbox().height/2);
        parent = null;
        childs = new Vector();
        arrows = new Vector();
        arrow = null;
	isconcept = iscon;
	layout_y = 0;
    }