Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java editres

19 views
Skip to first unread message

FredK

unread,
Jul 27, 2012, 5:03:56 PM7/27/12
to
Is there a java equivalent of the Xt editres program (displays a tree of all of the GUI components of a program, allows editing resource values, flashes selected components, etc.) ?

markspace

unread,
Jul 27, 2012, 6:49:57 PM7/27/12
to
I did a quick Google for "Xt editres" and I think I know what you are
talking about, though I've never used the program myself.

Short answer is no I don't, sorry. However here's some links that might
help you.

<http://www.jasperpotts.com/blog/2008/08/nimbus-uimanager-uidefaults/>

<http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/>

<http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/NimbusLookandFeel_OBE2012/CustomizingLandF.html>


Can you tell use what you'd like to use this for? Since I'm really
unfamiliar with Xt editers, I can't really guess. I think it might not
be too hard to come up with something similar.


John B. Matthews

unread,
Jul 27, 2012, 8:58:25 PM7/27/12
to
In article <e79f4e37-8c43-43f8...@googlegroups.com>,
There are some ideas here:

<http://stackoverflow.com/q/8302143/230513>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

markspace

unread,
Jul 27, 2012, 9:51:53 PM7/27/12
to
On 7/27/2012 5:58 PM, John B. Matthews wrote:
> In article <e79f4e37-8c43-43f8...@googlegroups.com>,
> FredK <fred.l.kl...@gmail.com> wrote:
>
>> Is there a java equivalent of the Xt editres program (displays a tree
>> of all of the GUI components of a program, allows editing resource
>> values, flashes selected components, etc.) ?
>
> There are some ideas here:
>
> <http://stackoverflow.com/q/8302143/230513>
>


If he's talking about just live components, and not default resources
(and he may mean both), I think I've seen someone use the WindowToolKit
(sp?) to do this. Set a window created listener. Each new top level
window created then fires your listener. You can then add each window
to a hash map or something, and iterate over its component tree when needed.

I'm not sure still if the OP means *programatically*, or if he's looking
for an external tool like a debugger to do this, because I don't know
his Xt program well (or at all, even).


markspace

unread,
Jul 27, 2012, 9:54:35 PM7/27/12
to
On 7/27/2012 5:58 PM, John B. Matthews wrote:
> In article <e79f4e37-8c43-43f8...@googlegroups.com>,
> FredK <fred.l.kl...@gmail.com> wrote:
>
>> Is there a java equivalent of the Xt editres program (displays a tree
>> of all of the GUI components of a program, allows editing resource
>> values, flashes selected components, etc.) ?
>
> There are some ideas here:
>
> <http://stackoverflow.com/q/8302143/230513>
>


Cool new thing I learned from that link: control+shift+F1

<http://www.oracle.com/technetwork/java/javase/awt-138016.html>


Daniele Futtorovic

unread,
Jul 27, 2012, 9:56:00 PM7/27/12
to
On 28/07/2012 03:54, markspace allegedly wrote:
> Cool new thing I learned from that link: control+shift+F1
>
> <http://www.oracle.com/technetwork/java/javase/awt-138016.html>

Great link overall. Thanks!

--
DF.

John B. Matthews

unread,
Jul 28, 2012, 2:19:02 AM7/28/12
to
In article <juvgos$lej$2...@dont-email.me>, markspace <-@.> wrote:

> > <http://stackoverflow.com/q/8302143/230513>
> >
> Cool new thing I learned from that link: control+shift+F1
>
> <http://www.oracle.com/technetwork/java/javase/awt-138016.html>

Bonanza! Thank you.

Hans Castorp

unread,
Jul 28, 2012, 2:51:53 AM7/28/12
to
You might want to look at the NetBeans GUI designer for creating the components.

There is also a Swing debugger built into the new (7.2) version that lets you "debug" the component hierarchy of a running Swing application.

markspace

unread,
Jul 28, 2012, 3:33:03 AM7/28/12
to
Really? Where at? I just checked and didn't see one.


Hans Castorp

unread,
Jul 28, 2012, 3:57:13 AM7/28/12
to

markspace wrote on 28.07.2012 09:33:
>> There is also a Swing debugger built into the new (7.2) version that
>> lets you "debug" the component hierarchy of a running Swing application.
>>
>
> Really? Where at? I just checked and didn't see one.

See here

http://netbeans.org/kb/docs/java/debug-visual.html

markspace

unread,
Jul 28, 2012, 11:24:20 AM7/28/12
to
On 7/28/2012 12:57 AM, Hans Castorp wrote:
>
> http://netbeans.org/kb/docs/java/debug-visual.html
>


Ah, under the Debug menu. I was looking under Windows->Debug, thinking
perhaps I needed to open some sort of inspector. Thanks for pointing
that out!


FredK

unread,
Jul 30, 2012, 10:42:53 AM7/30/12
to
On Saturday, July 28, 2012 8:24:20 AM UTC-7, markspace wrote:
> On 7/28/2012 12:57 AM, Hans Castorp wrote: > > http://netbeans.org/kb/docs/java/debug-visual.html > Ah, under the Debug menu. I was looking under Windows->Debug, thinking perhaps I needed to open some sort of inspector. Thanks for pointing that out!

One thing I use it for is to examine the widget hierarchy.
Editres presents a tree of the widgets in your application;
you can then click on an item in the tree and editres will
place a flashing box over the widget in the app for several
seconds. Quite useful for debugging errors in placing, sizing,
or organizing the widgets on the screen. You can also do the
inverse - click on a component in your application and the
corresponding item in the editres tree gets highlighted.

You can also edit resources - select a specific component,
then you can alter the colors (fg, bg, hilights, etc), font,
font size, alignments, margins, or any other specifiable
resource, while executing the program. A great help in
choosing what default values to use to make a better visual
experience for your users.

markspace

unread,
Jul 30, 2012, 3:11:16 PM7/30/12
to
On 7/30/2012 7:42 AM, FredK wrote:

> seconds. Quite useful for debugging errors in placing, sizing,
> or organizing the widgets on the screen.


This is much better done with Matisse. Trying to do this in a debugger
sounds painful and slow.

<http://netbeans.org/features/java/swing.html>


> You can also edit resources - select a specific component,
> then you can alter the colors (fg, bg, hilights, etc), font,
> font size, alignments, margins, or any other specifiable


Again, use Matisse, or one of the several existing Look and Feel classes.

<http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html>

0 new messages