Intercepting editing start and stop/cancel in a JTable

Hi,
I've been seaching the forum for days but could not find anything that solved my problem.
Problem:
I'm writing a multiclient server. The data of the server is displayed in a JTable. The rows(cells) in the table is editable and to make sure no two clients edit the same row at the same time I've implemented a locking mechanism in the server and would like to lock a row whenever a user starts editing and release the lock when the user either stops or cancels editing.
The JTable is 'hooked up' with a TableModel class that I've written to handle the locking and notification of the lock and unlock events from the server.
I've tried a couple of things but non worked very good. It would be nice if the CellEditorListener implemented a startEditing but it does not so letting my model implement the interface was no good.
Any ideas? If anyone knows how to solve this, please reply
Yours, Johan

Playing around with some methods in JTable, and some minimal testing, I came up with:
table = new JTable(...)
     private int editingRow = -1;
     public  boolean editCellAt(int row, int column, EventObject e)
          boolean editingCell = super.editCellAt(row, column, e);
          if (isEditing())
               editingRow = row;
               System.out.println("started");
          return editingCell;
     public void removeEditor()
          if (isEditing())
               editingRow = -1;
               System.out.println("stopped");
          super.removeEditor();
};

Similar Messages

  • How to use counter as an start and stop trigger in 6009

    Hi ALL.
    I'm using USB 6009 as a subject of to acquire data.
    I would like to know on how to use the counter digital input as a start and stop trigger. 
    The acquisition will only start when the first pulse of the digital signal is received and it will stop when the desired number of pulse is received.
    I was trying to use the VI as attachment as my reference. However, after tried, the VI is not working for USB 6009 as the counter input cannot be used as a trigger.  
    I would be happy if anyone could suggest me some ideas on this matter.
    Thanks.
    Attachments:
    DigitalStartandStopTrigger.vi ‏32 KB

    Hi Kate. 
    Thanks for your response.
    For your information, I've design my VI using the counter method. However, it doesnt work well. Please see the figure below. The file also attached with this reply.
     At first, the first counter from Device 2 will start counting. If the counting equal 0, then the acquisition for Device 1/AIO also the counter of Device 1/ctr0 begin acquiring data and counting the edges respectively.
    However, when I did the test, it doesn't work as wanted. It is happened because when counter of device 2 in not equal to 0, the acquisition for Device 1 not happened as it will go to false state.
    Is there anything that someone could suggest on how to start the acquisition for device 1 only and if the counter of device 2 is equal to 1. I would like the acquisition of device 1 start only when the counter of device 2 is equal to 1. I cannot use the trigger as 6009 is not support for it. 
    -Fird- 
    Message Edited by Fird on 07-02-2009 04:28 AM
    Attachments:
    Acquire Data Test 4.vi ‏27 KB

  • How to start and stop the BI Services in Solaris 10

    Hello All,
    Can anyone guide me on how to start and stop the BI Services in Solaris 10. In windows there are options set in Start->Programs->Middleware_Home->Start/Stop BI Services.
    Primarily after doing changes to the scheduler configuration, I need to restart the services to get it implemented? If yes how can I do it?
    Any help will be appreciated
    Thank you
    Ash
    Edited by: 902739 on Jan 11, 2012 12:17 PM

    Please help me by showing action plan for stop sap , offline backup and then start sap.
    i am little bit confuse How to start and stop SAP on cluster for offline backup
    Below are the systems name with host name , please explain me in sequence
    Systems name                                   Hostname
    # Hope SAP ERP Prod DB Primary       gsgbbux860
    # Hope SAP ERP Prod DB Standby      gsgbbux861
    # Hope SAP ERP Prod Cluster              gsgbbux862
    # Hope SAP ERP App 1                       gsgbbux864
    # Hope SAP ERP App 2                       gsgbbux865
    Thanks in advance
    Zaheer

  • How to copy only part of a binary file after selecting a start and stop byte?

    I need to copy a selectable block of binary data from one file to a new file.  The binary file is made up of several data widths (8/16/32 signed and unsigned).  If I use a read binary function I will need to account for the data types within the file.  I was hoping to do a copy function with a start and stop byte control. Any pointers?  

    The attached Rube Goldberg Code copies two arrays of clusters to two arrays of indicators.
    Ben
    BTW: It does so by writtng the flattened data to a fixed length file and decoding same on the read.
    Message Edited by Ben on 03-24-2007 12:54 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    File Decode.JPG ‏137 KB
    FileDecode.vi ‏125 KB

  • Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes?

    Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes? The Ipod Touch, by itself does not allow cross-fading, therefore when the stop time is edited short, the song jusst truncates then goes to the next song. I tried the DJay ap and while it would crossfade, it would NOT read the song settings for the stop marker. So now I want to try and Ipad and see if there is an app that will READ the Itune stop settings within the song. I do NOT want an app that will allow me to DO the stop marker. I want an app that will READ the stop marker from the song as it is set in Itunes.

    Itunes provides the option for setting the Start and Stop times of each music track.  However, the start and stop times do not synchronize to the iPhone.  I don't understand why this option is even available as it doesn't work when listening to music on the phone.  I have not found another application that will support the start and stop time markets.  I have searched quite a bit for this but can't find anything.  I hope we can find something. 

  • How to start and stop looping

    I'm very new to Flash / action script, so I just need to know where to put both the start loop, and the end loop code (below) in my Flash file to make the waving effect on this flag (link below) start and stop when I need it to, because I'm adding a small amount of flash both before and after it. thanks.....
    loopI = setInterval(loopF,40);
    to start the waving and use:
    clearInterval(loopI);
    to stop the waving.
    function loopF(){
        // move the matrix by speed along x to shift the noise
        shift.translate(speed, 0);
        // drawing in the perlin movie clip,
        // create a rectangle with the perlin noise
        // drawn in it with an offset supplied by the
        // shift matrix
        with (displace_mc.perlin){
            clear();
            beginBitmapFill(noiseBitmap, shift);
            moveTo(0,0);
            lineTo(ramp._width, 0);
            lineTo(ramp._width, ramp._height);
            lineTo(0, ramp._height);
            lineTo(0, 0);
            endFill();
        // draw the displacement movie clip in the
        // displaceBitmap (used in displaceFilter)
        displaceBitmap.draw(displace_mc);
        // apply displaceFilter to the flag
        flag_mc.filters = [displaceFilter];
    updateAfterEvent();
    http://www.senocular.com/flash/source.php?id=0.188

    i told you and it's in your message:
    use:
    loopI = setInterval(loopF,40);
    to start the waving.
    use:
    clearInterval(loopI);
    to stop the waving.
    // do not edit the below code:
    function loopF(){
        // move the matrix by speed along x to shift the noise
        shift.translate(speed, 0);
        // drawing in the perlin movie clip,
        // create a rectangle with the perlin noise
        // drawn in it with an offset supplied by the
        // shift matrix
        with (displace_mc.perlin){
            clear();
            beginBitmapFill(noiseBitmap, shift);
            moveTo(0,0);
            lineTo(ramp._width, 0);
            lineTo(ramp._width, ramp._height);
            lineTo(0, ramp._height);
            lineTo(0, 0);
            endFill();
        // draw the displacement movie clip in the
        // displaceBitmap (used in displaceFilter)
        displaceBitmap.draw(displace_mc);
        // apply displaceFilter to the flag
        flag_mc.filters = [displaceFilter];
    updateAfterEvent();
    http://www.senocular.com/flash/source.php?id=0.188

  • Videos start and stop

    watching videos from any sites, news, webcams, apple quick tips, etc-start and stop
    Have iMAC, 2.8, 6Mgs Ram

    3gone wrote:
    Any thoughts about my disconnecting the ethernet cable from the router and going directly to the IMAC from the modem to see if this makes any difference? My network services the IMAC, my wireless printer and occasionally my netbook, which I rarely use.
    Yes!  Good idea.  In fact, this is the proper way to troubleshoot this issue - isolate the problem by first taking the wifi router out of the equation completely.
    Your current speed is in the broadband spectrum, yet it's at the very bottom.  I wouldn't be surprised if you experienced video problems at your current speed - even with your local network working properly. 
    What type of internet service do you have and who is your provider?
    Message was edited by: pianoman1976

  • Dispatcher starts and stops immediately

    Dispatcher is starts and stops immediately and all the work process are died state.  We don't have the backup of    database also? 
                              Database in suspect mode , How can recover from this situation?
    Thanks
    Srikanth

    Hi,
    Database in suspect mode , How can recover from this situation?
    Have you referred this [SAP Note  81692 - Suspect database |https://service.sap.com/sap/support/notes/81692] ? Its lists possible causes for such situation. I would first determine the root cause of such issue, which can be identified in SQL Server Log.
    Also you can refer some Microsoft Knowledge base articles as listed in [SAP Note 437160 - MS Disaster Recovery Articles for MS SQL Server|https://service.sap.com/sap/support/notes/437160] and [SAP Note Note 353149 - SQL server not running - hints for analyzing|https://service.sap.com/sap/support/notes/353149].
    Regards,
    Bhavik G. Shroff
    Edited by: Bhavik G. Shroff on Jun 30, 2011 6:37 PM

  • Starting and Stopping Instances from Netweaver Administrator does not work.

    When we go to our http://<host>:<port>/nwa and navigate to Systems. We see our instances, although we see status and UNKNOWN.
    Also, when we click down to see our server nodes, and try and restart them or stop them...we enter our user/pass for Unix and but it doesn't do anything.
    Does anyone know what is involved to get this functionality to work? We're not looking install CCMS or anything like that, we just want th ability to start and stop our cluster from the central instance web administration screens.
    Thanks,
    -Tim

    Just works for us, without needing any config.
    If your running unix the alternative method is to use a tool called JCMON, much better than NWA.
    log in as <sid>adm onto your host.
    jcmon pf=/usr/sap/PEP/SYS/profile/PEP_JC00_xxxxx
    for our production portal for example;
    Which allows you to do admin on your java instance only.
    use the menu options 10 - 21.
    Message was edited by:
            James Ibbotson
    Message was edited by:
            James Ibbotson

  • Programmatically starting and stopping my vi at set times

    I have a vi that runs during every production shift, however the running and stopping of this vi is currently manual, requiring a user to start and stop the vi at the appropriate times. I would like a way of programming the vi so that it starts every weekday at 6:55am and stops every weekday at 15:05pm. All my while loops run if engine status is TRUE, so I wondered if starting/stopping the engine appropriately would be sufficient. I will need to reinitialise all my values from the previous day – does this happen automatically by stopping/restarting the engine? I would also like to ignore weekends if possible.
    I have attached the vi that I would like to automatically start and stop. If anyone knows the best way to program this (slightly messy) vi, then I would greatly appreciate the help.
    Thanks to all,
    Stuart
    Attachments:
    HC2 Efficiency Information SW Edit (rev 10).vi ‏1202 KB

    My LV8 is having issues this morning and does not want to open the VI I sent you, so I jsut created the loop that I had added.  It is very simple, but should get you started.  It does not ignore weekends I have not had time to work on that.  You could do something like every time the start time is triggered, increment a counter and when the counter hits 6 (saturday if you start counting on monday), do not start the engine and then when it hits 7 reset the counter.
    Good luck and post back if you have more issues.
    Kenny
    Kenny
    Attachments:
    start stop.vi ‏16 KB

  • Reset song start and stop times

    Resetting start and stop times for all songs.
    Hi. I recently trialled a DJ BPM matching software product and unknown to me, it scanned all my songs and in the majority of cases, put new start and stop times (in seconds) so now when I play my songs in iTunes, they either start to play early and/or stop playing before they are complete.
    I can go and reset these parameters manually but I have 5000 songs so wondered if there was a utility or a file I could edit that would do this for me as its really annoying that the DJ software didnt reset these when I uninstalled it at the end of the trial period.
    Thanks
    Jason

    You might be able to use this script to reset the start/stop times to zero.  Try with a small selection and see if it works for you.
    http://dougscripts.com/itunes/scripts/ss.php?sp=batchtrimtime

  • Starting and stopping services of SAP and database

    pls tell what are the Starting and stopping services of SAP and database

    Hi Ranga,
    The services dealing with SAP and database(Ex: Oracle in this case) are:
    SAP<SID>_<Instance No.>  (For ex: SAPECC_01)
    SAPOsCol
    Oracle<SID><No>Listener
    OracleCSSservice
    OracleService<SID>
    Reward points if it is helpful##
    Thanks & Regards,
    Santhosh P
    Please change the status to answered if you got the solution...
    Message was edited by:
            Santhosh Kumar P

  • How do you start and stop music on iMovie

    how do you start and stop music on imovie?

    http://support.apple.com/kb/HT4157
    To stop, just to back into those settings and cancel before the monthly plan automatically renews.
    Regards.

  • Start and Stop Trigger using PXI-6120 and DigitalSta​rtAndStopT​rigger.vi not working :-(

    Hello,
    I've been trying for a while now to get my PXI unit to capture a waveform between a Start and Stop (Reference) Trigger using the NI example DigitalStartAndStopTrigger.vi downloaded from the NI website. However, whilst the start trigger and stop trigger seem to be working i.e. the VI runs and stops at  the correct times there is never any data read from my DAQmx compatible PXI-6120 card. So I can see the VI is running around the aquisition loop but the Property Node AvailSampPerChan is always returning zero... this has me slightly puzzled. I thought this might just be a driver issue so I've updated my box to the following software versions (see below) and installed the latest drivers e.g. DCDNov07.exe (also from the NI site) but nothing has changed.
    my software as of now.
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.3.0.49152
    DAQmx 8.6.0f12
    Trad DAQ 7.4.4f7
    before I updated I had the same problem but with the following versions:
    Labview 7.1 (with the 7.1.1 upgrade applied)
    Max 4.2.1.3001
    DAQmx 8.5.0f5
    Trad DAQ 6.9.3f4
    So to cut a long story short I still have the same problem with the triggers... does anybody have any ideas what is going wrong?
    To add insult to injury it the traditional DAQ example ai_start-stop_d-trig.vi was almost working correctly before I did the upgrade. It had the strange behaviour of capturing the AI0 channel but on the wrong edges (e.g. if I set Start on Rise and Stop on Fall it would do the opposite, Start on Fall and Stop on Rise).
    I'm going to leave my box doing a mass compile over night but i'd really like it if someone could suggest a solution or point me in the right direction.
    Many thanks,
    Mike

    Hi Graham
    I'm out of the lab today but I'll try and answer your questions as best I can...
    1) What are the values you have set for Buffer size, Rate, samples per read and post trigger Samples?
    At the moment I have all the values (e.g. sample rate, buffer size etc) unchanged apart from the ones I mentioned in my previous post (see above). I have in the past played around with changing the buffer sizes and rates in the example VI but as this appeared to have no effect on the behaviour I now have them setup as in the download.
    2) Does the program end after the stop trigger is implemented?
    Yep, if I toggle the trigger line high then low I see the program exits the read loop and the VI stops running as expected.
    3) Lastly can you give me the details of triggering method. Are you
    using a digital train of users set digital pulses? how long is the
    program running.I'm using the WriteDigChan.vi to manually toggle the first digital line of the PXI-6733 card which is wired directly to PFI0 of the PXI-6120 card. Generally, I just start the VI running  and then toggle the line high, wait a couple of seconds and then toggle it low.
    To me it all looks like it should be acquiring samples but as I said yesterday it just refuses to fill the buffer with any data (and hence no samples are read).
    Any ideas? and thanks for you help,
    Mike

  • I do not have the 'Advanced' tab on the menu bar. I am trying to change ringtone on my iphone 4s. Have done the following: Right cick on song, entered the start and stop times, but unable to proceed as need 'Advanced' tab in order to change to option.

    I do not have the 'Advanced' tab on the menu bar. I am trying to change ringtone on my iphone 4s. Have done the following: Right cick on song, entered the start and stop times, but unable to proceed as need 'Advanced' tab in order to change to option.

    You don't need to upgrade your software.  But if you're struggling with Spry, IMO you should cut your losses and switch to something better for the longrun.
    If you have a budget to work with, I highly recommend Project Seven's Pop-Menu Magic 3.  It's easy to use in DW CS4, 5, 6 or CC.  More importantly, it's bullet proof and works in all devices. 
    Pop-Menu  Magic3 by PVII (commercial DW extension)
    http://www.projectseven.com/products/menusystems/pmm3/index.htm
    If you don't have a budget to work with, you can roll your own menus with jQuery plugins.  A bit more effort on your part, but they perform better than Spry.
    jQuery Superfish
    http://users.tpg.com.au/j_birch/plugins/superfish/
    jQuery MegaMenu2
    DEMO:
    http://www.geektantra.com/projects/jquery-megamenu-2/
    DOWNLOAD:
    http://code.google.com/p/jquery-megamenu/
    Nancy O.

Maybe you are looking for

  • WPF- How to save and retrieve details from database

    I want to develop an desktop app to save and retrieve details from database, but am having a little hitch am getting errors in my code, kindly advice below are the required code xaml <Grid>         <TextBox HorizontalAlignment="Left" Height="23" Marg

  • How to get dates with respect to System Date?

    Hello, I am trying to get Date value after 30 days of my System current date. I am using System.out.println(new java.util.Date(System.currentTimeMillis()+30*3600*24*1000)); but I am not getting correct date. Suppose my system date is 15July then afte

  • Album split into 3 albums in album view

    Hi I have been transferring some of my old music from a Creative MP3 player to my Ipod. When I go into album view, a couple of albums have been split up, into 3 albums. The first having the first few tracks, the next album having a couple more, then

  • Manual Excise Condition

    Hi All We are Using  TAXINJ  as our tax procedure, Please advice accordingly. My user  wants  that  the following three tax are automatically  calculated at the time of Excise invoice creation (J1IIN)  . i.e (1) BED  basic excise duty (2) Edu CESS (3

  • Cost estimate

    Hi Guru's Our project go live was this month of 11th. At the time i run cost estimate for all the materials. But i know this is month end activity. But my doubt is before next cost estimate for all the materials. Is it required for all the PP orders