Is it possible to make only some nodes of a tree editable but not others???

I am trying a simple java program in which I need only leaf nodes to be editable but not non-leaf nodes. So please if anyone has any idea of that then I need help.

You could write conditionals because getTreeCellEditorComponent() method of a TreeCellEditor should have boolean leaf argument.

Similar Messages

  • Why does some artwork embed into the file, but not others?

    Hey everyone.
    I'm running iTunes 11.3.1. I'm incredibly obsessive about having organised files and one thing in particular I want is album artwork embedded into the music file itself, not just on iTunes. The problem I have is that the artwork will embed for some, and not for others - even if I use the exact same methods:
    I use the following for getting HQ covers: http://bendodson.com/code/itunes-artwork-finder/index.html
    I will then click on the high resolution version, copy it to clipboard, command-i to get info of the individual tracks and manually paste the cover into every track on the album. When I then go into Finder to see if it has embedded, I find that for one album it has worked perfectly; but although I use the exact same method, it won't work for another album even if they're exactly the same file type.
    (I know I can save myself time and select all the tracks, command-i and paste the artwork to do it in one go - but I find I get just as much of a mixed bag. I.e. sometimes it works, and sometimes it doesn't.)
    I am literally at the end of my tether and I can't figure out what I need to do differently, any help is appreciated. Thanks.

    I have encountered exactly the same problem and frustration :-)
    Although I can't offer a definitive reason why, I did notice that the problem tracks typically had a higher resolution image attached in iTunes. I have used Preview to reduce the resolution to 600 x 600 (standard iTunes size) and it worked.
    Now, I have no idea if it was the resolution or the fact that I was re-saving a fresh version of the JPG (which may have stripped out whatever was causing the problem), but the process of tweaking the file to 600 x 600 and re-saving has worked for me.

  • Syncing audiobooks from nac to iPad/iphone unable to clsick the box on some audiobooks( all purchased on iTunes) but not others.  all still play from the itunes library on my mac. Why can't I sync them ?

    Help.  Why can't I select some audiobooks to sync but I can select others in the audiobooks section under sync selected audiobooks area.  All of them still work when played from Itunes on tmy Mac Desktop. 

    Hi,
    You cannot manually manage music with match turned on on your iOS device. If you want to manage music manually, you will need to turn off match on your iPhone.
    Jim

  • .wid file opens for some developers Web Intell Rich Client but not others

    4 developers with same BO client installs @ 12.2.7.598** (server at 3.2 SP 2.7)
    2 can read demo .wid files and 3rd party supplied .wid file, 2 cannot!*
    Error produced when running:
    An internal error occured while calling 'openDocumentMDP' API. (Error: ERR_WIZ_30270).
    Last few lines of Trace file produced for the 2 that cannot run the .wid(s):.
    ERROR COMPONENT="WIS" ERRORCODE="30270" ERRORTYPE="USER" MESSAGE="An internal error occured while calling 'openDocumentMDP' API. (Error: ERR_WIS_30270)" PREFIX="ERR">
    <DEBUGINFO BORESULT="5" FILENAME="kdgWICDZ_i2.cpp" LINEPOSITION="792" MODULENAME="WICDZServer_i"/>
    <REQUESTINFO COMMANDID="" COMMANDNAME="" DPID="" DPLONGNAME="" DPNAME=""/>
    -Tried removing all files under LocData, the error still produces and
    creates a new trace file.
    -tried 2 that can open .wid to "open and save for all" a .wid and send back to us 2 that can't open, still no success
    Please Advise,
    MAC

    Hi,
    First of all, you'll need to work out if the problem is install/machine based, or user-based. Get the users than can't open the file to log in on the machines of the two people that can open the report. What happens?
    If they can open the report on the other machine, it's a client issue, I'd suggest a double-check that the versions match and/or a re-install.
    If they can't open the reports on the other machines then it's a server/user problem. Either examine the user accounts to identify the differences, or just re-create the users from scratch to match the two users who can open the reports.

  • Is their any possibility to Obfuscate only some classes.

    Hi,
    I tried with jBuilder to obfuscate only some classes as per the help provided by the jbuilder, where it is clearly specifed that it is possible to obfuscate only some classes. But i am not getting that. I tried same as given in the help.
    Let me know, any wrong i did... and is there any other way to do this.
    plz reply me.
    With Regards,
    Rajesh

    Use exclude parameter and check the below link.
    http://www.oracle-base.com/articles/10g/oracle-data-pump-10g.php
    Regards
    Asif Kabir

  • How to make only some open Invoices visible in Incoming Payments Wizard ?

    I want only to make only some Open Invoices visible in Incoming Payment. Can i use series (Document Numbering) ? Lets say I have SBO in 2 cities and want to user of city A only se open invoices of city A in incoming Payments , and user of city B to see only invoices created in city B . Any ideas ?

    You may use Project code to reach your goal.
    Thanks,
    Gordon

  • I want to make only one node draggable in the tree. How?

    I want to make only one node draggable in the tree. How?
    when we have only
    tree.setDragEnable(true)which makes draggable the entire nodes in the tree.
    Thanks -

    Hi Andrea
    Just to clarify things up: is this what you want?
    package treeDnD;
    * DragJustOneNode.java
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    public class DragJustOneNode extends JFrame {
        private JTree tree;
        private DefaultTreeModel model;
        private DefaultMutableTreeNode root;
        public DragJustOneNode() {
            super("Only child 1 is draggable!");
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            setSize(400,300);
            setLocationRelativeTo(null);
            tree = new JTree();
            tree.setDragEnabled(true);
            getContentPane().add(new JScrollPane(tree), BorderLayout.CENTER);
            tree.setTransferHandler(new TreeTransferHandler());
            root = new DefaultMutableTreeNode(new NodeData(0, "root"));
            root.add(new DefaultMutableTreeNode(new NodeData(1, "child 1")));
            root.add(new DefaultMutableTreeNode(new NodeData(2, "child 2")));
            root.add(new DefaultMutableTreeNode(new NodeData(3, "child 3")));
            root.add(new DefaultMutableTreeNode(new NodeData(4, "child 4")));
            model = new DefaultTreeModel(root);
            tree.setModel(model);
        public static void main(final String args[]) {new DragJustOneNode().setVisible(true);}
    class NodeData{
        private int id;
        private String data;
        public NodeData(final int id, final String data){
            this.id = id;
            this.data = data;
        public int getId() {return id;}
        public void setId(final int id) {this.id = id;}
        public String getData() {return data;}
        public void setData(final String data) {this.data = data;}
        public String toString() {return data;}
    class TreeTransferable implements Transferable{
        private NodeData nodeData;
        public TreeTransferable(NodeData nodeData){
            this.nodeData = nodeData;
        public DataFlavor[] getTransferDataFlavors() {
            return new DataFlavor[]{DataFlavor.stringFlavor};
        public boolean isDataFlavorSupported(DataFlavor flavor) {
            return true;
        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {
            return nodeData;
    class TreeTransferHandler extends TransferHandler{
        private DefaultMutableTreeNode sourceNode, targetNode;
        public boolean canImport(final JComponent comp, final DataFlavor[] transferFlavors) {
            NodeData nodeData = (NodeData) (sourceNode).getUserObject();
            if(nodeData.getId() == 1) return true;
            return false;
        protected Transferable createTransferable(final JComponent c) {
            JTree tree = ((JTree)c);
            sourceNode = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
            return new TreeTransferable((NodeData) sourceNode.getUserObject());
        public int getSourceActions(final JComponent c) {return DnDConstants.ACTION_MOVE;}
        public boolean importData(final JComponent comp, final Transferable t) {
            JTree tree = ((JTree)comp);
            DefaultTreeModel model = (DefaultTreeModel)tree.getModel();
            targetNode = (DefaultMutableTreeNode) tree.getLastSelectedPathComponent();
            DefaultMutableTreeNode parent = (DefaultMutableTreeNode)targetNode.getParent();
            if(parent == null) return false;
            model.removeNodeFromParent(sourceNode);
            model.insertNodeInto(sourceNode, parent, parent.getIndex(targetNode));
            tree.setSelectionPath(new TreePath(model.getPathToRoot(sourceNode)));
            return true;
    }

  • How to make only part of a PDF document editable?

    I'm looking to see if there is a way to make only part of a PDF document editable. My problem is, I have pieces of collateral that some of our channel partners need to be able to add their logo to and then edit the contact information on them, but we don't want them to be able to change any of the main copy on these documents. The only thing I've been able to come up with as a solution is to create outlines of the text that I don't want editable, but I need the copy to be able to be read by computer systems for disability purposes. Does anyone have any ideas on something I could do for this? Or has anyone dealt with anything like this? Any help would be greatly appreciated!

    Hi vward26,
    You can use Acrobat to make only part of a PDF document editable.
    Kindly refer this FAQ:http://tv.adobe.com/watch/acrobat-x-tips-tricks/how-to-convert-just-part-of-a-pdf-file/
    Regards,
    Florence

  • How to make some fields in ALV tree editable

    Hello All,
    Can any one tell me how to make some fields in ALV tree editable.
    If possible please post some code.
    Regards,
    Lisa.

    Hi Lisa,
    I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
    I tried making the wa_fieldcat-edit = 'X' But in vain.
    Also i made the layout fields  wa_layout-edit = 'X'  and wa_layout-edit_mode = 'X'.
    But still the alv tree field appears as display.
    As you have mentioned in the post as answered, So please guide me to make the field editable.
    I am using oops method.
    Please provide me code if any.
    Thanks & Regards,
    Mozila

  • TS3274 my ipad is having trouble with my music... i had recently gotten a new one when i signed into my icloud the music that i had on the original one was not there.... some songs were in fact there but not clickable ( it was there only gray)..anyone kno

    my ipad is having trouble with my music... i had recently gotten a new one when i signed into my icloud the music that i had on the orignal one was not there.... some songs were in fact there but not clickable ( it was there only gray)... i was looking for help on how to get the music on the ipad

    my ipad is having trouble with my music... i had recently gotten a new one when i signed into my icloud the music that i had on the orignal one was not there.... some songs were in fact there but not clickable ( it was there only gray)... i was looking for help on how to get the music on the ipad

  • HT1727 i bought some ringtones on my iPhone, later on i sync my iphone to my old computer now i have a new mac pro desktop and i only have 2 ringtones on my phone but not the rest of them how can i get them back without having to pay for them again?

    i bought some ringtones on my iPhone, later on i sync my iphone to my old computer now i have a new mac pro desktop and i only have 2 ringtones on my phone but not the rest of them how can i get them back without having to pay for them again?

    If you bought them on your iPad then you will need to connect your iPad to your computer's iTunes and do File > Devices > Transfer Purchases to copy them over to the Tones part of your computer's iTunes library and you can then sync them to your iPhone - ringtones are a one-time only download, so you won't be able to redownload them directly on your phone.

  • I add some node to a tree but it is not shown in web page.

    Hi
    thank you for reading my post.
    I read some tutorial in the web and i add some tree node to a tree dynamically.
    but none of them is shown :(.
    I should say that i write the code that create a tree in session scope bean because my tree is placed in a fragment and fragment has no preRender method.
    here is code that initiate a tree, and i think it is correct.
        public void initiateTree() {
            getTree1().setClientSide(true);       
            System.out.println("Setter called");
            Context ctx=null;
            DataSource ds=null ;
            Connection con=null ;
            Statement st = null ;
            List rootMenuItems = new ArrayList();
            ResultSet rs = null;
            try {
                ctx = new InitialContext();
                ds= (DataSource) ctx.lookup("java:comp/env/jdbc/dataSource");
                con= ds.getConnection();
                st= con.createStatement();
            } catch (Exception ex) {
                ex.printStackTrace();
            try {
                java.sql.PreparedStatement childsPSt  = con.prepareStatement("select * from categories where parentcategory = ?");
                rs=  st.executeQuery("select * from categories where parentcategory= 0 and language = " +"'"+getLang()+"'");
                //roots
              while(rs.next()){
                  int parentID = rs.getInt("categoryID");
                                System.out.println("A root has been added   "+parentID );
    TreeNode aRootNode =  new TreeNode();
    aRootNode.setText(rs.getString("categoryname"));
                //childs
                    childsPSt.setInt(1,parentID);
                    ResultSet cRs = childsPSt.executeQuery();
                    while(cRs.next()){
                        System.out.println("Achild has been added "+ cRs.getString("categoryname")+ " " + parentID);
    TreeNode childNode = new TreeNode();
    childNode.setText(cRs.getString("categoryname"));
    aRootNode.getChildren().add(childNode);
    getTree1().getChildren().add(aRootNode);
            } catch (SQLException ex) {
                ex.printStackTrace();
       I call this method in session bean constructor.
    here is code that bind the tree in page fragment to session bean tree1
                <ui:tree binding="#{SessionBean1.tree1}" id="tree1" style="height: 167px"/>here is console output that prove the initiate method do some works.
    Setter called
    A root has been added   1
    Achild has been added cat name 2  1
    Achild has been added cat name 3 1
    A root has been added   5

    i think u need to add hyperlink component to the node thus cause node must carry hyperlink or anything u like to add like staticText or checkBox ....
    add this code after creation the aRootNode and childNode
    it may works :)
    Hyperlink h = new Hyperlink();
    h.setText(cRs.getString("categoryname"));
    childNode .getFacets().put( childNode .CONTENT_FACET_KEY, h );

  • Why can I make comments on some documents but but not others?

    why can I make comments on some documents but but not others?

    If the PDFs were made from scanned (bitmap) images, they would have no selectable text, and you couldn't add comments to those.

  • My Library shows some albums as separate titles so you can only choose 1 title at a time but not the whole album to be played. How do I create  a complete album ?

    My Library shows some albums as separate titles so you can only choose 1 title at a time but not the whole album to be played. How do I create  a complete album ?

    check out this excellent user tip by Steve MacGuire.

  • I downloaded ios 6 for my iPad 2 and some of the upgrades went through but not all. It sounds like I need to reinstall ios 6. How do you do that? Everytime I try to upgrade it says I'm already updated

    I downloaded ios 6 for my iPad 2 and some of the upgrades went through but not all. It sounds like I need to reinstall ios 6. How do you do that? Everytime I try to upgrade it says I'm already updated

    If you mean Siri then that is only on the iPad 3, it is not on the iPad 2 in iOS 6 (possibly because the iPad 2 doesn't have the Audience chip which the iPad 3 does). If there are other things that you think are missing (YouTube has been removed, and Passbooks is iPhone and iPod Touch only) ?

Maybe you are looking for