You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Garimella Srinivas <ga...@yahoo.co.in> on 2009/11/26 12:47:51 UTC

MDI Application regarding

Hi,
Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.

Thanks
Garimella Srinivas


      

Re: MDI Application regarding

Posted by Greg Brown <gk...@mac.com>.
You may also find this developerWorks tutorial useful for understanding how WTKX and Java relate to each other:

http://www.ibm.com/developerworks/xml/tutorials/x-pivottut/index.html


On Nov 26, 2009, at 11:36 AM, Greg Brown wrote:

> OK, now I understand. We don't have a "pure" Java version of that example. However, the WTKX version isn't really any different from a Java version. If you have not already read the the WTKX Primer, I suggest that you take a look - it will help you gain an understanding of how WTKX elements map to Java classes and properties:
> 
> http://incubator.apache.org/pivot/1.4/tutorials/wtkx_primer.html
> 
> Greg
> 
> On Nov 26, 2009, at 10:04 AM, Garimella Srinivas wrote:
> 
>> 
>> The given example is a wtkx version. I meants a Java only version of the above example. 
>> 
>> Garimella Srinivas
>> 
>> 
>> From: Greg Brown <gk...@mac.com>
>> To: pivot-user@incubator.apache.org
>> Sent: Thu, November 26, 2009 6:33:48 PM
>> Subject: Re: MDI Application regarding
>> 
>> Hi Garimella,
>> 
>> I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).
>> 
>> Please let us know if you have any additional questions.
>> 
>> Greg
>> 
>> On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
>> 
>>> Hi,
>>> Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>>> 
>>> Thanks
>>> Garimella Srinivas
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
> 


Re: MDI Application regarding

Posted by Greg Brown <gk...@mac.com>.
OK, now I understand. We don't have a "pure" Java version of that example. However, the WTKX version isn't really any different from a Java version. If you have not already read the the WTKX Primer, I suggest that you take a look - it will help you gain an understanding of how WTKX elements map to Java classes and properties:

http://incubator.apache.org/pivot/1.4/tutorials/wtkx_primer.html

Greg

On Nov 26, 2009, at 10:04 AM, Garimella Srinivas wrote:

> 
> The given example is a wtkx version. I meants a Java only version of the above example. 
> 
> Garimella Srinivas
> 
> 
> From: Greg Brown <gk...@mac.com>
> To: pivot-user@incubator.apache.org
> Sent: Thu, November 26, 2009 6:33:48 PM
> Subject: Re: MDI Application regarding
> 
> Hi Garimella,
> 
> I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).
> 
> Please let us know if you have any additional questions.
> 
> Greg
> 
> On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
> 
>> Hi,
>> Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>> 
>> Thanks
>> Garimella Srinivas
>> 
>> 
>> 
>> 
> 
> 
> 


Re: MDI Application regarding

Posted by Greg Brown <gk...@mac.com>.
Just wondering - are you trying to set the host frame to fill the screen? If so, you might be able to simply use the --fullScreen argument. Setting this to true at startup will open the host in full screen exclusive mode.
G

On Nov 28, 2009, at 3:00 AM, Garimella Srinivas wrote:

> I have got the code in java now and working. Sending the same for use by others .
> 
> public class Windows implements Application { 
>     private Window window = null; 
>     private Frame frame = null; 
>     private Toolkit kit = Toolkit.getDefaultToolkit(); 
>     private    Dimension dim = kit.getScreenSize(); 
>     private Display display = null; 
>     private PushButton pb; 
>     private BoxPane bp; 
>     private PushButton pb2;     
>      
>         @Override 
>         public void startup(final Display display, Map<String, String> properties) throws Exception { 
>             this.display = display; 
>             int x = 0; 
>             int y = 0; 
>            for (int i = 0; i < 5; i++) { 
>            final Frame frame = new Frame(); 
>            frame.setTitle("Frame " + (i + 1)); 
>                 frame.setLocation(x, y); 
>                 x += 20; 
>                 y +=20; 
>                 bp = new BoxPane(); 
>                 bp.setPreferredHeight(200); 
>                 bp.setPreferredWidth(250); 
>                 pb = new PushButton(); 
>                 pb2 = new PushButton(); 
>                 pb2.setButtonData("Open Dialog 2"); 
>                 pb.setButtonData("OPEN DIALOG"); 
>                 pb.getButtonPressListeners().add(new ButtonPressListener() { 
>  
>                     @Override 
>                     public void buttonPressed(Button arg0) { 
>                         // TODO Auto-generated method stub 
>                         MyDialog md = new MyDialog(); 
>                         md.setPreferredHeight(300); 
>                         md.setPreferredWidth(500); 
>                         md.open(frame,null); 
>                         } 
>                      
>                 }); 
>                 pb2.getButtonPressListeners().add(new ButtonPressListener() { 
>  
>                     @Override 
>                     public void buttonPressed(Button arg0) { 
>                         // TODO Auto-generated method stub 
>                         MyDialog2 md2 = new MyDialog2(); 
>                         md2.setPreferredHeight(300); 
>                         md2.setPreferredWidth(500); 
>                         md2.open(frame,null); 
>                         } 
>                      
>                 }); 
>  
>                 bp.add(pb); 
>                 bp.add(pb2); 
>                  
>                 ApplicationContext.DisplayHost displayHost = display.getDisplayHost(); 
>                 displayHost.setPreferredSize(dim); 
>                 java.awt.Frame awtHostFrame = (java.awt.Frame)displayHost.getParent(); 
>                 awtHostFrame.pack(); 
>                 frame.setContent(bp); 
>                 frame.open(display); 
>             } 
>         } 
>       
>         @Override 
>         public boolean shutdown(boolean optional) { 
>             for (int i = display.getLength() - 1; i >= 0; i--) { 
>                 Window window = (Window)display.get(i); 
>                 window.close(); 
>             } 
>             return false; 
>         } 
>       
>         @Override 
>         public void suspend() { 
>         } 
>       
>         @Override 
>         public void resume() { 
>         } 
>      /* 
>         public static void main(String[] args) { 
>             DesktopApplicationContext.main(Windows.class, args); 
>         } 
> }
>  
> Thanks
> Garimella Srinivas
> 
> 
> From: Greg Brown <gk...@mac.com>
> To: pivot-user@incubator.apache.org
> Sent: Fri, November 27, 2009 10:47:34 PM
> Subject: Re: MDI Application regarding
> 
> The WTKX primer is pretty short. Once you read through it, you should be able to very quickly grasp what the corresponding Java code would look like. Of course, if you have any questions, please feel free to post them here.
> 
> Greg
> 
> 
> On Nov 27, 2009, at 4:10 AM, Garimella Srinivas wrote:
> 
>> Yes I was referring tohttp://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/. I requested for a Java version so as to understand the implentation immediately.
>> 
>> G Srinivas
>> 
>> 
>> From: Todd Volkert <tv...@gmail.com>
>> To: pivot-user@incubator.apache.org
>> Sent: Thu, November 26, 2009 8:41:19 PM
>> Subject: Re: MDI Application regarding
>> 
>> Hi Garimella,
>> 
>> Do you have a link to the example in question so we can make sure we're all talking about the same example?  I'm guessing you're talking abouthttp://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/, but I'm not positive.
>> 
>> Thanks,
>> -T
>> 
>> On Thu, Nov 26, 2009 at 10:04 AM, Garimella Srinivas <ga...@yahoo.co.in> wrote:
>> 
>> The given example is a wtkx version. I meants a Java only version of the above example. 
>> 
>> Garimella Srinivas
>> 
>> 
>> From: Greg Brown <gk...@mac.com>
>> To: pivot-user@incubator.apache.org
>> Sent: Thu, November 26, 2009 6:33:48 PM
>> Subject: Re: MDI Application regarding
>> 
>> Hi Garimella,
>> 
>> I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).
>> 
>> Please let us know if you have any additional questions.
>> 
>> Greg
>> 
>> On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
>> 
>>> Hi,
>>> Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>>> 
>>> Thanks
>>> Garimella Srinivas
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> 


Re: MDI Application regarding

Posted by Garimella Srinivas <ga...@yahoo.co.in>.
I have got the code in java now and working. Sending the same for use by others .

public class Windows implements Application { 
    private Window window = null; 
    private Frame frame = null; 
    private Toolkit kit = Toolkit.getDefaultToolkit(); 
    private    Dimension dim = kit.getScreenSize(); 
    private Display display = null; 
    private PushButton pb; 
    private BoxPane bp; 
    private PushButton pb2;     
     
        @Override 
        public void startup(final Display display, Map<String, String> properties) throws Exception { 
            this.display = display; 
            int x = 0; 
            int y = 0; 
           for (int i = 0; i < 5; i++) { 
           final Frame frame = new Frame(); 
           frame.setTitle("Frame " + (i + 1)); 
                frame.setLocation(x, y); 
                x += 20; 
                y +=20; 
                bp = new BoxPane(); 
                bp.setPreferredHeight(200); 
                bp.setPreferredWidth(250); 
                pb = new PushButton(); 
                pb2 = new PushButton(); 
                pb2.setButtonData("Open Dialog 2"); 
                pb.setButtonData("OPEN DIALOG"); 
                pb.getButtonPressListeners().add(new ButtonPressListener() { 
 
                    @Override 
                    public void buttonPressed(Button arg0) { 
                        // TODO Auto-generated method stub 
                        MyDialog md = new MyDialog(); 
                        md.setPreferredHeight(300); 
                        md.setPreferredWidth(500); 
                        md.open(frame,null); 
                        } 
                     
                }); 
                pb2.getButtonPressListeners().add(new ButtonPressListener() { 
 
                    @Override 
                    public void buttonPressed(Button arg0) { 
                        // TODO Auto-generated method stub 
                        MyDialog2 md2 = new MyDialog2(); 
                        md2.setPreferredHeight(300); 
                        md2.setPreferredWidth(500); 
                        md2.open(frame,null); 
                        } 
                     
                }); 
 
                bp.add(pb); 
                bp.add(pb2); 
                 
                ApplicationContext.DisplayHost displayHost = display.getDisplayHost(); 
                displayHost.setPreferredSize(dim); 
                java.awt.Frame awtHostFrame = (java.awt.Frame)displayHost.getParent(); 
                awtHostFrame.pack(); 
                frame.setContent(bp); 
                frame.open(display); 
            } 
        } 
      
        @Override 
        public boolean shutdown(boolean optional) { 
            for (int i = display.getLength() - 1; i >= 0; i--) { 
                Window window = (Window)display.get(i); 
                window.close(); 
            } 
            return false; 
        } 
      
        @Override 
        public void suspend() { 
        } 
      
        @Override 
        public void resume() { 
        } 
     /* 
        public static void main(String[] args) { 
            DesktopApplicationContext.main(Windows.class, args); 
        } 
}

 Thanks
Garimella Srinivas




________________________________
From: Greg Brown <gk...@mac.com>
To: pivot-user@incubator.apache.org
Sent: Fri, November 27, 2009 10:47:34 PM
Subject: Re: MDI Application regarding


The WTKX primer is pretty short. Once you read through it, you should be able to very quickly grasp what the corresponding Java code would look like. Of course, if you have any questions, please feel free to post them here.

Greg


On Nov 27, 2009, at 4:10 AM, Garimella Srinivas wrote:

Yes I was referring tohttp://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/. I requested for a Java version so as to understand the implentation immediately.
>
>G Srinivas
>
>
>
>
>
________________________________
From: Todd Volkert <tv...@gmail.com>
>To: pivot-user@incubator.apache.org
>Sent: Thu, November 26, 2009 8:41:19 PM
>Subject: Re: MDI Application regarding
>
>Hi Garimella,
>
>Do you have a link to the example in question so we can make sure we're all talking about the same example?  I'm guessing you're talking abouthttp://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/, but I'm not positive.
>
>Thanks,
>-T
>
>
>On Thu, Nov 26, 2009 at 10:04 AM, Garimella Srinivas <ga...@yahoo.co.in> wrote:
>
>
>>
>>The given example is a wtkx version. I meants a Java only version of the above example. 
>>
>>Garimella Srinivas
>>
>>
>>
>>
>>
________________________________
From: Greg Brown <gk...@mac.com>
>>To: pivot-user@incubator.apache.org
>>Sent: Thu, November 26, 2009 6:33:48 PM
>>Subject: Re: MDI Application regarding
>>
>>
>>
>>Hi Garimella,
>>
>>
>>I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).
>>
>>
>>Please let us know if you have any additional questions.
>>
>>Greg
>>
>>
>>On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
>>
>>Hi,
>>>Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>>>
>>>Thanks
>>>Garimella Srinivas
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>



      

Re: MDI Application regarding

Posted by Greg Brown <gk...@mac.com>.
The WTKX primer is pretty short. Once you read through it, you should be able to very quickly grasp what the corresponding Java code would look like. Of course, if you have any questions, please feel free to post them here.

Greg


On Nov 27, 2009, at 4:10 AM, Garimella Srinivas wrote:

> Yes I was referring tohttp://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/. I requested for a Java version so as to understand the implentation immediately.
> 
> G Srinivas
> 
> 
> From: Todd Volkert <tv...@gmail.com>
> To: pivot-user@incubator.apache.org
> Sent: Thu, November 26, 2009 8:41:19 PM
> Subject: Re: MDI Application regarding
> 
> Hi Garimella,
> 
> Do you have a link to the example in question so we can make sure we're all talking about the same example?  I'm guessing you're talking abouthttp://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/, but I'm not positive.
> 
> Thanks,
> -T
> 
> On Thu, Nov 26, 2009 at 10:04 AM, Garimella Srinivas <ga...@yahoo.co.in> wrote:
> 
> The given example is a wtkx version. I meants a Java only version of the above example. 
> 
> Garimella Srinivas
> 
> 
> From: Greg Brown <gk...@mac.com>
> To: pivot-user@incubator.apache.org
> Sent: Thu, November 26, 2009 6:33:48 PM
> Subject: Re: MDI Application regarding
> 
> Hi Garimella,
> 
> I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).
> 
> Please let us know if you have any additional questions.
> 
> Greg
> 
> On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
> 
>> Hi,
>> Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>> 
>> Thanks
>> Garimella Srinivas
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> 


Re: MDI Application regarding

Posted by Garimella Srinivas <ga...@yahoo.co.in>.
Yes I was referring to http://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/. I requested for a Java version so as to understand the implentation immediately.

G Srinivas




________________________________
From: Todd Volkert <tv...@gmail.com>
To: pivot-user@incubator.apache.org
Sent: Thu, November 26, 2009 8:41:19 PM
Subject: Re: MDI Application regarding

Hi Garimella,

Do you have a link to the example in question so we can make sure we're all talking about the same example?  I'm guessing you're talking about http://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/, but I'm not positive.

Thanks,
-T


On Thu, Nov 26, 2009 at 10:04 AM, Garimella Srinivas <ga...@yahoo.co.in> wrote:


>
>The given example is a wtkx version. I meants a Java only version of the above example. 
>
>Garimella Srinivas
>
>
>
>
>
________________________________
 From: Greg Brown <gk...@mac.com>
>To: pivot-user@incubator.apache.org
>Sent: Thu, November 26, 2009 6:33:48 PM
>Subject: Re: MDI Application regarding
>
>
>
>Hi Garimella,
>
>
>I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).
>
>
>Please let us know if you have any additional questions.
>
>Greg
>
>
>On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
>
>Hi,
>>Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>>
>>Thanks
>>Garimella Srinivas
>>
>>
>>
>>
>>
>>
>>
>
>



      

Re: MDI Application regarding

Posted by Todd Volkert <tv...@gmail.com>.
Hi Garimella,

Do you have a link to the example in question so we can make sure we're all
talking about the same example?  I'm guessing you're talking about
http://svn.apache.org/repos/asf/incubator/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/windows/,
but I'm not positive.

Thanks,
-T

On Thu, Nov 26, 2009 at 10:04 AM, Garimella Srinivas <
garimella_srinivas@yahoo.co.in> wrote:

>
> The given example is a wtkx version. I meants a Java only version of the
> above example.
>
> Garimella Srinivas
>
>
> ------------------------------
> *From:* Greg Brown <gk...@mac.com>
> *To:* pivot-user@incubator.apache.org
> *Sent:* Thu, November 26, 2009 6:33:48 PM
> *Subject:* Re: MDI Application regarding
>
> Hi Garimella,
>
> I am not 100% sure what you are asking, but it sounds like you are assuming
> that the Windows tutorial is specific to the Windows operating system. The
> term "window" in this case actually refers to the Pivot Window class, not
> Microsoft Windows. That example will actually run on all supported Pivot
> platforms (i.e. any OS with Java 6 or greater).
>
> Please let us know if you have any additional questions.
>
> Greg
>
> On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:
>
> Hi,
> Seen the example provided in the windows tutorial for building multi
> document interfaces. Is there a Java only version for the same.  If so
> please give pointer.
>
> Thanks
> Garimella Srinivas
>
>
>
>
>
>
>

Re: MDI Application regarding

Posted by Garimella Srinivas <ga...@yahoo.co.in>.

The given example is a wtkx version. I meants a Java only version of the above example. 

Garimella Srinivas




________________________________
From: Greg Brown <gk...@mac.com>
To: pivot-user@incubator.apache.org
Sent: Thu, November 26, 2009 6:33:48 PM
Subject: Re: MDI Application regarding


Hi Garimella,

I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).

Please let us know if you have any additional questions.
Greg


On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:

Hi,
>Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
>
>Thanks
>Garimella Srinivas
>
>
>
>
>
>
>



      

Re: MDI Application regarding

Posted by Greg Brown <gk...@mac.com>.
Hi Garimella,

I am not 100% sure what you are asking, but it sounds like you are assuming that the Windows tutorial is specific to the Windows operating system. The term "window" in this case actually refers to the Pivot Window class, not Microsoft Windows. That example will actually run on all supported Pivot platforms (i.e. any OS with Java 6 or greater).

Please let us know if you have any additional questions.

Greg

On Nov 26, 2009, at 6:47 AM, Garimella Srinivas wrote:

> Hi,
> Seen the example provided in the windows tutorial for building multi document interfaces. Is there a Java only version for the same.  If so please give pointer.
> 
> Thanks
> Garimella Srinivas
> 
> 
> 
>