Eliale / seaglass

Automatically exported from code.google.com/p/seaglass
0 stars 0 forks source link

Problem of CUF Framework while working with seaglass #76

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
While trying to integrate seaglass into a project working with CUF 
(http://cuf.sourceforge.net/) library I became the following error

Caused by: java.lang.IllegalArgumentException: name 
Frame/FramePanel/tabbedPane/TabbedPaneTabArea.button contained twice in parent, 
XML Element backtrace:
xml2swing (id unknown)
    visual (id unknown)
        frame (id=Frame)
            any (id=FramePanel) (...)

It's either a bug of CUF or seaglass, but these two libraries have a problem 
working together. Reason is, that CUF builds itself a tree-like structure 
containing names of the used widgets. The used names must be unique in the tree 
node.

I have made a small change in the SeaGlassTabbedPaneUI.createScrollButton 
Operation and added the direction variable to the buttons name:

    /**
     * @see javax.swing.plaf.basic.BasicTabbedPaneUI#createScrollButton(int)
     */
    @Override
    protected JButton createScrollButton(final int direction) {
        SynthScrollableTabButton b = new SynthScrollableTabButton(direction);

        b.setName("TabbedPaneTabArea.button" + direction); // <- HERE

        return b;
    }

After building the jar all problems were gone.

like I sad, it's not really a bug in seaglass, but such a small change would 
help me and other CUF based projects a lot. :)

Regards,

Marek Puchalski

Original issue reported on code.google.com by marp...@gmail.com on 26 May 2011 at 10:14

GoogleCodeExporter commented 8 years ago
Yes, that looks reasonable. Thanks!

I'll incorporate something like that into the next release.

Original comment by kahuxtable on 26 May 2011 at 12:04

GoogleCodeExporter commented 8 years ago
Hi,
I integrated this into the integraton_rossi branch that is only available in 
the source code repository.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 30 Jun 2011 at 9:59

GoogleCodeExporter commented 8 years ago
This issue is fixed in sealglass 0.2 that we just have released.
Please give this new version a try.

Have fun,
- Rossi

Original comment by rosstaus...@googlemail.com on 25 Jun 2012 at 8:50