Render the same model in multiple ways for several components

I am faced by the problem explained in the subject.
Getting more specific I have two jtrees that should share the same model/nodes and display them in two different ways (different icons, different popups...)
I have to cut & paste nodes in one of the trees while I use the other to set some properties in a convenient way so it would be really nice if there was a way to have only one data model so that the two jtrees would be synchronized (not easy to do otherwise...)
So basically I'd like to change the renderer on fly depending on which "view" of the model I am rendering, I need also to keep the selection separated otherwise things would get really out of hand.
Any ideas?

You have described the solution in your question.
One TreeModel can be set to multiple JTrees. I am more familure with Tables, but I am pretty sure the same holds true to trees.
The renderer can be set per tree and can show any aspect of the data node you wish.
Just make sure that all your data manipulations are done in the model. Meaning DON'T manually add children to a tree node, instead use the manipulation methods from DefaultTreeModel:
insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent, int index)
removeNodeFromParent(MutableTreeNode node)Or if you implement your own tree model, make sure to inform the TreeModelListener's of all changes.

Similar Messages

  • Re: Running the same (Forte) application multiple times -for different

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi
    We had the same problem - how to deploy a number of identical applications, using each their own db.
    (for training).
    The solution we used is to wrap the entire application into different applications by using a very small
    module called KURSUS01, KURSUS02 etc, that did nothing but call the start procedure of the main app.
    Then in the dbsession connect, we made a call appname to get the application name, and appended the
    first 8 chars to the dbname. Thus our dbnames now points to logicals name: rdbdataKURSUS01, rdbdataKURSUS02 etc.
    All this allows us to deploy the identical apps in the same env, or change one version, and run both the old
    and new program on the same pc and server at the same time (eg. KURSUS01 and KURSUS02).
    I also think this is a kludge - but it works nicely!
    Jens Chr
    KAD/Denmark
    -----Original Message-----
    From: Haben, Dirk <[email protected]>
    To: 'Soapbox Forte Users' <[email protected]>
    Date: 15. januar 1999 09:41
    Subject: Running the same (Forte) application multiple times - for different business clients.
    Hi All
    We have a number of different business clients all willing to use our
    application.
    The (forte) application is to run on our machines etc for these (business)
    clients.
    All (business) clients will have their data kept in separate Oracle DBs
    (instance).
    The problem now is that the entire (forte) application is written using
    DBSessions.
    Now, depending on what business client needs to be serviced (so to speak) we
    need to attach to the right DB - or use the "right" SO.
    The two options we can think of are:
    Option1:
    Programatic change to somehow "know" what (business) client (DB) I'm talking
    about and then use the right DB.
    Pro:
    Only one forte environment to maintain
    Can run multiple (business) clients on same PC at the same time
    Con:
    Requires many program changes
    bending O-O rules(?)
    can't dynamically name SOs so can it be done at all? (ResourceMGRs maybe?)
    Option2:
    Use separate environments! One for each business client.
    Pro:
    More defined separation of app and data,
    SLA-easy
    Con:
    Maintain "n" number of environments
    Can only run the application for one environment (business client) at a time
    on one PC - Big Negative here!
    Not knowing any feasible solution to option 1 (without much code changes and
    developer moaning) I would go for option two; as I have already worked on
    multi-environment setups on VMS back at the Hydro (hi guys).
    I would appreciate any comments from anyone who has solved this problem.
    How, Why Pro Con etc.
    TIA,
    Dirk Haben
    Perth, WA
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Multiple DEVL_PROJECT_ID for the same model in CZ_DEVL_PROJECTS Table.

    Hi,
    Did anyone came across this issue!! I am triggering the config engine from back and and trying to pick up a model but it has multiple devl_project_id's. :(
    I could see multiple DEVL_PROJECT_ID for the same model in CZ_DEVL_PROJECTS Table. Apart from DEVL_PROJECT_ID and created_by_date every thing looks the same.
    Below are the 2 records the data from the table
    select * from CZ.CZ_DEVL_PROJECTS where product_key = '122:17056' and DEVL_PROJECT_ID in (12943,15321)
    DEVL_PROJECT_ID     NAME     ORIG_SYS_REF     CREATION_DATE     LAST_UPDATE_DATE     PERSISTENT_PROJECT_ID     MODEL_TYPE
    12943     ASI XXX MODEL(122 17056)     OPTIONAL:122:17056     12/18/2012 10:01     12/18/2012 10:01     11100     A
    PRODUCT_KEY     ORGANIZATION_ID     INVENTORY_ITEM_ID     BOM_CAPTION_RULE_ID     NONBOM_CAPTION_RULE_ID
    122:17056     122     17056     802     801
    15321     ASI XXX MODEL(122 17056)     OPTIONAL:122:17056     12/26/2012 23:10     12/26/2012 23:10     11100     A     
    122:17056     122     17056     802     801
    Thanks in advance,
    -vijay

    It can be possible to have multiple devl_project_id for the same model in cz_devl_projects Table.
    Case -1 : When you delete the existing model and re-import again.
    case 2:
    When you publish the model locally, it will create the same copy of the record with different devl_project_id, creation_date, last update_date etc..\
    You can see that for published records the last_updat_login, checkout_user will be null and for the original model, last_update_login,checkout_user (if model is locked) will not be null.
    -Murali
    Edited by: 907569 on Jan 8, 2013 10:55 AM

  • Can I use the same icloud username and password for multiple phones?

    I have 6 iphones and wanted to use Apple Configurator to install the same apps on all 6 phones.  Some of the apps though, also require further installation by email.  Can I use the same iCloud username and password for all 6 phones to download the apps and also to configure email or do I need to create 6 different Apple IDs?

    If different people will be using these phones, you might be better off using the same Apple ID for the iTunes content...apps, music, etc. on each of these devices, but create different ID's for iCloud on each device. You can use one ID for the iTunes/App store, & a different ID for iCloud. That way, messages, notes, contacts, calendars, etc will be kept separate on each device.

  • HT2731 I have multiple phones on my account; do they all have to use the same Apple ID and Password for ITunes?

    I have multiple phones on my account; do they all have to use the same Apple ID and Password for ITunes?

    No.

  • Share the same SharePoint 2013 development environment for multiple developers

    Hi,
    We need our developers(more than 2) to use the same ''SharePoint 2013 development server' for different application developments. Their work should not affect each others(like application pool reset etc.). How this can be achieved ?
    Thanks,,

    Hi Kalai,
    Please check the following similar post suggested that each developer could deploy his dll file to each separated web application bin folder by setting Visual Studio property "Assembly Deployment Target" to "Web Application".
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/7ee3858f-243c-4f43-a72d-3483ad1506f6/multiple-developers-debugging-on-different-web-apps-on-single-server?forum=sharepointgeneral
    Thanks
    Daniel Yang
    TechNet Community Support

  • I have an iphone 4 and it's not working, if i pay can apple replace it with the same model even though it's no longer for sale?

    I have an iphone 4 and it's not working, if i pay can apple replace it with the same model even though it's no longer for sale?

    If the iPhone has not been opened or serviced by other than Apple
    or authoriized service provider (there are a few other requirements),
    you should be eligible for out of warranty replacemement for $149 US.
    Apple maintains sufficient stock for replacements even for iPhones that
    are no longer available for purchase. You may be better off upgrading to
    a newer version than paying $149 to stay with the iPhone 4.
    What is no longer working? If you provide more details as to the problem
    and what troubleshooting steps you have taken, some one may offer
    a solution.

  • Can I trade a broken ipod touch for the same model.

    Can I trade a broken ipod touch (dead battery) for the same model.

    Yes. See the repair pricing here:
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipod
    If only the battery the exchange price is $79.
    You can make an appointment at the Genius Bar of an Apple store for the exchange
    Apple Retail Store - Genius Bar

  • Retaining row selection in a new  table which uses the same model.

    hi can anybody help me
    actually i have a table which allows multiple selections.like it allows to select row1 & row 4 if
    there are 5 rows.Now on click of a button i show a dialog with another table but with the same model
    applied to it.
    now my problem is that iam not able to make the selction of 1 & 4 rows in the new table.
    if i use a selectSingleRow in a for loop only 4rth row is getting selected.
    if i use a selection interval method it selects all the 4 rows from 1 to 4.
    is there any way i could select only the 1st and the 4rth row ?

    import javax.swing.*;
    import java.awt.*;
    import javax.swing.table.*;
    class Testing
      public void buildGUI()
        JTable table = new JTable(10,3);
        JScrollPane sp = new JScrollPane(table);
        sp.setPreferredSize(new Dimension(300,200));
        JFrame f = new JFrame();
        f.getContentPane().add(sp);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
        table.changeSelection(1,0,true,false);
        table.changeSelection(4,0,true,false);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }

  • I have two cameras of the same model and want to separate out the photos taken on each one. Is this possible?

    I have a Canon and my husband has a Canon, and they are the same model (mistake!)
    I imported his photos into my library (I'm the keeper of the photos), and now I want to seperate out his photos from mine.
    To make matters worse, the dates are the same (since we travel together) and the file numbers overlap (because the world is out to get us).
    They are thoroughly intermingled, but I'm hoping there is a super geeky way to seperate them.
    Ideas?

    Try to separate the photos by "import session".
    Assuming you can recognize some of the photos you took - perhaps there are some photos showing your husband and some photos showing you - these photos will tell you the import session. All photos you import into the library will be assigned an import session metadata tag, so his photos should have all the same import session tag.
    To show this thag, set the Info panel in the Inspector to "Edit" and add it to your current Metadata view.
    Once you found the Import Session for your husband's photos, create a smart album based on this meta data tag.
    When I import my husband's photos in my library, I use a metadata preset on import, that will assign automatically a keyword, set his copyright, and adds a color code. So I can see at a glance, which photos are my photos and which are his.

  • How can I edit the same photo in multiple LR catalogs?

    Hi Forumworld,
    I would like to edit the same photo in multiple LR catalogs. Before you say "don't", there are many reasons why I'd like to do this. I am a working professional photographer and LR is one of the many tools in my workflow. I essentially want to organize my catalogs according to two different principles: once by year and once by theme. As in, a catalog each for 2014, 2015, 2016. But also one where I can group all of my wedding photos, for instance. I have several reasons for not throwing all of them together into one catalog.
    I know that LR is essentially non-destructive, making this an uphill battle. But: if I do something like set all LR catalogs involved to Automatically Write Changes into XMP, should that a) be visible by any catalog and b) sync properly? As in: once the photo is imported to both Catalog A to Catalog B, can I edit it in A and see those changes - including developing, but also flagging etc. - in B? And vice-versa?
    Thanks for your help,
    Adam

    Hi All,
    thanks for the various answers. I've considered most of what was written already, but the gem in all this that I was looking for was from John's answer:
         You will also lose some of your work (xmp doesn't record flags, stacking, virtual copies, history steps...). So for one thing you specifically mentioned, flagging, you can't sync it across multiple collections
    This is consistent with what I've experienced - I wanted to find out if there was a way to not loose some of my work. The goal was to find a way that everything would sync automatically & properly so that I would always access the identical image from various catalogs. This is what I thought XMP would do - but I experienced that it didn't and now I understand that it won't do it properly, regardless of the settings. Flags were exactly the piece of information I was missing when I tried this.
    I am surprised that everyone is telling me to use one Catalog. I am sorry but I don't believe that it will scale - because that is not what I have experienced. When my LR4 catalog got to about 50,000 images, it slowed down dramatically.  Has something big changed in LR5? I have read many threads about this, most seem to say that already in LR4 it shouldn't have slowed down, but it did. No, my hard drive wasn't full. I just shoot a lot, mostly with a D800.
    Thanks,
    Adam

  • How do I add the same description to multiple photos in the new photos app

    How do I add the same description to multiple photos? I could do this in iPhoto but I do not see a way to do it in Photos for OS X. This is a handy feature to have.

    This link asks the same question,  https://discussions.apple.com/thread/6994338?searchText=How%20do%20I%20add%20a%2 0description%20to%20multiple%20photos?
    Someone shows the method to use AppleScript/ Automator to make Photos add the same description to multiple photos. I just opened up AppleScript editor and poked around the Dictionary for Photos and saw we have access to GPS longitude,latitude and altitude. So by using a third party app/web page to get those values, an Apple Script could be used to batch add the info to selected photos. That being said, I'm really busy these days and lack time to write scripts and migrate to photos.

  • How can I apply the same crop to multiple photos?

    It is easy to apply the same Adjust settings to multiple photos by using the Copy and Paste in the Adjust pane. Or by using iPhoto Batch Enhancer.
    But can you apply the same crop to multiple photos? I don't see any way to copy a crop. iPhoto Batch Enhancer can do something like it but, being an external editor, it does so on a copy of the photo. I want it on the original photo. (Well, it's not really the original since that one is saved separately in the Library but on the current version).
    Thanks for any suggestion.
    Bo

    Here's how:
    1 - bring up the first photo in the edit window and click on the Crop button or *use the "C" key on the keyboard*.
    2 - set the crop size/ratio in the menu and position the crop window over the photo as needed.
    3 - click the Apply button or *use the Enter key*.
    4 - click on the right arrow in iPhoto or *use the right arrow key on the keyboard* to bring up the next photo.
    5 - click the "C" key to bring up the crop function.
    6 - repeat steps 2 thru 5 for each photo.
    This video screenshot shows how:
    Click to view video screenshot
    Happy Holidays

  • I have two printers of the same model registed in eprintcenter and can't differentiate between them.

    I have two printers of the same model registed in eprintcenter and can't differentiate between them.
    I've tried change varios names in each printer's settings but they still show up in eprintcenter with the model name. What can I do to change the name so I can diffentiate the two prineters?

    Hi mptpro, the way to differentiate between your two printers within your ePrintCenter account is by their email address. The model name is automatically detected when you add the printer to your account and is not configurable but you can set the email address is. By giving each printer a distinctively different and meaningful email address you'll be able to differentiate between the two.
    To change a printer's email address: 
    log in to your ePrintCenter account
    click on the Printers tab
    select one of the printers and you will see the current email address for that printer just above the job history table
    click the Change button to the right of the address and enter the desired name in the dialog box that opens
    repeat for the second printer
    Hope this helps answer your question
    If my reply helped you, feel free to click on the Kudos button (hover over the "thumbs up").
    If my reply solved your problem please click on the Accepted Solution button so other Forum users may benefit from viewing the post.
    I am an HP employee.

  • Why, with iCloud, do we continue receiving the same email on multiple computers?

    Why, with iCloud, do we continue receiving the same email on multiple computers? Is there a way of stopping this?

    If those multiple computers are all setup to use the same iCloud account, then it is working exactly as intended. That's what iCloud does. Keeps your email, contacts, calendars, bookmarks, tasks etc. in sync across all devices/computers that the same iCloud account is setup on.
    If you want independent email on each device/computer, you need to setup independent email accounts for each device/computer.

Maybe you are looking for

  • When I click on a bookmark in the listing, nothing happens. If I right click and click on "Open In New Tab" the page loads. I am using version 14.0.1

    Firefox just updated to version 14.0.1. When I clicked on one of my book,marks from the listing, nothing happened. The page did not load. If I right click on the bookmark and choose " Open in a New Tab", the page loads in a new tab. None of my bookma

  • Possibly the most Stupid response every received

    Dear Customer, Welcome again to Apple iTunes store support. This is Kulamani again to assist you regarding this issue. I understand that you are unable to access Germany iTunes store. This is because of your iTunes account which is of under UK store.

  • Portal30_sso accidentally dropped

    Hello ssoers, I have a big trouble. I have accidentally dropped the portal30_sso. I tried to import this user from my last backup but i am getting the following errors: Connected to: Oracle8i Release 8.1.7.0.0 - Production JServer Release 8.1.7.0.0 -

  • BOM- Routing- cost estimate

    Hello i want to find out the relationship between BOM - Routing and cost estimate. i know what a BOM is, not sure how its linked to Routing and its compulsary to have a BOM and routing to update the costing run with quantity structure? can someone th

  • EMAIL activity with 2 username

    Hi' all, I am working on Oracle SOA 11.1.1.5.0 I have a requirement where I need to send email from two different usernames, inside the email activity we can only have single username, it like we get default which is configured inside EM inside User