update dev300-m58
[ooovba.git] / odk / examples / java / Inspector / SwingTreePathProvider.java
blob37376c269b42a0fc3e221edacd1bff0a2e771ea3
1 import javax.swing.tree.TreePath;
4 public class SwingTreePathProvider implements XTreePathProvider {
5 TreePath m_aTreePath;
7 /** Creates a new instance of TreePathProvider */
8 public SwingTreePathProvider(TreePath _aTreePath) {
9 m_aTreePath = _aTreePath;
13 public XUnoNode getLastPathComponent(){
14 return (XUnoNode) m_aTreePath.getLastPathComponent();
18 public XUnoNode getPathComponent(int i){
19 return (XUnoNode) m_aTreePath.getPathComponent(i);
22 public int getPathCount(){
23 return m_aTreePath.getPathCount();
27 public XTreePathProvider getParentPath(){
28 return new SwingTreePathProvider(m_aTreePath.getParentPath());
32 public XTreePathProvider pathByAddingChild(XUnoNode _oUnoNode){
33 TreePath aTreePath = m_aTreePath.pathByAddingChild(_oUnoNode);
34 return new SwingTreePathProvider(aTreePath);
37 public TreePath getSwingTreePath(){
38 return m_aTreePath;