/** * Expand this tree row. * If tree is inside a {@link SScrollPane} try to * adjust pane, so that as much as possible new * nodes are visible. * @param p the TreePath to expand * @deprecated This method is deprecated and should not be used because * expandPath(TreePath) is the proper method with the same functionality. */ @Deprecated public void expandRow(TreePath p) { expandPath(p); }
public void expandRow(int row) { expandPath(getPathForRow(row)); }
@Override public void dropStay(SComponent source, SComponent target, int action, SMouseEvent event) { if(!(target instanceof STree)) return; if (event == null || event.getPoint() == null || event.getPoint().getCoordinates() == null) { return; } String[] coords = event.getPoint().getCoordinates().split(":"); int row = Integer.parseInt(coords[0]); STree tree = (STree)target; TreePath path = tree.getPathForRow(row); if(path != null && !tree.isExpanded(path)) { tree.expandPath(path); } }