Area for selecting text

Hello,
I am looking for something like a text area where text will be selected when clicked on it.
Suppose I have a lunchroom:
On my system I have a panel with several products that people can order.
When I click on a product, I want that in another part of the panel the price apears.
Is there such a component in Java?? If yes, can somebody tell me what the name of that component is please?
thanks,
Daniel

A javax.swing.JList will list items and highlight them when clicked. Also, if you use a javax.swing.event.ListSelectionListener you can detect when an item is clicked, and display the appropriate information elsewhere.
Look at this link for the JList tutorial:
http://java.sun.com/docs/books/tutorial/uiswing/components/list.html

Similar Messages

  • Text Area for long text not appearing properly for BBP_POC_DISPLAY Service

    Hi,
    In our development we have added additional Icon at ITS in Process PO transaction and onclicking  that icon Web dynpro AB screen called with the Purchase Order No of selected row .(SRM 5.0)
    There is one more icon in Web dynpro screen on click of that Purchase order service open in ITS with display mode .This is achieved with service BBP_POC_DISPLAY from Web Dynpro-AB.
    This is also working ok only the issue is in Document tab of PO The Text Area for long text appear at Top  .This functionality is working fine with BBP_POC  service from ITS .
    Has anybody faced this kind of issue ?
    Thanks,
    SMS

    Hi SMS,
    I am unsure of the additional component you are talking about. In general, issues with text area misplacing, is solved by note 1067625. May be you can check it.
    thanks,
    Ashwin

  • Blue color for selected text

    Hello, is any way to change blue color for selected text which is the same as for invisible characters? When I select text all unvisible characters are realy unvisible... In old ID selected text was black and invisible characters inside was orange. Many thx for help... Ilja

    For sure I tried to use "select text" in Illustrator CC on the same system (windows 7) and selected text is black too...
    Many thx for help
    Ilja
    PS
    I must agree with the post about very slowly ID CC. I tried the same indd files in CS6 and CC and CC is slowly in large documents (500 pages and more), for ex. find/replace, but when document is near its end (aprox 80-100 pages) ID CC is much faster than at the start of document. Now I am working on large doc (540 pages) with many headers (aprox 3-4 on each page) and when I want change space for non-breaking space on pages between 1-100, this takes sometimes more than 2 seconds!!! Only simple space change - no styl change etc.
    I think that I am using fast PC (Intel i7, 16GB RAM, SSD disks - cache is on separated mSATA 30GB SSD), all doc are located inside PC, no external drives for normal day work) and I never seen these lags on CS6. Doesn't matter if I using ID CC 32 od 64 bit - it is aprox the same.

  • [CS3][JS] Apply XML tag for selected text

    Hi
      I need to apply XML tag to selected text in a tagged content.The XML tag is already applied for paragraph.I need to apply XML Tag for selected text in a paragraph.
    I have used following code, it applies tag for entire paragraph,not a selected text in a paragraph.
    app.selection[0].associatedXMLElements[0].markupTag=myDoc.xmlTags.item("italic");
    Please suggest me.
    Regards
    kumar

    The example script, markup.jsx
    //Markup.jsx
    //An InDesign CS4 JavaScript
    //Shows how to use the markup method.
    main();
    function main(){
        mySetup();
        mySnippet();
        myTeardown();
    function mySetup(){
        var myDocument = app.documents.add();
        var myPage = app.activeWindow.activePage;
        var myRootXMLElement = myDocument.xmlElements.item(0);
        var myXMLTag = myDocument.xmlTags.add("xml_element");
        var myXMLElementA = myRootXMLElement.xmlElements.add(myXMLTag);
        myXMLElementA.contents = "This is a paragraph in an XML story.";
        var myTextFrame = myPage.textFrames.add({geometricBounds:myGetBounds(myDocument, myPage)});
        myTextFrame.contents = "This is the first paragraph in a text frame.\rThis is the second paragraph in a text frame.\rThis is the third paragraph in a text frame.\rThis is the fourth paragraph in a text frame.\r";
    function mySnippet(){
        //<fragment>
        var myDocument = app.documents.item(0);
        var myPage = myDocument.pages.item(0);
        myDocument.xmlElements.item(0).xmlElements.item(0).markup(myPage.textFrames.item(0));
        //</fragment>
    function myTeardown(){
    function myGetBounds(myDocument, myPage){
        var myPageWidth = myDocument.documentPreferences.pageWidth;
        var myPageHeight = myDocument.documentPreferences.pageHeight
        if(myPage.side == PageSideOptions.leftHand){
            var myX2 = myPage.marginPreferences.left;
            var myX1 = myPage.marginPreferences.right;
        else{
            var myX1 = myPage.marginPreferences.left;
            var myX2 = myPage.marginPreferences.right;
        var myY1 = myPage.marginPreferences.top;
        var myX2 = myPageWidth - myX2;
        var myY2 = myPageHeight - myPage.marginPreferences.bottom;
        return [myY1, myX1, myY2, myX2];
    I think you can use the markup function on the selected item (Text Object have a markup method)
    Thomas B. Nielsen
    http://www.lund-co.dk

  • Create new tag for selected text using API?

    Hello,
    I want to add new tag for the selected text just like 'Create Tag from selection' .
    is it possible to create tag for selected text using acrobat api?
         please,help me.

    As per sample of snippetRunner for adding tag for selected text.
    I tried below code
    PDPage pg;
    AVDoc avDoc = AVAppGetActiveDoc();
    PDDoc pd = AVDocGetPDDoc(avDoc);
        pg = PDDocAcquirePage(pd, 0);
    ASAtom theSelectionType = AVDocGetSelectionType(avDoc);
    if (theSelectionType == ASAtomFromString("Text")){
        PDTextSelect ts = static_cast<PDTextSelect>(AVDocGetSelection(avDoc));
        PDSTreeRoot pdsTreeRoot;
        CosObj pageObj = PDPageGetCosObj (pg);
        PDSElement newElem;
        PDSElementCreate(pd, &newElem);
        char buf1[64];
        strcpy (buf1, "A new structure element");
        // set its type as "Document" standard type
        PDSElementSetType(newElem, ASAtomFromString ("Document"));
        // set its title
        PDSElementSetTitle(newElem, reinterpret_cast<const ASUns8*> (buf1), strlen(buf1));
        PDSTreeRootInsertKid (pdsTreeRoot, aElem, kPDSAfterLast);
        PDSElementInsertMCAsKid // here something i have to add
    If i have PDTextSelect how i can add tag for selected text.like user add tag using "CreateTagForSelectedText" option.
    please,help me.
    thanks.

  • Pages '09: Can't use AppleScript for selected text inside tables?

    When I run get selection on selected text in a Pages document, I get something like this:
    <pre>text from character 1 to character 4 of body text of document id 9943974 of application "Pages"</pre>
    When I run get selection on selected text inside a table cell in a table in a Pages document, I get something like this:
    <pre>text from character 1 to character 4 of some table of document id 3539679 of application "Pages"</pre>
    When I run get selection on selected text inside a table cell in ANOTHER table in the same Pages document, I get the exact same thing. It still says "some" table. So there is no way to distinguish between tables if there are more than one table in the same Pages document.
    Am I correct in understanding that this means that most AppleScript commands for manipulating text are unusable inside table cells?
    For example, it seems impossible to get the properties of the selection when the selection is selected text inside "some" table. So it's impossible do anything about text styles, etc.
    Is AppleScript support in Pages ’09 really that limited, or am I missing something?

    The first script below should return the character style of any selection made in Pages ’09, whereas the second script should apply the "XXX" character style to any selection:
    --BEGINNING OF SCRIPT 1
    tell application "Pages"
    activate
    tell application "System Events" to tell process "Pages"
    -- Show the format bar:
    if not (pop up button 1 of window 1 exists) then
    click menu item "Show Format Bar" of menu 1 of menu bar item "View" of menu bar 1
    end if
    -- Show the styles drawer and character styles:
    if menu item "Show Styles Drawer" of menu 1 of menu bar item "View" of menu bar 1 exists then
    keystroke "t" using {shift down, command down}
    end if
    tell front window
    tell checkbox 1 of group 1 of drawer 1 -- “Show or hide character styles.” checkbox
    repeat until it exists
    delay 0.1 -- wait until the styles drawer is open
    end repeat
    if description is "show character style" then click
    end tell
    -- Get the row index (although it is not a property) of the character style:
    tell menu button 2 -- “Choose a character style.” menu button
    click
    set k to 0
    repeat
    set k to k + 1
    if value of attribute "AXMenuItemMarkChar" of menu item k of menu 1 exists then exit repeat
    end repeat
    keystroke return -- hide the menu
    end tell
    -- Get the character style name:
    if k > 1 then set k to k + 1
    value of static text 1 of row k of outline 1 of scroll area 2 of splitter group 1 of group 1 of drawer 1
    end tell
    end tell
    end tell
    --END OF SCRIPT 1
    --BEGINNING OF SCRIPT 2
    set myStyle to "XXX" -- the name of the character style you want to apply
    tell application "Pages"
    activate
    tell application "System Events" to tell process "Pages"
    -- Show the format bar:
    if not (pop up button 1 of window 1 exists) then
    click menu item "Show Format Bar" of menu 1 of menu bar item "View" of menu bar 1
    end if
    -- Show the styles drawer and character styles:
    if menu item "Show Styles Drawer" of menu 1 of menu bar item "View" of menu bar 1 exists then
    keystroke "t" using {shift down, command down}
    end if
    tell front window
    tell checkbox 1 of group 1 of drawer 1 -- “Show or hide character styles.” checkbox
    repeat until it exists
    delay 0.1 -- wait until the styles drawer is open
    end repeat
    if description is "show character style" then click
    end tell
    set characterStyles to value of static text 1 of rows of outline 1 of scroll area 2 of splitter group 1 of group 1 of drawer 1
    set k to 0
    repeat with thisStyle in the characterStyles
    set k to k + 1
    if thisStyle as text is myStyle then exit repeat
    end repeat
    -- Apply the character style:
    if k > 1 then set k to k - 1
    click menu button 2 -- “Choose a character style.” menu button
    click menu item k of menu 1 of menu button 2
    end tell
    end tell
    end tell
    --END OF SCRIPT 2
    I suppose that +paragraph styles+ should work the same.
    I'm beginning to know Pages ’09 a little better now.
    Message was edited by: Pierre L. (show format bar)

  • SetFont for selected text in JTextArea

    Hi there,
    I'm trying to build a small Texteditor.
    How do you set a selceted area of text to fx. BOLD font?
    I can of course set the font for the whole JTextArea via the setFont method, but what about a smal selection.
    Also: setFont seems to take no less than 3 arguments (fontname, style, size). Is it possible just to set the selected font as the same as before, but BOLD??
    Kind Regards
    Thomas

    Alright, so here I go :
    I've been working for two months on a TextEditor/HTMLEditor, but I'm not allowed to share my code (I work for a company that wants to use this editor).
    There are a lot of stuff that you should know about "javax.swing.text" package if you want to get initiated to Editors programming with Swing components.
    Well, first of all, I'm going to answer to your punctual question :
    You can't set style attributes ( color, bold, italic, ...) to specifc text elements in a JTextArea, you have got to use a JEditorPane or a JTextPane. (JTextPane lets you deal with the notion of "Styles"... but this is a bit complex for a simple editor, so I suggest you to just stick to the JEditorPane).
    Any of these three Components has a document model related to it. These document models can be of different types. For example, PlainDocument, StyledDocument, HTMLDocument, etc...
    A JTextArea can only have PlainDocument bound to it. These documents don't keep info about color, font, bold, and stuff for specific portions of text.They apply it to all content.
    JEditorPane can have PlainDocuments, HTMLDocuments and I think they can have StyledDocuments.
    To set bold to selected text you've got to do this :
            import javax.swing.text.*;
            int posStart = editorPane.getSelectionStart( );
            int posEnd =  editorPane.getSelectionEnd( );
            int selLength = posEnd - posStart;       
            MutableAttributeSet atr = new SimpleAttributeSet();
            StyleConstants.setBold(atr,true);
            StyledDocument doc = editorPane.getDocument();
            //Check out false in the following instruction
            // it means that any other attribute existing should
            // be kept if it has not be redefined in the attribute you are applying
            doc.setCharacterAttributes(posStart,selLength,atr,false);         That's it.. that's the way to do it.. the same principle applies for any other attribute,
    for example if you also wanted to change font you could have added the following :
            StyleConstants.setFontFamily(atr,"Arial");Alright, so know I'm going to give you the good adresses to learn stuff about Editors, here I go:
    * The Swing Connection Articles (hard to understand for a newbie but really helpful ):
    http://java.sun.com/products/jfc/tsc/articles/index.html (Check out the TextPackage Articles)
    * Manning Matthew Robinson and Pavel Vorobiev Swing book (it's all online for free)
    This is the absolute reference, step by step examples. Check out Chapter 20 : Constructing a
    Word Processor. (This is I guess the best stuff available online about constructing Text and HTML Editors in Java with Swing)
    http://www.spindoczine.com/sbe/

  • Drop down in report for selection texts on selection screen

    Hi,
    I have a selection screen for a custom report on which there is a selection-option for entering text-symbol value from selection texts of the same report.
    Could anybody please let me know how to put a drop-down so that users can see selection texts before entering into this free form field.
    Otherwise, could anybody let me know which table stores text symbols of the report?
    Regards
    Kasi

    Hi,
    Here is the sample code for dropdown list box in the selection-screen,
    SELECT-OPTIONS: LB_MACRO_KOART    MYLIST(1)  5  COMMENT.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM ADD_VALUES_TO_KOART.
      COMMENT = 'Account type'.
    END-OF-SELECTION.
    *&      Form  add_values_to_koart
          text
    -->  p1        text
    <--  p2        text
    FORM ADD_VALUES_TO_KOART .
      TYPE-POOLS: VRM.
      DATA: MY_LIST  TYPE VRM_VALUES,
            VALUE LIKE LINE OF MY_LIST.
           i_tab TYPE TABLE OF bseg WITH HEADER LINE.
      DATA : BEGIN OF I_TAB OCCURS 0 ,
             KOART TYPE C,
             END OF I_TAB.
      CLEAR I_TAB.
      I_TAB-KOART = 'A'.
      APPEND I_TAB.
      CLEAR I_TAB.
      I_TAB-KOART = 'D'.
      APPEND I_TAB.
      CLEAR I_TAB.
      I_TAB-KOART = 'K'.
      APPEND I_TAB.
      CLEAR I_TAB.
      I_TAB-KOART = 'M'.
      APPEND I_TAB.
      CLEAR I_TAB.
      I_TAB-KOART = 'S'.
      APPEND I_TAB.
      CLEAR I_TAB.
    Regards,
    Azaz Ali.

  • Language issue for selection texts

    Hi All,
    There is a auto generated program, for which I am facing a language issue.
    When I logon the system in EN language, I can see the the selection text in english language.
    However when I logon to system in DE language, it just displays the variable name in the selection screen.
    When I click on the selection text, the following info msg is displayed: "Not translated texts from the original language DE be interfered".
    What does this message mean? Can I view the selection text in English language when i am logged in DE language.
    Since this is an auto generated program, I am not authorised to do the changes.
    Thanks

    Hi Rohit
    Ask your basis team to give you authorization for these two authorization objects:
    S_QUERY_ALL          Change, maintain and translate query
    S_QUERY_UPD         Change and Translate
    If you have these authorizations you can go and change the translation in ABAP Query which is generated by using SQ01 tcode.
    If you have the authorization for above mentioned authorization objects the nuse tcode :
    SQ07 and you can translate your query.
    Regards
    Neha
    Edited by: Neha Shukla on Nov 28, 2008 3:57 PM

  • After my Firefox updated to version 8.0, my mouse started acting up. It is difficult to click on links, sometimes it takes a few tries. Same goes for selecting text, which has become an ordeal. Is anyone else experiencing mouse issues after updating?

    Clicking, right-clicking, and selecting is very awkward after the latest update, and many times requires more than one try. At first I thought it was just my mouse that was having issues, but then I realized it only happens in Firefox.

    It may be that your hard drive is either failing again or that the hard drive bay SATA cable may need replacing. And if you're getting a "Service Battery" anyway it's probably best to take the machine into your local Apple Store or an AASP and get a free diagnosis and estimate for repair. I would specifically ask that the SATA cable be tested so that you can tick that off the list of culprits.
    Good luck,
    Clinton

  • Tagging for selected Text

    Hi All,
    I am new in Illustrator and through scripting am trying to tag the each line in the text Frame. Same way as InDesign does - Frame Tag and Inline Text Tag.
    Is that possible? if so how and if no is there similar concept avialable in Illustrator which can be used?
    Thank you all in advance.
    Regards
    Farzana.

    Hi All,
    I am new in Illustrator and through scripting am trying to tag the each line in the text Frame. Same way as InDesign does - Frame Tag and Inline Text Tag.
    Is that possible? if so how and if no is there similar concept avialable in Illustrator which can be used?
    Thank you all in advance.
    Regards
    Farzana.

  • Selection texts are transported along report....

    hi friends i have a doubt regarding selection texts.
    i created selection texts for my report program . when i transport my report are this selection texts are transported along with my report or else do i need to do it explicitly.....

    Hi Chaitanya,
    When you transport you report, all the Text Elements i.e. Title and Headers, Selection Texts and Text Symbols also get transported along with your report.
    You need not do explicitly.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • Selecting text from insertion point

    I want to select all of the text from the insertion point to the end of the file. The instructions I can find for this say to shift-click. I insert the cursor in the text and hold down the shift key and click, and nothing happens. Any suggestions?

    You must shift+click at the position you want to select to. If your cursor is here | and you shift+click here ->, everything from "and" to "here" is selected. So to select from your current position up to the end of a story, set your cursor to the start, scroll to the last visible character of that story (it only works with one continuous story, in multiple connected text frames) and shift+click there. The end of the current story is marked by a # -- visible with "Show Invisible Characters".
    It's easier to use the keyboard for this particular task. Cmd (or Ctrl) + End moves the cursor to the end of the current story, even if it's not visible on screen! (If that's the case, the last text frame has a bright red + on its lower right.) To select from the current position to the end, hold down Shift as well.
    These are the usual mouse operations and keystrokes for selecting text in any text editing app I could think of, on both Windows and Mac.

  • TRANSPORTING SELECTION TEXTS

    Hi
    Am working on a programme and i need this to be transferred to quality system.Can anybody tell me that the selection texts of this programme will be transported along with it or do i need to follow any separate procedure to transport selection texts...
    thanks..

    if you are creating selection texts for the first time for your program it asks for the request number,
    give your earlier request number that you created for your program.
    if you are Transporting your  program from DEV -
    > Quality,program will takes selection texts.
    suppose if your program already transported,now you are trying to create selecetion texts,you need to create separate TR for that and transport it seperately...
    Hope it helps.....

  • Selecting Text/Cells (MS Office)

    I want to create Microsoft Office "Try It - assessment" simulations and i am wondering if "clicking and dragging to select text/table cells-columns etc, and the resulting highlighted text/table" is supported. How can i do this in Captivate 5.5?  (I also have ELS 2.5)
    If it is not directly supported is there a work around? i.e. check for an inital mouse click and then a mouse release action, use a widget, create it in Flash (i have limited experience in Flash so a URL showing this would help).

    Thanks for help and good tips.
    I found another workaround for selecting text in Word, selecting cells in Excel  - i'll display a button called "Shift" to mirror the action of the Shift key on the keyboard. Click where you want to start your selection, click the Shift button (show it in down state), click where you want to end the selection - text is highlighted.
    I can also use the Shift button and Copy command to copy formula in Excel..
    (The following forum discussion outlines why "Shift/Control and Click" are NOT supported in Captivate - http://forums.adobe.com/message/3957662#3957662).
    I will have to use the Full Motion Recording for mouse down and drag actions in Word and Excel. And the Flash option.... well with my limited experience that will have to wait for another day : )

Maybe you are looking for

  • Search feature in flash

    hi i need help with this please..... i wanted to add a search feature for a flash website....i am adding some data lists to the website and i wanted to have a search feature.....could you also please advise me if i should use xml for adding the lists

  • HEADS UP! New Oracle Hotnews note was released today!

    Hi! In case you didn't know this already. A new SAP Hotnews was released. 2011199 - SAP Bundle Patches (SBP) - structure changes starting with June 2014 As this is a major change in the patching procedure, you may read this before planning any SBP in

  • HT1848 How can I save iTunes movies on an external HD?

    I'm trying to transfer my iTunes movie library from my iPad2 to my external HD, because my PC's internal SSD doesn't have enough memory to hold all the movies.  Any ideas?

  • Find Wraped Source In Oracle...

    Hi all, how can i findout wraped function and procedure ... in oracle database Regards Gopinath M

  • OSB http headers management

    I have a scenario where my osb messages are rejected by the target server, while the same messages are accepted when sent by wget. The only difference between the two requests is represented by the http headers. The first thing to notice was that mos