HTML Viewer: Copying images+text to another component

Hi folks,
I'm working on a Java app for a research project where I'd like to be able to view a webpage in one panel (with some HTML viewer) and then be able to select pictures AND text from it (web browser-style), click a button, and have it copy the images and text (even the HTML code behind it would be sufficient) to some JTextArea or whatever.
In other words, I'm trying to find an HTML viewer or browser which will be able to select both text and images and be able to copy the selection (as the real objects or even as HTML code, either way) so that it could be sent to some other component.
I believe that JEditorPane supports viewing HTML, but you can only copy text from it. So, can anyone recommend an API class or even some 3rd party software (no funds since it's academic research, so free is preferable) that can do anything close to this? Alternatively, does anyone know of some other work around -- for example, selecting in IE or another browser, then dragging it onto some component into the Java app?
Thanks a ton for any help!
-Jon

Try this..
create a new flex project and add a folder called "src"
create a new MXML component named "VideoComp.mxml" and copy/paste
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Script>
<![CDATA[
[Bindable]
public var videoWidth:int = 300;
[Bindable]
public var videoHeight:int = 300;
]]>
</mx:Script>
<mx:Label text="Vidoe" />
<mx:TextInput text="{videoWidth}" id="w" change="this.videoWidth = int(w.text);" />
<mx:TextInput text="{videoHeight}" id="h" change="this.videoHeight = int(h.text);" />
</mx:VBox>
create a new MXML component named, "SharingComp.mxml" add copy/paste this..
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300">
<mx:Script>
<![CDATA[
[Bindable]
public var videoWidth:int;
[Bindable]
public var videoHeight:int;
]]>
</mx:Script>
<mx:Label text="Sharing Comp." />
<mx:Label text="{videoWidth}" />
<mx:Label text="{videoHeight}" />
</mx:VBox>
and here is the main.mxml file
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:src="src.*">
    <mx:Script>
        <![CDATA[
            private function doSomething():void
             sharingComp.videoHeight = videoComp.videoHeight;
             sharingComp.videoWidth = videoComp.videoWidth;
        ]]>
    </mx:Script>
   <src:VideoComp id="videoComp" />
   <mx:Button click="doSomething()" label="copy" />
   <src:SharingComp id="sharingComp" />
</mx:Application>
Hope this helps,
BaBo,

Similar Messages

  • Copy a text from another dokument

    hello...
    if I want to copy a text it doesn`t take the textstile from pages automatically.
    do you know how I can set this up?
    thank ypu..
    best regards franzi

    It would be useful to read the page "Deleting, Copying, and Pasting Text" in the help
    In Deutsch it's spelled :"Löschen, Kopieren und Einsetzen von Text"
    Yvan KOENIG (from FRANCE lundi 7 juillet 2008 11:53:56)

  • Elements 9 organizer, folder location view & copying images

    I am using photoshop elements 9.0.3 under windows 7.
    In the "folder location" view, when I click on a folder I see pictures that belong to a completely different folder.
    How can I solve this problem?
    Also, is it possible to copy an image from one folder to another from within the organizer?

    If you always move images within Organizer you will have no problems.
    Problems only arise when users move images behind Organizers back e.g. using Explorer or Finder.
    Remember to select the Display button and thumbnail view to search the entire catalog otherwise your search will be limited to a single folder which matches the folder on your OS.

  • Copying a standard text into another text in so10

    Hello Gurus,
           I have an issue where i need to track offer letter,i have a standard text which is been automatically used in pb40 while generating offer letter and that is ww-offer-contract in which i need to change the code ( in textid palt )but it is read only document. i need to copy the text into another text.So that i can do the changes required in that.
    If i go with Utilities-->copy from client then it is allowing me to copy but not allowing me to change into it.it is giving me the dump.Since it is asking for the permission,i went for stop protection.but still it is giving me the dump.
    Any one plzz help me out with this.
    Thank you all.
    Edited by: BHAVANI MADIREDDY on Feb 12, 2008 12:34 PM

    There is a selection screen parameter
    parameters: par_bi like rfpdo1-f100buch   default ' '.
    Comment this and declare a variable and pass 'X' or space into that as per the requirement.

  • Copying header text to the billing text in the same document

    Hi,
       I just want to know ,can we copy one text to another text in the same document.it means that once we enter the header text , can it be copied into all the texts and inturn it should be copied to all the proceeding documents.
    Regards
    Ram Pedarla

    Hi,
    No, this will be not possible in SAP standard. U have to enter manually only in any of the following.
    If u enter text in customer master data of all types manually then u can copy the same into sales order all text types and like subseq doc automaically..
    In the same way if u dont want to maintian in custoemr and want to maintain in Sales order then maintain in all text types in order manually then it will be copied to subsequent document also automaitcally..
    Hope u have under stood..

  • RH7 Trial HTML View

    This discussion started with
    this
    thread. I am using the RH7 trial on a Windows XP SP2 machine
    and looking at a project with Japanese text in the topics. The
    project language is now set to Japanese. In Design view, the
    characters display properly, but in HTML view, all I get are
    squares. The encoding is utf-8, which must be RH7's default, so I
    would think it would work. If I open a topic in Notepad, the
    characters are showing up correctly.
    I am also getting squares in the TOC, glossary, and index
    panes. I was hoping when I heard about double-byte support that
    double-byte characters would render correctly throughout the
    interface in RH7, so I'm hoping this is something I can somehow
    change. Thanks for any help,
    Ben

    I am pretty certain that my computer does not have language
    packs installed. I looked into those some time ago as a way to have
    menus, etc. displayed on my machine in other languages, but we went
    with a different method.
    I followed Akshay's steps 1-3 but checked only the East Asian
    checkbox. My machine installed some files and asked to restart.
    When it booted back up and I opened my Japanese project in RH7, the
    Japanese characters show up in the TOC, glossary, and index
    pallettes and in HTML view with Courier New as my code font. In
    HTML view, the Japanese text doesn't all seem to display between
    tags and slides around a bit when I highlight it, but it looks like
    this is the closest I'll get and it should make things easier.
    Unless it would help with this strange behavior in HTML view,
    it looks like installing the language packs using the Windows XP
    SP2 CD is not necessary, which I was hoping because I would have to
    go through our tech support reps (who issue our workstations and
    manage the configuration) to get one. Thanks very much for the
    help!
    --Ben

  • Copy a text layer to another image in the same location

    I am trying to find a way to copy a text layer in one image to another image of the same size so that the text layer is in the exact same location.
    Basically I have two images for a rollover button for a website. What is the easiest way to copy a text layer to the other image so that it will be in the exact same location to create the rollover effect?
    Thanks!
    Nick

    Right click on the layer, Duplicate Layer, set destination to the other image file in the dropdown.

  • How do you set up so that you can view the alternate text on an image when you hover over it like you do in IE?

    Using Mozilla at present the alternate text for an image does not pop up when you hover your mouse over the image. This is what occurs in Internet Explorer. In Mozilla Firefox you have to right click, choose Properties and then you can view the alternate text. Is there a way to set up the mouse hover? Or is there a keyboard shortcut to at least view the Properties information of an image on a webpage quicker?

    The Alt attribute isn't meant to show as a tooltip on hover.
    The Alt attribute is meant to show if the image isn't or can't be displayed.
    The title attribute is meant to show if you hover an image or link.
    *http://kb.mozillazine.org/Image_tooltips_do_not_work
    Some extensions can interfere and disable the tooltip.
    * [[Troubleshooting extensions and themes]]
    * http://www.w3.org/TR/html401/struct/global.html#title title
    * http://www.w3.org/TR/html401/struct/objects.html#alternate-text
    *Popup ALT Attribute: https://addons.mozilla.org/firefox/addon/1933

  • How to copy/paste texts/images from webpages in iBooks Author?

    Hi,
    I want to copy/paste text/image contents from webpages with iBooks Author, somehow images can't be copied, only texts can be copied with copy/paste editing. Wonder if there are any ways to include images with simple copy/paste?
    Tried to search iBooks Author help, could not find answers. Please help.
    Thanks

    Perhaps the people who spent a lot of time and money to produce the websites.....and who own copyright ...don't want anybody using their work without payment or credits. Have you contacted the websites owners to ask permission? 
    IF any person(s)  use anything from websites without permission apart from being to lazy to email to request permission....could face a legal action if and when the sites owners fins out. 
    There is another her misconception that "free" websites and content on "social media" such as the dreaded FaceBook....can be used without consequence. Almost all "free" websites are common licence material - which requires permission and those who give permission do so only for personal or none profit reproduction.
    i Use a blocking script on my websites which apart from preventing a right click...those who try are whisked off  my website to the the UK copyright website page which explains my rights! 
    You may wish to check out your iBooks contract with Apple and read their warnings on use of others copyright material. 
    You could ..and should contact the websites...explain what you want to use and why....and ask them if they can supply media.

  • Dynamic Image Url html view

    Hi all,
    I am currentyl trying to display an image, which can be accessed by a http-url refering to an external server.
    The problem is, that that the displayed image is linked with the content...that means, that the image url has to be dynamic.
    Does anybody know how to solve this problem. I am currently mapping an url to the url-input of the html-view, but by starting the application the following error occurs:
    com.sap.tc.wd4vc.intapi.info.exception.WD4VCRuntimeException: No parser configuration entry for the tag HtmlView
    Does anybody know how to solve this problem?
    Thank you in advance.
    Kind regards, Patrick

    Hi Patrick,
    Are you still looking for the answer?
    Did you try the expression editor of the image control, where based on expression (ie., your content), image will be displayed.
    Are you storing the data (from where you pass the content to next UI component or next screen) in a data store; and taking the data store value in the expression editor of the image component?
    Let me know if it helps
    Regards,
    Vani

  • BIS users in Pakistan::: HTML email view with images

    Mobilink, service provider, has updated their BIS to 2.5 in July. But they are unable to provide HTML email view with images on Blackberry sets running on ver. 4.5.
    Mobilink says that it is only available to BES users at the moment. BIS users will get it late on.
    Please explain, is it a Mobilink issue or RIM? as all around the world BIS users are getiing it.

    i dont beleive this. RIM wont leave  out Mobilink, infact they cant. The upgrade was done on BIS servers across the board not for some service providers. You probably wanna try another device or may be re-install oS On device?
    chk this thread: http://supportforums.blackberry.com/rim/board/message?board.id=BlackBerryInternetSolution&thread.id=...
    Click on KUDOS to appreciate our efforts and mark the thread RESOLVED if your issue is resolved.

  • Text format + attached image files or Html format + displayed images ?

    Hi, I have this kind of probleme and I need some help.
    (Code : see below)
    I want to send a mail with some attached image files.
    For the message part, I create a MimeBodyPart and add two kinds of message (text or html) and this part is multipart/alternative.
    For the attachment part, I create another MimeBodyPart and I set the Header like this : xxx.setHeader("Content-ID", "<image>").
    When I use outlook (html format) , I receive a mail with the picture displayed at the bottom, it's perfect.
    However the problem is for the mailbox which is in text mode, I receive a mail with message + attachment files, but I also have some image frames generated by xxx.setHeader("Content-ID", "<image>") I guess.
    Who can give me a hand to implement something that able to make difference according to text format or html format.
    I post my code here, thanks a lot :
    //set Message
         msg.setText(pMsgText, DEFAULT_CHARSET);
         // Partie Texte brut
         MimeBodyPart textPart = new MimeBodyPart();
         String header = "";
         textPart.setText(header + pMsgText, DEFAULT_CHARSET);
         textPart.setHeader(
                   "Content-Type",
         "text/plain;charset=\"iso-8859-1\"");
         textPart.setHeader("Content-Transfert-Encoding", "8bit");
         // Partie HTML
         MimeBodyPart htmlPart = new MimeBodyPart();
         String images = BTSBackUtil.generateImgSrc(pictureContainers.length);
         String endPart = "</div>\n</body>\n</html>";
         htmlPart.setText(pMsgTextHTML+images+endPart);
         htmlPart.setHeader("Content-Type", "text/html");
         // create the mail root multipart
         // Multipartie
         Multipart multipart = new MimeMultipart("mixed");
         // create the content miltipart (for text and HTML)
         MimeMultipart mpContent = new MimeMultipart("alternative");
         // create a body part to house the multipart/alternative Part
         MimeBodyPart contentPartRoot = new MimeBodyPart();
         contentPartRoot.setContent(mpContent);
         // add the root body part to the root multipart
         multipart.addBodyPart(contentPartRoot);
         // add text
         mpContent.addBodyPart(textPart);
         // add html
         mpContent.addBodyPart(htmlPart);
         // this part treates attachment
         if (pictureContainers != null){
              PictureContainer pictureContainer = new PictureContainer();
              String fileName = "";
              for(int i = 0; i < pictureContainers.length; i++) {
                   pictureContainer = pictureContainers;
                   byte[] bs = pictureContainer.getImgData();
                   fileName = "image" + i +".jpg";
                   DataSource dataSource = new ByteArrayDataSource(fileName, "image/jpeg", bs);
                   DataHandler dataHandler = new DataHandler(dataSource);
                   MimeBodyPart mbp = new MimeBodyPart();
                   mbp.setDataHandler(dataHandler);
                   mbp.setHeader("Content-ID", "<image"+i+">");
                   mbp.setFileName(fileName);
                   multipart.addBodyPart(mbp);
    // end attachment
    msg.setContent(multipart);

    Hi All!!! I have created this code , i hope this w'll solve u'r problem , this code display u'r html text and display the images below on it, no need to attach the image...... byee.
    package Temp;
    import javax.activation.DataHandler;
    import javax.activation.DataSource;
    import javax.activation.FileDataSource;
    import javax.activation.URLDataSource;
    import javax.mail.Authenticator;
    import javax.mail.BodyPart;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.PasswordAuthentication;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.AddressException;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    public class HtmlImageExample {
    public static void main (String args[]) throws Exception {
    String host = "smtp.techpepstechnology.com";;
    String from = "[email protected]";
    String to = "[email protected]";
    //String to = "[email protected]";
    String dir=null;
    //String file = "C://NRJ/EmailApp/src/java/MailDao//clouds.jpg"];
    //File file = new File("C:\\NRJ\\EmailApp\\src\\java\\Temp
    Sunset.jpg");
    // Get system properties
    //Properties props = System.getProperties();
    HtmlImageExample html1 = new HtmlImageExample();
    html1.postImage(to,from);
    // Setup mail server
    String SMTP_HOST_NAME = "smtp.techpepstechnology.com";//smtp.genuinepagesonline.com"; //techpepstechnology.com";
    String SMTP_AUTH_USER = "[email protected]"; //[email protected]"; //techpeps";
    String SMTP_AUTH_PWD = "demo"; //techpeps2007";
    //my code
    public void postImage(String to, String from) throws MessagingException, FileNotFoundException, IOException
    Properties props = System.getProperties();
    props.put("mail.transport.protocol", "smtp");
    props.put("mail.smtp.host", SMTP_HOST_NAME);
    props.put("mail.smtp.auth", "true");
    // props.load(new FileInputStream(file));
    Authenticator auth = new SMTPAuthenticator();
    Session session = Session.getInstance(props, auth);
    // Create the message
    Message message = new MimeMessage(session);
    // Fill its headers
    message.setSubject("Embedded Image");
    message.setFrom(new InternetAddress(from));
    message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
    message.setContent
    h1. This is a test
    + "<img src=\"http://www.rgagnon.com/images/jht.gif\">",
    "image/jpeg");
    // Create your new message part
    //BodyPart messageBodyPart = new MimeBodyPart();
    //mycode
    MimeMultipart multipart = new MimeMultipart("related");
    MimeBodyPart mbp1 = new MimeBodyPart();
    // Set the HTML content, be sure it references the attachment
    String htmlText = "<html>"+
    "<head><title></title></head>"+
    "<body>"+
    " see the following jpg : it is a car!
    "+
    h1. hello
    "+
    //"<IMG SRC=\"CID:Sunset\" width=100% height=80%>
    "+
    "<img src=\"http://www.yahoo.com//70x50iltA.gif\">"+
    " end of jpg"+
    "</body>"+
    "</html>";
    mbp1.setContent("h1. Hi! From HtmlJavaMail
    <img src=\"cid:Sunset\">","text/html");
    MimeBodyPart mbp2 = new MimeBodyPart();
    mbp2.setText("This is a Second Part ","html");
    // Fetch the image and associate to part
    //DataSource fds=new URLDataSource(new URL("C://NRJ//MyWeb//logo.gif"));
    FileDataSource fds = new FileDataSource("C://NRJ//MyWeb//Sunset.jpg");
    mbp2.setFileName(fds.getName());
    mbp2.setText("A Wonderful Sunset");
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setHeader("Content-ID","<Sunset>");
    // Add part to multi-part
    multipart.addBodyPart(mbp1);
    multipart.addBodyPart(mbp2);
    message.setContent(multipart);
    // Send message
    Transport.send(message);
    //mycode
    private class SMTPAuthenticator extends javax.mail.Authenticator
    public PasswordAuthentication getPasswordAuthentication() {
    String username = SMTP_AUTH_USER;
    String password = SMTP_AUTH_PWD;
    return new PasswordAuthentication(username, password);

  • Hi I've a big problem with adobe acrobat reader XI pro and I hope you can help me. The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reade

    Hi
    I've a big problem with adobe acrobat reader XI pro and I hope you can help me.
    The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reader (adobe pdf reader, internet browsers, ...etc.).
    This problem started to happen since yesterday when I installed adobe acrobat reader XI pro to try it before I buy it, and before that when I was using the free adobe pdf reader I was totally able to copy any text from any pdf and past it anywhere with nothing wrong.
    What can I do?
    thank you a lot.

    There is no product called Adobe Acrobat Reader Pro. There is
    - Adobe Acrobat Pro ($$)
    - Adobe Reader (free)
    Which do you have? And are you a programmer?

  • After selecting an image in Library mode (grid view), my selection of image jumps to another image.

    Through several versions of Lightroom, I have encountered this problem.  I choose an image in Library mode while in Grid view and the image jumps to another that I have not chosen.  This happens about 75% of the time.  Does anyone else have this problem?  Does anyone know of a remedy.  I am using a Mac.

    HMSieg wrote:
    I am using a Mac.  I followed the platform specific instructions to find the preferences file but it is not there.  I also did a global search of my computer and the file did not show up.
    You are using the Option key to access the Library under the Go finder Menu?
    Click in the Go menu the hold the Option key and you will see Library appear, otherwise is is hidden.

  • Reading the data from one component view into another component view

    Hi All,
    I have requirement to read the data from one component into another component while creating the service order. Here are the details.
    Main View for Service order: BT116H_SRVO in that we have two assignment blocks like Organizational data(BTORGSET) and amount allocation(BTAMNTALL).This two blocks are two different component which are associated with main component(BT116H_SRVO).
    I need to read the sales org data from component/View(BTORGSET/Orgsetdata) into Component/View(BTAMNTALL(HdrBillPlanDet) method DO_VALIDATE_INPUT.
    I searched in SDN but all the posts are related to the data exchange between two views in same component. But My scenario is different as explained above.
    Refer the attachments for the component link..
    Please let me know how we can achieve this one..
    Thanks,
    Sapsar.

    Finally I was able to fix my code...My Mistakes were need to read the parent node above three levels and need to use the relation entity name while reading the data..
    Below is the correction code
    IF iv_index IS NOT INITIAL.
         lr_iterator ?= collection_wrapper->get_iterator( ).
         lr_current ?= lr_iterator->get_by_index( iv_index ).
         lr_entity ?= lr_iterator->get_by_index( iv_index ).
       ELSE.
         lr_current = collection_wrapper->get_current( ).
       ENDIF.
    *loop back to root entity
             WHILE lr_entity->get_name( ) NE 'BTAdminH'.
               lr_entity = lr_entity->get_parent( ).
             ENDWHILE.
    *Get the related entity
             IF lr_entity IS BOUND.
               lr_collection ?= lr_entity->get_related_entities( iv_relation_name = 'BTHeaderOrgmanSet' ) .
               IF lr_collection IS BOUND.
                 lr_orgset_m = lr_collection->get_current( ).
    *            lr_orgset = lr_orgset_m->get_related_entity( iv_relation_name = 'BTOrgSet' ).
                 lr_orgset = lr_orgset_m->get_property_as_string( 'SALES_ORG' ).
               ENDIF.
             ENDIF.
    Thanks,
    Sapsar.

Maybe you are looking for

  • Help me about Ai CS3

    anyone can help me about this http://bluelobsterart.com/images/tutorials/interface-illustrator-lg.gif anyone can share their function i need only the Panel Icons and Panel Menu sorry for my english..

  • Call a function in jsp

    in html we can call a user define function at any event and include the function within <script> </script>. eg: <script language="javascript"> <!-- function GetData() { // do something --> </script> <input type="submit" text="submit" onclick="GetData

  • How can I turn off the ability to turn off the phone from the lock screen for more security?

    How can I turn off the ability, to turn off the phone, from the lock screen for more security?

  • Send back an error msg to previous page

    hi all, can anyone tel me hw shud i send back an error to previous page and write tht error msg in the same cell of table where text field was null or empty. hw can i sene addtional info with sendRedirect() using sendRedirect("..url...?add=var1"); as

  • Anyone use an UC-33e as a Logic control?

    And if so, how is it? I see that you have to import an environment for it to work but that's easy enough. Chris