You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by ke...@sz.murata.com.cn on 2010/07/26 07:53:00 UTC

How to store the text( Url) link in clipboard?

Hi All,

Do you know how to store the text( Url) link in clipboard in pivot?
Does we need extend the clipboard but ourself or  run some Javascript?
for example,I would like store below link clipboard and user can paste it
to their email.
|--------------------------------------------------------------------------|
| Clipboard()                                                              |
|--------------------------------------------------------------------------|



Best regards,
Ken Jiang

*******************************************
Murata Electronics Trading  (Shenzhen) Co.,Ltd
Tel:86-755-82847251
E-mail:kenjiang@sz.murata.com.cn
*******************************************


Re: How to store the text( Url) link in clipboard?

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
only a few things:
1 - to copy data to Clipboard in Applets or Web Start Applications you must
have all jars signed, otherwise data will not be copied (for security
reasons), but attention: in standalone applications this works ... this is a
default in Java since many time. 
For example you can see this behavior in our Demos from the Site (some
signed, some not).

2 - jars are cached by default, and since Java 6 Update 10 you can also use
pack200 compressed jars in applets (jars are compressed a lot), take a look
here: 
http://java.sun.com/developer/technicalArticles/javase/java6u10/ 
under Deployment Usability

Bye,
Sandro

-- 
View this message in context: http://apache-pivot-users.399431.n3.nabble.com/How-to-store-the-text-Url-link-in-clipboard-tp995390p999856.html
Sent from the Apache Pivot - Users mailing list archive at Nabble.com.

Re: How to store the text( Url) link in clipboard?

Posted by Greg Brown <gk...@mac.com>.
> Sorry for my insufficient of explanation.
> Question 1.
> In the HTML we use <a href="javascript:gotoLocation(THREE_SISTERS);">Three
> Fingered Jack</a> to describe the link.
> and the user can copy the link text in IE and paste to excel,email and some
> common application.
> but in the pivot,when I copy the link in IE and use getText(),just return
> the string "Three Fingered Jack" only,it seems
> some link information have been filter.

OK, I think I understand. You have copied a link from IE and pasted it into a TextInput, and you see the human-readable text but not the URL - correct? On Windows, data can be placed on the clipboard in a variety of "flavors". One such flavor might be a "link", which would include both the human-readble text as well as the URL. Another flavor would be "text", which would contain only the human-readble string. 

A native Windows application is most likely capable of handling either the "link" or "text" types, but unfortunately Java does not support this. The only flavors currently supported by Pivot are text, images, and file lists. Fortunately these cover the most common cases.

> Question 2,
> How to speed up the Applet launch time?even the common program only around
> 1.5M.But somecase that is expensive  in the
> Enterparise network environment.
> Can we setup the client don't download jar everytime(only the connent has
> been changed) in the applet deploy scirpt?
> I remember that web start seem provide the feature for it.but I don't how
> the applet work on it.

The JARs should be cached by the JRE. Check your Java Plugin settings to make sure you have caching enabled.


Re: How to store the text( Url) link in clipboard?

Posted by ke...@sz.murata.com.cn.
Hi Greg,

Sorry for my insufficient of explanation.
Question 1.
In the HTML we use <a href="javascript:gotoLocation(THREE_SISTERS);">Three
Fingered Jack</a> to describe the link.
and the user can copy the link text in IE and paste to excel,email and some
common application.
but in the pivot,when I copy the link in IE and use getText(),just return
the string "Three Fingered Jack" only,it seems
some link information have been filter.


Manifest c1=Clipboard.getContent() ;
System.out.println(c1.getText());


Below is HTML Link.I would like use pivot put it in Clipboard and paste it
in any common application.
      Three Fingered Jack

Question 2,
How to speed up the Applet launch time?even the common program only around
1.5M.But somecase that is expensive  in the
Enterparise network environment.
Can we setup the client don't download jar everytime(only the connent has
been changed) in the applet deploy scirpt?
I remember that web start seem provide the feature for it.but I don't how
the applet work on it.



Best regards,
Ken Jiang

*******************************************
Murata Electronics Trading  (Shenzhen) Co.,Ltd
Tel:86-755-82847251
E-mail:kenjiang@sz.murata.com.cn
*******************************************


                                                                                               
  From:       Greg Brown <gk...@mac.com>                                                     
                                                                                               
  To:         user@pivot.apache.org                                                            
                                                                                               
  Date:       07/27/2010 10:01                                                                 
                                                                                               
  Subject:    Re: How to store the text( Url) link in clipboard?                               
                                                                                               





I'm sorry, I don't understand. Could you be a little more specific?
G

On Jul 26, 2010, at 8:41 PM, kenjiang@sz.murata.com.cn wrote:

> Hi Greg,
>
> For text,excel row is ok.but I don't know how the link(Url).
>
>
> Best regards,
> Ken Jiang
>
> *******************************************
> Murata Electronics Trading  (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn
> *******************************************
>
>
>
>  From:       Greg Brown <gk...@mac.com>

>
>  To:         user@pivot.apache.org

>
>  Date:       07/26/2010 19:47

>
>  Subject:    Re: How to store the text( Url) link in clipboard?

>
>
>
>
>
>
> You may also find the information in the Clipboard tutorial useful:
>
> http://pivot.apache.org/tutorials/clipboard.html
>
> It demonstrates copy/paste of image data, but the same concepts apply to
> text.
>
> On Jul 26, 2010, at 5:57 AM, Chris Bartlett wrote:
>
>      Ken,
>
>      The copy() method in TextInput places text onto the clipboard, so
can
>      be used as an example.  Source code is here.
>
http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java

>
>      Please see the note at the end of the FAQ regarding using the
>      clipboard in applets.
>      https://cwiki.apache.org/PIVOT/frequently-asked-questions-faq.html
>
>      Regards,
>
>      Chris
>
>      On Mon, Jul 26, 2010 at 12:53 PM, <ke...@sz.murata.com.cn> wrote:
>
>        Hi All,
>
>        Do you know how to store the text( Url) link in clipboard in
pivot?
>        Does we need extend the clipboard but ourself or  run some
>        Javascript?
>        for example,I would like store below link clipboard and user can
>        paste it
>        to their email.
>
|--------------------------------------------------------------------------|

>
>        | Clipboard()
>        |
>
|--------------------------------------------------------------------------|

>
>
>
>
>        Best regards,
>        Ken Jiang
>
>        *******************************************
>        Murata Electronics Trading  (Shenzhen) Co.,Ltd
>        Tel:86-755-82847251
>        E-mail:kenjiang@sz.murata.com.cn
>        *******************************************
>
>
>
>




Re: How to store the text( Url) link in clipboard?

Posted by Greg Brown <gk...@mac.com>.
I'm sorry, I don't understand. Could you be a little more specific?
G

On Jul 26, 2010, at 8:41 PM, kenjiang@sz.murata.com.cn wrote:

> Hi Greg,
> 
> For text,excel row is ok.but I don't know how the link(Url).
> 
> 
> Best regards,
> Ken Jiang
> 
> *******************************************
> Murata Electronics Trading  (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn
> *******************************************
> 
> 
> 
>  From:       Greg Brown <gk...@mac.com>                                                                           
> 
>  To:         user@pivot.apache.org                                                                                  
> 
>  Date:       07/26/2010 19:47                                                                                       
> 
>  Subject:    Re: How to store the text( Url) link in clipboard?                                                     
> 
> 
> 
> 
> 
> 
> You may also find the information in the Clipboard tutorial useful:
> 
> http://pivot.apache.org/tutorials/clipboard.html
> 
> It demonstrates copy/paste of image data, but the same concepts apply to
> text.
> 
> On Jul 26, 2010, at 5:57 AM, Chris Bartlett wrote:
> 
>      Ken,
> 
>      The copy() method in TextInput places text onto the clipboard, so can
>      be used as an example.  Source code is here.
>      http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java
> 
>      Please see the note at the end of the FAQ regarding using the
>      clipboard in applets.
>      https://cwiki.apache.org/PIVOT/frequently-asked-questions-faq.html
> 
>      Regards,
> 
>      Chris
> 
>      On Mon, Jul 26, 2010 at 12:53 PM, <ke...@sz.murata.com.cn> wrote:
> 
>        Hi All,
> 
>        Do you know how to store the text( Url) link in clipboard in pivot?
>        Does we need extend the clipboard but ourself or  run some
>        Javascript?
>        for example,I would like store below link clipboard and user can
>        paste it
>        to their email.
>        |--------------------------------------------------------------------------|
> 
>        | Clipboard()
>        |
>        |--------------------------------------------------------------------------|
> 
> 
> 
> 
>        Best regards,
>        Ken Jiang
> 
>        *******************************************
>        Murata Electronics Trading  (Shenzhen) Co.,Ltd
>        Tel:86-755-82847251
>        E-mail:kenjiang@sz.murata.com.cn
>        *******************************************
> 
> 
> 
> 


Re: How to store the text( Url) link in clipboard?

Posted by ke...@sz.murata.com.cn.
Hi Greg,

For text,excel row is ok.but I don't know how the link(Url).


Best regards,
Ken Jiang

*******************************************
Murata Electronics Trading  (Shenzhen) Co.,Ltd
Tel:86-755-82847251
E-mail:kenjiang@sz.murata.com.cn
*******************************************


                                                                                                                     
  From:       Greg Brown <gk...@mac.com>                                                                           
                                                                                                                     
  To:         user@pivot.apache.org                                                                                  
                                                                                                                     
  Date:       07/26/2010 19:47                                                                                       
                                                                                                                     
  Subject:    Re: How to store the text( Url) link in clipboard?                                                     
                                                                                                                     





You may also find the information in the Clipboard tutorial useful:

http://pivot.apache.org/tutorials/clipboard.html

It demonstrates copy/paste of image data, but the same concepts apply to
text.

On Jul 26, 2010, at 5:57 AM, Chris Bartlett wrote:

      Ken,

      The copy() method in TextInput places text onto the clipboard, so can
      be used as an example.  Source code is here.
      http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java

      Please see the note at the end of the FAQ regarding using the
      clipboard in applets.
      https://cwiki.apache.org/PIVOT/frequently-asked-questions-faq.html

      Regards,

      Chris

      On Mon, Jul 26, 2010 at 12:53 PM, <ke...@sz.murata.com.cn> wrote:

        Hi All,

        Do you know how to store the text( Url) link in clipboard in pivot?
        Does we need extend the clipboard but ourself or  run some
        Javascript?
        for example,I would like store below link clipboard and user can
        paste it
        to their email.
        |--------------------------------------------------------------------------|

        | Clipboard()
        |
        |--------------------------------------------------------------------------|




        Best regards,
        Ken Jiang

        *******************************************
        Murata Electronics Trading  (Shenzhen) Co.,Ltd
        Tel:86-755-82847251
        E-mail:kenjiang@sz.murata.com.cn
        *******************************************





Re: How to store the text( Url) link in clipboard?

Posted by Greg Brown <gk...@mac.com>.
You may also find the information in the Clipboard tutorial useful:

http://pivot.apache.org/tutorials/clipboard.html

It demonstrates copy/paste of image data, but the same concepts apply to text.

On Jul 26, 2010, at 5:57 AM, Chris Bartlett wrote:

> Ken,
> 
> The copy() method in TextInput places text onto the clipboard, so can be used as an example.  Source code is here.
> http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java
> 
> Please see the note at the end of the FAQ regarding using the clipboard in applets.
> https://cwiki.apache.org/PIVOT/frequently-asked-questions-faq.html
> 
> Regards,
> 
> Chris
> 
> On Mon, Jul 26, 2010 at 12:53 PM, <ke...@sz.murata.com.cn> wrote:
> 
> Hi All,
> 
> Do you know how to store the text( Url) link in clipboard in pivot?
> Does we need extend the clipboard but ourself or  run some Javascript?
> for example,I would like store below link clipboard and user can paste it
> to their email.
> |--------------------------------------------------------------------------|
> | Clipboard()                                                              |
> |--------------------------------------------------------------------------|
> 
> 
> 
> Best regards,
> Ken Jiang
> 
> *******************************************
> Murata Electronics Trading  (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn
> *******************************************
> 
> 


Re: How to store the text( Url) link in clipboard?

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

The copy() method in TextInput places text onto the clipboard, so can be
used as an example.  Source code is here.
http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/TextInput.java

Please see the note at the end of the FAQ regarding using the clipboard in
applets.
https://cwiki.apache.org/PIVOT/frequently-asked-questions-faq.html

Regards,

Chris

On Mon, Jul 26, 2010 at 12:53 PM, <ke...@sz.murata.com.cn> wrote:

>
> Hi All,
>
> Do you know how to store the text( Url) link in clipboard in pivot?
> Does we need extend the clipboard but ourself or  run some Javascript?
> for example,I would like store below link clipboard and user can paste it
> to their email.
>
> |--------------------------------------------------------------------------|
> | Clipboard()
>  |
>
> |--------------------------------------------------------------------------|
>
>
>
> Best regards,
> Ken Jiang
>
> *******************************************
> Murata Electronics Trading  (Shenzhen) Co.,Ltd
> Tel:86-755-82847251
> E-mail:kenjiang@sz.murata.com.cn <E-...@sz.murata.com.cn>
> *******************************************
>
>