Binding a javabeans property to JPanel.visible

View: New views
4 Messages — Rating Filter:   Alert me  

Binding a javabeans property to JPanel.visible

by janneefef :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No answers to previous question, I will try to form it better.

I'm trying to bind my bean's boolean property MyBean.someBoolean to a JPanel visibility. Trying this with beansbinding and Netbeans.

I can bind this nicely if I write the binding by hand:

public EditForm() {
        initComponents();
        bindingGroup2 = new org.jdesktop.beansbinding.BindingGroup();
        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding
                (org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE,
                myBean,
                org.jdesktop.beansbinding.ELProperty.create("${someBoolean}"),
                jPanel1,
                org.jdesktop.beansbinding.BeanProperty.create("visible"));

Now when I change someBoolean, panel is shown and hidden like it should be.

If I try to create this binding with Matisse, right click on the jPanel + "bind" gives only options background/border/foreground. Not visible like I'm looking for. This selection seems a bit random, where is it defined?

If I open the JPanel in properties -window, I have many more properties under "Binding" tab. There's stuff like maximumSize, focusable, autoscrolls etc under "Preferred", "Observable" and "Non-observable". But once again, visible is missing. 

Re: Binding a javabeans property to JPanel.visible

by Fabrizio Giudici :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

janne mattila wrote:
> No answers to previous question, I will try to form it better.
>
The question was already clear, and I've forwarded it to the right
target. But I don't have yet any response, so far. Stay tuned.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@... - mobile: +39 348.150.6941


Re: Binding a javabeans property to JPanel.visible

by janneefef :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Any news on this? I am curious to what determines the bindable properties in Netbeans. Is it some hardcoded list inside Netbeans code, or can I do something to make it possible to bind to MyExoticCustomSwingComponent.myExoticCustomProperty with Matisse?

On Fri, Jul 3, 2009 at 2:28 PM, Fabrizio Giudici <fabrizio.giudici@...> wrote:
janne mattila wrote:
No answers to previous question, I will try to form it better.

The question was already clear, and I've forwarded it to the right target. But I don't have yet any response, so far. Stay tuned.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@... - mobile: +39 348.150.6941



Re: Binding a javabeans property to JPanel.visible

by Fabrizio Giudici :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

janne mattila wrote:
> Any news on this? I am curious to what determines the bindable
> properties in Netbeans. Is it some hardcoded list inside Netbeans
> code, or can I do something to make it possible to bind to
> MyExoticCustomSwingComponent.myExoticCustomProperty with Matisse?
For the record, I've asked but I didn't receive so far an answer.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@... - mobile: +39 348.150.6941