Board index » jbuilder » Can inspector be configured to includ setFocusable?

Can inspector be configured to includ setFocusable?


2005-01-06 02:31:44 AM
jbuilder12
setFocusable is an important property but the inspector doesn't show it.
Can the inspector be configured to show setFocusable?
I find that if I manually call setFocusable for some components, the
property is then shown by the inspector. However, the inspector seems to
assume the default is false, not true, so I can't distinguish between
the components where I've explicitly set it false and those where I
haven't done anything, so it's useless.
John
 
 

Re:Can inspector be configured to includ setFocusable?

John T. Dow wrote:
Quote
setFocusable is an important property but the inspector doesn't show it.

Can the inspector be configured to show setFocusable?

I find that if I manually call setFocusable for some components, the
property is then shown by the inspector. However, the inspector seems to
assume the default is false, not true, so I can't distinguish between
the components where I've explicitly set it false and those where I
haven't done anything, so it's useless.

John

Invoke the context menu for the properties pane in the designer
(right-click). Set your properties exposure level to "Expert".
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:Can inspector be configured to includ setFocusable?

Lori
We must be using different versions of JBuilder. I have X Enterprise.
I don't think that works.
I did the following. Exit from JBuilder and user a programmer's text
editor to change all setFocusable to setxfocusable, then restarted
JBuiler. With no setFocusable calls anyplace in the project, focusable
did not appear in the inspector, whether regular, expert, or hidden.
I then exited from JBuilder, fixed setxfocusable to be setFocusable
again in all source fiels, and restarted JBuilder. Now, regardless of
whether it's regular, expert, or hidden, focusable appears in the inspector.
You'd think I'd be happy because it's there. I'm not, because it shows
"false" for every component where it's not set, yet the default should
be "true". So unless I explicitly set hundreds of components to the
default value of true, I can't tell whether I've explicitly set any of
them to false.
From my understanding of focus, I really need to use setFocusable to
get the control I need. Maybe I'm wrong about that. Otherwise, why don't
others complain about the inspector???
Puzzled.
John
Lori M Olson [TeamB] wrote:
Quote
John T. Dow wrote:

>setFocusable is an important property but the inspector doesn't show it.
>
>Can the inspector be configured to show setFocusable?
>
>I find that if I manually call setFocusable for some components, the
>property is then shown by the inspector. However, the inspector seems
>to assume the default is false, not true, so I can't distinguish
>between the components where I've explicitly set it false and those
>where I haven't done anything, so it's useless.
>
>John
>

Invoke the context menu for the properties pane in the designer
(right-click). Set your properties exposure level to "Expert".

 

{smallsort}

Re:Can inspector be configured to includ setFocusable?

On 1/5/2005 at 1:31:44 PM, John T. Dow wrote:
Quote
setFocusable ... the inspector doesn't show it.
It looks to me as if the setFocusable property is not included in the
BeanInfo classes that JBuilder provides for all of the standard Swing
components. It would be a good idea to submit a bug report for this on
QualityCentral.
Quote
setFocusable is an important property
I don't think you should need to set this property for most components.
The default value should be appropriate under most circumstances. It is
generally defaults to true, but some components will not accept the focus
for other reasons.
So the only times you should need to set it is if you have a component
that normally will accept focus, but you want to prevent that. And in
those cases, disabling the component is often the right thing to do.
What components are you setting the Focusable property for?
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
www.JPMcGrath.net/newsgroups/e-mail.html
 

Re:Can inspector be configured to includ setFocusable?

John
Thank you for that suggestion.
I was using setFocusable because documentation led me to believe that is
the standard way to prevent focus from going to a component. (The
documentation says components can receive focus if they are visible,
displayable, enabled, and focusable. The first two obviously aren't
available to me to control focus for components that are to be visible
and displayed.) The components I set to not be focusable are:
buttons
jdbtextfields
jdbtextareas
The textfields and textareas have data that the user cannot set
directly, they are only set programmatically. A little experimentation
suggests that setEnabled will do the job for them. That is a useful
workaround for the setfocusable ide problem. Even though a field or area
is not enabled, it remains data aware, which is what I want.
Various buttons on our frames should only be accessed with the mouse,
not the keyboard. That's why they should not be focusable. If a button
is set to not be enabled, you can't click it (no surprise). I want it to
be enabled but not to receive keyboard focus. Only setFocusable will do
that, I believe.
John Dow
John McGrath [TeamB] wrote:
Quote
On 1/5/2005 at 1:31:44 PM, John T. Dow wrote:


>setFocusable ... the inspector doesn't show it.


It looks to me as if the setFocusable property is not included in the
BeanInfo classes that JBuilder provides for all of the standard Swing
components. It would be a good idea to submit a bug report for this on
QualityCentral.


>setFocusable is an important property


I don't think you should need to set this property for most components.
The default value should be appropriate under most circumstances. It is
generally defaults to true, but some components will not accept the focus
for other reasons.

So the only times you should need to set it is if you have a component
that normally will accept focus, but you want to prevent that. And in
those cases, disabling the component is often the right thing to do.

What components are you setting the Focusable property for?