Updating Jtree witout loosing selected Path

Hi,
I want the user to be able to get the most recent version of the database structure that is represented by the tree, without loosing the selected path.
that's mean i would like to update the Jtree structure without changing the selected path.
i tried to use myJtree.getModel.nodeStructureChanged((TreeNode) changedNode) but without success the selcted path is losed.
Is there any idea?
Thanks in advance

no this dosen't work , here after my code:
DefaultMutableTreeNode addedNode=new DefaultMutableTreeNode("NewNode");
ParentNode.add(addedNode);
// and i fired this event to cheng the tree
((DefaultTreeModel) myTree.getModel())).nodeStructureChanged((TreeNode) node);
but with this i lose mu selected Path
and i also tried this
((DefaultTreeModel) myTree.getModel())).nodeChanged((TreeNode) node);
but no success i can't update my tree structure

Similar Messages

  • IPOD Updater - Error 1324 - The Folder path contains an invalid character

    I tried to install ITUNES on an external HD (I didn't want to slow down my computer by putting all of my music on my internal HD). ITunes installed and then crashed. I removed all traces of ITUNES and IPOD that I could find and went to install ITUNES again on my regular internal drive. Now it goes through the installation and REMEMBERS my IPOD serial number (so obviously I can't find all of the files to remove) but doesn't give me a choice of where to install (it still must be trying to install to my external HD) the ITUNES. All I get is the following Error message:
    IPOD Updater - Error 1324 - The Folder path "Program Files" contains an invalid character
    Does anyone have a solution out there?
    Thanks in advance!
    MonsterProb

    IPOD Updater - Error 1324 - The Folder path "Program Files" contains an invalid character
    Interesting. It's choking on the old iPod updater application. (iPod software updates are no longer handled by a standalone application ... that function was folded into iTunes beginning with iTunes 7.0.0.70.)
    Let's try the following procedure.
    Download and install the Windows Installer CleanUp utility:
    Description of the Windows Installer CleanUp Utility
    Now launch Windows Installer CleanUp ("Start > All Programs > Windows Install Clean Up"), find any entries called "ipod for windows \[date]" or "ipod updater \[date]" or just "ipod for windows" in the list of programs in CleanUp, select those entries, and click “remove”.
    Quit out of CleanUp, and restart the PC.
    Does an itunes install go through properly after that?

  • Don't want nodes in a JTree to be selectable

    I have a JTree and don't want the user to be allowed to select nodes, just leafs should be selectable. Any ideas?
    Thanks,
    pi-j

    Subclass DefaultTreeSelectionModel and override any methods which add new selection paths to prevent nodes from being added to the tree selection paths.

  • Is this possible to select Path nodes....? - Please help!

    Hi Everyone!
    Is this possible to select Path nodes. Like below image.
    If I select more than one closed and apply Path operation like shapeOperation.SHAPEINTERSECT & combine path.
    Thanks in advance.
    Note: Select all nodes from path not a select path in Path palette.
    Regards,
    - yajiv

    There are other older choices from which to experiment, such as Classilla 9.2.1 browser,
    which is newer than the much older WaMcom mozilla derivative...
    These would all have some issues, and one of them is the lack of correct Java support
    along with any Flash player or other important parts whose update has ceased to happen.
    Classilla:
    http://www.floodgap.com/software/classilla/releases/
    Older browsers, such as very early (Mac OS) Mozilla and Netscape 7 or before may be OK
    if you can find them as downloads; but each will be lacking in some important area. For those
    who may hope to use the email function in some, that may not work. It may in another, if the
    technical specs for email haven't changed too much, or if the Internet provider allows access.
    http://code.google.com/p/classilla/wiki/AAATheFAQ
    MRJ and Flash 7 are supported to some limited extent, from what I've read; but for issues
    including security and performance, it is 'forced-off' and should only be turned on to see if
    a web page supports it, or in known-secure web sites. Classillia should be read into further.
    Some models of older computer hardware predating OS X 10.2 may require a Firmware
    update version to be installed in the older OS9 software, running in the computer, to be
    able to safely consider running 10.2 or later, in the computer. So if you consider that, do
    look into available or necessary firmware updates and install one as needed. Then, to run
    an OS X, the computer may require other hardware updates, more RAM, larger HDD, etc.
    Or be on the look-out for a newer build Macintosh which supports later OS systems; you
    can find info in MacTracker.ca or everymac.com on what hardware supports which OS.
    PS: if your older 'colors' G3 iBook were a 'dual-USB' model (white, 500MHz+) it would be
    able to run up to Panther 10.3.9 and OS 9.2.2, without additional firmware update; limited
    by the size of the hard disk drive, graphic processor, limited RAM upgrade, bus speed, etc.
    Good luck & happy computing!

  • I'm afraid to do the latest update because in the past when I update I always loose something . Last time it was my "pinned" tabs. What is the solution?

    I'm afraid to install the latest update because in the past when I update I always loose something . Last time it was my "pinned" tabs. What is the solution?

    Hello,
    Firefox automatically creates backups of your bookmarks, which can be helpful if your bookmarks are lost or missing. To recover them, follow the instructions below.
    #Use <u>one</u> of these methods to open the Bookmarks Library window:
    #*Click the ''[[Display the Firefox button menu instead of the menu toolbar|Firefox button]]'' to open the menu and click on ''Bookmarks''.
    #*Click the ''Bookmarks'' menu and click on ''Show All Bookmarks''.
    # At the top of the Library window, click the "Import and Backup" menu and select Restore.
    # Click the date of the bookmark backup you want to recover.
    # In the new window that appears, click OK.
    # Your bookmarks from the selected date should now be restored.
    For more information, see the [[Restore bookmarks from backup or move them to another computer]] article. For other solutions, see the [[Recover lost or missing Bookmarks]] article.
    Thank you.

  • JTree - full row select

    Hi,
    I would like to make the JTree tree items selectable/appearing like in the eclipse "Package Explorer". A tree item should become selected when the user clicks anywhere in it's row. Additionally the background color of the full row should be the selection-background color not only the label background.
    Any ideas how to do this ? I hope there is a solution for this, but I have doubts about it because of how the CellRenderer thing works.
    Thanks in advance,
    Christian

    Hi
    The mouse listener in that solution doesn't properly handle SHIFT/CTRL.
    This should work better:
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Insets;
    import java.awt.Rectangle;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.UIManager;
    import javax.swing.plaf.basic.BasicTreeUI;
    import javax.swing.tree.TreePath;
    public class ExplorerTreeUI extends BasicTreeUI {
        private Color backgroundSelectionColor = null;
        private RowSelectionListener sf = new RowSelectionListener();
        protected void installDefaults() {
            super.installDefaults();
            backgroundSelectionColor = UIManager.getColor("Tree.selectionBackground");
        protected void paintRow(Graphics g, Rectangle clipBounds,
                Insets insets, Rectangle bounds, TreePath path,
                int row, boolean isExpanded,
                boolean hasBeenExpanded, boolean isLeaf) {
            // Don't paint the renderer if editing this row.
            if (editingComponent != null && editingRow == row)
                return;
            if (tree.isRowSelected(row)) {
                int h = tree.getRowHeight();
                g.setColor(backgroundSelectionColor);
                g.fillRect(clipBounds.x, h*row, clipBounds.width, h);
            super.paintRow(g, clipBounds, insets, bounds, path, row, isExpanded,
                    hasBeenExpanded, isLeaf);
        protected void installListeners() {
            super.installListeners();
            tree.addMouseListener(sf);
        protected void uninstallListeners() {
            tree.removeMouseListener(sf);
            super.uninstallListeners();
        private class RowSelectionListener extends MouseAdapter {
                         * Listener for selecting the entire rows.
                         * @author Kirill Grouchnikov
            @Override
            public void mousePressed(MouseEvent e) {
                if (!tree.isEnabled())
                    return;
                TreePath closestPath = tree.getClosestPathForLocation(e.getX(), e.getY());
                if (closestPath == null)
                    return;
                Rectangle bounds = tree.getPathBounds(closestPath);
                // Process events outside the immediate bounds -
                // This properly handles Ctrl and Shift
                // selections on trees.
                if ((e.getY() >= bounds.y)
                        && (e.getY() < (bounds.y + bounds.height))
                        && ((e.getX() < bounds.x) || (e.getX() > (bounds.x + bounds.width)))) {
                    // fix - don't select a node if the click was on the
                    // expand control
                    if (isLocationInExpandControl(closestPath, e.getX(), e.getY())) {
                        return;
                    selectPathForEvent(closestPath, e);
    }

  • I am thinking of updating to the newest version for my Mac Laptop. I have the 10.6.8 should I update to the Mountain Lion OS X? If I update will I loose all my data, like documents, music, pictures?

    Wondering if I should update my Mac Notebook which is a 10.6.8 versions to the newest Mountain Lion version? What are the positive and negatives about the new version? Also if I update will I loose all the date on my computer like documents, music, pictures etc..? 

    First check the Compatibility of your Mac...
    Upgrade to Mountain Lion
    Then... Before attempting any Major Upgrade... get yourself an External Hard Drive... and create a Bootable Clone Backup of your current Hard Drive...
    By far the easiest way to make such a Backup, is to use something like
    SuperDuper  http://www.shirt-pocket.com/
    or CCC  http://www.bombich.com/
    That way, should anything untoward happen during the Upgrade,
    you will NOT LOSE ANYTHING.
    (Get an EHD that is at least equal to your current Drive...)
    Also, Check here for compatibility of 3rd party Software you may be using...
    http://roaringapps.com/apps:table

  • Name and Number selected paths?

    I am working on a very large .ai file of a baseball stadium render. It contains many small sections and box seats that need named and numbered in this format: section::100, section::101, ... and so on. Right now, I'm having to go through and rename each path individually. Is there a script that will save me TONS of time by automating this for me?
    I found this one on here, which is a good start for what I need, but it doesn't let me only number selected paths, nor does it let me start the numbering where I want (say at 100 and go up from there).
    #target illustrator
    var docRef = app.activeDocument;
    var newName = prompt ("What's the base of the new name","base");
    var myNB = docRef.pathItems.length;
    for ( i = 1 ; i < myNB; i++)
    var finalName = newName + i;
    docRef.pathItems[i].name = finalName
    Thanks in advance!!

    I have taken a quick guess at what you want but Im supposed to be busy at work…
    #target illustrator
    var docRef = app.activeDocument;
    var newName = prompt ("What's the base of the new name","base");
    var stNumb = prompt ("What's the start number","1");
    var myNB = docRef.selection.length;
    for (var i = 0 ; i < myNB; i++) {
         var finalName = newName + stNumb;
         if (docRef.selection[i].typename == 'PathItem') {
              docRef.selection[i].name = finalName;
              stNumb++;

  • [ADF-UIX] updating some fields after selecting an item from messageChoice

    Hi,
    I'll try and keep it short and simple.
    How do I do the following: I have 2 ViewObjects: department - employees, they
    have a 1 - many relationship. But there's no master-detail in my ViewObjects
    (no link between my view objects)
    On my UIX page I have a input form for Employees, with a messageChoice for
    choosing a department. And I show an extra label department_description, which
    comes from Department view. How can I update this label after selecting an item
    from the messageChoice?
    Is is possible?
    I tried searching this forum, but didnt find anything, hard define search
    parameters for this :)
    kind regards
    Ido

    Hi,
    I tried it in another page, one with a read-only form for courses.
    There it kinda works for the first 2 out of 3 items in the messageChoice,
    but not the last option.
    It does give me an error in JDev during runtime though
    05/10/20 15:13:57 editCourseV2DP.uix:line 60,col 95: Illegal HTML: cannot put a <td> element in a <form> element.
    which points to <messageTextInput model="${bindings.Longname1}" id="longname1"/>
    Dont see a relation between the error and my xml source...
    and it states: 05/10/20 15:25:48 Parameter partialTargets=_uixState longname1
    so that should be ok
    Can it be because CourseView has 2 EntityObjects, course and course_codes.
    and I have a course_codeView, with just 1 EntityObject, course_codes
    So when im building the uix page I have 2 options where to pull the longname
    from, CourseView and course_codeView. I tried both btw, and only the longname
    from CourseView changes. I would expect the other one to change.
    Oh well, im kinda lost now, perhaps I'll drop this feature and think of an
    otherway to implement my screen.
    Thanks for the replies
    kind regards
    Ido

  • When I go to update and it gets to the backup part it gives me error -43 and says to complete it it will take all the stuff off my iPod how do I get it to update with out loosing everything on my 64 gb iPod touch

    When I go to update and it gets to the backup part it gives me error -43 and says to complete it it will take all the stuff off my iPod how do I get it to update with out loosing everything on my 64 gb iPod touch

    You have a 1st generation iPod Touch.
    It can be updated to 3.1.3 by purchase. See here Purchasing iOS 3.1 Software Update for iPod touch (1st generation)

  • Creating a Dynamic Update Statement based on Select

    hi,
    i'm trying to create a dynamic update statement based on select statement
    my requirment is to query a joint tables and get the results then based on the results i need to copy all the data and create an update statement for each row
    for ex
    the update statement should look like this
    update iadvyy set SO_SWEEP_CNT = '1' where inst_no = '003' and memb_cust_no = 'aaaaaaaaaaaaaaaa';
    and the select statement like the following
    select substr(key_1,11,9) account_no,sord_mast SO_SWEEP_CNT from
    select acct_no,count(*) sord_mast from
    (select from_acct_no acct_no,update_mast
    from sord where FROM_SYS in ('DEP','INV') and TERM_DATE > 40460
    union all
    select to_acct_no acct_no,update_mast
    from sord where TO_SYS in ('DEP','INV') and TERM_DATE > 40460)
    group by Acct_no)
    right outer join
    invm
    on
    key_1 = '003'||acct_no
    where sord_mast > 0;
    so taking the above two columns from the above select statement and substitue the values as separate update statement.
    is that doable , please share your knowledge with me if poosible
    thanks in advanced

    is that doable , please share your knowledge with me if poosibleyes
    The standard advice when (ab)using EXECUTE IMMEDIATE is to compose the SQL statement in a single VARCHAR2 variable
    Then print the SQL before passing it to EXECUTE IMMEDIATE.
    COPY the statement & PASTE into sqlplus to validate its correctness.

  • Suggestion: interactive update of text while its path is transformed

    I've been using Ps CS6 for a couple of months now, and I occasionally used CS5.1 before that. I'm becoming increasingly frustrated with its lack of interactive feedback during many manipulations. A lack of feedback which is provided in applications costing a small fraction of the price. This is 2012, Ps is a leading graphics app in some ways, but in other ways it is pitifully like a relic from the early 1990s.
    The latest case. You have text on a path and you decide to transform that path with Free Transform (Cmd+T). The positions of the text characters don't update while you manipulate the path! You don't see the changes until confirming the transform command. So you blindly transform again, confirm, and again, confirm, and again... again... again... until you chance upon the desired result.
    Please improve this, Adobe.

    Hi Noel
    I think you're transforming the characters and their path.
    I want the form and scale of each character to be unchanged. It's the path along which the characters flow that I'm transforming. Below is a trivial before and after example.
    The characters' positions do not change during use of the transform command, e.g. Free Transform (Cmd+T), when it's only the path that's being transformed. It's like working with a blindfold on.

  • Is it possible to use an object as a selection path?

    I know in photoshop you can make shapes with the pen tool and then covert them into a selection path.
    I was wondering if there is such similar feature in Illustrator
    For example with the picture I posted here, what I want to do is be able to select the objects that are in contact with the black object on top without having to individually select them or use the "lasso" tool
    It would make things easier with a "Select all objects under or above" option, theres only the "Select next object under or above"

    Djxyz0 wrote:
    It would make things easier with a "Select all objects under or above" option, theres only the "Select next object under or above"
    the script works exactly the way you originally asked, you draw a path, with the pen if you want, then run the script and everything under this path of yours will get selected.

  • Speed Issue on an UPDATE from a sub-select

    Ignoring the fact this is a Spatial Query... having troubles understanding why a select finishes very quickly, yet putting the same select syntax in an UPDATE command as a sub-select takes forever to finish. Columns in the original table are indexed (ie SANITARY_MH_DATA.GIS_ID). The work-around has been to load a Temporary table with the sub-select results, followed by an UPDATE command. But it creates more sql code than needed.
    Any hints appreciated.
    Phil.
    -- FIND THE SANITARY CATCHMENT THE MANHOLE IS IN --
    -- need to add the ones that fall into more than 1 catchment
    -- with the mask=TOUCH
    UPDATE SANITARY_MH_DATA SET CATCHMENT_NAME = '';
    -- THIS BLAZES AND IS DONE IN 5 SECONDS...
    SELECT CATCHMENT_ID FROM
    (SELECT A.GIS_ID AS MANHOLE, B.GIS_ID AS CATCHMENT_ID
    FROM SANITARY_MH A, SANITARY_CATCHMENT B
    WHERE SDO_RELATE (A.GEOMETRY,B.GEOMETRY, 'mask=INSIDE querytype=Window') = 'TRUE');
    -- THIS BOGS DOWN AND TAKES FOREVER TO FINISH...
    UPDATE SANITARY_MH_DATA SET CATCHMENT_NAME = ( SELECT CATCHMENT_ID FROM
    (SELECT A.GIS_ID AS MANHOLE, B.GIS_ID AS CATCHMENT_ID
    FROM SANITARY_MH A, SANITARY_CATCHMENT B
    WHERE SDO_RELATE (A.GEOMETRY,B.GEOMETRY, 'mask=INSIDE querytype=Window') = 'TRUE')
    WHERE SANITARY_MH_DATA.GIS_ID = A.MANHOLE);
    EXIT;
    Edited by: user13174287 on 24-Aug-2010 3:51 PM
    Edited by: user13174287 on 24-Aug-2010 4:06 PM

    There is such a way, however I doubt that it will work in your case. There are some restrictions on it.
    You can write an update to a kind of inline query.
    UPDATE (select dat.*, mh.GIS_ID AS MANHOLE, cat.GIS_ID CATCHMENT_ID
           from SANITARY_MH_DATA dat,  SANITARY_MH mh, SANITARY_CATCHMENT cat
           where SDO_RELATE (mh.GEOMETRY,cat.GEOMETRY, 'mask=INSIDE querytype=Window') = 'TRUE'
           and dat.GIS_ID = mh.GIS_ID
           ) v
    SET v.CATCHMENT_NAME = v.CATCHMENT_ID
    WHERE (v.CATCHMENT_NAME != v.CATCHMENT_ID or v.CATCHMENT_NAME is null)
    ;there is some join criteria missing between cat and dat. MAybe it would work if the CATACHMENT ID is fetched in the selct clause of the inline view, instead of joining it.
    UPDATE (select dat.*, mh.GIS_ID AS MANHOLE,
                        (select cat.GIS_ID from SANITARY_CATCHMENT cat
                         where SDO_RELATE (mh.GEOMETRY,cat.GEOMETRY, 'mask=INSIDE querytype=Window') = 'TRUE'
                         and rownum = 1) as catchment_id
           from SANITARY_MH_DATA dat,  SANITARY_MH mh
           where dat.GIS_ID = mh.GIS_ID
           ) v
    SET v.CATCHMENT_NAME = v.CATCHMENT_ID
    WHERE (v.CATCHMENT_NAME != v.CATCHMENT_ID or v.CATCHMENT_NAME is null)
    ;Oh and there is the MERGE statement. This might help in your case.
    Edited by: Sven W. on Aug 25, 2010 9:19 PM

  • How to select paths with the same stroke width

    I would like to know how to select all the paths inside a document whose stroke width are equal to 0.361 points
    I will appreciate any help.

    here you go
    #target illustrator
    // script.name = selectPathsThisSize.jsx;
    // script.description = selects pathItems that have the same supplied stroke width; limited to 3 decimals;
    // script.required = a document with at least one path item;
    // script.parent = CarlosCanto // 6/5/11;
    // script.elegant = false;
    var idoc = app.activeDocument;
    var strokewidth = prompt ("Enter Stroke Width in points of paths to be selected", 0.361, "Select Paths this size:___");
    for (i=0 ; i< idoc.pathItems.length; i++)
              var ipath = idoc.pathItems[i];
                   if ( (ipath.strokeWidth).toFixed(3) == Number(strokewidth).toFixed(3))
                             ipath.selected = true;
    app.redraw();

Maybe you are looking for