Re: How to get all components in the interface.
Timothy Wall <twall <at> users.sf.net>
2012-01-06 13:17:38 GMT
Costello uses a custom AWTHierarchy which filters its own windows from the hierarchy. If you have other
components that you don't want included, use the AWTHierarchy.filter() method to remove them from consideration.
AWTHierarchy.getDefault() simply uses Frame.getFrames() to establish the root(s) of the component hierarchy.
On Jan 6, 2012, at 8:11 AM, xiaokun wrote:
> I know that.
>
> I just wonder how come the AWTHierarchy class know which app I was handling. There must exist some relation
between the getDefault() method and the way of starting the app. Am I right?
>
> so I want to know how to lunch the app properly so that the AWTHierarchy can work well. Of course it is
independent with the editor.
>
> Thank you very much~
>
> Sean
>
> 在 2012年1月6日 下午8:57,Timothy Wall <twall <at> users.sf.net>写道:
> you must launch the application, or the hierarchy will never be created.
>
> you can use the AWTHierarchy class independently of the script editor.
>
> you can also launch the app from a console, then type control-shift-F1 and the hierarchy will be dumped to
the console output.
>
> On Jan 6, 2012, at 7:39 AM, xiaokun wrote:
>
>> So, that means I must lunch the application with the 'costello' ( the method used? ). And then the
AWTHierarchy will get the hierarchy of the application which running in the visual costello?
>>
>> 在 2012年1月6日 下午6:53,Timothy Wall <twall <at> users.sf.net>写道:
>> The default hierarchy walker provided by AWTHierarchy.getDefault() will provide you with the means to
find all reachable components (that's what is used to display the hierarchy tree in the script editor).
>>
>> It's still up to you to place the components found into a structure appropriate for your task.
>>
>> On Jan 6, 2012, at 4:44 AM, Gerard Davison wrote:
>>
>>>
>>> Well,
>>>
>>> You could try AWTHierarchy.getDefault()
(http://abbot.sourceforge.net/doc/api/abbot/finder/AWTHierarchy.html) to get hold of the roots;
but that would only tell you about the components abbot has seen. Or you could use
java.awt.Frame.getFrames() and then call getComponents/getRootPane on the child elements as required.
>>>
>>> Gerard
>>>
>>>
>>>
>>> On 6 Jan 2012, at 07:48, xiaokun wrote:
>>>
>>>> Hi all,
>>>>
>>>> I want to get all the components (or the hierarchy? what the hierarchy really is? Is it a tree? ) in a view ,
and then store them in a tree or even a forest. I have read the abbot source code. But it is too complicated for
me, and I still can't figure it out.
>>>>
>>>> Now we have the runnable jar application and its main class. So how can I get what i want.?
>>>>
>>>> I really need ur help.
>>>>
>>>> Best Regards,
>>>> Sean
>>>> ------------------------------------------------------------------------------
>>>> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
>>>> infrastructure or vast IT resources to deliver seamless, secure access to
>>>> virtual desktops. With this all-in-one solution, easily deploy virtual
>>>> desktops for less than the cost of PCs and save 60% on VDI infrastructure
>>>> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox_______________________________________________
>>>> abbot-users mailing list
>>>> abbot-users <at> lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/abbot-users
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
>>> infrastructure or vast IT resources to deliver seamless, secure access to
>>> virtual desktops. With this all-in-one solution, easily deploy virtual
>>> desktops for less than the cost of PCs and save 60% on VDI infrastructure
>>> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
>>> _______________________________________________
>>> abbot-users mailing list
>>> abbot-users <at> lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/abbot-users
>>
>>
>
>
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
abbot-users mailing list
abbot-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/abbot-users