It is due to the preferred height. Change your NotWork.bxml file from this <filter:GridViewFilter/> to this <filter:GridViewFilter preferredHeight="20"/> and you will see the GridViewFilter
Change the start of your
com.custom.skin.GridViewFilterSkin.paint(Graphics2D) method to show
the width and height that are used when painting
@Override
public void paint(Graphics2D graphics) {
int width = getWidth();
int height = getHeight();
System.out.println(String.format("paint [%d,%d]", width, height));
...
}
You will see that it has a height of 0, so you will not see anything
painted to the screen.
Have a look at the source for TerraTableViewHeaderSkin and how it sets
its preferredWidth & preferredHeight
http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraTableViewHeaderSkin.java
I have attached a modified version of your BXML file to show that the
GridViewFilter will be shown when it has been given a non-zero height.
(Look in the <columnHeader> element)
Chris
On 7 September 2011 17:50, Chris Bartlett <[email protected]> wrote:
> OK, I will have a look and get back to you.
>
> On 7 September 2011 17:42, prophe <[email protected]> wrote:
>> Ok, thank you for your reply.
>>
>> I use pivot eclipse plugin. In archive you'll find code of my custom
>> component ant 2 bxml with working and not working example. I run my
>> application with this two bxml files like a pivot script.
>>
>> Here is my code:
>>
>> http://perdunov.net/pivotforum.rar my code
>>
>> -----
>> Thank you!
>> --
>> View this message in context:
>> http://apache-pivot-users.399431.n3.nabble.com/Custom-TableViewFilter-tp3304078p3316281.html
>> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.
>>
>
NotWork.bxml
Description: Binary data
