Keeping my nodeIcon while editing and another question

Hi group, I have two questions which made my life pretty unpleasant.
1. I try to edit tree nodes which contain custom Icons but at the moment as I start editing them my these vanish (Java replace them with default ones)and when I am ready with the editing they are displayed again.
I suppose I have to define my own CellEditor which extends DefaultTreeCellEditor but what I have exactly to do ???
2.The second question also concerns the editing.My problem is not managing to edit a cell again after a non valid entry has been made.The situation looks like this:
/**Adding the node to the tree*/
DefaultMutableTreeNode newNode = new DefaultMutableTreeNode("");
DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
model.insertNodeInto(newNode, selectedNode,
selectedNode.getChildCount());
/**Starting editing at Path*/
TreePath treePath = new TreePath(model.getPathToRoot(newNode));
tree.startEditingAtPath(treePath);
So far so good...
Then I take the value of the editor with
String newName =(String)tree.getCellEditor().getCellEditorValue();
and then I say for example
if(newName.equals("")){
tree.startEditingAtPath(treePath)
With other words if the entry is empty start editing again but I didn't work.
If anyone can help me understand my problem better than please do make your contributions I would appreciate that much.
I thank you in advance

Hi,
I have a similar problem as urs. if u have found a solution cud u please help me out.
This is how I set my editor
ESMOPTreeCellEditor oTreeCellEditor = new ESMOPTreeCellEditor(m_tree, oOPTextField);
m_tree.setCellEditor(new DefaultTreeCellEditor(m_tree, orenderer, oTreeCellEditor));
And Tree cell editor defeined below
private class ESMOPTreeCellEditor extends DefaultCellEditor implements CellEditorListener
public ESMOPTreeCellEditor(JTree p_oTree, ESMTextField p_oTxtField)
public boolean isCellEditable(EventObject oEvent)
public Component getTreeCellEditorComponent(JTree tree,Object value, boolean isSelected, boolean expanded, boolean leaf,int row)
public void editingCanceled(ChangeEvent e)
public void fireEditingStopped()
public void editingStopped(ChangeEvent e)
Now I have a tree cell rendere defined and I have overridden these methods
public Icon getLeafIcon(){}
public Icon getClosedIcon(){}
public Icon getOpenIcon(){} to return the icon which i display in my renderer. This way I am able to get the right icon even in edit mode, but my rendereing needs to display an Icon with a background color which i am loosing presently. I know this may not be a right way to show the rendering in edit mode.
Thanx,Anu

Similar Messages

  • Bug while editing and compiling the procedure

    Bug while editing and compiling the procedure in Sql Developer 1.5.4
    the error is
    ora -00904 "ATTRIBUTE" Invalid Identifier
    Edited by: user4448643 on Mar 16, 2009 5:09 AM

    I'm not trying to be snippy but this is the answer I got from you in another thread about the same issue:
    +"I'm not sure I said it's being worked on - the bug is logged and in the queue.+
    +Support will tell you to move to a supported version of the database, this is true. The same is true for the forum, if you are on an unsupported database version you're encouraged to move to a supported release.+
    +If you need to work with 9i, then use SQL Developer 1.5.3, the error is not in that release."+
    When I read that I got that I should not assume the bug was being worked on and that the SQL Developer team sees 9i as having a short remaining life.
    JB

  • According your advice reset my home screen layout but not yet show apple store application and another question when I any thing brows from apple site by safari then show "this address is invalided" please advice me......

    According your advice reset my home screen layout but not yet show apple store application and another question when I any thing brows from apple site by safari then show "this address is invalided" please advice me......

    I am using windows Vista and having this problem also (not exactly, but iTunes gives pop-up that "files are in use"). Acting a suggestion from another answer in this thread, I clicked on Computer and selected eject...windows did warn me that the device was in use, but also gave me a CONTINUE button, which I clicked and it was ejected...had to go back to iTunes and eject the iPod there also, but it did eject

  • How do I import multiple Ai files into one Indesign File - whilst still keeping the Ai Files editable and up dateable for the one Indesign File?

    Hi All,
    Im relatively new to Ai and Indesign, and have been doing Uni work over Christmas, and have a rather urgent question thats stressing me out.
    I originally had many art boards in my ai file, but due to the number, I split these into single files to help my computer run better.
    Now I want to organise them into one document to save. From searching online Indesign can import these and save as one file, yet automatically update if the original ai file is updated. I would like to do this but just don't know how to do this correctly?
    Any help would be greatly appreciated.
    Im using CC Ai and indesign.
    Thanks in advance
    Sam

    Yes, effectively I would like to catalogue the files into one collection so i can save as one PDF and Print as one.:)
    I know I could save each AI as a pdf them then merge the pdf's together in acrobat, but I have nearly 100 files so would feel more comfortable seeing them all together before print / saving.
    My concern is that if I insert them in Ai, will the file resolution reduce? and will the ai still be editable and would it update the indesign file?
    Thanks for the quick reply

  • Should I use an external hard drive to store the files while editing and how should I do this?

    Getting used to FCPX and want help learning how to store my Canon D60 Video files on either my internal Mac book pro or on an external hard drive while editing projects?   Do the files need to be transcoded on the computer drive or can that happen on an external HD?
    Thanks,
    Greg

    Well, in my opinion, it all comes down to speed. There are a lot of editors that swear that working with footage on your system drive will do all sorts of horrible things, cause crashes, etc. Really its a bunch a malarkey. The most it will do is slow you down when your system needs access to the drive. Bandwidth is bandwidth is bandwidth - its all the same. If working with video on your system drive caused crashes, so would doing thousands of other things and we would all have dumped apple long ago for Microsoft or linux.
    Here's what I tend to get for sustained read speed on various drives (ie reading a few large files like video files):
    USB 2.0: 25 - 30 MB/sec. Drive RPM doesn't matter much since USB is limiting factor, unless you're running a system.
    Firewire 400: 28 - 34 MB/sec.  Drive RPM doesn't matter much since FW is limiting factor
    Firewire 800: 55 - 60 MB/sec.  Drive RPM doesn't matter much since FW is limiting factor
    internal drive on SATA II or III connection, or USB 3.0 external drive:
        7200 RPM: ~100 MB/sec
        5400 RPM (most laptop drives): probably ~70-80 MB/sec
    SSD: 250-500 MB/sec if installed internally or over USB 3. USB 2 or firewire connection for an SSD is a waste of SSD speed *except* that they have fantasticly fast random access for reading many small files, so I got a really fast launching system in an experiment installing a system on an SSD and connecting it via FW 800 - but that's not relevant here
    so - to make a short story long - do whatever works for you. avoid using USB 2.0 or firewire 400 drives if you're editing HD - you can't play transcoded ProRes 1080p footage from them reliably. And once you have more than one clip overlapping, like at cross dissolves, you're sunk. You're internal drive is likely much faster, even with the overhead of the system using it too.
    Blackmagic Disk Speed Test on the app store is a good HD speed tester. Ignore all the video specific stuff at the bottom - its mostly for uncompressed video, which I doubt you're working with.
    Since i have a recent macbook pro (late 2011) and my edits are usually not more dense than 3 layers of video at a time (mostly concert video rather than narrative film), I actually almost never transcode, or even render - and this is for 1080p HD video - because FCP X is so good at playing the imported original h.264 files. I store my media I'm working with on my internal laptop drive (which i upgraded to a 7200 RPM) or a FW 800 7200 RPM external drive.
    h.264 files from the camera are much smaller than transcoded ProRes files, so they will play back from USB 2 or firewire 400 drives, but I would only do it in a pinch.
    enjoy your editing.

  • I keep losing audio while editing...any advice?

    Keep losing audio while moving stuff around while editing... can't figure it out

    Can you tell us what type of actions you are performing to evoke this behaviour?
    Do you know the properties of audio file you are using?
    Al

  • Playback while minimized? And another question!

    Hi guys,
    Let me start by saying I have Premere Pro 5.5, 64bit windows 7 pro, 24gb ram, 3 hard drives(1tb each, 7200rpm), nvidia gtx 285, quad core i7.
    How can I set Premiere up for playback while I minimize the application and do web surfing. You may ask why I want this. It is because If I want to listen to the audio track while surfing the web, or I want to view it on my secondary monitor while also surfing the web, this would be ideal.
    Also, the second question: I made a new project and inserted a just one 30mb audio clip in the timeline. No video.  I hit the spacebar to play back and Premiere waits 2 seconds before playing it back. This is strange. It is small and my computer is extremely fast. I also have 3 hard drives. I put the file in each hard drive to see if it would change the lag, but it did not. It always waits 2 seconds before playback and I get impatient because that is too slow and laggy for me. So any thoughts on how to cure this? On the bottom right of my screen, there is almost no applications open. I closed down as many as I could and it still lags
    -MrD

    Thank you both for the reply,
    Okay, so the lag issue. Todd, I did try all the stuff you said. I turned off many proceses, made sure nothing un-needed wasn't on in the compuer start up. Closed all apps, etc. WHen i check Task manager, it says I have 0 cpu usage, and 2 gb ram in use. Then I open premiere and do a test project with only one small audio file. It lags approx 2 seconds after I hit play, before it actually starts playinmg.
    I don't see what else I can do?
    Thanks again,
    MrD

  • Time Machine/Capsule -- 2.93GHzx -- and another question.

    I upgraded my PowerBook G4 (1.67GHz and 2 GB DDR2 SDRAM) from Tiger to Leopard 10.5.6. I did so largely to get Time Machine. And then I ran into all sorts of woes doing my back-ups. So I took another step and replaced my external 2TB Lacie drive (that I was using for Time Machine) with a 500 GB Time Capsule. It arrived today and is right now in the middle of its first back-up. We shall see how well it fares with Time Machine. I am crossing my fingers. Does anyone see anything right or wrong I did in this exercise?
    Meanwhile, I am going to take the plunge and buy a new MacBook Pro. I want to load it up. But I have a question: Is the 2.93GHz Intel Core 2 Duo THAT MUCH better than the 2.66GHz Intel Core 2 Duo? It costs $300 more and I’m wondering if 0.27GHz makes such a significant ($300) difference — bearing in mind that I will be running Final Cut Pro, etc, and want the best I can get in strength and speed. But I don't want to blow $300 for window dressing that does not deliver. Bottom line: is an extra 0.27 GHz that significant or that much of a game changer?
    And one more question: Is it OK to use your Mac and its other apps while Time Machine is running? Or does that cause a problem?
    Of course, I’m not asking you all to write a thesis paper on all this but your quick opinion would be gratefully appreciated.
    Thank you -- and thank heavens for this discussion groups.
    Happy Easter and other holidays,
    Richard M.

    Richard Mackenzie wrote:
    I upgraded my PowerBook G4 (1.67GHz and 2 GB DDR2 SDRAM) from Tiger to Leopard 10.5.6. I did so largely to get Time Machine. And then I ran into all sorts of woes doing my back-ups. So I took another step and replaced my external 2TB Lacie drive (that I was using for Time Machine) with a 500 GB Time Capsule. It arrived today and is right now in the middle of its first back-up. We shall see how well it fares with Time Machine. I am crossing my fingers. Does anyone see anything right or wrong I did in this exercise?
    Depends on what sort of problems you had with the LaCie. If the problem wasn't with the drive itself, you may not have gained much, if anything. TC's are more convenient in some ways, but also much slower.
    And since you can't partition a TC disk, I'd advise against putting any other data there: if you ever want or have to erase all your TM backups and start over, you'll have to copy that other data somewhere temporarily.
    And one more question: Is it OK to use your Mac and its other apps while Time Machine is running? Or does that cause a problem?
    It's fine. You may have slower response time, especially using the internet while doing a wireless backup, but TM won't crash or fail to back up.

  • NTSC vs PAL in HD -- editing and shooting question.

    I've heard different answers on this question and all my Googling has resulted in nothing but more confusion, so I'm hoping someone in here who truly knows the answer to this can tell me.
    I am based in Los Angeles, but am partnering up on a big project with some people who are based in Europe. The project we are shooting is going to be shot in New Zealand and we want to shoot it in HD. When we are done, we are planning on having both parties split up the footage and the European crew will edit half of it on FCP there in Europe, while my crew here in the U.S. will edit the other half on FCP here in the U.S.
    Obviously, European TV and video are all PAL based and here in the U.S. it's all NTSC. My question is deceptively simple: are we going to have a problem if all the footage is shot on the same camera?
    I typically use Canon HD video cameras (the A-1 and the HV20) that were purchased here in the U.S. to do my shooting. I would like to take these cameras on the trip and shoot with them, but I also want the footage I shoot to be compatible with my partner's PAL-based FCP system. I have heard that there is no such a thing as NTSC HD or PAL HD and that HD is just HD regardless of the country it's in. Is that true? Could I rent an HD camera in Europe and shoot stuff with it there and then bring the resulting tapes back here to the U.S. and play them on my U.S.-purchased HD cameras and decks and load it into my current FCP setup in L.A. without any problem? And would my partners be able to do the vice-versa (i.e. will my HD footage play and load on their HD cameras that were purchased in Europe?)
    I would love to know if anyone has an answer to this. So far I've heard a lot of speculation and conjecture and no one I've talked to definitively seems to know.
    Many thanks if anyone does.

    I have heard that there is no such a thing as NTSC HD or PAL HD and that HD is just HD regardless of the country it's in. Is that true?
    Yes, its true. As far as "definition" goes, there is no difference between a 1080 image shot in a PAL region and a 1080 image shot in an NTSC region. However, which frame rate you intend to shoot at eg 50i / 60i, 25p / 30p etc will certainly make a difference. Most consumer level HD camera's are restricted depending upon the electrical frequency of the market region they are being sold in. If your camera was purchased in a 60Hz ( NTSC ) region then its likely your camera will only support 60i, 30p 24p etc. If its purchased in a 50Hz (PAL) region then it's likely to only support 50i, 25p etc.
    Generally it is only the higher end pro camera's that support switching between systems ... neither the HV20 nor the XH-A1 have this capability.
    Could I rent an HD camera in Europe and shoot stuff with it there and then bring the resulting tapes back here to the U.S. and play them on my U.S.-purchased HD cameras and decks and load it into my current FCP setup in L.A. without any problem?
    Well that would depend on what camera you rented as compared to what your current setup is ... what's your current setup and what do you have in mind to rent?

  • And another question on video

    While I'm here, I have another itunes problem. I bought a daily pass to the Daily Show. It's great, except the quality of the video is TERRIBLE!!! There is a tremendous lag between what I see and what I hear and it looks pretty pixelated. This happens on most of the episodes. I have downloaded many other programs from itunes and did not have this problem. Any ideas?
    Thanks again.

    While I'm here, I have another itunes problem. I
    bought a daily pass to the Daily Show. It's great,
    except the quality of the video is TERRIBLE There
    is a tremendous lag between what I see and what I
    hear and it looks pretty pixelated. This happens on
    most of the episodes. I have downloaded many other
    programs from itunes and did not have this problem.
    Any ideas?
    Thanks again.
    I am not familiar with the daily pass, but is this video streamed or do you actually download the entire files? The videos you download from iTunes are specifically made for the iPod so they have a 320x240 resolution which would look pretty bad fullscreen on a computer.
    Hope that answers your question.

  • Upgrading Itunes with an external hard drive and another question

    Okay so about a month ago I transferred my itunes library to my external hard drive. I have since purchased and downloaded new music/video to my Ipod. Here are my questions if anyone can help me please.
    1) Because I moved the library to the external, does that mean I also moved the Itunes program OR just the place where new music is downloaded/purchased and save to?
    2) Upgrading to new Itunes on this computer, will that ruin what I have in my library or just upgrade and keep everything the same like it is now?
    3) Horror story I heard is that when I upgrade, I may have to re-purchase music from Itunes in order for it to play on new Itunes. If that's true then I am paying like $400+.
    I'm not a dummy, but this Ipod and music are very, very important to me. Any help would be very appreciated.
    Sincerely,
    Gusaphit

    gusaphit wrote:
    so because you have kept your itunes folder and library on an EHD, I take it you have also deleted the actual Itunes program folder from your computer's C drive?
    Not the program folder, iTunes folder where your music library and ancillary files are kept. I haven't had my iTunes music on any internal hard drive on any computer for years.
    I am trying to delete the music/movies off of this PC as it is my work station as well.
    What steps do I need to take in order to successfully ensure that my Itunes will be secured on my EHD and fully operable should I want to add more music, purchase more music, or delete/re-arrange music as I am doing now.
    Check in Preferences>Advanced to make sure that iTunes is pointed to your EHD. If it is, you should be fine. Then, just to make sure that everything is where it should be consolidate your library: File>Library>Organize Library.
    Follow-up: If I move the program over to my EHD does that mean I can use any PC to download music into the Itunes library from my EHD?
    I don't think you want to move the iTunes.exe file to your EHD. As I understand it, iTunes isn't really happy there and it takes some work to get it there. Just move the library.
    I'm asking because you responded and you're cute.
    Very happy to help but really, I'm not that cute.

  • Video format and another question

    I saw someone else ask what video format photos for iOS supports but i had a couple of extra questions so didn't want to hijack his.
    I've been using aperture for years but my library was really messy, i'm loving photos overall so far as i hardly used the features in aperture and the interface looked a bit dated. Sharing photos was also a bit of a nightmare compared to the new photos app.
    Anyway instead of importing the whole aperture library, which i didn't want to do as it was messy, i decided to start fresh with a new photos library and just copy/drag the photos over from my aperture albums/folders. Firstly, am I right in assuming when i do this, it will actually hardcopy the photo over into the photos library and not just a link or a soft copy from aperture? Therefore i can delete the aperture library once all photos are copied over and i will still have all the original photos in the new app? Just to note, i didn't use referenced files in aperture.
    Secondly, unless I'm being really stupid, none of my older videos taken on IPHONES seem to copy over, even from just last year using an iPhone 5. the format seems to be .MOV.
    Now, SURELY, apple are not going to release an photos app that DOESN"T support the importing of videos taken on their own phones from just a few months ago?

    Hi. Your understanding of how the copies from your old library are not quite correct, but the bottom line is you would be able to delete your old Aperture library afterwards (or at some point, which might be a wiser approach). I used iPhoto not Aperture so I'm not sure if it's the same but take note of what you are actually exporting so you keep any GPS, date, keyword information etc. etc. you might have added.
    Some have encountered this movie issue and found that simply exporting it to the desktop before adding it to Photos is enough, others have found the export to the desktop works but not the import into Photos and have had to use Quicktime to export it again to an Apple Device compatible format. Clearly the videos should be supported, I don't believe Apple have decided not to but rather that something has/is going wrong.

  • Inheritance and another question

    Hi
    When you create a class for example plane, you can create two subclasses for example engine plane and propeller plane. Inheritance is used not to have to re-write all the set get methods in the plane class correct?
    But while processing(using, making random access classes to add planes for example) do you have to make one for propellor and one for engines? or is there something which allows you to create once and "inherit" those features? is this clear?
    Thanks

    Hi
    When you create a class for example plane, you can
    create two subclasses for example engine plane and
    propeller plane. Inheritance is used not to haveto
    re-write all the set get methods in the planeclass
    correct?No, that's not why inheritance is used. It's a nice
    side benefit, but it's not the purpose. The purpose
    of inheritance is specialization. You create a base
    class Plane, and then subclasses that do everything a
    Plane can do, but do some of it in their own
    specialized ways.ah ok.. like you mean for example another calculation or another method using the things in the base class

  • 8 G Nano Freezing Problems--How Widespread Is It And Another Question

    I got this 8 G Nano about 1 and 1/2 weeks ago. Last night it froze. I did the "hold switch on and off" and it worked. Then I did the "center and menu" option which gave me the Apple icon when I turned it on with a prompt to use iTunes to restore the Nano. Since I am away from my computer, I have not be able to do that yet. My questions are: how widespread is the freezing problem and is there anything I can do to lessen the chances of it occuring, and since I got the Apple icon on the screen will I encounter any problems when I do the restore?

    I think it would be a little bit of a skewed judgement of how widespread any particular problem is based on the responses on this board. You have to keep in mind that most people come here in the first place because of a problem they are experiencing. So it's likely that the ratio on here would be extremely high. The people that post on here only represent a small number (ratio wise) of ipod users world wide so over all the problems described on here may not be as widespread as it may appear (also keep in mind that other sites where complaints are logged would have the same issue...and it's very likely that a number of the complaints here are reposted on various sites by the same people). On here, I am one of the few people that has not experienced the majority of the issues that others have posted about. I have not had to reset my ipod or do a restore or go through any of the 5 R's. On here I feel like I may be on of the lucky minority but the people around me represent a different picture. No problems with their units with the exception of the on-the-go playlists bug and the initial firmware bugs everyone experienced.
    As for experiencing any problems when you go to restore due to you having the Apple icon...in theory I would like to tell you no, you won't have any problems, but the reality seems to be that it's impossible to really predict what will happen.
    Hope all works out for you.

  • Answers to a question and another question

    Have just started using chat beta app for imessaging from my mac to iphones.
    a lot of people have had issues syncing properly between devices, which i had as well.
    by syncing i mean:
    at the moment on my iphone all messages from 'dave' are in a single conversation. if dave was to imessage me from his mac, his message would show in a different conversation because its come from his email address instead of his phone number. even if i add his email address to his contact it will still show in different conversation. which is very annoying because i want all my conversations with dave to be unified regardless of where they were sent from.
    some people have suggested that the answer is to change the caller ID for imessage from your phone no to your email address.
    my problem with this is that all your imessages from your iphone to other iphones will show up as your email address instead of your phone number on the recipients phone, which i don't want and im sure a lot of people wouldn't want.
    anyway in case people are looking for a solution (as i was for ages) i came across a possible one which seems to work:
    delete all existing conversations from that person on both your phone and reciepients phone. from then onwards all messages sent between those 2 people will show in same conversation rather then 2 different ones regardless of where they are sent from.
    i have tried this with wifes phone and after deleting existing conversation on both our phones, all messages i sent her regardless of wether from my iphone or mac all shows in same conversation.
    anyway thats my answer to a possible problem, i also have a question:
    what is the future of messages beta? its a excellent idea, however makes no sense at all if it doesn't sync PROPERLY across all your devices which at the moment it doesn't. surely apple can identify you purely from your apple id, so i can't see why they can't get imessages to sync fully, so all imesseges sent to me and those i send as well all show up on both my phone and on mac.

    Hi,
    Currently Mesages Beta is storing your Messages from any source in two places.
    By default it is saving iChat style transcripts in Your Home Folder/Documents/iChats (this is the default place for the ichats folder)
    It is also storing, at least iMessages, in Your Home Folder/Library/Messages in the form of a data base.
    It seems to be this data base that show you the "History" of the contact you is chatting with you.
    (This can only be accessed by using the Finder's Go Menu and holding the ALT key to be able to select the Library)
    It also seems unclear as to whether it is the Address Book details or something at the Apple Server end that links Phone Numbers with IDs that allows the linking and syncing of the two forms of ID.
    The fact that you have found that clearing all the History of all IDs conversations allows better syncing is interesting.
    As I see it several things need to be considered
    Not only iMessages from Phone Numbers and Apple IDs need to be resolved for syncing but also whether people want the iChat type Buddy list chats to also be collated in that process.
    If iMessages are kept separate from the older iChat style chats in terms of syncing chats on the Mac end there is still the issue of whether Jabber and AIM Chats should be "synced" or collated for the "History" view.
    As I have several Buddies with History at least on AIM chats going back to 2004 and later jabber Chats with some of those it would make for a very long scroll back.
    There would appear to be a syncing issue with iMessages regarding the Name or Phone number that needs to just work and not need all chats to be closed and cleared to then sync  (or if closed/deleted a way of getting one you want to keep back or stored for review)
    A way of deciding what and how much "History" is called back for a Buddy or contact.
    The fact that all Saved Chat for a Buddy will show up does mean you have a useful search tool for certain things.
    However I rarely use Saved Chats for much more than that after about 6 months.
    Spotlight would tend to find it anyway (in the current Storage place)
    If History/Archives of chat are going to be kept in the Library then Spotlight will not be able to Search them.
    Messages will be in Mountain Lion.
    And for that we will have to wait.
    9:23 PM      Thursday; May 17, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.4)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.7.4),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for