JList Select and Deselect

well, i set my JList to be multiple selection mode,
say i made two selection on my jlist
and how could i deselect of them !
thx in advance!
Sam

You can use CTRL+click with your mouse in the interface to select and deselect things in multi-mode.
If you want to select/deselect things from inside your code, try using the setSelectedIndices(int[] indices) method which you can find in JList. It should remove whatever selections were made and instead select those items that you specified in the array.

Similar Messages

  • Applet select and deselect by JCRE

    Hi,
    I wonder why, in term of technical design, applet should have "select" and "deselect" method. This implies that the applet can select/ deselect by its self. (invoking these methods inside another method)
    However, the JCRE is the one who perform applet selection. Therefore, the right location to define select and deselect should be in the JCRE implementation.
    Do you have the same idea or there are advantages by defining select, deselect in each applet to be considered?
    thanks,
    Hoang Long

    Some secure Java Card platforms check that the caller's context is the JCRE, hence making the (de)select() un-invokable by anything else than the JCRE.
    You shouldn't do anything critical in the deselect() method, as you have no guarantee that it will be invoked, in particular when a power loss occurs.
    For more information, you should read the JCRE specification, there are some chapters on process()/select()/deselect() methods.

  • JList selections automatically deselect on mouseout

    Hi,
    I'm having a problem with a JList that's contained within a JPanel that's contained within a JTable cell. The problem is that whenever I select a row in the JList and then leave the JList (to some other portion of the JPanel) the selection gets deselected. That way I can never click on a button that resides on the JPanel that should call an action using the selected item from the JList. Has anyone experienced this?

    If im getting your problem right theres a simple solution. Your list in the table cell is a TableCellEditor right? but when your done editing the value it switchs back to the TableCellRenderer. So if your renderer is another list its normal that this list has no item selected
    My advice, either take the same list as your renderer and editor or code your renderer to check the new selected value and to update his list.
    Hope it helps.

  • AA6 - Move To Beginning/Ending Of A Selection And Deselect

    Hello...
    In AA3- you could make a selection, then click at the beginning/ending of the selection.  It would deselect the selection and move the play head to that position.
    In AA5.5 you had to use the left/right arrows to do the same task.
    In AA6, neither work.  If you left/right arrow, the play head moves but it moves down/up the timeline (not to the beginning/ending) and it doesn't deselect.  Ctrl+left/right arrow does move the play head to the appropriate places (as well as other places) but it doesn't deselect.
    Is there a way to do this with AA6?
    I used it a lot when doing track breaks for cd (home, shift+click at 5:00, f8, right arrow, shift+click at 10:00, f8, etc...).  I also used it where I wanted to have only 0.5 seconds of extra silence at the beginning/ending of some audio (click at the beginning of the audio, drag backwards 0.5 seconds, left arrow, shift+home, delete).
    JJ

    Since you're doing this for CD, I think I have a method that would be faster for you.
    1. Home, Shift+M (This sets the playhead to the start and places a CD Track Marker at the playhead).
    2. Click where you want this track to end and the next to start and again press Shift+M.
    3. Continue placing single point CD Track Markers at each location where you want the last track to end and the new one to start (including adding one to the very end).
    4. When all markers have been added, open the Markers Panel and select all the markers.
    5. Press the icon in the Markers Panel for "Merge selected markers".
    Now if you want to burn the CD, just go to "File > Export > Burn Audio to CD..." and we will burn a CD with track markers where you hae defined them.
    --Ron

  • Problem selecting and deselecting photos

    My mind is confused.  Last night I was carefully selecting photos from about 900 in the browse view.  I held down the command key continually and then left clicked one image I wanted after another.  Sometimes after chosing 45 images, sometimes after only 10, Aperture 3 would on its own start all over.  The count at the bottom of the view would reset to 1.  All the images I had just selected were deselected.  I did this seveal times, always being very careful to click only in the images and no where else.  The thumbnails were large, so accuracy was not an issue.  I would scroll down using the wheel, always holding down the command key.  It seemed to have a mind of its own.  i'm well familiar with the Finder interface, so it wasn't me being clunky.  I repeated this behavior a number of times...baffling behavior.  Besides Aperture 3 being beastly slow on my imac, this was extremely irritating and buggy.  Am I the only one who has experienced?  What say you Apple?  Thank you collective.

    Thanks Mark, but you answered what I already included within my question. I wrote "So it's that, or disabling the hyperlink, move the object normally, and putting the hyperlink on again"
    With that, to "Uncheck the "Make hyperlinks active" you need to first select the object, and you end up back to the first and second problem I wrote.

  • Selecting and Deselecting Images in Aperture

    Is there anyway to select images in Aperture and keep them selected until you deselect them? For example if I close Aperture I would like to be able to comeback and the images are still selected.

    No, Aperture won't remember your selection after quitting.
    You can get around this by creating a new album from selection, or a assigning a temporary keyword 'selected' which you can then filter for when relaunching aperture to select the same images again.

  • Select and deselect all in ALV

    Hi,
    I have created an ALV that has a Check box as the first field as the first field of the row.
    Now when I press SELECT ALL nothing gets selected.How can i correct it,
    Thnx in advance

    Hi chirantan,
    1. To get a taste of it,
       just copy paste this program.
    2. It will display alv (t001)
      and DOUBLE-CLICK ON any row.
       It will TICK ALL THE CHECKBOXES.
    (Instead of double-click, u can check for the user-command
    of select all button )
    3.
    REPORT abc.
    TYPE-POOLS : slis.
    Data
    DATA : BEGIN OF itab OCCURS 0.
            INCLUDE STRUCTURE t001.
    DATA : flag tyPE c,
           END OF itab.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvly TYPE slis_layout_alv.
    Select Data
    SELECT * FROM t001 INTO TABLE itab.
    *------- Field Catalogue
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_internal_tabname     = 'ITAB'
        i_inclname             = sy-repid
      CHANGING
        ct_fieldcat            = alvfc
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2
        OTHERS                 = 3.
    Display
    alvly-box_fieldname = 'FLAG'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        it_fieldcat             = alvfc
        i_callback_program      = sy-repid "<-------Important
        i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
        is_layout               = alvly
      TABLES
        t_outtab                = itab
      EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
    CALL BACK FORM
    FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
      LOOP AT itab.
        itab-flag = 'X'.
        MODIFY itab.
      ENDLOOP.
    IMPORTANT.
    WHATROW-REFRESH = 'X'.
    ENDFORM. "ITAB_user_command
    regards,
    amit m.

  • Selecting and deselecting desktop background images

    Can I select which Apple photos to use when setting desktop background to Change Picture? Put another way, can I deselect pictures I don't want to see? I hoped the "-" box at the bottom of the list would let me deselect folders or even specific images within folders, but it doesn't. I would like to have only the nature pictures in the Change Picture rotation.

    You would have to create your own folder or album with select photos for this type control.
    Use the + sign to add your album.

  • Is there a keyboard shortcut to select and deselect items?

    Using the mouse or trackpad to position the cursor over the checkbox to select dozens of tracks in my library is tedious. Is there a keyboard shortcut that will allow me to use the arrow keys to move up or down to select items?

    Jon,
    On Windows, it's the "/" key. Try Googling "lightroom keyboard shortcuts" and going to the Victoria Bampton site. She has a .pdf file with a complete list.
    Hal

  • Question concerning Selecting and Deselecting Toggle Buttons

    Hello Everyone,
    I am still relatively new to the adobe web suite (still in the trial period in fact). I am working on creating a mock-up of a main web page design to demonstrate and discuss with management. The decision associated with such would determine if we go forward with purchasing adobe products, continuing a redesign of our website among many other things.
    The big issue that I am running into at the moment is creating a series of interactive thumbnails.
    I have the following set up on the page:
    - A section for the actual image (full sized) complete with a title and description provided at the side for one of potentially many topics.
    - Below the topic/image section is a series of thumbnails, which the first one is set for full opacity and marked as selected. (All of these thumbnails are in a Custom Component and break down into a Toggle Button component each, if the image is unselected it remains set at a low opacity)
    - When selecting one of the other thumbnails, I need it to change the image (this part works), select/set the thumbnail to full opacity (this part works as well, given it is a toggle button feature), and lastly unselect the previous thumbnail (causing it to go to a lower opacity, I cannot figure out a way to accomplish this one)
    - In the future I intend to design side bars (left and right) for both thumbnails and the section above (effectively changing the topic to a new one)
    The ultimate idea is to create articles, provided with thumbnails associated to the article at the bottom and to allow clean alternation between the thumbnails, and likewise be able to switch to a new article (with a new set of thumbnails associated to the new article) as well.
    Any help would be greatly appreciated.
    -Steven

    I think I found the solution of my own question. I share it in the hope that it’ll be useful to other people. Remind that I use Cp 6.1.0.319. I modified the project as follows: 1) I unchecked “Visible in output” for the button “Audio Play” (Bt_play) 2) I  modified the AA associated to the audio on/off buttons as descrived below: Action Name: Play Assign cpCmndMute with 0 Show Bt_Stop Enable Bt_Stop Hide Bt_Play Disable    Bt_Play Action Name: Stop Assign cpCmndMute with 1 Show Bt_Play  Enable Bt_Play  Hide Bt_Stop Disable Bt_Stop In this way the two buttons in the same location work well as a real toggle button! Greetings Elena

  • I'm using LR5 and have recently had a problem with selecting and deselecting images.  When I click on an image, the adjacent image also gets selected.

    To expand on the problem, I've tried importing a different catalog and I get the same problem so I think the issue is in the application.  Also I've tried using different mice and get the same result.  Do you think I need to uninstall LR and reinstall it?

    First, try rebooting your computer.
    Second, exit Lightroom and delete the LR preferences: Preference and other file locations in Lightroom 5.  On Mac, reboot after deleting.  Sprinkling that magic fairy dust often fixes weirdness in the LR user interface.

  • Select all and deselect all in table control

    Hi experts,
        I want to make the select all and deselect all options in my table control.
    But i can't able to do that one. Kindly suggest me how to do that one.
    one more thing, if i select some rows in the table control, and press save it should be saved in some other table. how can i implement that one.
    Waiting for ur reply.
    Regards...
    Arun.

    Hi Arun,
    In the context node that you bind to the table, set the cardinality as 0..n and selection as 0..n. In the UI element Table, set the property selectionMode as 'multi'. Then a toggle button for select/deselect all will appear automatically in your table. You can see it in the top left corner.
    For your second question, after selecting the elemets and pressing 'save', in your event handler, do a get_selected_elements( ) on your node. This will return you a set of context elements. Loop through each element and do a get_static_attributes to get the rows. Then you can append these rows to another internal table and bind it to the context. Bind your second table to this node. If the two tables are in different views, the context nodes need to be present in the component controller and mapped to the views.
    Hope this helps.
    Regards
    Nithya

  • Installed latest icloud app on Windows 8.1 desktop, selected icloud drive but won't show in file explorer. Go back to icloud app and drive deselected. Can select and apply but whenever go back it's deselected again, any suggestions?

    installed latest icloud app on Windows 8.1 desktop, selected icloud drive but won't show in file explorer. Go back to icloud app and drive deselected. Can select and apply but whenever go back it's deselected again, any suggestions?

    Click Photo Stream, look at upper on the right. u can see Open Folder. click there...

  • Selecting a jlist item and placing it in view

    i have 100 items in a jlist. then i scrolled to the bottom of the list.....so now the first item is not in view anymore.
    i have a button on top that retrieves rows and rebuilds the jlist.
    which it does.
    however, if i am at the bottom of the list and hit the button i want the first item to be selected and viewed in the screen.
    dbase_list.setSelectedIndex(0); ---> selects the first item
    but its not in view till i scroll back up again.
    how do i select and place the first item in the users view after i hit the button? is there a method that does it?
    thanks

    Add this code in ur constrcutor
    list.setAutoscrolls(true);
    list.addKeyListener(new java.awt.event.KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    list.ensureIndexIsVisible(list.getSelectedIndex());
    });

  • Overriding JList selection behavior

    Hi,
    I am trying to implement a multiple selection JList that when you right/left click on an item it selects the item, if it is not selected. Deselect the item if it is already selected. The right click works fine, but the left click still works as the default. My code is as follow:
    String[] items={ "item 0", "item 1", "item 2", "item 3" , "item 4" };
    final JList l = new JList(items);
    l.setSelectionMode(javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    l.setUI(new BasicListUI(){
    protected MouseInputListener createMouseInputListener()
    return new BasicListUI.MouseInputHandler()
    {//react on mouse pressed
    public void mousePressed(MouseEvent e)
    int row = convertYToRow(e.getY() );
    if(row >= 0)
    {    l.setValueIsAdjusting(true);
    if(l.isSelectedIndex(row) )
    l.removeSelectionInterval(row,row);
    else l.addSelectionInterval(row,row);
    public void mouseRelease(MouseEvent e)
    l.setValueIsAdjusting(false);
    Thanks you.

    I'm doing something similar with an inner class of my JList subclass. This code enables toggling and drag-selecting with button 1, and selection clearing with button > 1. Here's the inner class:
    class EasySelectListUI extends BasicListUI {
    protected MouseInputListener createMouseInputListener() {
    return new BasicListUI.MouseInputHandler() {
    public void mousePressed(MouseEvent e) {
    // clear selection first if button > 1
    if (e.getButton() != 1)
    clearSelection();
    int row = convertYToRow(e.getY());
    if (row >= 0) {
    setValueIsAdjusting(true);
    if (isSelectedIndex(row))
    removeSelectionInterval(row, row);
    else
    addSelectionInterval(row, row);
    public void mouseDragged(MouseEvent e) {
    // drag select only for button 1
    if ((e.getModifiers()&MouseEvent.BUTTON1_MASK) ==0)
    return;
    int row = convertYToRow(e.getY());
    if (row >= 0) {
    setValueIsAdjusting(true);
    addSelectionInterval(row, row);
    public void mouseReleased(MouseEvent e) {
    setValueIsAdjusting(false);

Maybe you are looking for

  • How do I change permissions on many files at once?

    Hello! I recently had a large hard drive crash, and, long story short, I got all my data back but now have a different user account on a new hard drive.  The permissions on all the files on the computer are fine. However, I am a recently graduated fi

  • Can't Back Up Mail Due To Numerous EMIX Errors -- Help

    When I try to drag my mail folder from Library to a backup hard drive, it begins to copy then quits, saying it couldn't read an .emix file. I delete that file, and the whole thing happens again. No matter what I try, it keeps finding .emix files that

  • Transferring SAP data to non-sap system

    Hi All, My client has non-sap CRM system. We have a requirement to pass material stock information from SAP system to non-sap CRM system. We don't need to update this information on instant basis. We require the update should happen twice or thrice a

  • How to access data structures in C dll from java thru JNI?

    We have been given API's( collection of C Functions) from some vendor. SDK from vendor consist of: Libpga.DLL, Libpga.h,Libpga.lib, Along with that sample program Receiver.h (i don't know its written in C or C++), I guess .C stnads for C files? Consi

  • How to see the iPhone Apps top charts on an iPad?

    How can I view the top charts for the iPhone Apps on my iPad in the AppStore? You were able to do this on iOS 5  by pressing the "Show iPhone Apps" button on the bottom when you scrolled down.  Though ever since iOS 6 I just couldn't find a way/that