@Override public Object getChild(Object parent, int i) { StringTree t = (StringTree)parent; return t.getChild(i); }
@Override public String toString() { if ( !isNil() ) return text; return "nil"; } }
@Override public int getIndexOfChild(Object parent, Object child) { StringTree c = (StringTree)child; return c.getChildIndex(); }
@Override public int getChildCount(Object parent) { StringTree t = (StringTree)parent; return t.getChildCount(); }
protected int toEventPosition(JTextComponent component, int position) { int result = position; while (toComponentPosition(component, result) < position) { result++; } return result; }
public JTreeSTModel(Interpreter interp, EvalTemplateEvent root) { this.interp = interp; this.root = new Wrapper(root); }
@Override public boolean isLeaf(Object node) { return getChildCount(node) == 0; }
@Override public Object getChild(Object parent, int i) { StringTree t = (StringTree)parent; return t.getChild(i); }
@Override public int getChildCount(Object parent) { StringTree t = (StringTree)parent; return t.getChildCount(); }
protected int toEventPosition(JTextComponent component, int position) { int result = position; while (toComponentPosition(component, result) < position) { result++; } return result; }
@Override public int getIndexOfChild(Object parent, Object child) { StringTree c = (StringTree)child; return c.getChildIndex(); }
@Override public String toString() { if ( !isNil() ) return text; return "nil"; } }
@Override public Object getChild(Object parent, int i) { StringTree t = (StringTree)parent; return t.getChild(i); }
@Override public int getChildCount(Object parent) { StringTree t = (StringTree)parent; return t.getChildCount(); }
protected int toEventPosition(JTextComponent component, int position) { int result = position; while (toComponentPosition(component, result) < position) { result++; } return result; }
@Override public int getIndexOfChild(Object parent, Object child) { StringTree c = (StringTree)child; return c.getChildIndex(); }
@Override public Object getChild(Object parent, int i) { StringTree t = (StringTree)parent; return t.getChild(i); }
@Override public int getChildCount(Object parent) { StringTree t = (StringTree)parent; return t.getChildCount(); }
protected int toEventPosition(JTextComponent component, int position) { int result = position; while (toComponentPosition(component, result) < position) { result++; } return result; }
protected int toEventPosition(JTextComponent component, int position) { int result = position; while (toComponentPosition(component, result) < position) { result++; } return result; }