You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Bob Santos <bo...@gmail.com> on 2009/11/17 14:53:28 UTC

How To Specify Location of Image in wtkx file

Hi All!

I am trying to replicate the example in the Labels and Image Views section
of the tutorials. I've been looking for something that will help me in the
documentation, unfortunately I found nothing or I'm just looking at the
wrong places.

I just want to ask how do I specify the location of an image in "main.wtkx"
located in the "image" folders if I have this directory layout.

I [image:
?ui=2&view=att&th=1250267720e5e1b3&attid=0.1&disp=attd&realattid=ii_1250267720e5e1b3&zw]

And here's the content of "main.wtkx":

<Window title="Hello Pivot" maximized="true"
    xmlns:wtkx="http://pivot.apache.org/wtkx"
    xmlns="org.apache.pivot.wtk">
    <content>
        <BoxPane styles="{padding4, verticalAlignment'center'}">
            <ImageView image="?" cursor="link" />
            <Label text="Add Table" styles="{font'Georgia bold 10'}" />
        </BoxPane>
    </content>
</Window>


Thanks and Regards,

Bob Santos

Re: How To Specify Location of Image in wtkx file

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

The images folder will need to be on the classpath to make it work.  Once
that's set, then you should be able to say <ImageView image="images/foo.png"
/>.  Behind the scenes, this finds the image by its resource name (
http://incubator.apache.org/pivot/1.3/docs/api/org/apache/pivot/wtk/ImageView.html#setImage(java.lang.String)
)

Hope that helps,
-T

On Tue, Nov 17, 2009 at 8:53 AM, Bob Santos <bo...@gmail.com> wrote:

> Hi All!
>
> I am trying to replicate the example in the Labels and Image Views section
> of the tutorials. I've been looking for something that will help me in the
> documentation, unfortunately I found nothing or I'm just looking at the
> wrong places.
>
> I just want to ask how do I specify the location of an image in "main.wtkx"
> located in the "image" folders if I have this directory layout.
>
> I [image:
> ?ui=2&view=att&th=1250267720e5e1b3&attid=0.1&disp=attd&realattid=ii_1250267720e5e1b3&zw]
>
> And here's the content of "main.wtkx":
>
> <Window title="Hello Pivot" maximized="true"
>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>     xmlns="org.apache.pivot.wtk">
>     <content>
>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>             <ImageView image="?" cursor="link" />
>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>         </BoxPane>
>     </content>
> </Window>
>
>
> Thanks and Regards,
>
> Bob Santos
>

Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
Thanks again Todd and Greg! I''ll try the argument solution as it is closer
to what I want.


Kind Regards,

Bob

On Fri, Nov 20, 2009 at 12:35 AM, Greg Brown <gk...@mac.com> wrote:

> There is currently no way to do this programmatically. However, when
> running an application in BrowserApplicationContext, you can specify the
> width and height parameters to the host applet. When running in
> DesktopApplicationContext, you can specify an initial size via the --width
> and --height command line arguments.
>
> Hope this helps.
>
> Greg
>
>
> On Nov 19, 2009, at 10:52 AM, Bob Santos wrote:
>
> Hi All!
>
> How are you doing?
>
> Got a question, I tried changing the size of the Window object but still
> the main container's size remains unchanged. How can I change its size like
> simply calling pack() or setSize(100,100) in JFrame?
>
> On Wed, Nov 18, 2009 at 2:49 AM, Bob Santos <bo...@gmail.com>wrote:
>
>> Oh, ok then, I just subscribed to the Apache mailing list.
>>
>> Good luck on the votes and I hope you graduate.
>>
>>
>> Thanks,
>>
>> Bob
>>
>>
>> On Wed, Nov 18, 2009 at 2:43 AM, Greg Brown <gk...@mac.com> wrote:
>>
>>> Oddly enough, a graduation vote was just started:
>>>>
>>>>
>>>> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e<http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3C168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3E>
>>>>
>>>
>>> Is this voting internal to apache?
>>>
>>>
>>> Well, sort of. Anyone can subscribe to the mailing list and vote, but
>>> only Incubator PMC member votes are considered binding.
>>>
>>>
>>
>
>

Re: How To Specify Location of Image in wtkx file

Posted by Greg Brown <gk...@mac.com>.
There is currently no way to do this programmatically. However, when running an application in BrowserApplicationContext, you can specify the width and height parameters to the host applet. When running in DesktopApplicationContext, you can specify an initial size via the --width and --height command line arguments.

Hope this helps.

Greg

On Nov 19, 2009, at 10:52 AM, Bob Santos wrote:

> Hi All!
> 
> How are you doing?
> 
> Got a question, I tried changing the size of the Window object but still the main container's size remains unchanged. How can I change its size like simply calling pack() or setSize(100,100) in JFrame?
> 
> On Wed, Nov 18, 2009 at 2:49 AM, Bob Santos <bo...@gmail.com> wrote:
> Oh, ok then, I just subscribed to the Apache mailing list.
> 
> Good luck on the votes and I hope you graduate.
> 
> 
> Thanks,
> 
> Bob
> 
> 
> On Wed, Nov 18, 2009 at 2:43 AM, Greg Brown <gk...@mac.com> wrote:
>> Oddly enough, a graduation vote was just started:
>> 
>> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e
>> 
>> Is this voting internal to apache?
> 
> Well, sort of. Anyone can subscribe to the mailing list and vote, but only Incubator PMC member votes are considered binding.
> 
> 
> 


Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
Hi All!

How are you doing?

Got a question, I tried changing the size of the Window object but still the
main container's size remains unchanged. How can I change its size like
simply calling pack() or setSize(100,100) in JFrame?

On Wed, Nov 18, 2009 at 2:49 AM, Bob Santos <bo...@gmail.com> wrote:

> Oh, ok then, I just subscribed to the Apache mailing list.
>
> Good luck on the votes and I hope you graduate.
>
>
> Thanks,
>
> Bob
>
>
> On Wed, Nov 18, 2009 at 2:43 AM, Greg Brown <gk...@mac.com> wrote:
>
>> Oddly enough, a graduation vote was just started:
>>>
>>>
>>> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e<http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3C168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3E>
>>>
>>
>> Is this voting internal to apache?
>>
>>
>> Well, sort of. Anyone can subscribe to the mailing list and vote, but only
>> Incubator PMC member votes are considered binding.
>>
>>
>

Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
Oh, ok then, I just subscribed to the Apache mailing list.

Good luck on the votes and I hope you graduate.


Thanks,

Bob

On Wed, Nov 18, 2009 at 2:43 AM, Greg Brown <gk...@mac.com> wrote:

> Oddly enough, a graduation vote was just started:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e<http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3C168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3E>
>>
>
> Is this voting internal to apache?
>
>
> Well, sort of. Anyone can subscribe to the mailing list and vote, but only
> Incubator PMC member votes are considered binding.
>
>

Re: How To Specify Location of Image in wtkx file

Posted by Greg Brown <gk...@mac.com>.
> Oddly enough, a graduation vote was just started:
>
> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e
>
> Is this voting internal to apache?

Well, sort of. Anyone can subscribe to the mailing list and vote, but  
only Incubator PMC member votes are considered binding.


Re: How To Specify Location of Image in wtkx file

Posted by Todd Volkert <tv...@gmail.com>.
I think anyone can vote, though only votes from the members of the Incubator
Project Management Committee will be binding.

On Tue, Nov 17, 2009 at 1:37 PM, Bob Santos <bo...@gmail.com> wrote:

> Oddly enough, a graduation vote was just started:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e
>>
>
> Is this voting internal to apache?
>

Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
>
> Oddly enough, a graduation vote was just started:
>
>
> http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e
>

Is this voting internal to apache?

Re: How To Specify Location of Image in wtkx file

Posted by Greg Brown <gk...@mac.com>.
> To the Pivot team,
>
> Great job on Pivot!

Thanks!  :-)

> So how does Pivot get out of incubation and be endorsed by ASF?

Oddly enough, a graduation vote was just started:

http://mail-archives.apache.org/mod_mbox/incubator-general/200911.mbox/%3c168ef9ac0911170947w43bbe003p997fdb97542c7988@mail.gmail.com%3e

> I would like to contribute by fixing bugs but as I was going through  
> the bugs I find that most of them is out of my league, for now. But  
> if I find anything I can fix I will definitely help.

Very much appreciated. If you have any questions, please let us know.

Greg


Re: How To Specify Location of Image in wtkx file

Posted by Todd Volkert <tv...@gmail.com>.
Thanks for the positive feedback, Bob!

If you're itching to tackle tickets, we're here to help.  These two might be
attainable, depending on your area of expertise or how adventurous you are:

http://issues.apache.org/jira/browse/PIVOT-28 (Add tick marks to Slider
component)
The work would be limited to
http://svn.apache.org/repos/asf/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/terra/TerraSliderSkin.javaand
would amount to creating a new bean property that governed the tick
marks.

http://issues.apache.org/jira/browse/PIVOT-35 (Complete Dispatcher support)
The work would be limited to
http://svn.apache.org/repos/asf/incubator/pivot/trunk/core/src/org/apache/pivot/util/concurrent/Dispatcher.javaand
would amount to creating a working thread pool.  This one is
technically
a lot tougher, but in the off-chance that thread pooling is your area of
expertise... :)

Or if you see an opportunity to fix a bug or implement a new feature, you
can always create a new ticket in JIRA and attach the patch to the new
ticket :)

Cheers,
-T

On Tue, Nov 17, 2009 at 1:25 PM, Bob Santos <bo...@gmail.com> wrote:

> To the Pivot team,
>
> Great job on Pivot!
>
> Although I just started a few hours ago I find myself liking it and I am
> planning on using it on a future dev work.
>
> So how does Pivot get out of incubation and be endorsed by ASF?
>
> I would like to contribute by fixing bugs but as I was going through the
> bugs I find that most of them is out of my league, for now. But if I find
> anything I can fix I will definitely help.
>
> Again, Great Job!
>
>
> Thanks and Regards,
>
> Bob
>
>
> On Tue, Nov 17, 2009 at 10:10 PM, Bob Santos <bo...@gmail.com>wrote:
>
>> I'll do just that.
>>
>> Thanks again Todd!
>>
>>
>> On Tue, Nov 17, 2009 at 10:08 PM, Todd Volkert <tv...@gmail.com>wrote:
>>
>>> We're quick on the draw :)
>>>
>>> I'd start by studying the WTKX primer (
>>> http://incubator.apache.org/pivot/1.3/tutorials/wtkx_primer.html) -- it
>>> explains how WTKX translates to Java API calls.  Once you understand how it
>>> works, you'll know all the attributes and elements you can use by browsing
>>> the Javadocs :)
>>>
>>> Cheers,
>>> -T
>>>
>>>
>>> On Tue, Nov 17, 2009 at 9:05 AM, Bob Santos <bo...@gmail.com>wrote:
>>>
>>>> Hi Todd and Greg!
>>>>
>>>> Thanks for the fastest reply I have ever received for my questions. :)
>>>>
>>>> You just confirmed my guess earlier. So time for me to learn how to add
>>>> resources to the classpath in Maven.
>>>>
>>>> I'm learning Maven and Pivot at the same time.
>>>>
>>>> By the way, where can I see a list of the attributes and the styles I
>>>> can use?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Bob
>>>>
>>>>
>>>> On Tue, Nov 17, 2009 at 10:01 PM, Greg Brown <gk...@mac.com> wrote:
>>>>
>>>>> Hi Bob,
>>>>>
>>>>> You need to make sure that the images directory is on your classpath.
>>>>> Then you can say:
>>>>>
>>>>> <ImageView image="foo.png"/>
>>>>>
>>>>> where the value of the "image" attribute is simply the name of an image
>>>>> on your classpath, using the same syntax you would pass to
>>>>> Class#getResourceAsStream().
>>>>>
>>>>> Greg
>>>>>
>>>>> On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:
>>>>>
>>>>> Hi All!
>>>>>
>>>>> I am trying to replicate the example in the Labels and Image Views
>>>>> section of the tutorials. I've been looking for something that will help me
>>>>> in the documentation, unfortunately I found nothing or I'm just looking at
>>>>> the wrong places.
>>>>>
>>>>> I just want to ask how do I specify the location of an image in
>>>>> "main.wtkx" located in the "image" folders if I have this directory layout.
>>>>>
>>>>> I <layout.PNG>
>>>>>
>>>>>
>>>>> And here's the content of "main.wtkx":
>>>>>
>>>>> <Window title="Hello Pivot" maximized="true"
>>>>>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>>>>>     xmlns="org.apache.pivot.wtk">
>>>>>     <content>
>>>>>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>>>>>             <ImageView image="?" cursor="link" />
>>>>>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>>>>>         </BoxPane>
>>>>>     </content>
>>>>> </Window>
>>>>>
>>>>>
>>>>> Thanks and Regards,
>>>>>
>>>>> Bob Santos
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
To the Pivot team,

Great job on Pivot!

Although I just started a few hours ago I find myself liking it and I am
planning on using it on a future dev work.

So how does Pivot get out of incubation and be endorsed by ASF?

I would like to contribute by fixing bugs but as I was going through the
bugs I find that most of them is out of my league, for now. But if I find
anything I can fix I will definitely help.

Again, Great Job!


Thanks and Regards,

Bob

On Tue, Nov 17, 2009 at 10:10 PM, Bob Santos <bo...@gmail.com> wrote:

> I'll do just that.
>
> Thanks again Todd!
>
>
> On Tue, Nov 17, 2009 at 10:08 PM, Todd Volkert <tv...@gmail.com> wrote:
>
>> We're quick on the draw :)
>>
>> I'd start by studying the WTKX primer (
>> http://incubator.apache.org/pivot/1.3/tutorials/wtkx_primer.html) -- it
>> explains how WTKX translates to Java API calls.  Once you understand how it
>> works, you'll know all the attributes and elements you can use by browsing
>> the Javadocs :)
>>
>> Cheers,
>> -T
>>
>>
>> On Tue, Nov 17, 2009 at 9:05 AM, Bob Santos <bo...@gmail.com>wrote:
>>
>>> Hi Todd and Greg!
>>>
>>> Thanks for the fastest reply I have ever received for my questions. :)
>>>
>>> You just confirmed my guess earlier. So time for me to learn how to add
>>> resources to the classpath in Maven.
>>>
>>> I'm learning Maven and Pivot at the same time.
>>>
>>> By the way, where can I see a list of the attributes and the styles I can
>>> use?
>>>
>>>
>>> Thanks,
>>>
>>> Bob
>>>
>>>
>>> On Tue, Nov 17, 2009 at 10:01 PM, Greg Brown <gk...@mac.com> wrote:
>>>
>>>> Hi Bob,
>>>>
>>>> You need to make sure that the images directory is on your classpath.
>>>> Then you can say:
>>>>
>>>> <ImageView image="foo.png"/>
>>>>
>>>> where the value of the "image" attribute is simply the name of an image
>>>> on your classpath, using the same syntax you would pass to
>>>> Class#getResourceAsStream().
>>>>
>>>> Greg
>>>>
>>>> On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:
>>>>
>>>> Hi All!
>>>>
>>>> I am trying to replicate the example in the Labels and Image Views
>>>> section of the tutorials. I've been looking for something that will help me
>>>> in the documentation, unfortunately I found nothing or I'm just looking at
>>>> the wrong places.
>>>>
>>>> I just want to ask how do I specify the location of an image in
>>>> "main.wtkx" located in the "image" folders if I have this directory layout.
>>>>
>>>> I <layout.PNG>
>>>>
>>>>
>>>> And here's the content of "main.wtkx":
>>>>
>>>> <Window title="Hello Pivot" maximized="true"
>>>>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>>>>     xmlns="org.apache.pivot.wtk">
>>>>     <content>
>>>>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>>>>             <ImageView image="?" cursor="link" />
>>>>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>>>>         </BoxPane>
>>>>     </content>
>>>> </Window>
>>>>
>>>>
>>>> Thanks and Regards,
>>>>
>>>> Bob Santos
>>>>
>>>>
>>>>
>>>
>>
>

Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
I'll do just that.

Thanks again Todd!

On Tue, Nov 17, 2009 at 10:08 PM, Todd Volkert <tv...@gmail.com> wrote:

> We're quick on the draw :)
>
> I'd start by studying the WTKX primer (
> http://incubator.apache.org/pivot/1.3/tutorials/wtkx_primer.html) -- it
> explains how WTKX translates to Java API calls.  Once you understand how it
> works, you'll know all the attributes and elements you can use by browsing
> the Javadocs :)
>
> Cheers,
> -T
>
>
> On Tue, Nov 17, 2009 at 9:05 AM, Bob Santos <bo...@gmail.com>wrote:
>
>> Hi Todd and Greg!
>>
>> Thanks for the fastest reply I have ever received for my questions. :)
>>
>> You just confirmed my guess earlier. So time for me to learn how to add
>> resources to the classpath in Maven.
>>
>> I'm learning Maven and Pivot at the same time.
>>
>> By the way, where can I see a list of the attributes and the styles I can
>> use?
>>
>>
>> Thanks,
>>
>> Bob
>>
>>
>> On Tue, Nov 17, 2009 at 10:01 PM, Greg Brown <gk...@mac.com> wrote:
>>
>>> Hi Bob,
>>>
>>> You need to make sure that the images directory is on your classpath.
>>> Then you can say:
>>>
>>> <ImageView image="foo.png"/>
>>>
>>> where the value of the "image" attribute is simply the name of an image
>>> on your classpath, using the same syntax you would pass to
>>> Class#getResourceAsStream().
>>>
>>> Greg
>>>
>>> On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:
>>>
>>> Hi All!
>>>
>>> I am trying to replicate the example in the Labels and Image Views
>>> section of the tutorials. I've been looking for something that will help me
>>> in the documentation, unfortunately I found nothing or I'm just looking at
>>> the wrong places.
>>>
>>> I just want to ask how do I specify the location of an image in
>>> "main.wtkx" located in the "image" folders if I have this directory layout.
>>>
>>> I <layout.PNG>
>>>
>>>
>>> And here's the content of "main.wtkx":
>>>
>>> <Window title="Hello Pivot" maximized="true"
>>>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>>>     xmlns="org.apache.pivot.wtk">
>>>     <content>
>>>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>>>             <ImageView image="?" cursor="link" />
>>>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>>>         </BoxPane>
>>>     </content>
>>> </Window>
>>>
>>>
>>> Thanks and Regards,
>>>
>>> Bob Santos
>>>
>>>
>>>
>>
>

Re: How To Specify Location of Image in wtkx file

Posted by Todd Volkert <tv...@gmail.com>.
We're quick on the draw :)

I'd start by studying the WTKX primer (
http://incubator.apache.org/pivot/1.3/tutorials/wtkx_primer.html) -- it
explains how WTKX translates to Java API calls.  Once you understand how it
works, you'll know all the attributes and elements you can use by browsing
the Javadocs :)

Cheers,
-T

On Tue, Nov 17, 2009 at 9:05 AM, Bob Santos <bo...@gmail.com> wrote:

> Hi Todd and Greg!
>
> Thanks for the fastest reply I have ever received for my questions. :)
>
> You just confirmed my guess earlier. So time for me to learn how to add
> resources to the classpath in Maven.
>
> I'm learning Maven and Pivot at the same time.
>
> By the way, where can I see a list of the attributes and the styles I can
> use?
>
>
> Thanks,
>
> Bob
>
>
> On Tue, Nov 17, 2009 at 10:01 PM, Greg Brown <gk...@mac.com> wrote:
>
>> Hi Bob,
>>
>> You need to make sure that the images directory is on your classpath. Then
>> you can say:
>>
>> <ImageView image="foo.png"/>
>>
>> where the value of the "image" attribute is simply the name of an image on
>> your classpath, using the same syntax you would pass to
>> Class#getResourceAsStream().
>>
>> Greg
>>
>> On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:
>>
>> Hi All!
>>
>> I am trying to replicate the example in the Labels and Image Views section
>> of the tutorials. I've been looking for something that will help me in the
>> documentation, unfortunately I found nothing or I'm just looking at the
>> wrong places.
>>
>> I just want to ask how do I specify the location of an image in
>> "main.wtkx" located in the "image" folders if I have this directory layout.
>>
>> I <layout.PNG>
>>
>>
>> And here's the content of "main.wtkx":
>>
>> <Window title="Hello Pivot" maximized="true"
>>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>>     xmlns="org.apache.pivot.wtk">
>>     <content>
>>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>>             <ImageView image="?" cursor="link" />
>>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>>         </BoxPane>
>>     </content>
>> </Window>
>>
>>
>> Thanks and Regards,
>>
>> Bob Santos
>>
>>
>>
>

Re: How To Specify Location of Image in wtkx file

Posted by Bob Santos <bo...@gmail.com>.
Hi Todd and Greg!

Thanks for the fastest reply I have ever received for my questions. :)

You just confirmed my guess earlier. So time for me to learn how to add
resources to the classpath in Maven.

I'm learning Maven and Pivot at the same time.

By the way, where can I see a list of the attributes and the styles I can
use?


Thanks,

Bob

On Tue, Nov 17, 2009 at 10:01 PM, Greg Brown <gk...@mac.com> wrote:

> Hi Bob,
>
> You need to make sure that the images directory is on your classpath. Then
> you can say:
>
> <ImageView image="foo.png"/>
>
> where the value of the "image" attribute is simply the name of an image on
> your classpath, using the same syntax you would pass to
> Class#getResourceAsStream().
>
> Greg
>
> On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:
>
> Hi All!
>
> I am trying to replicate the example in the Labels and Image Views section
> of the tutorials. I've been looking for something that will help me in the
> documentation, unfortunately I found nothing or I'm just looking at the
> wrong places.
>
> I just want to ask how do I specify the location of an image in "main.wtkx"
> located in the "image" folders if I have this directory layout.
>
> I <layout.PNG>
>
>
> And here's the content of "main.wtkx":
>
> <Window title="Hello Pivot" maximized="true"
>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>     xmlns="org.apache.pivot.wtk">
>     <content>
>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>             <ImageView image="?" cursor="link" />
>             <Label text="Add Table" styles="{font'Georgia bold 10'}" />
>         </BoxPane>
>     </content>
> </Window>
>
>
> Thanks and Regards,
>
> Bob Santos
>
>
>

Re: How To Specify Location of Image in wtkx file

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

You need to make sure that the images directory is on your classpath.  
Then you can say:

<ImageView image="foo.png"/>

where the value of the "image" attribute is simply the name of an  
image on your classpath, using the same syntax you would pass to  
Class#getResourceAsStream().

Greg

On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:

> Hi All!
>
> I am trying to replicate the example in the Labels and Image Views  
> section of the tutorials. I've been looking for something that will  
> help me in the documentation, unfortunately I found nothing or I'm  
> just looking at the wrong places.
>
> I just want to ask how do I specify the location of an image in  
> "main.wtkx" located in the "image" folders if I have this directory  
> layout.
>
> I <layout.PNG>
>
> And here's the content of "main.wtkx":
>
> <Window title="Hello Pivot" maximized="true"
>     xmlns:wtkx="http://pivot.apache.org/wtkx"
>     xmlns="org.apache.pivot.wtk">
>     <content>
>         <BoxPane styles="{padding4, verticalAlignment'center'}">
>             <ImageView image="?" cursor="link" />
>             <Label text="Add Table" styles="{font'Georgia bold  
> 10'}" />
>         </BoxPane>
>     </content>
> </Window>
>
>
> Thanks and Regards,
>
> Bob Santos