You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Pavan Vadavalli <pa...@gmail.com> on 2011/03/09 09:55:32 UTC

MDI Kind of implementation simulating JDesktopPane

Hi,

I am looking for help related to create a MDI related Application using
Pivot.

I wasnt able to figure about a container  like  JDesktopPane that manages
the Forms or Frames that can be added and can be iconified and closed.

Can some one point me to some tutorials/demos that achieve .
Thanks and Regards,
Pavan

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Pavan Vadavalli <pa...@gmail.com>.
Thanks alot for all the inputs. I will start working on this from tomorrow
and will let you know the results.
Thanks and Regards,
Pavan

On Wed, Mar 23, 2011 at 12:26 AM, Chris Bartlett <cb...@gmail.com>wrote:

> On 22 March 2011 19:55, Greg Brown <gk...@verizon.net> wrote:
>
>>  2. How can i create a generic container kind of environment that can hold
>>> all the Frames that i can add at runtime and manage the window
>>> events,especially considering that in general the containers in Pivot is not
>>> designed to add Windows.
>>>
>> You would still just open Frames as normal, but would specify that your
>> 'main display' Window is the parent, rather than the Display.
>>
>>
>> Note that the "main display" should be the frame's *owner*, not parent.
>> The Display is always a window's parent. However, it's owner always remains
>> below it in the z-order.
>>
>> Oops.  That is what I meant, good catch.
>
>
>> Now that I think about it, one challenge with this solution is that
>> maximized windows should not overlap the task bar. The easiest way to do
>> this would be to provide a custom display skin that is aware of the presence
>> of the task bar window. It is not currently possible to replace the display
>> skin, though at the moment I can't remember the reason for that - it seems
>> like it should be possible.
>>
> I quickly prototyped a custom Frame skin that handled the maximized
> resizing because Display was final, and wondered if Display does really need
> to be final.
>
> Applying a general caveat to Pivot classes whereby if a user extends them,
> they are responsible for the changes seems fair to me.  Users might be free
> to extend Display but would be reminded that the class has not necessarily
> been designed *for* extension, and therefore there are no guarantees.
>
> Chris
>

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Chris Bartlett <cb...@gmail.com>.
On 22 March 2011 19:55, Greg Brown <gk...@verizon.net> wrote:

> 2. How can i create a generic container kind of environment that can hold
>> all the Frames that i can add at runtime and manage the window
>> events,especially considering that in general the containers in Pivot is not
>> designed to add Windows.
>>
> You would still just open Frames as normal, but would specify that your
> 'main display' Window is the parent, rather than the Display.
>
>
> Note that the "main display" should be the frame's *owner*, not parent. The
> Display is always a window's parent. However, it's owner always remains
> below it in the z-order.
>
> Oops.  That is what I meant, good catch.


> Now that I think about it, one challenge with this solution is that
> maximized windows should not overlap the task bar. The easiest way to do
> this would be to provide a custom display skin that is aware of the presence
> of the task bar window. It is not currently possible to replace the display
> skin, though at the moment I can't remember the reason for that - it seems
> like it should be possible.
>
I quickly prototyped a custom Frame skin that handled the maximized resizing
because Display was final, and wondered if Display does really need to be
final.

Applying a general caveat to Pivot classes whereby if a user extends them,
they are responsible for the changes seems fair to me.  Users might be free
to extend Display but would be reminded that the class has not necessarily
been designed *for* extension, and therefore there are no guarantees.

Chris

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Greg Brown <gk...@verizon.net>.
> 2. How can i create a generic container kind of environment that can hold all the Frames that i can add at runtime and manage the window events,especially considering that in general the containers in Pivot is not designed to add Windows.
> You would still just open Frames as normal, but would specify that your 'main display' Window is the parent, rather than the Display.

Note that the "main display" should be the frame's *owner*, not parent. The Display is always a window's parent. However, it's owner always remains below it in the z-order.

Now that I think about it, one challenge with this solution is that maximized windows should not overlap the task bar. The easiest way to do this would be to provide a custom display skin that is aware of the presence of the task bar window. It is not currently possible to replace the display skin, though at the moment I can't remember the reason for that - it seems like it should be possible.



Re: MDI Kind of implementation simulating JDesktopPane

Posted by Chris Bartlett <cb...@gmail.com>.
On 20 March 2011 16:58, Pavan Vadavalli <pa...@gmail.com> wrote:

> Main issues concerning for me .
> 1. How to Create this fixed length divided partitions to the main area.
>
As Greg mentioned, you would probably create two Windows ('main display'
&'taskbar'), each of which are as wide as the Display, and positioned as you
need.  Then add a resize listener to the Display so that when its size
changes you can recalculate how to size the windows.
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/ComponentListener.html

Pivot Sheets position themselves this way, so perhaps take a look at the
following skin class.
http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/TerraSheetSkin.java

You might also want to look at the source code for other layout containers
to see how they allocate space.
http://pivot.apache.org/tutorials/layout-containers.html
http://svn.apache.org/repos/asf/pivot/trunk/wtk-terra/src/org/apache/pivot/wtk/skin/terra/

See the MenuBar tutorial for an example of how to put a menu into a Window.
http://pivot.apache.org/tutorials/menu-bars.html


2. How can i create a generic container kind of environment that can hold
> all the Frames that i can add at runtime and manage the window
> events,especially considering that in general the containers in Pivot is not
> designed to add Windows.
>
You would still just open Frames as normal, but would specify that your
'main display' Window is the parent, rather than the Display.

You could track these Frames manually by adding them to a list when you open
them, and removing them when they close (via a WindowStateListener).
 Another option would be to listen for new Frames that are attached to your
'main display' window (via ContainerListener). Yet another option might be
to use the 'main display' Window itself as the model via its internal
ownedWindows list (getOwnedWindow, getOwnedWindowCount).
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Window.html#getOwnedWindow(int)
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/ContainerListener.html


When you have a list of the Windows you wish to display in your 'taskbar',
you can use to populate a FlowPane or BoxPane. The components used to
represent the Frames might simply be PushButtons with a custom renderer that
will show the icon from the Frame, along with its title text.  If you do use
PushButtons, they might have their 'toggleButton' property set to true, and
be part of a ButtonGroup so that only one will ever show as pressed.  (The
'buttonData' property of the button would probably be a reference to the
actual Frame that it represents on the taskbar) Adding a ButtonPressListener
to the PushButtons would allow you to set the active Window corresponding to
the pressed button.

http://pivot.apache.org/tutorials/push-buttons.html
http://pivot.apache.org/tutorials/toggle-buttons.html
http://pivot.apache.org/tutorials/windows.html
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/PushButton.html
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/ButtonGroup.html
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/ButtonPressListener.html
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/Window.html#requestActive()
http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/ContainerListener.html

You might also want to extend Window and/or Frame to create a custom class
or skin which behaves exactly how you need.  For instance, a maximized
Window will size to fit the Display, but you might not want it to cover your
'task bar'.  Also, clicking on the PushButton (or however you choose to
represent your Frames on the task bar) may result in the relevant window
being hidden (if it is already active), made active or some other custom
action.

Chris

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Pavan Vadavalli <pa...@gmail.com>.
Hi Chris,
Thanks for Prompt response.

I would like to a Multiple Document Interface Kind of interface with a
Parent Window divided into three parts.
1. Menu Bar
2. Main Display area
3. Task bar .
The Main display area can hold many Frames whihc has Minimize button and
minimize button press would iconify the window to task bar and click on this
icon would put the window back onto the display area.

Main issues concerning for me .
1. How to Create this fixed length divided partitions to the main area.
2. How can i create a generic container kind of environment that can hold
all the Frames that i can add at runtime and manage the window
events,especially considering that in general the containers in Pivot is not
designed to add Windows.

I believe above requires me to extend existing classes of pivo for achieving
the above functionality.
I need your guidence here to know at a high level  of the classes involved
and  extension points in them so that i can finish this as per Pivot coding
and Development standards.

THanks and Ragards,
Pavan




On Sun, Mar 20, 2011 at 8:24 PM, Chris Bartlett <cb...@gmail.com>wrote:

> Pavan,
>
> Could you please try to explain what you are struggling with?  Perhaps list
> your requirements as a few short sentences and explain what you *can* do and
> what you have been unable to do.
>
> Did you get a 'task bar' working?
> Are you able to open, close, minimise, maximise and activate windows on
> your 'desktop'?
>
> Chris
>
> On 20 March 2011 04:23, Pavan Vadavalli <pa...@gmail.com> wrote:
>
>> Hi,
>> its been little struggling to come up with this extension implementation
>> and i need this as part of Core functionality.
>> Can you please provide some wokring functionality that i can extend and
>> continue to give a complete shape for this.
>> Thanks,
>> Pavan
>> On Tue, Mar 15, 2011 at 12:23 AM, Greg Brown <gk...@verizon.net>wrote:
>>
>>> You can't add a Window to another container. However, when you call
>>> open() on a window, it is internally added to the display. You could create
>>> a "special" window representing the task bar that listens for add and remove
>>> events on the display so you know when windows are opened or closed. You'll
>>> also probably want to listen for size changes on the display so you can
>>> reposition the task bar. This is similar to how the task bar was implemented
>>> in earlier versions of Windows (not sure how it works now though).
>>>
>>> Finally, you'll probably want some way to determine which windows should
>>> appear in the task bar (e.g. top-level frames, but not menu popups or
>>> tooltips). For example, in my prototype I decided that only root windows
>>> (those that have no owner) would appear in the task bar.
>>>
>>> Hope this helps,
>>> G
>>>
>>>   On Mar 14, 2011, at 3:22 AM, Pavan Vadavalli wrote:
>>>
>>>  Hi
>>>
>>> Trying to accomplish the below
>>>
>>> Have enabled the minimize button from FramTerraSkin
>>> Tried to create Mainwindow by adding Table with one Column and
>>> fundamentally two rows,
>>> Added a Panel to the Row and tried to add a Frame to this Panel
>>> This is throwing below Error
>>>
>>> java.lang.IllegalArgumentException: Window parent must be null or
>>> display, cannot be org.apache.pivot.wtk.TablePane
>>>     at org.apache.pivot.wtk.Window.setParent(Window.java:460)
>>>     at org.apache.pivot.wtk.Container.insert(Container.java:151)
>>>     at org.apache.pivot.wtk.Container.add(Container.java:131)
>>>     at
>>> org.apache.pivot.wtk.TablePane$RowSequence.insert(TablePane.java:469)
>>>     at org.apache.pivot.wtk.TablePane$RowSequence.add(TablePane.java:448)
>>>
>>> I guess Since Frame is itslef a Window this is no supported.
>>>
>>> Basically i want to add multiple Frames to the main Window and at the
>>> Bottom Task Bar to manage the Navigation of these windows ( Minmize,
>>> maximize)
>>>
>>> Can you help me out what is going wrong here.
>>> Attached is the BXML
>>>
>>>
>>> On Wed, Mar 9, 2011 at 11:17 PM, Greg Brown <gk...@verizon.net>wrote:
>>>
>>>> That's correct - I actually started prototyping something like this a
>>>> while back, but I never finished it.
>>>>
>>>>  On Mar 9, 2011, at 6:33 AM, Chris Bartlett wrote:
>>>>
>>>>  Pavan,
>>>>
>>>> See this thread
>>>>
>>>> http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html
>>>>
>>>> Currently, if you minimize a Pivot Frame it will disappear from the
>>>> Display, much as it would if you called myFrame.setVisible(false).
>>>>
>>>> If you want to show the minimized frames somewhere you will have to do
>>>> that yourself.
>>>>
>>>> For instance to emulate the MS Windows Taskbar you could maybe have a
>>>> FlowPane or TablePane at the bottom of the Display, and populate it with
>>>> instances of a custom Component that renderers part of the Frame's title.
>>>>
>>>> If I have some time later today I will try to knock up a quick example
>>>> and post here.
>>>>
>>>> Chris
>>>>
>>>> On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am looking for help related to create a MDI related Application using
>>>>> Pivot.
>>>>>
>>>>> I wasnt able to figure about a container  like  JDesktopPane that
>>>>> manages the Forms or Frames that can be added and can be iconified and
>>>>> closed.
>>>>>
>>>>> Can some one point me to some tutorials/demos that achieve .
>>>>> Thanks and Regards,
>>>>> Pavan
>>>>>
>>>>>
>>>>
>>>>
>>> <MainWindow.bxml>
>>>
>>>
>>>
>>
>

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Chris Bartlett <cb...@gmail.com>.
Pavan,

Could you please try to explain what you are struggling with?  Perhaps list
your requirements as a few short sentences and explain what you *can* do and
what you have been unable to do.

Did you get a 'task bar' working?
Are you able to open, close, minimise, maximise and activate windows on your
'desktop'?

Chris

On 20 March 2011 04:23, Pavan Vadavalli <pa...@gmail.com> wrote:

> Hi,
> its been little struggling to come up with this extension implementation
> and i need this as part of Core functionality.
> Can you please provide some wokring functionality that i can extend and
> continue to give a complete shape for this.
> Thanks,
> Pavan
> On Tue, Mar 15, 2011 at 12:23 AM, Greg Brown <gk...@verizon.net> wrote:
>
>> You can't add a Window to another container. However, when you call open()
>> on a window, it is internally added to the display. You could create a
>> "special" window representing the task bar that listens for add and remove
>> events on the display so you know when windows are opened or closed. You'll
>> also probably want to listen for size changes on the display so you can
>> reposition the task bar. This is similar to how the task bar was implemented
>> in earlier versions of Windows (not sure how it works now though).
>>
>> Finally, you'll probably want some way to determine which windows should
>> appear in the task bar (e.g. top-level frames, but not menu popups or
>> tooltips). For example, in my prototype I decided that only root windows
>> (those that have no owner) would appear in the task bar.
>>
>> Hope this helps,
>> G
>>
>>   On Mar 14, 2011, at 3:22 AM, Pavan Vadavalli wrote:
>>
>>  Hi
>>
>> Trying to accomplish the below
>>
>> Have enabled the minimize button from FramTerraSkin
>> Tried to create Mainwindow by adding Table with one Column and
>> fundamentally two rows,
>> Added a Panel to the Row and tried to add a Frame to this Panel
>> This is throwing below Error
>>
>> java.lang.IllegalArgumentException: Window parent must be null or display,
>> cannot be org.apache.pivot.wtk.TablePane
>>     at org.apache.pivot.wtk.Window.setParent(Window.java:460)
>>     at org.apache.pivot.wtk.Container.insert(Container.java:151)
>>     at org.apache.pivot.wtk.Container.add(Container.java:131)
>>     at
>> org.apache.pivot.wtk.TablePane$RowSequence.insert(TablePane.java:469)
>>     at org.apache.pivot.wtk.TablePane$RowSequence.add(TablePane.java:448)
>>
>> I guess Since Frame is itslef a Window this is no supported.
>>
>> Basically i want to add multiple Frames to the main Window and at the
>> Bottom Task Bar to manage the Navigation of these windows ( Minmize,
>> maximize)
>>
>> Can you help me out what is going wrong here.
>> Attached is the BXML
>>
>>
>> On Wed, Mar 9, 2011 at 11:17 PM, Greg Brown <gk...@verizon.net> wrote:
>>
>>> That's correct - I actually started prototyping something like this a
>>> while back, but I never finished it.
>>>
>>>  On Mar 9, 2011, at 6:33 AM, Chris Bartlett wrote:
>>>
>>>  Pavan,
>>>
>>> See this thread
>>>
>>> http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html
>>>
>>> Currently, if you minimize a Pivot Frame it will disappear from the
>>> Display, much as it would if you called myFrame.setVisible(false).
>>>
>>> If you want to show the minimized frames somewhere you will have to do
>>> that yourself.
>>>
>>> For instance to emulate the MS Windows Taskbar you could maybe have a
>>> FlowPane or TablePane at the bottom of the Display, and populate it with
>>> instances of a custom Component that renderers part of the Frame's title.
>>>
>>> If I have some time later today I will try to knock up a quick example
>>> and post here.
>>>
>>> Chris
>>>
>>> On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> I am looking for help related to create a MDI related Application using
>>>> Pivot.
>>>>
>>>> I wasnt able to figure about a container  like  JDesktopPane that
>>>> manages the Forms or Frames that can be added and can be iconified and
>>>> closed.
>>>>
>>>> Can some one point me to some tutorials/demos that achieve .
>>>> Thanks and Regards,
>>>> Pavan
>>>>
>>>>
>>>
>>>
>> <MainWindow.bxml>
>>
>>
>>
>

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Pavan Vadavalli <pa...@gmail.com>.
Hi,
its been little struggling to come up with this extension implementation and
i need this as part of Core functionality.
Can you please provide some wokring functionality that i can extend and
continue to give a complete shape for this.
Thanks,
Pavan
On Tue, Mar 15, 2011 at 12:23 AM, Greg Brown <gk...@verizon.net> wrote:

> You can't add a Window to another container. However, when you call open()
> on a window, it is internally added to the display. You could create a
> "special" window representing the task bar that listens for add and remove
> events on the display so you know when windows are opened or closed. You'll
> also probably want to listen for size changes on the display so you can
> reposition the task bar. This is similar to how the task bar was implemented
> in earlier versions of Windows (not sure how it works now though).
>
> Finally, you'll probably want some way to determine which windows should
> appear in the task bar (e.g. top-level frames, but not menu popups or
> tooltips). For example, in my prototype I decided that only root windows
> (those that have no owner) would appear in the task bar.
>
> Hope this helps,
> G
>
>   On Mar 14, 2011, at 3:22 AM, Pavan Vadavalli wrote:
>
>   Hi
>
> Trying to accomplish the below
>
> Have enabled the minimize button from FramTerraSkin
> Tried to create Mainwindow by adding Table with one Column and
> fundamentally two rows,
> Added a Panel to the Row and tried to add a Frame to this Panel
> This is throwing below Error
>
> java.lang.IllegalArgumentException: Window parent must be null or display,
> cannot be org.apache.pivot.wtk.TablePane
>     at org.apache.pivot.wtk.Window.setParent(Window.java:460)
>     at org.apache.pivot.wtk.Container.insert(Container.java:151)
>     at org.apache.pivot.wtk.Container.add(Container.java:131)
>     at
> org.apache.pivot.wtk.TablePane$RowSequence.insert(TablePane.java:469)
>     at org.apache.pivot.wtk.TablePane$RowSequence.add(TablePane.java:448)
>
> I guess Since Frame is itslef a Window this is no supported.
>
> Basically i want to add multiple Frames to the main Window and at the
> Bottom Task Bar to manage the Navigation of these windows ( Minmize,
> maximize)
>
> Can you help me out what is going wrong here.
> Attached is the BXML
>
>
> On Wed, Mar 9, 2011 at 11:17 PM, Greg Brown <gk...@verizon.net> wrote:
>
>> That's correct - I actually started prototyping something like this a
>> while back, but I never finished it.
>>
>>  On Mar 9, 2011, at 6:33 AM, Chris Bartlett wrote:
>>
>>  Pavan,
>>
>> See this thread
>>
>> http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html
>>
>> Currently, if you minimize a Pivot Frame it will disappear from the
>> Display, much as it would if you called myFrame.setVisible(false).
>>
>> If you want to show the minimized frames somewhere you will have to do
>> that yourself.
>>
>> For instance to emulate the MS Windows Taskbar you could maybe have a
>> FlowPane or TablePane at the bottom of the Display, and populate it with
>> instances of a custom Component that renderers part of the Frame's title.
>>
>> If I have some time later today I will try to knock up a quick example and
>> post here.
>>
>> Chris
>>
>> On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am looking for help related to create a MDI related Application using
>>> Pivot.
>>>
>>> I wasnt able to figure about a container  like  JDesktopPane that manages
>>> the Forms or Frames that can be added and can be iconified and closed.
>>>
>>> Can some one point me to some tutorials/demos that achieve .
>>> Thanks and Regards,
>>> Pavan
>>>
>>>
>>
>>
> <MainWindow.bxml>
>
>
>

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Greg Brown <gk...@verizon.net>.
You can't add a Window to another container. However, when you call open() on a window, it is internally added to the display. You could create a "special" window representing the task bar that listens for add and remove events on the display so you know when windows are opened or closed. You'll also probably want to listen for size changes on the display so you can reposition the task bar. This is similar to how the task bar was implemented in earlier versions of Windows (not sure how it works now though).

Finally, you'll probably want some way to determine which windows should appear in the task bar (e.g. top-level frames, but not menu popups or tooltips). For example, in my prototype I decided that only root windows (those that have no owner) would appear in the task bar.

Hope this helps,
G

On Mar 14, 2011, at 3:22 AM, Pavan Vadavalli wrote:

> Hi 
> 
> Trying to accomplish the below
> 
> Have enabled the minimize button from FramTerraSkin
> Tried to create Mainwindow by adding Table with one Column and fundamentally two rows,
> Added a Panel to the Row and tried to add a Frame to this Panel
> This is throwing below Error
> 
> java.lang.IllegalArgumentException: Window parent must be null or display, cannot be org.apache.pivot.wtk.TablePane
>     at org.apache.pivot.wtk.Window.setParent(Window.java:460)
>     at org.apache.pivot.wtk.Container.insert(Container.java:151)
>     at org.apache.pivot.wtk.Container.add(Container.java:131)
>     at org.apache.pivot.wtk.TablePane$RowSequence.insert(TablePane.java:469)
>     at org.apache.pivot.wtk.TablePane$RowSequence.add(TablePane.java:448)
> 
> I guess Since Frame is itslef a Window this is no supported.
> 
> Basically i want to add multiple Frames to the main Window and at the Bottom Task Bar to manage the Navigation of these windows ( Minmize, maximize)
> 
> Can you help me out what is going wrong here.
> Attached is the BXML
> 
> 
> On Wed, Mar 9, 2011 at 11:17 PM, Greg Brown <gk...@verizon.net> wrote:
> That's correct - I actually started prototyping something like this a while back, but I never finished it.
> 
> On Mar 9, 2011, at 6:33 AM, Chris Bartlett wrote:
> 
>> Pavan,
>> 
>> See this thread
>> http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html
>> 
>> Currently, if you minimize a Pivot Frame it will disappear from the Display, much as it would if you called myFrame.setVisible(false).
>> 
>> If you want to show the minimized frames somewhere you will have to do that yourself.  
>> 
>> For instance to emulate the MS Windows Taskbar you could maybe have a FlowPane or TablePane at the bottom of the Display, and populate it with instances of a custom Component that renderers part of the Frame's title.
>> 
>> If I have some time later today I will try to knock up a quick example and post here.
>> 
>> Chris
>> 
>> On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com> wrote:
>> Hi,
>> 
>> I am looking for help related to create a MDI related Application using Pivot.
>> 
>> I wasnt able to figure about a container  like  JDesktopPane that manages the Forms or Frames that can be added and can be iconified and closed.
>> 
>> Can some one point me to some tutorials/demos that achieve .
>> Thanks and Regards,
>> Pavan
>> 
>> 
> 
> 
> <MainWindow.bxml>


Re: MDI Kind of implementation simulating JDesktopPane

Posted by Pavan Vadavalli <pa...@gmail.com>.
Hi

Trying to accomplish the below

Have enabled the minimize button from FramTerraSkin
Tried to create Mainwindow by adding Table with one Column and fundamentally
two rows,
Added a Panel to the Row and tried to add a Frame to this Panel
This is throwing below Error

java.lang.IllegalArgumentException: Window parent must be null or display,
cannot be org.apache.pivot.wtk.TablePane
    at org.apache.pivot.wtk.Window.setParent(Window.java:460)
    at org.apache.pivot.wtk.Container.insert(Container.java:151)
    at org.apache.pivot.wtk.Container.add(Container.java:131)
    at org.apache.pivot.wtk.TablePane$RowSequence.insert(TablePane.java:469)
    at org.apache.pivot.wtk.TablePane$RowSequence.add(TablePane.java:448)

I guess Since Frame is itslef a Window this is no supported.

Basically i want to add multiple Frames to the main Window and at the Bottom
Task Bar to manage the Navigation of these windows ( Minmize, maximize)

Can you help me out what is going wrong here.
Attached is the BXML


On Wed, Mar 9, 2011 at 11:17 PM, Greg Brown <gk...@verizon.net> wrote:

> That's correct - I actually started prototyping something like this a while
> back, but I never finished it.
>
> On Mar 9, 2011, at 6:33 AM, Chris Bartlett wrote:
>
> Pavan,
>
> See this thread
>
> http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html
>
> Currently, if you minimize a Pivot Frame it will disappear from the
> Display, much as it would if you called myFrame.setVisible(false).
>
> If you want to show the minimized frames somewhere you will have to do that
> yourself.
>
> For instance to emulate the MS Windows Taskbar you could maybe have a
> FlowPane or TablePane at the bottom of the Display, and populate it with
> instances of a custom Component that renderers part of the Frame's title.
>
> If I have some time later today I will try to knock up a quick example and
> post here.
>
> Chris
>
> On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com> wrote:
>
>> Hi,
>>
>> I am looking for help related to create a MDI related Application using
>> Pivot.
>>
>> I wasnt able to figure about a container  like  JDesktopPane that manages
>> the Forms or Frames that can be added and can be iconified and closed.
>>
>> Can some one point me to some tutorials/demos that achieve .
>> Thanks and Regards,
>> Pavan
>>
>>
>
>

Re: MDI Kind of implementation simulating JDesktopPane

Posted by Greg Brown <gk...@verizon.net>.
That's correct - I actually started prototyping something like this a while back, but I never finished it.

On Mar 9, 2011, at 6:33 AM, Chris Bartlett wrote:

> Pavan,
> 
> See this thread
> http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html
> 
> Currently, if you minimize a Pivot Frame it will disappear from the Display, much as it would if you called myFrame.setVisible(false).
> 
> If you want to show the minimized frames somewhere you will have to do that yourself.  
> 
> For instance to emulate the MS Windows Taskbar you could maybe have a FlowPane or TablePane at the bottom of the Display, and populate it with instances of a custom Component that renderers part of the Frame's title.
> 
> If I have some time later today I will try to knock up a quick example and post here.
> 
> Chris
> 
> On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com> wrote:
> Hi,
> 
> I am looking for help related to create a MDI related Application using Pivot.
> 
> I wasnt able to figure about a container  like  JDesktopPane that manages the Forms or Frames that can be added and can be iconified and closed.
> 
> Can some one point me to some tutorials/demos that achieve .
> Thanks and Regards,
> Pavan
> 
> 


Re: MDI Kind of implementation simulating JDesktopPane

Posted by Chris Bartlett <cb...@gmail.com>.
Pavan,

See this thread
http://apache-pivot-users.399431.n3.nabble.com/Minimized-Frames-td2117206.html

Currently, if you minimize a Pivot Frame it will disappear from the Display,
much as it would if you called myFrame.setVisible(false).

If you want to show the minimized frames somewhere you will have to do that
yourself.

For instance to emulate the MS Windows Taskbar you could maybe have a
FlowPane or TablePane at the bottom of the Display, and populate it with
instances of a custom Component that renderers part of the Frame's title.

If I have some time later today I will try to knock up a quick example and
post here.

Chris

On 9 March 2011 15:55, Pavan Vadavalli <pa...@gmail.com> wrote:

> Hi,
>
> I am looking for help related to create a MDI related Application using
> Pivot.
>
> I wasnt able to figure about a container  like  JDesktopPane that manages
> the Forms or Frames that can be added and can be iconified and closed.
>
> Can some one point me to some tutorials/demos that achieve .
> Thanks and Regards,
> Pavan
>
>