JTable custom - editor update the currently selected cell

I have a JTable and a custom converter / editor for my JTable column. I have a small problem, where if I select a cell that uses the custom editor, and the purpose of the model is updated from another thread, is not discounting the value in my editor to reflect the new value. Is there a way to force the Publisher must be drawn with the new object?

I'll put the new value on the model using the. setValueAt(); and then call fireTableCellUpdated() but the Editor still shows the old object.

Any ideas?

Thank you

BBB

Well that's what I would do, but do not know how to get a handle on the editor-in-Chief of the displayed cell to the for update.

JTable #getCellEditor (). It is null if no cell is being edited, that a cell can be change at the same time). GetEditingRow/column store, call cancelCellEditing and then startEditAt() after your fireTableCellUpdated.

Tags: Java

Similar Questions

  • Click here to follow the link opens in the currently selected tab

    FF17.0.1 (also ff16)
    Click here to follow the link (for example, a link in an email) opens in the currently selected FF window (which is a real pain) I don't know it used to open in a new tab
    CTRL-click here to follow a link from MS word opens in the existing tab

    Tools-> Options-> tabs-> open new window in a new tab is checked

    I think I've had this problem before and done away with by unchecking this option, FF opening and closing and then new FF, however, if I try this, when I restart FF, the option is always checked. (Maybe a clue?)

    The problem occurs if FF started in safe mode
    It is not possible to ctrl-click on the link in outlook (I guess that OUtlook must deactivate that)
    I don't have a mouse with a central button

    Make a right click Open in new tab works fine
    Right click Open in a new window is fine

    Information system
    ThinkPad R60 3 GB RAM
    Windows 7 + latest updates
    Windows Firewall
    Malwarebytes Anti-virus

    For links opened by an external program, you can use this pref to substitute the browser.link.open_newwindow pref if this pref is not the default of-1.

    • Browser.Link.open_newwindow.override.external
  • How to read or get the current selected value of selectonechoice

    How to read or get the current selected value of selectonechoice, so that it can be used in the custom query.

    selectOneChoice11.getValue () m:System.NET.SocketAddress.ToString () returns the index of the list.

    from 0 - number of values in selectonechoice.

    I want to read the exact value of selected.

    Concerning

    Niaz M

    Why don't you try this?

    Re: Value of SelectOneChoice in valueChangeListener

    Both approaches will work...

    Julian

  • Projection Shockwave Flash as v16.0.0.287's plugin check but he updated the current 16.0.0.305 and restart Firefox (v36.0) do not change the situation.

    Shows a check as v16.0.0.287 Shockwave Flash plugin, but it updated the current 16.0.0.305 and restart Firefox (v36.0) do not change the version number or status when rechecking the plugins. Control of Adobe and the Flash Control Panel website confirms 16.0.0.305 is installed. All the solutions to this?

    I noticed in the information in the topic: plugins page under Shockwave Flash, path: line was showing.

    < path: C:\WINDOWS\SysWOW64\Macromed\Flash\NPSWF32_16_0_0_287.dll,C:\WINDOWS\SysWOW64\Macromed\Flash\NPSWF32_16_0_0_305.dll >

    For outdated version 287 .dll file was still there and listed before the current version of 305. I deleted the 287 .dll version and restart Firefox and check the plug-ins again the problem seems to have been resolved.
    Greetings - Spindrift

  • To access the currently selected keyframes

    Is there a way to access the keyframes selected currently through javascript?  I'm writing a GUI which will stick the currently selected keyframes (or copied keyframes could work too) on a layer specified user when you press a button.  And secondly, is it possible to have all the additional attributes, such as ease in deceleration example?

    Thanks in advance!

    Indeed, I wrote this from memory and it's fake...

    It is: position.keySelected (idx);

    and in general the syntax to read a something key is myProperty.keyXxx (idx);

    and not what I wrote. I'm sorry.

    But well, if you have access to the table of methods in the guide of script... they're all here.

    Xavier.

  • How to get the current selected action.

    Hello

    I would get the currently selected action.

    Please refer to the image below. Vignette (selection) is selected.

    Is there a script that I could use to get the which?

    Your help is very appreciated.

    Untitled-1.jpg

    getSelectedAction()
    function getSelectedAction(){
        var ref = new ActionReference();
        ref.putEnumerated( charIDToTypeID("Actn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
        try{
            var desc = executeActionGet(ref);
        }catch(e){ return; } // no action selected
        var selectedName = desc.getString(charIDToTypeID("Nm  "));
        var selectedIndex = desc.getInteger(charIDToTypeID("ItmI"));
        var parentName = desc.getString(charIDToTypeID("PrNm"));
        var parentIndex = desc.getInteger(charIDToTypeID("PrIn"));
        if(isActionSet( parentIndex, parentName )){
            var setName = parentName;
            var actionName = selectedName;
        }else{
            var setName = findAction(parentIndex, parentName );
            var actionName = parentName;
        }
        return [setName,actionName];
    };
    function isActionSet( parentIndex, parentName ){
       var res = false;
       try{
          var ref = new ActionReference();
          ref.putIndex( charIDToTypeID( "ASet" ), parentIndex );
          var setName = executeActionGet( ref ).getString(charIDToTypeID("Nm  "));
          if(setName == parentName) res = true;
       }catch(e){}
       return res;
    };
    function findAction(parentIndex, parentName ) {
      var i = 1;
      var found = false;
      while (!found) {
        var ref = new ActionReference();
        ref.putIndex(charIDToTypeID('ASet'), i);
        var desc;
        try {
          desc = executeActionGet(ref);
        } catch (e) {
          break;
        } finally {
        }
        if (desc.hasKey(charIDToTypeID('Nm  '))) { ;
          var setName = desc.getString(charIDToTypeID('Nm  '));
            var ref = new ActionReference();
            ref.putIndex(charIDToTypeID('Actn'), parentIndex);
            ref.putIndex(charIDToTypeID('ASet'), i);
            try{
            var adesc = executeActionGet(ref);
            var actName = adesc.getString(charIDToTypeID('Nm  '));
            if(actName==parentName) return setName;
            }catch(e){}
          }
        i++;
        }
    };
    
  • New file depending on the size of the current selection?

    Is there a way to make a new file based on the current selection?

    Copy the selection to the Clipboard.

  • Is it possible to get the current selection?

    catalogue: getTargetPhotos () returns an array of selection photos or film if nothing is selected. catalogue: getTargetPhoto() returns only non-neant if something is more selected.

    Is it possible to get a real choice?

    The methods of selection are indeed confusing.  This function returns the current selection, or empty if there is no selection in the array:

    getSelection () function

    If catalog: getTargetPhoto () then

    back catalogue: getTargetPhotos)

    on the other

    return {}

    end

    end

  • Creation of a SpanElement of the current selection

    Hi all

    I am creating a SpanElement of the current selection. I need to assign an ID to the selected text, so I can refer to it later. I looked in my interactionManager TextAreas and flowComposer and I cannot find a way to do it. Any ideas?

    See you soon,.

    James

    The best way to apply the ID would be to use the ApplyElementIDOperation, which takes a size and a relative end of beginning or a parent. If you want the entire span to get the ID, pass 0, spanElement.textLength. But you can get a subset of the span to get the ID from the other values. This will divide the original duration in smaller spans. After the operation, there will be a span element that has just the indicated interval, with applied ID.

    -robin

  • write an analytical function custom to get the current time

    Hi all
    I want to write a custom analytical function to get to the current week.
    for example if it is today, January 13, 2012 then during week 2 the analytical function must return true.

    I have an existing analytical function for the passage of time, written by someone else as below.

    Decode (connect_by_root (LASTDATE) - trunc (sysdate),-1, 1, 0)

    here last date it receives from the other query. This function returns me if the current date is passed or not.

    So can someone please tell me how to write a custom function to get the current week.


    Thank you
    Prateek

    Published by: 804658 on January 13, 2012 02:10

    I have an existing analytical function for the passage of time, written by someone else as below.
    Decode (connect_by_root (LASTDATE) - trunc (sysdate),-1, 1, 0)

    Is not an analytic function.

    I guess (because we don't know) that you need a function analytical, because you have a start date, but no end date and so an analysis as an ADVANCE or a DELAY can help you get the end_date.

    If so, then maybe this shows you in the right direction.
    I limited to 5 weeks to keep the short output.
    I chose a start date of January 3, 2012.

    SQL> WITH my_cal AS
      2  (select ROWNUM week_no
      3   ,      TO_DATE('03-JAN-2012','DD-MON-YYYY') + (ROWNUM-1)*7 start_date
      4   FROM   DUAL
      5   CONNECT BY  ROWNUM <= 52)
      6  SELECT *
      7  FROM   my_cal
      8  WHERE  week_no <= 5;
    
       WEEK_NO START_DAT
    ---------- ---------
             1 03-JAN-12
             2 10-JAN-12
             3 17-JAN-12
             4 24-JAN-12
             5 31-JAN-12
    
    SQL>  WITH my_cal AS
      2   (select ROWNUM week_no
      3    ,      TO_DATE('03-JAN-2012','DD-MON-YYYY') + (ROWNUM-1)*7 start_date
      4    FROM   DUAL
      5    CONNECT BY  ROWNUM <= 52)
      6  SELECT week_no
      7  ,      start_date
      8  ,      LEAD(start_date) OVER (ORDER BY start_date) - 1 end_date
      9  FROM   my_cal
     10  WHERE week_no <= 5;
    
       WEEK_NO START_DAT END_DATE
    ---------- --------- ---------
             1 03-JAN-12 09-JAN-12
             2 10-JAN-12 16-JAN-12
             3 17-JAN-12 23-JAN-12
             4 24-JAN-12 30-JAN-12
             5 31-JAN-12
    
    SQL> WITH my_cal AS
      2  (select ROWNUM week_no
      3   ,      TO_DATE('03-JAN-2012','DD-MON-YYYY') + (ROWNUM-1)*7 start_date
      4   FROM   DUAL
      5   CONNECT BY  ROWNUM <= 52)
      6  SELECT *
      7  FROM (
      8   SELECT week_no
      9   ,      start_date
     10   ,      LEAD(start_date) OVER (ORDER BY start_date) - 1 end_date
     11   FROM   my_cal)
     12  WHERE  TRUNC(SYSDATE) BETWEEN start_date AND end_date;
    
       WEEK_NO START_DAT END_DATE
    ---------- --------- ---------
             2 10-JAN-12 16-JAN-12
    
    SQL> 
    
  • How can I return at the beginning of the current selection?

    The hearing 3 and earlier versions, if I wanted to hear the audio selected, I made the selection in the Waveform Editor, you press Play and the selection would play.  He would play the same selection again if I stopped reading and press Play again.  CS5.5 and 6 that appears not to work the first time you press Play after selecting some audio.  After that, the audio is just resumes since when he arrested him.

    Is it possible to get the current time indicator to return at the beginning of a selection?

    Robert

    I find that it is quite consistent in his behavior. But if you want to study the possibilities, go in Edition > Preferences > reading and you have several options of course altering it.

  • Is it possible to get the currently selected clipitem?

    Heya folk from Adobe,

    Is it possible to get the clipItem currently selected in the active sequence, something like this:

    app.enableQE ();

    project var = qe.project;

    Project.init)

    curSeq = project.getActiveSequence ();

    curSeq.getSelected () # does not exist, I'm looking for a way to do this

    It is a high priority for me.

    Thank you!

    Raphael

    I appreciate your optimism about what is in the API, but it only no concept of selection (other than, 'what sequence is currently active").

    I'll add your vote to the feature request (already very popular), "to provide current information of project selection and sequence.

  • change the current selection to a subset of the current selection

    Hello

    I wonder how can I change/modify a current selection and then have 2 images selected for the new selection. I have the full path of these 2 images (but I do not have their UUID).

    Background:

    From a selection provided images of the film (not a set of collection), a plug-in retrieves full-paths-file names in a list for external treatment (works fine).

    Error handling: by mistake, the user can include images which should NOT be dealt with in the previous step. The first occurrence of differring from image by selected error which should not be treated is captured by a simple comparison with the previous image. The two full path names of files are extracted and displayed in an error message. Then plugin stops further processing of selected images, Lightroom is back to where he started, the choice of the film remains unchanged.

    Objective:

    What I want is that when process prevents the selection changes the 2 images that have been identified as different.

    In fact different occurrences are captured by the labels and ratings only.

    if varFLabel ~= varFLabel_comp then
    

    and

    elseif varFRating ~= varFRating_comp then
    

    Here's the code I'm working on that:

    LrTasks.startAsyncTask( function()
    local photos = catalog:getTargetPhotos()
    ...
    for j, photo in ipairs(photos) do
              varFLabel = photo:getFormattedMetadata('label')                    --word eg. approved
              varFRating = photo:getFormattedMetadata('rating')                    --number
              if lrItem > 1 then                    -- second pass of 'for ... do'
                        --catch missmatching Labels in selection by user
                        if varFLabel ~= varFLabel_comp then
                                  LrDialogs.message(string.format("Labels missmatch!\n %q Not equal to %q", varFileName_comp, varFileName, "DIFF Labels", "info"), "Labels do NOT match!\nDouble-check your selection!\nStopping task and script!")
    --new selection to show the two differing images in: varFileName_comp varFileName
                                  return          --exit script
                        --catch missmatching Ratings in selection by user
                        elseif varFRating ~= varFRating_comp then
                                  LrDialogs.message(string.format("Ratings missmatch!\n %q Not equal to %q", varFRating_comp, varFRating, "DIFF Ratings", "info"), "Ratings do NOT match!\nDouble-check your selection!\nStopping task and script!")
    --new selection to show the two differing images in: varFileName_comp varFileName
                                  return          --exit script
                        end
              end
              --prepare for next comparison in 'for ... do' 
              varFileName_comp = varFileName
              varFLabel_comp = varFLabel
              varFRating_comp = varFRating
    end
    end)
    
    

    Tried to make use of the setSelectedPhotos function but I don't get any internal processing error results only and do not know how to proceed.

    I suppose that this function requires that the LrPhotoID derived from the selected Photos (table) table.

    photos = catalog:setSelectedPhotos( varFileName, varFileName_comp )
    

    Edit: This command selects a different images

    return catalog:setSelectedPhotos( photo, {} ) --exit script
    
    

    I hope someone can help.

    Post edited by: snahphoto

    If you hold a second through the iteration variable, photo_comp, which is the value of 'photo' of the previous iteration in the loop, so you could do:

    back catalogue: setSelectedPhotos (varPhoto, {, photo_comp})

  • Additional mouse click required to set other combo box values based on the current selection combo box

    I have an Acrobat PDF form where there are 8 combo boxes (not editable) which are related in a logical way, but have unique names and a list of unique values, with the exception of a default value that represents 'null' or 'none '.

    for example:

    The first 1 combo box value is "none" followed by the value A1, B1, C1, etc., and Combo box 2 the first value is 'none' followed of the values A2, B2, C2, etc...

    The combined list useful values for every combo boxes relate to the types of unique product for the user to select mode 'radio button '.

    When the user selects one of the 8 Combo boxes and performs one selection other than 'none', then the form must verify the 7 other combo boxes and when any current value is not equal to 'none', he has to change 'None '.

    The following script is currently enrolled in the properties of "Actions - Mouse Run - Up a Javascript" from one of the drop-down list boxes, others have similar scripts as well.

    (var cbox is the current combo box and var obox is for other drop-down list boxes when called).

    Cbox var = this.getField ("TagStyleStake");

    If (cbox.value! = "none")

    {

    obox var = this.getField ("TagStyleBasket");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStylePushon");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleHandle");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleHang");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleBlank");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleMolded");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    Obox = this.getField("TagStyleSignage");

    If (obox.value! = "none")

    {obox.value = 'none' ;}

    }

    The current problem is that, when a Combo is selected and one option other than the 'none' value is clicked, the other combo boxes do not include the 'None' value.

    To reset the other combo boxes requires another click on the option which has just been moved to the position selected in the drop-down list, but it seems reasonable that the drop-down list boxes should reset with the initial click the option in the drop-down list.

    I tried other properties (Format, validate, Calculate) but without success.

    What I'm missing here?

    The normal way to proceed is to define "value option selected to validate immediately" and to place the code in the event of the combo box button. And instead of the first two lines you have, you need to use something like:

    If (! event.willCommit & event.changeEx! == 'none') {}

    Your other code goes here

    }

    The changeEx property returns the value of exports, if any, for the selected item.

  • Try to update the current Web site and I get this error message

    I can't update my dute site to "An FTP error" when connecting to the server. See attachment below. I have another site and I have day yesterday without problem.

    I use: Windows 7, IE 11, Avast Antivirus, DW CS6, Go Daddy is my host.

    Thank you, Mariola

    ServerError.jpg

    Check your FTP credentials.

    Lost random access with GoDaddy in the past. They have "updated" the server and lost your credentials in the process.

    You can also activate or use the FTP Passive mode and performance optimization in your FTP site settings.

    Also check that you are using the folder root correct server. I think GD still use / public for this. It's been a while since I've dealt with them.

    If none of these things make the case, we will need to take a look "under the hood" so to speak. Post a screenshot of your FTP (change any sensitive information) can help.

Maybe you are looking for