JTree and JClient - change label problem

Hi,
I got jTree to work. However, I want to change the root node from using the view name "TARGET_LISTING_TREE1View1" to something more user friendly like "All Targets". Is it possible? What do I need to do?
The following is the setModel code I have.
jTree1.setModel(JUTreeBinding.createTreeNodeTypeBinding(panelBinding, jTree1, "TARGET_LISTING_TREE1View1", null, "TARGET_LISTING_TREE1View1Iter", new JUCtrlHierTypeBinding[] {new JUTreeAccessorTypeBinding("NodeType1", "defaultbc4j.TARGET_LISTING_TREE1View", "LevelOne", "TARGET_LISTING_TREE2View", null, null, null), new JUTreeAccessorTypeBinding("NodeType2", "defaultbc4j.TARGET_LISTING_TREE2View", "LevelTwo", "TARGET_LISTING_TREE3View", null, null, null), new JUTreeAccessorTypeBinding("NodeType3", "defaultbc4j.TARGET_LISTING_TREE3View", "LevelThree", null, null, null, null)}));
Thanks,
Louisa

You would need a special renderer. The JUTreeBinding doesn't offer the possibility to set the name currently.
The tree cell renderer can determine whether a node is the root node by calling DefaultMutableTreeNode.isRoot() and can then set the text to anything you specify.
If you search this forum a bit, then you'll find a code snippet.
Sascha

Similar Messages

  • Apple ID and PW changes create problems on IPad ICloud

    I changed my Apple ID and password on the apple website but changing it on Ipad to connect with Icloud using new parameters seems to be a problem, will not accept new pw for deleting old account. Please help

    Of course not. You need to first enter the old password to disconnect the old Apple ID.
    What is it you are trying to do? Why do you need a NEW Apple ID instead of just changing your current Apple ID to use a new email address for example?
    I hope you know changing your Apple ID - at least for iTunes - will remove your ability to use any apps that you have purchased using the old ID.

  • Help with JTree and JPanel (or JFrame)

    Hi! I've an application that has JLabel, JTextField, JTree and JScrollPane.
    The problem is that when I add the tree to the scrollpane and then add it to the frame (or panel), the tree is not displayed. The labels and textfields are there, but the tree is not. But, if I don't use the scroll, just add the tree, then the tree is visible.
    Why is this happening?
    Hope u can help me!

    Please, helpppppppppppp!!!!!!!!!!!!!!!!!!!!!!!
    :)

  • Problem with changing Label in Bridge CS3 and CS6

    Hi there,
    I am having some problem with changing Label in Bridge CS3 and CS6 in windows.
    1. In Bridge CS3 (Windows XP), most of the time with most of the files, there is no problem. But I found that in some files, the Label does not get changed. I usually change Label by right clicking on the picture, then Label and select any Label. When I do so in those files, nothing happens. But when I rename the file by changing or adding just a single character, then it works. And if I again rename to original name, it still works. But without renaming the Label does not change. Again this does not happen with all pictures, but occationally with some. We usually receive pictures from different clients for editing purpose.
    2. In Bridge CS6 (Windows 7), if you create lot of Path using Pen tool in Photoshop for the purpose of removing background, you save the file, close, and change Label in Bridge, again open the file in Photoshop, you see no Path in the Path Pallette. So that means, changing Label works, but it removes the Path from the file. But if there is small amount of path, then no prboblem. But if there is lot of path, like you need to create for a necklace to remove background, then the problem arises.
    I am using Bridge for a purpose where it is very helpful so I really need to use Bridge, and Labeling feature is the most important to me, but after feaguring out this problem, I am really tensed as to whether or not I will find a solution to this. So any help, guidance will really be appreciated.
    Thanks very much in advance for any solution.
    Best regards

    I have re-checked the issue and I found that the problem is with JPG file.
    I wasn't even aware you could save a path to a jpeg file (always use PSD because of wanting to keep the Alpha Channel, jpeg only can contain 1 layer and no alpha channels and/or transparency).
    However I tried it on a file with a simple path and one with a complex path. It seems indeed you have found a bug. The simple path is no problem but the more complex path is indeed disappearing.
    It is not only label but also rate or adding IPTC in the description field. The moment metadata is saved to this jpeg file and reopened the earlier present work path of a more complex path is gone.
    Despite the fact that to my opinion a jpeg is not the most suitable file format for saving a work path this should not happen. If a work path is saved to a jpeg then it should be kept saved after just altering metadata in Bridge.
    It still is the same behavior in Bridge CC because that is what I use. Don't know when it started but it still needs to be repaired
    Here is the link for filing a problem or bug:
    http://feedback.photoshop.com/photoshop_family/

  • Focus Problem with JTree and Menus

    Hi all,
    I have a problem with focus when editing a JTree and selecting a menu. The problem occurs when the user single clicks on a node, invoking the countdown to edit. If the user quickly clicks on a menu item, the focus will go to the menu item, but then when the countdown finishes, the node now has keyboard focus.
    Below is code to reproduce the problem. Click on the node, hover for a little bit, then quickly click on the menu item.
    How would I go about fixing the problem? Thanks!
    import java.awt.Container;
    import java.awt.GridLayout;
    import javax.swing.JFrame;
    import javax.swing.JMenu;
    import javax.swing.JMenuBar;
    import javax.swing.JMenuItem;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    public class MyTree extends JTree {
         public MyTree(DefaultTreeModel treemodel) {
              setModel(treemodel);
              setRootVisible(true);
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              JMenuBar bar = new JMenuBar();
              JMenu menu = new JMenu("Test");
              JMenuItem item = new JMenuItem("Item");
              menu.add(item);
              bar.add(menu);
              frame.setJMenuBar(bar);
              Container contentPane = frame.getContentPane();
              contentPane.setLayout(new GridLayout(1, 2));
              DefaultMutableTreeNode root1 = new DefaultMutableTreeNode("Root");
              root1.add(new DefaultMutableTreeNode("Root2"));
              DefaultTreeModel model = new DefaultTreeModel(root1);
              MyTree tree1 = new MyTree(model);
              tree1.setEditable(true);
              tree1.setCellEditor(
                   new ComponentTreeCellEditor(
                        tree1,
                        new ComponentTreeCellRenderer()));
              tree1.setRowHeight(0);
              contentPane.add(tree1);
              frame.pack();
              frame.show();
    import java.awt.FlowLayout;
    import java.util.EventObject;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultTreeCellEditor;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.TreeCellEditor;
    import javax.swing.tree.TreeCellRenderer;
    public class ComponentTreeCellEditor
         extends DefaultTreeCellEditor
         implements TreeCellEditor {
         private String m_oldValue;
         private TreeCellRenderer m_renderer = null;
         private DefaultTreeModel m_model = null;
         private JPanel m_display = null;
         private JTextField m_field = null;
         private JTree m_tree = null;
         public ComponentTreeCellEditor(
              JTree tree,
              DefaultTreeCellRenderer renderer) {
              super(tree, renderer);
              m_renderer = renderer;
              m_model = (DefaultTreeModel) tree.getModel();
              m_tree = tree;
              m_display = new JPanel(new FlowLayout(FlowLayout.LEFT));
              m_field = new JTextField();
              m_display.add(new JLabel("My Label "));
              m_display.add(m_field);
         public java.awt.Component getTreeCellEditorComponent(
              JTree tree,
              Object value,
              boolean isSelected,
              boolean expanded,
              boolean leaf,
              int row) {
              m_field.setText(value.toString());
              return m_display;
         public Object getCellEditorValue() {
              return m_field.getText();
          * The edited cell should always be selected.
          * @param anEvent the event that fired this function.
          * @return true, always.
         public boolean shouldSelectCell(EventObject anEvent) {
              return true;
          * Only edit immediately if the event is null.
          * @param event the event being studied
          * @return true if event is null, false otherwise.
         protected boolean canEditImmediately(EventObject event) {
              return (event == null);
    }

    You can provide a cell renderer to the JTree to paint the checkBox.
    The following code checks or unchecks the box with each click also:
    _tree.setCellRenderer(new DefaultTreeCellRenderer()
      private JCheckBox checkBox = null;
      public Component getTreeCellRendererComponent(JTree tree,
                                                    Object value,
                                                    boolean selected,
                                                    boolean expanded,
                                                    boolean leaf,
                                                    int row,
                                                    boolean hasFocus)
        // Each node will be drawn as a check box
        if (checkBox == null)
          checkBox  = new JCheckBox();
          checkBox .setBackground(tree.getBackground());
        DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
        checkBox.setText(node.getUserObject().toString());
        checkBox.setSelected(selected);
        return checkBox;
    });

  • Drag and Drop between JTree and Labels in 2 different panes

    Hi,
    I am using JDK 1.4.1 and am trying to implement Drag n Drop between a JTree and JLabels with ImageIcons, both on different panes.
    I got the DnD working fine on the tree. but i cant get to drag and drop the label from the other pane, on the Jtree as a node. I am getting confused with the DataFlavors, and also wonder if there is something else that i have to do for DnD between 2 panes. Can someone give me any leads on this, please? The Panes I am talking about are splitpanes.
    thanks,
    Sri.

    hey thanks Dennis!! I was hoping you would respond to my question, as I have seen a lot of your replies. yes, the example you gave would be helpful. but i am trying to implement this in 1.4.1, with the new drag and drop in swing. and i am getting confused wiht theh data flavors etc.
    my problem at hand is :
    I have a tree on the left pane. i can drag and drop the nodes on the tree itself. (i already did that...no problem). I have Jlabels with imageicons (actually wrapper classes with labels and imageicons) on the right pane. i have to be able to drag these labels to the tree such that they form a node.
    I have one class the NodeSelection class which extends TransferHandler and implements Transferable. i was able to do DnD for the tree using this. I customized the importData method in this.I thought that i can just use the same class to create the transferhandler and transferable, and just use a different implementation for the importData method if the data being dragged is from the label.
    well, my thoughts and ideas were ok...but i can implement it...so they must be wrong ;-)
    Can u please suggest another way to do this. I have a deadline to meet and am stuck here :-( any suggestions or tips or hints would be very helpful and appreciated!!
    Thanks,
    Sri.

  • I am using a work laptop and have the same problem. When I try to change the "configure proxy", they only available option is "use this proxy server for all protocols". Could it be that my system administrator blocked me from changing it since they don'

    I am using a work laptop and have the same problem. When I try to change the "configure proxy", they only available option is "use this proxy server for all protocols". Could it be that my system administrator blocked me from changing it since they don't want us to use Firefox.
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.4; FNGP_SYS)

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • My boyfriend knew my apple id and my password and when we broke up he changed it and he changed my alternate e-mail address so i cannot restore it. The problem is that my iPhone activation is linked to iCloud. What can i do? I have old pass and e-mai

    My boyfriend knew my apple id and my password and when we broke up he changed it and he changed my alternate e-mail address so i cannot restore it. The problem is that my iPhone activation is linked to iCloud. What can i do? I have old password and old alternate e-mail.

    Take it and its purchase receipt to a physical Apple Store and/or click here and contact Apple's Account Security team.
    (124839)

  • I no longer have access to the back up email address I used when I set up my apple ID. I have since forgotten the answers to my security questions and am having a problem making changes to my account. What can I do?

    I no longer have access to the back up email address I used when I set up my apple ID. I have since forgotten the answers to my security questions and am having a problem making changes to my account. What can I do?

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (114957)

  • Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?

    Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?

    Hi Memalyn
    Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
    My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
    If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
    Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
    Let us know what you find out, and if you manage to get your space back.
    Matt

  • My wireless keyboard no longer connects with my iMac since changing the batteries. It now shows as not connected, not paired and not configured. A friend recently connected his iPad to the iMac and since then the problem started. Any ideas to resolve this

    My wireless keyboard no longer connects with my iMac since changing the batteries. It now shows as not connected, not paired and not configured. A friend recently connected his iPad to the iMac and since then the problem started. Any ideas to resolve this?

    a friend told me that he wants my os x cd for my macbook pro to upgrade his imac.
    The discs that come with your Mac are "machine specfic" and cannot be used on another Mac.

  • TS4088 why is there a limit on 3 years? it should be all the MacBook Pro mid 2010 with symptoms, there should get their logic board changed for free, mine mac is 3 month late and i had this problem for over a year, but i first saw this article today :(

    it should be all the MacBook Pro mid 2010 with symptoms, there should get their logic board changed for free, mine mac is 3 month late and i had this problem for over a year, but i first saw this article today

    Hey Clintonfrombirmingham
    I called Apple technical support in Denmark, but with no positive reply.
    She couldn't do anything, and said that They had sent a recall Email about the problem and with their offer to repair the Macbook Pro, but I'd never recieved an Email about the problem. She wasn't in power to make an exception. It can't be true that i paid a lot of money, for a product that can't barely stand on its own feets, Apple didn't tell me that the product I was about to buy, would restart every 5 minute. and now when  they know the problem, they wont repair it? it just don't make sense for me. If a car seller discovers that all the brakes in a car he had sold, will crash after some years he will call all the cars back to repair no mater what. i just don't understand how Apple will make good service for their custumers, by extending the warranty from 2 to 3 years, but wont take the computers there is a little bit to old, 4 months will make the difference. i can't believe it.
    What can i do now? 
    best regards Oskar

  • I tried changing my password, and it changed to one that wasnt it, and i dont know it. So i tried it too many times and now its saying it is disabled, connect to itunes. but a problem is that my power button on top is broken. how to i fix it?

    I tried changing my password, and it changed to one that wasnt it, and i dont know it. So i tried it too many times and now its saying it is disabled, connect to itunes. but a problem is that my power button on top is broken. how to i fix it?

    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • Problem in changing label in leave request approval screen

    Hi All,
    I have followed the SAP note 1234273 to change labels in our Leave request iViewin ESS and could do it successfullybut I could not able to know how to change the labels in Leave request approval screen because I have created a custom role and assigned Universal work list to it and assigned it to manager to view the leave requests applied. I navigated to Leave request approval screen via that role but ctrl + right click is not working on that page. Please suggest me

    Check your uwl config, normally it is configured to directly call concerned(leave req approval) application hence your iview may not be getting called. You can try changing the uwl config to call PCD page instead of direct wdp application call.
    ~cheers
    avadh

  • HT204053 I have a big problem in my account in Game Center .. I have been an account before in the game center and i change it to another one ...when i play any game its change by itself to the last account not still to the new one and i lost my update in

    I have a big problem in my account in Game Center ..
    I have been an account before in the game center and i change it to another one ...
    when i play any game its change by itself to the last account not still to the new one and i lost my update in my game
    How can i keep the new account in my game center and didn't change again ?
    My new account is :[email protected] ............Thats i wanna to keep it
    The old one is :michael-adel [email protected]
    Thank you

    I have a big problem in my account in Game Center ..
    I have been an account before in the game center and i change it to another one ...
    when i play any game its change by itself to the last account not still to the new one and i lost my update in my game
    How can i keep the new account in my game center and didn't change again ?
    My new account is :[email protected]. ............Thats i wanna to keep it
    The old one is :michael-adel [email protected]
    Thank you

Maybe you are looking for

  • Error while saving the excise invoice

    Hi All, I am getting the following error while saving the excise invoice. No account is specified in item 0000000001 Message no. F5670 Diagnosis No account was specified for account type "S" in item "0000000001" of the FI/CO document. System Response

  • Reinstalling Adobe Apps to a Leopard Disk

    I have just updated to Leopard and did what I usually do which is to do a clean install to a new hard disk and then migrate my personal files. I don't migrate the apps as I know there are problems doing this, and it gives me the opportunity to do a b

  • User command in ALV grid

    Hi I am displaying the output of a report in the ALV grid. I have used REUSE_ALV_LIST_DISPLAY in my code as follows. FORM DISPLAY_ALV_LIST.   CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'   EXPORTING   I_CALLBACK_PROGRAM = SYREPID   IS_LAYOUT = FIELDLAYOUT

  • InterMedia domain passivation

    How do I solve this one? oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.RuntimeException, msg=Temp file can not be created by interMedia domain passivation. ## Detail 0 ## java.lang.RuntimeException: Temp file can not be c

  • Networking IMac and MacBook Pro

    I'm having problems connecting my MacBook Pro with my iMac. The iMac can see and communicate with the MBP but not the other way around. If I try to connect to the iMac I get a message saying that "The server "iMac" is available on your computer. Acce