Important that each addRow be synched with a tableChange event?

Suppose you have a folder that can recieve objects from any thread. The insert method is synchronized, so only one thread gets in at a time. The folder is a TableModel. Each insert needs to update the UI.
If you use invokeAndWait, you run the risk of deadlock when the EDT is waiting for the folder to be free while another thread is blocking on the EDT. One solution is to use invokeLater, but then each UI update doesn't necessarily come immediately after its corresponding insert.
Another solution is to force all inserts to come from the EDT. This solution is less desirable since sometimes the folder is not open, and there is no need to update the UI.
So my question is: How important is it that each table change event follow immediately after the corresponding change to the data model?

I don't think the component will actually update the
gui
everytime you insert data. If you insert many things
in rapid succession, it will probably end up with one
update
at the end.If you're using a DefaultXXXXMode, any change to the model results in an event being fired to listeners. If one of those listeners is a visible view, the component is dirtied and will be redrawn the next time the GUI is refreshed.
You can have rapid inserts, and maybe the GUI will only be redrawn once, but the component will be dirtied every time.
>
Why not modify the table model and add a method that
takes
a block of objects and insert them together instead of
1 by 1?
That will ensure only 1 gui update be dispatched for a
block
of objects inserted. That's what I did in my program.
There is a method
named fireTableRowsInserted(int start, int end) that
you might
want to use.The problem is that the table model is part of a larger model, and there are 3 representations of data that exist in the model. Objects passed into this model are stored in an array (if the model contains a vew that's visible), are also cached, and also sent across a server to be stored remotely. Since objects can be stored into the model from any thread, you must use synchronization to keep it from stepping on itself. A problem occurs when you do an invokeAndWait call from a synchronized method, since the EDT could already be waiting for the object to finish with its current synchronized operation.

Similar Messages

  • How do I format a document in Pages 5.2 so that each sentence automatically starts with capital letter?

    How do I format a document in Pages 5.2 so that each sentence automatically starts with capital letter?

    If you installed the Devon Technologies (Freeware) WordService Service package, there is an item that will enable you to fix selected content to show initial capitals in sentences. You may need to enable this feature in the System Preferences > Keyboard > Shortcuts > Services selections. This only works in Pages v5.2 (and maybe later releases).

  • Can I create a Capivate 6 course that plays offline and synchs with our LMS?

    Can I create a Captivate 6 course that plays offline and synchs with our LMS?

    Hi there,
    Welcome to Adobe Community.
    Unfortunately, I do not seem to remember any possible way to have a course offline and then synch it with the LMS.
    If you do not have an internet connection and within a local network then you could try internal server reporting.
    The below thread could be of some help:
    http://forums.adobe.com/message/5120619#5120619
    Thanks!

  • Importing movies into iTunes to synch with iTouch

    Is there a way to import a movie (a DVD I purchased) into iTunes so I can synch it to my iTouch?
    Thanx...
    Al

    I'm afraid that importing of commercial DVDs can't be discussed on the forum as that involves breaking the encryption on them (which is illegal in most countries). If your discs don't have a digital copy then there's no advice that can be given. Such discussions are against the Forum's terms of use. "Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.": Discussions Help & Terms of Use

  • How do I import photos to iTunes, to synch with iPhone?

    The manual for my new iPhone says I can synch photos via iTunes with the phone. But I can't figure out how to get photos into iTunes to start.

    Hi cafox513,
    Thanks for using Apple Support Communities.  Two applications you can sync photos from (through iTunes) are iPhoto and Aperture.  This article has some more information:
    iTunes: Syncing photos
    http://support.apple.com/kb/HT4236
    Cheers,
    - Ari

  • Is there no easy way to change the computer that an iPhone is synched with?

    I have my iPhone 4 synched to an old Power Mac.  I just bought a new Macbook and want to transfer my iPhone info to this new computer so I can synch and update software from this new computer.  I am getting rid of the Power Mac.  Is there no easy way to do this?  I can't seem to figure it out.  I don't want to lose my info or iTunes library.  Apple is usually so intuitive, but this seems to be incredible complicated.  Any ideas?

    This link says "If you have photos that were synced to your phone or music ripped on your own that were not backed up, you will first have to extract them from your phone using third party software, before you do anything else, as Apple makes no provision to do so".  I don't understand.  Isn't it ALL synched to my iPhone?  Isn't that why it's ON my iPhone?  This is absurdly confusing.

  • Synching with iCal work events

    Work synchs Calendar events and tasks using iCal.  How can I receive and publish these with Mavericks?  I'd like their Tasks to be a Reminders list.
    Thank you!
    Chip

    Set up an Other Account type in Internet Accounts System Prefs. Choose a Calendar (CalDAV) account type.
    Put in the information for the ownCloud account you are logged into at work. Then, check the boxes to get the information you want.
    You should then see the calendar in Calendar and Tasks in Reminders (if Reminders was an option when you set up the account).
    If they have their own ownCloud server set up behind a firewall, you will have to talk to your IT department about how to access the server from your home.
    Here is Apple's minimalistic setup instructions: OS X Mavericks: Set up iCloud, Twitter, Facebook, and other Internet accounts
    Here is an ownCloud pictorial description (While it is for Mountain Lion, the setup is the same in Mavericks). http://doc.owncloud.org/server/4.5/user_manual/sync_osx.html

  • Mappings out of synch with OWB repository

    Hi,
    I have a global problem with my repository, every mapping reports validation errors (many) advising to reconcile inbound or outbound.
    First question is how could this happen on such a global scale (affects every mapping) ?
    Second is how to fix, when I reconcile inbound a) All the links to columns are lost and I have to manually re-attach which is very risky let alone tedious b) After reconcile inbound some tables dont match what is in the repository (columns missing). The only way around this was to delete and drag the table back into the mapping and re-attach columns.
    Third question is, since the prod version of these mappings are running successfully if I deploy a mapping that is out of synch with the repository will it still function as it should ?
    Any help appreciated.
    Cheers,
    Brandon

    I think the problem you are having is that your mapping objects are not reconciled to the repository objects. It is purely a logical OWB problem of matching an mapping operator to an OWB object. It should not effect your busines logic or code that is generated by OWB.
    The warnings are just that, warnings. If you were missing a connection between objects, you'd get an error.
    Even though an operator in your map exists as an object in your repository, they are not properly bound. If your reconcile inbound each object (match by UOID and by name), you should stop getting the warnings.
    This is one of those quirks with OWB (at least with 9.2.0.8 that I am using). I noticed that if I import a mapping from another repository, the operators become unbound. I've given up trying to fix them each time. I just ignore the warnings.

  • IPad synched with another itunes library

    Recently my pc's hard drive died - I've installed a new hard drive but having problems with itunes and the ipad I have.
    When I try to connect the two a message comes up stating that my ipad is synched with another itunes library and the options i have are to erase & sync replacing the ipads content with the library's content or transfer itunes store purchases over - my problem is that there are music files on the ipad that i will ose if i follow this way. Is there any way I can copy these files?
    Any help/pointers is much appreicated.

    Noboers-
    One possibility is that you have more than one account on your computer, and previously synced with a different user account.  You might log into each account and try again.  If that is the reason, one should work.
    We can guess at other scenarios that might cause the problem, but the solution may be to go ahead and choose Restore instead of syncing the iPad.  You would lose any changes since the last time you synced.
    Fred

  • During sync, msg about a conflict with an iCal event that doesn't exist

    When syncing the iPhone to the MBP, I sometimes get a message that says there are conflicts with three iCal events. Two weird things about these events:
    1. There's no difference between the events being shown on the iPhone and the MBP. The details of the two so-called versions are identical.
    2. None of these events actually exist on my iPhone or MBP's iCal!
    They look like events that I created and subsequently deleted... but somehow their ghosts are still haunting iCal somewhere -- though they don't show up in searches.
    One thing they all have in common: these non-existent events are/were all recurring events.
    Anyone have any ideas how I could delete these events? The only option I currently have is to choose the iPhone version or the MBP version (neither of which actually exists!).

    I think the answer you need is this:
    You need to tell the "Synch" which 'direction' to copy from - i.e. from .Mac to that computer or from that computer to .Mac.
    If, on either computer, you click 'system preferences' ( in the dock) and then .Mac and then Advanced you will see a button to 'reset synch options' and tell the machine to send what it has to .Mac or recall what .Mac has back to the machine.
    I have a simpler problem - I want to start a new topic in this forum and can't find a button to do that!
    Mac Pro   Mac OS X (10.4.10)   Powerbook G4 12"

  • Palm Z22 synch. with Outlook 2007

    My old HP 4700 series PDA has died.  Fortunately, I've been backing it up to Outlook 2007.  I tried to replace it with an HP 111, but it simply would not synch. with Outlook and I eventually sent it back.  I really don't need WiFi on the PDA, so I'm thinking about going with a much simpler model and the Palm Z22 has been recommended.  I just want to make sure that it will easily synch with Outlook 2007 so I don't have to reenter all the contacts, calendar entries and notes that are presently on Outlook.  Has anyone had any problems that I should know about?  Any comments about the Z22 would also be appreciated.  Thanks.
    Post relates to: Palm Z22

    Yes, the z22 will work with Outlook. However, Palm is not selling the z22 anymore. You might be able to find it on ebay...

  • Ipad is disabled i do not have the computer that it was last synced with

    I have an ipad 2 that is disabled because the password was punched in wrong several times.  I am on vacation and do not have the computer that it was last synched with.  Can I restore it another way?

    Well, you are not going to get anywhere until you erase the Ipad at this point.. The bright spark screwed you. you can check and see if you have an icloud backup if you have another device that uses the same icloud. Managing your iCloud storage
    iOS: Forgot passcode or device disabled
    Use Find My iPhone
    If you enabled Find My iPhone, you can use it to erase your device.
    Go to icloud.com/#find to see if you enabled Find My iPhone.
    Click All Devices at the top of your browser window.
    Select your device and click "Erase [device]" to erase your device and its passcode.
    Use the Setup Assistant on your device to restore the most recent backup of your device.
    Use recovery mode
    Follow these steps if you never synced your device with iTunes, if you don't have Find My iPhone set up, or if you can't get to your own computer. You'll need to put your device in recovery mode, which will erase the device and its passcode. Then you'llrestore your device as new or from a backup.
    Disconnect all cables from your device.
    Turn off your device.
    Press and hold the Home button. While holding the Home button, connect your device to iTunes. If your device doesn't turn on automatically, turn it on.
    Continue holding the Home button until you see the Connect to iTunes screen.
    iTunes will alert you that it has detected a device in recovery mode.
    Click OK, then restore the device.

  • HT1212 Using the "if you have never synched with itunes" instructions, will I lose all data on the phone? That is the most important information, how to recover the data. The phone is fungible.

    Using the "if you have never synched with itunes" instructions, will I lose all data on the phone? That is the most important information, how to recover the data. The phone is fungible.

    Thanks @ KiltedTim, but losing "only" any data is really not acceptable and, in this case, the phone had not been backed up, but thanks for taking the time. Also, yes, fungible means what I think it means. An iphone is a completely substitutible commodity, unlike my data, so instructions that inform me as to how to fix a phone I could replace for a small sum of money while failing to address the more important issue of the data are almost useless - they potentially save me the $99 it would cost me to replace the phone if I were so inclined to trust another apple product. Not worth the hour it took to find them or the 35 minutes on the phone to confirm my suspicions about the data.

  • HT5225 I have an imac 24 , imac 27, mac book pro, airbook and Iphone 3G.  I have switched to icloud from mobile and all the computers synch with each other but data entered from my iphone in ical won't sync to the other computers.

    I have an imac 24 , imac 27, mac book pro, airbook and Iphone 3G.  I have switched to icloud from mobile and all the computers synch with each other but data entered from my iphone in ical won't sync to the other computers.
    Is there a setting on the iphone that will allow ical entries on the iphone to sink to my other computers
    Thank-you

    Welcome to the Apple community.
    First check that all your settings are correct, that calendar syncing is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
    Make sure the calendars you are using are in your 'iCloud' account and not an 'On My Mac', 'On My Phone' or other non iCloud account (you can do this by clicking/tapping the calendar button in the top left corner of the application ), non iCloud calendars will not sync.
    If you are sure that everything is set up correctly and your calendars are in the iCloud account, you might try unchecking calendar syncing in the iCloud settings, restarting your device and then re-enabling calendar syncing settings.

  • HT1725 Download didn't download to my iPhone. I tried again. Got message that it will download next time I synch with iTunes. It doesn't.

    Docusign ink failed to download onto my iPhone. I tried again. got message that it will download next time I synch with iTunes. It doesn't. After trying different things, each time I tried to download it + checked the box, it unchecks itself during sync. Not sure what can be wrong. A partial download maybe, but reporting a problem brought me here. 'Elp!

    Aha! Just found out. It needs IOS 5! Duh.

Maybe you are looking for

  • Can't Drag and Drop in iTunes 10!

    This was driving me crazy! You can't move tracks within a playlist or drag and drop content from iTunes to your iPod. I hope that Apple will fix this soon! Until Apple fixes this, your best bet is to download iTunes 9. I did, and all my drag and drop

  • Advice needed regarding learning path

    Friends, I have completed my OCP certification in 11g recently. I want to do OCM in 11g in long run. I need to learn skill-sets named  RAC and Performance tuning before preparing for OCM. So what learning can  I do next after OCP- RAC or Performance

  • Are queries thread-safe ? (continued)

    Hi In a previous thread on this topic, it was said that a query can be reused, and why it was good on performance. But a reusable object is not necessarily thread-safe. So I ask again. Are queries thread-safe ? What about Expressions ? Thanks JCG

  • I have never changed my passcode and now I'm locked out.  Others had this?  Solutions?

    I have an ipad air with a passcode that's never had the passcode changed.  Tonight I entered it as usual and it was repeatedly rejected, locked me out, etc. I'm now going through the painful process of having to restore it (fun to do as you have to d

  • Unable to login to facebool page. Why ?

    I am unable to log into my Facebook page no matter what I do. If you can help thanks, if not then Facebook is like the other pages that don't work. You ask for help and they tell you a bunch of junk and it still don't work.