1*34dd1e25SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*34dd1e25SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*34dd1e25SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*34dd1e25SAndrew Rist * distributed with this work for additional information 6*34dd1e25SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*34dd1e25SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*34dd1e25SAndrew Rist * "License"); you may not use this file except in compliance 9*34dd1e25SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*34dd1e25SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*34dd1e25SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*34dd1e25SAndrew Rist * software distributed under the License is distributed on an 15*34dd1e25SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*34dd1e25SAndrew Rist * KIND, either express or implied. See the License for the 17*34dd1e25SAndrew Rist * specific language governing permissions and limitations 18*34dd1e25SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*34dd1e25SAndrew Rist *************************************************************/ 21*34dd1e25SAndrew Rist 22*34dd1e25SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir import com.sun.star.reflection.XIdlMethod; 25cdf0e10cSrcweir import com.sun.star.uno.Type; 26cdf0e10cSrcweir import com.sun.star.uno.XComponentContext; 27cdf0e10cSrcweir import javax.swing.tree.DefaultMutableTreeNode; 28cdf0e10cSrcweir 29cdf0e10cSrcweir public class SwingUnoFacetteNode extends SwingUnoNode implements XUnoFacetteNode{ 30cdf0e10cSrcweir String m_sFilter = ""; 31cdf0e10cSrcweir 32cdf0e10cSrcweir /** Creates a new instance of UnoMethodNode */ SwingUnoFacetteNode(Object _oUnoObject)33cdf0e10cSrcweir public SwingUnoFacetteNode(Object _oUnoObject){ 34cdf0e10cSrcweir super(_oUnoObject); 35cdf0e10cSrcweir setFoldable(true); 36cdf0e10cSrcweir } 37cdf0e10cSrcweir 38cdf0e10cSrcweir getFilter()39cdf0e10cSrcweir public String getFilter(){ 40cdf0e10cSrcweir return m_sFilter; 41cdf0e10cSrcweir } 42cdf0e10cSrcweir setFilter(String _sFilter)43cdf0e10cSrcweir public void setFilter(String _sFilter){ 44cdf0e10cSrcweir m_sFilter = _sFilter; 45cdf0e10cSrcweir } 46cdf0e10cSrcweir getName()47cdf0e10cSrcweir public String getName(){ 48cdf0e10cSrcweir return toString(); 49cdf0e10cSrcweir } 50cdf0e10cSrcweir 51cdf0e10cSrcweir // TODO The implementation of the following methods is not really robust and should be changed!!! isMethodNode()52cdf0e10cSrcweir public boolean isMethodNode(){ 53cdf0e10cSrcweir return ((String) getUserObject()).equals(SMETHODDESCRIPTION); 54cdf0e10cSrcweir } 55cdf0e10cSrcweir isPropertyNode()56cdf0e10cSrcweir public boolean isPropertyNode(){ 57cdf0e10cSrcweir String sNodeDescription = (String) getUserObject(); 58cdf0e10cSrcweir return ((sNodeDescription.equals(SPROPERTYDESCRIPTION)) || (sNodeDescription.equals(SPROPERTYINFODESCRIPTION)) || (sNodeDescription.equals(SPROPERTYVALUEDESCRIPTION))); 59cdf0e10cSrcweir } 60cdf0e10cSrcweir isContainerNode()61cdf0e10cSrcweir public boolean isContainerNode(){ 62cdf0e10cSrcweir return ((String) getUserObject()).equals(SCONTAINERDESCRIPTION); 63cdf0e10cSrcweir } 64cdf0e10cSrcweir isServiceNode()65cdf0e10cSrcweir public boolean isServiceNode(){ 66cdf0e10cSrcweir return ((String) getUserObject()).equals(SSERVICEDESCRIPTION); 67cdf0e10cSrcweir } 68cdf0e10cSrcweir isInterfaceNode()69cdf0e10cSrcweir public boolean isInterfaceNode(){ 70cdf0e10cSrcweir return ((String) getUserObject()).equals(SINTERFACEDESCRIPTION); 71cdf0e10cSrcweir } 72cdf0e10cSrcweir } 73cdf0e10cSrcweir 74