benjamin84 / fest

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

Add support for extension #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have a GUI that uses a lot of Jide GUI components, some of which do
not fit under the standard Swing types provided by the FrameFixture or
the ComponentFixture (like button, textBox, comboBox, etc...).

One of these components is combo box like component that extends
JComponent, but behaves a lot like a normal Swing ComboBox from the
API perspective. It is not possible to obtain this component using the
standard FEST approach of;
frameFixture.comboBox("comboBox");

We extended the FrameFixture and implemented new methods to obtain one
of these Jide combo boxes, but we would like to be able to do so at
the ComponentFixture level as well. I have looked into the code and
cannot see a straight forward way to plug in a custom ComponentFixture
like we have with the FrameFixture (which we create explicitly).

Is there any easy way to add methods to a ComponentFixture (or another
class) to provide nice getter methods for these custom GUI components? 

Original issue reported on code.google.com by Alex.Rui...@gmail.com on 31 Jan 2008 at 4:10

GoogleCodeExporter commented 9 years ago

Original comment by Alex.Rui...@gmail.com on 18 Jun 2008 at 10:27

GoogleCodeExporter commented 9 years ago
+1 on adding support for extensions!

I created a FEST-Swing "hack" to test Piccolo2D, which has a custom scene-graph 
that
is rendered outside of Swing:
http://code.google.com/p/piccolo2d/

It works great; the only caveat is that I had to modify ComponentFixture in 
order to
plug it in, because the PCanvas Swing element that encapsulates the scene-graph 
can
appear under any container.

If you make some progress on this in the trunk and want some help validating the
design, I would be glad to take an early swag at converting my "hack" to a real
"extension".

Original comment by steveonjava on 30 Jul 2008 at 7:48

GoogleCodeExporter commented 9 years ago
Added class org.fest.swing.core.ComponentFixtureExtension to add extension 
methods to
ContainerFixture.

Original comment by Alex.Rui...@gmail.com on 14 Sep 2008 at 4:57

GoogleCodeExporter commented 9 years ago
I'll be updating the documentation shortly. On the meantime, please take a look 
at
http://code.google.com/p/fest/source/browse/trunk/fest/fest-swing/src/test/java/
org/fest/swing/core/ExtensionTest.java

ExtensionTest shows how the extension mechanism works.

Original comment by Alex.Rui...@gmail.com on 14 Sep 2008 at 4:59

GoogleCodeExporter commented 9 years ago
Oops! I meant org.fest.swing.fixture.ComponentFixtureExtension :)

Original comment by Alex.Rui...@gmail.com on 14 Sep 2008 at 5:19

GoogleCodeExporter commented 9 years ago
Documentation can be found at
http://fest.easytesting.org/swing/wiki/pmwiki.php?n=FEST-Swing.Extending

Original comment by Alex.Rui...@gmail.com on 14 Oct 2008 at 11:17

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 1:50