You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Piotr Kołaczkowski <pk...@gmail.com> on 2012/03/12 18:58:02 UTC

Disappearing Palettes

Hi,

Maybe I don't get something about Palettes, but they behave strangely.

I open the main Window of class Window.
Then I open a number of Palettes in that Window.
Then I open one Dialog in the Window.
Now when the user closes that Dialog, all the Palettes disappear. When
the Dialog is opened again, the Palettes appear.

How to make them stay open whatever new window / frame / dialog gets open?

And another question - is there a simple way to make the palette title
text use a different, bigger font?

Thanks,
Piotr

Fwd: Disappearing Palettes

Posted by Sandro Martini <sa...@gmail.com>.
Hi all,
just tried (after many time) to run the WindowTest test class from the
trunk, but got a cast exception ... to remove it I had to write the
following patch:

### Eclipse Workspace Patch 1.0
#P wtk
Index: src/org/apache/pivot/wtk/effects/DropShadowDecorator.java
===================================================================
--- src/org/apache/pivot/wtk/effects/DropShadowDecorator.java	(revision 1300090)
+++ src/org/apache/pivot/wtk/effects/DropShadowDecorator.java	(working copy)
@@ -255,7 +255,7 @@
         srcGraphics.dispose();

         int[] dstBuffer = new int[dstWidth * dstHeight];
-        int[] srcBuffer = new int[srcWidth * srcHeight];
+        short[] srcBuffer = new short[srcWidth * srcHeight];

         Raster srcRaster = src.getRaster();
         srcRaster.getDataElements(0, 0, srcWidth, srcHeight, srcBuffer);
@@ -347,7 +347,7 @@
             bufferOffset = x;
             historyIdx = 0;

-            // Compute the blur avera`ge with pixels from the previous pass
+            // Compute the blur average with pixels from the previous pass
             for (int y = 0; y < yStop; y++, bufferOffset += dstWidth) {
                 // Store alpha value + shadow color
                 int a = vSumLookup[aSum];

Please can you confirm that currently this happens even to others (I'm
running in a xp virtualized environment so could be an issue only for
me in this environment) ?
Tell me so I can apply the patch (if it's the case) ...

Bye,
Sandro



---------- Forwarded message ----------
From: Sandro Martini <sa...@gmail.com>
Date: 2012/3/13
Subject: Re: Disappearing Palettes
To: user@pivot.apache.org


Hi Piotr,
from what I can see on Palette:

A tool palette is an auxiliary window whose visibility is tied to its
owner's active state

so the behaviour you see should be right, at least if the owner you
close and reopen is that right :-) ...


Some more info: the related class is Palette under the package
org.apache.pivot.wtk, then there is the related skin class.

Under the Tests subproject you can find WindowTest, a runnable test
application using Palette, could help.


>How to make them stay open whatever new window / frame / dialog gets open?
Have you tried using as parent your main window ? I'm not sure this
can works (could be by design), Greg can say more on this ... but you
can try and tell us as a starting point.


>And another question - is there a simple way to make the palette title text use a different, bigger font?
I have to look inside, but could be a missing feature in its skin,
let's update on this.


Bye

Re: Disappearing Palettes

Posted by Noel Grandin <no...@gmail.com>.
Sounds like a bug to me.

If you can create a simplified test-case, and log it in JIRA, we can 
probably track it down and fix it for you.

-- Noel Grandin

On 2012-03-13 16:21, Piotr Kołaczkowski wrote:
> I understand it is tied to its owner's active state, and it is exactly
> what I'm doing.
> The parent of the palette *is* the main window - it is visible and active.
>
> The window tree is like that:
>
> main window
>    |
>    +--- palette 1
>    +--- palette 2
>    +--- some other frame
>
> When I close the other frame, the palettes disappear. They are *not*
> tied to the other frame.
>
> Thanks,
> Piotr
>
>
> 2012/3/13 Sandro Martini<sa...@gmail.com>:
>> Hi Piotr,
>> from what I can see on Palette:
>>
>> A tool palette is an auxiliary window whose visibility is tied to its
>> owner's active state
>>
>> so the behaviour you see should be right, at least if the owner you
>> close and reopen is that right :-) ...
>>
>>
>> Some more info: the related class is Palette under the package
>> org.apache.pivot.wtk, then there is the related skin class.
>>
>> Under the Tests subproject you can find WindowTest, a runnable test
>> application using Palette, could help.
>>
>>
>>> How to make them stay open whatever new window / frame / dialog gets open?
>> Have you tried using as parent your main window ? I'm not sure this
>> can works (could be by design), Greg can say more on this ... but you
>> can try and tell us as a starting point.
>>
>>
>>> And another question - is there a simple way to make the palette title text use a different, bigger font?
>> I have to look inside, but could be a missing feature in its skin,
>> let's update on this.
>>
>>
>> Bye

Re: Disappearing Palettes

Posted by Piotr Kołaczkowski <pk...@gmail.com>.
I understand it is tied to its owner's active state, and it is exactly
what I'm doing.
The parent of the palette *is* the main window - it is visible and active.

The window tree is like that:

main window
  |
  +--- palette 1
  +--- palette 2
  +--- some other frame

When I close the other frame, the palettes disappear. They are *not*
tied to the other frame.

Thanks,
Piotr


2012/3/13 Sandro Martini <sa...@gmail.com>:
> Hi Piotr,
> from what I can see on Palette:
>
> A tool palette is an auxiliary window whose visibility is tied to its
> owner's active state
>
> so the behaviour you see should be right, at least if the owner you
> close and reopen is that right :-) ...
>
>
> Some more info: the related class is Palette under the package
> org.apache.pivot.wtk, then there is the related skin class.
>
> Under the Tests subproject you can find WindowTest, a runnable test
> application using Palette, could help.
>
>
>>How to make them stay open whatever new window / frame / dialog gets open?
> Have you tried using as parent your main window ? I'm not sure this
> can works (could be by design), Greg can say more on this ... but you
> can try and tell us as a starting point.
>
>
>>And another question - is there a simple way to make the palette title text use a different, bigger font?
> I have to look inside, but could be a missing feature in its skin,
> let's update on this.
>
>
> Bye

Re: Disappearing Palettes

Posted by Sandro Martini <sa...@gmail.com>.
Hi Piotr,
from what I can see on Palette:

A tool palette is an auxiliary window whose visibility is tied to its
owner's active state

so the behaviour you see should be right, at least if the owner you
close and reopen is that right :-) ...


Some more info: the related class is Palette under the package
org.apache.pivot.wtk, then there is the related skin class.

Under the Tests subproject you can find WindowTest, a runnable test
application using Palette, could help.


>How to make them stay open whatever new window / frame / dialog gets open?
Have you tried using as parent your main window ? I'm not sure this
can works (could be by design), Greg can say more on this ... but you
can try and tell us as a starting point.


>And another question - is there a simple way to make the palette title text use a different, bigger font?
I have to look inside, but could be a missing feature in its skin,
let's update on this.


Bye