摘要 |
An apparatus and method for obtaining a string representation of objects in a displayed hierarchical structure are provided. With the apparatus and method, a list having separators may be converted into a path equivalent for a specified hierarchical structure. In order to convert the separated list into a textual representation for an object in a hierarchical structure, an input string having separators is received and the cell renderer for a hierarchical structure is identified. Comparisons between portions of the separated list are compared to string representations for objects in the hierarchical structure in order to identify matches and ultimately, a path in the hierarchical structure corresponding to the separated list. The string representations for the objects are obtained by identifying the cell renderer component that is used to paint the object on a display and determining if the cell renderer component has predetermined methods used to obtain text for display. If so, these methods are used to obtain the string. Otherwise, if there are no predetermined methods, a check is made as to whether the object is a container and, if so, the objects within the container are checked for ones in which methods for painting text are found.
|