AdvancedDataGrid: display disclosure icon for empty nodes

Hi,
I have an AdvancedDataGrid with HierarchicalData that will be loaded lazily. Initialy, the tree displays only the parent nodes. Since the nodes' children are not loaded yet, no disclosure icons are rendered. Is there a way to force the tree to also render the disclosure icon for empty nodes, so that I can load a node's children when it is expanded?
I have tried looking at TreeDataDescriptors, but AdvancedDataGrid or HierarchicalData don't seem to support this.
I also looked into extending AdvancedDataGridGroupItemRenderer, but fail to see where I can put logic to render the disclosure icon.
Any help would be much appreciated.
Glenn

Thanks, a case of missing the obvious
Extending HierarchicalData and overriding canHaveChildren and hasChildren worked.

Similar Messages

  • How to display different icon, for different node of jtree

    Hi All,
    How to display different icon, for different node of jtree

    you haven't responded to my last post here: [http://forums.sun.com/thread.jspa?threadID=5323190&messageID=10382676#10382676|http://forums.sun.com/thread.jspa?threadID=5323190&messageID=10382676#10382676]

  • Hide disclosure icon for some nodes

    Hi,
    For some nodes with children, I would like hide the
    disclosure icon; for some not.
    How can I do that?
    I tried disclosure._visible = false in the function
    setValue(node, state) of my custom TreeRow Renderer extended from
    mx.controls.treeclasses.TreeRow. It did not work though.
    For other embedded moviclip in a tree, it seems I can
    control, i.e. nodeIcon, cell.
    Thx,
    Guangming

    Thanks, a case of missing the obvious
    Extending HierarchicalData and overriding canHaveChildren and hasChildren worked.

  • Unable to display blinking icon for JTree

    I am unable to see blinking icon for JTree node. If I use any other image which is not blinking, then I am able to see icon.
    If blinking image is used, it shows blank image.
    Please refer to following code.
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.net.URL;
    import javax.swing.ImageIcon;
    import javax.swing.JApplet;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeCellRenderer;
    public class TreeApplet extends JApplet {
    JTree tree;
    DefaultMutableTreeNode root;
    DefaultMutableTreeNode node1;
    DefaultMutableTreeNode node2;
    DefaultMutableTreeNode node3;
    DefaultMutableTreeNode node4;
    private ImageIcon errorIcon = null;
    private URL resource = null;
    private static final long serialVersionUID = 1L;
    public void init() {
         errorIcon = loadIcon("images/errorBlink.gif");
         root = new DefaultMutableTreeNode(new ProcessInfo("root", "error"));
         node1 = new DefaultMutableTreeNode(new ProcessInfo("Node1", "info"));
         node2 = new DefaultMutableTreeNode(new ProcessInfo("Node2", "warn"));
         node3 = new DefaultMutableTreeNode(new ProcessInfo("Node3", "debug"));
         node4 = new DefaultMutableTreeNode(new ProcessInfo("Node4", "error"));
         node1.add(node2);
         node3.add(node4);
         root.add(node1);
         root.add(node3);
         setLayout(new BorderLayout());
         tree = new JTree(root);
         tree.setCellRenderer(new TreeRenderer());
         add(new JScrollPane((JTree) tree), "Center");
    private class TreeRenderer extends DefaultTreeCellRenderer {
         private static final long serialVersionUID = 1L;
         public TreeRenderer() {
              this.setBackgroundSelectionColor(Color.lightGray);
              this.setBorderSelectionColor(Color.BLACK);
         public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf,
              int row, boolean hasFocus) {
              super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
              setIcon(getStatus(value));
              return this;
         private ImageIcon getStatus(Object value) {
              DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
              ProcessInfo nodeInfo = (ProcessInfo) node.getUserObject();
              String status = nodeInfo.getStatus();
              if ( status != null ) {
              if ( status.equalsIgnoreCase("error") ) {
                   return errorIcon;
              return null;
    private ImageIcon loadIcon(String name) {
         ImageIcon icon = null;
         resource = this.getClass().getResource(name);
         if ( resource != null ) {
              icon = new ImageIcon(resource);
         return icon;
    }

    1. Use code tags to post codes -- [code]CODE[/code] will display asCODEOr click the CODE button and paste your code between the {code} tags that appear.
    2. A renderer is just a "rubber stamp" used to paint on the table/tree/list/whatever. You can't display animation in an ImageIcon by setting it to a renderer. Since the JLabel subclass used as the renderer isn't a part of any visible component hierarchy, the icon won't be refreshed with new frames.
    db

  • Conditionally display an icon for each record in a multi record block

    Hi,
    I am using Forms 6i. Is there any way to conditionally display an icon for each record in a multi record block. The SET_ITEM_INSTANCE_PROPERTY builtin does not have many choices. Thanks for your help.

    Henry,
    I doubt that. You would have to replace the text item with an image item. This however can't be done for individual cells in a table but only for the whole column.
    On the web chances are that these could be handled with a custom PJC, but this solution doesn't work in client/server
    Frank

  • I have a ipod u2 the screen displays an icon for the current conetar but does not start

    I have a ipod u2 the screen displays an icon for the current conetar but does not start

    Shockwave and Flash are not the same. Try installing a Flash plug-in. Here's the latest: Adobe Flash Player 11.2.202.183

  • Using animation as icon for JTree node

    Hi,
    I am using a custom tree cell renderer. I have a label in the renderer, the label have gif Image Icon, but the problem is it is not getting animated. But when I use a JLabel with gif icon some where else it is working fine, but it is not working for tree node.
    package com.gopi.utilities.gui;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.GridBagConstraints;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultTreeCellRenderer;
    import javax.swing.tree.TreeCellRenderer;
    import com.gopi.remfilebrowser.gui.GUIUtil;
    import com.gopi.remfilebrowser.util.FileBrowserConstants;
    public class CustomTreeCellRenderer implements TreeCellRenderer
         private JPanel panel;
         private JLabel label;
         private TreeCellRenderer defaultRenderer;
         public CustomTreeCellRenderer()
              super();
              panel = GUIUtil.createGridBagPanel();
              label = new JLabel();
              label.setHorizontalAlignment(JLabel.LEFT);
              System.out.println("New");
              GridBagConstraints gc = new GridBagConstraints();
              GUIUtil.fillComponent(panel,label);
              defaultRenderer = new DefaultTreeCellRenderer();
         public Component getTreeCellRendererComponent(JTree tree, Object value,
                     boolean sel,
                     boolean expanded,
                     boolean leaf, int row,
                     boolean hasFocus)
              if(value instanceof NewAbstractTreeNode)
                   NewAbstractTreeNode node = (NewAbstractTreeNode) value;
                   System.out.println("dr");
                   label.setText(value.toString());
                   label.setIcon(ImageLoader.getInstance().getIcon(node.getIconKey()));
                   if(hasFocus && sel)
                        panel.setBackground(FileBrowserConstants.TREE_NODE_SELECTED_COLOR);
                   else if(sel)
                        panel.setBackground(FileBrowserConstants.TREE_NODE_UNSELECTED_COLOR);
                   else
                        panel.setBackground(Color.white);
                   return panel;
              return defaultRenderer.getTreeCellRendererComponent(tree,value,sel,expanded,leaf,row,hasFocus);
    }

    JLabels using ImageIcons are designed to display the icon as is, including animation and all.
    A CellRenderer only paints the Icon once, when the cell is painted. Much ike a rubber stamp of the JComponent. Hence, its not designed to do the animation and all.
    If you really want it, you can probably use MediaTracker and a Timer to do your animation scheduling. Might not be very pretty code though
    ICE

  • Display the icon when current node selected in af:tree

    Hi !! Gud Mrg !!
    I am using jdeveloper 11.1.1.5
    I had created an af:tree., I need to display the icon when my user clicks the current node!!
    Could any one pls provide me solution to fix this !!

    Sorry jhon and Frank !!
    I will explain what i had did and my scenario!!
    What i had did
    I had dragged and dropped my ApplBusFun as a af:tree
    Such that it doesnot have parent and child My tree would look like this
    Request for quotation
    Supplier Documents
    Suppliers
    Purcahse Order
    My Scenario
    My scenario is when my user clicks the current row ., Consider if my user clicks Request for quotaiton an arrow symbol must be appeared before Request for Quotation such that my output must looks like this
    ==>Request for quotation
    Supplier Documents
    Suppliers
    Purcahse Order==> This is the icon which appeared before Request For Quotation and this icon must appear whenever user clicks any node Suppose if my user going to click Supplier Document means
    My output must look like this
    Request for quotation
    ==>Supplier Documents
    Suppliers
    Purcahse OrderHope i had explained my scenario clearly!! Appologise if i didnt explained properly!!

  • ADF TreeTable - How to hide Disclose/Expand icon for leaf node

    We are using ADF Tree Table in our application.
    Whenever a node is expanded - all the child nodes have the disclose/expand icon along with it.
    But, we don't want to show the disclose/expand icon if it is a leaf node.
    How can this be done?
    JDeveloper Version: JDeveloper 11.1.1.3
    Thanks,
    Navaneeth

    I have a hierarchical tree based on single POJO based class exposed as data control.
    (i.e) a node can have many levels.
    Can you specify how we can use the folder icon for this - Can you please provide some detailed information?
    Thanks in advance,
    Navaneeth

  • Change the default icon for unsatisfied node

    Is it possible to change the default icon for the unsatisfied node (unsatisfied indicator). I have checked the UI content element with the same name, but it does not have the source file setting in it, so I guess it is hard coded. I tried to change the source file with the name unsatisfied_status.gif to a different image and it works, but this will be a system wide change. I want to do this as a model specific change. Has anyone done this before? Thanks in advance.
    Cheers,
    Biju.
    [My Oracle Blog|http://oraclewithbiju.blogspot.com]

    Did you try changing image name in UI edit page?
    UI edit page lists few images which can be changed for each UI, like unsatisfied indicator, logic status icons etc.

  • JFileChooser Displays Garbage Icons for Files in 1.4.2-02

    Since switching from 1.3.1 to 1.4.2-02 I no longer get meaningful icons displayed beside file names by JFileChooser. What it is displaying do not look like anything meaningful. I suspect it is just grabbing some random chunk of memory and interpreting it as an icon. In 1.3.1 I got a folder icon for directories and a dog-eared piece of paper for files. I have not changed any of the code here, except to fix a bug where I was passing an invalid object (not a Component) to showOpenDialog, and the problem occurs both before and after that change. I appreciate that I can create a FileView to display whatever icons I want, but I do not understand why the default is garbage.
         JFileChooser chooser;
         String     directory     = parent.getProperty("directory", "");
         if (directory != "")
         chooser = new JFileChooser(directory);
         else
         chooser = new JFileChooser();
         // select only Text and Excel files, but permit multiples to be chosen
         chooser.addChoosableFileFilter(new TxtFileFilter());
         chooser.setFileFilter(new XlsFileFilter());
         chooser.setMultiSelectionEnabled(true);
         // display the dialog and wait for a response
         int option = chooser.showOpenDialog(desk);

    I have since determined that the problem is in FileSystemView.getSystemIcon, which returns a garbage icon on my system.

  • Custom icon for tree node

    Hi,
    Can anyone tell me how to change the icon for a particular node in a JTree?
    I know how to change all the leafs for example by using the DefaultTreeCellRenderer.setLeafIcon()method. But do you know how to set just one node to a particular icon?
    Cheers,
    Jim

    MyTreeCellRenderer extends DefaulTreeCellRenderer{
      public Component getTreeCellRendererComponent(
        JTree tree,
        Object value,
        boolean sel,
        boolean expanded,
        boolean leaf,
        int row,
        boolean hasFocus) {
        super.getTreeCellRendererComponent(
          tree, value, sel,
          expanded, leaf, row,
          hasFocus);
        //Do your condition on your value
        if( value ....){
         setIcon(myIcon);
        return this;
    }

  • Icons Bug in Finder - Displays Random Icons for Random Files

    This seems to have occurred after the latest Leopard update. Doing a search through a large folder, containing all my custom icons, for files named 'Documents', 'Dog', etc., the correct list of files comes up, yet the majority of them display a random icon. This random icon doesn't change for the individual files, as they essentially come up as one of 2 or 3 completely wrong, custom icons.
    This problem occurs in Coverflow and grid view, yet not in the 'Get Info' screen nor in the listed/column view. I've restarted twice and on both occasions the wrong icons shared have changed.
    Thanks in advance.

    Forgive me for not explaining it well enough. The icons presented are incorrect (hence the randomness). They are not previews with white borders but rather a file that has come up early on in the search (one of the first few found) that has been applied randomly to the following results of that search. For example, a search for 'dog' will come up with, say, 40 icons. The first 10 or so will be displayed accurately, only for the following 30 to be displayed with any one of the 10 previous icons.

  • Display hyperlinked icon for long columns in the Report

    Hi All,
    I am new to APEX and i am trying to create report in APEX.
    I have column whose contents are too big and displaying it directly on the report mess up the whole report.
    Instead i want to display an icon/image in the column and if user wants to see the content , he can click on it and it expands.
    Can anyone help me on how can this be done ?
    Thanks.

    Actually detailed_error column is almost equal to 400 char and adding it to the static text of CSS makes it bigger than 4000 it seems.
    But if i change it to
    '<div onclick="showdetail(this,''detail'|| exceptionid ||''')" style="cursor:hand;cursor:pointer;text-decoration:underline;font-weight:bold;">show_detail</div><pre id="detail'|| exceptionid ||'" style="display:none;"> 1234 </pre>' detailed_errorit instead of displaying show_detail hyperlinked on the report , shows the column value as
    <div onclick="showdetail(this,'detail4')" style="cursor:hand;cursor:pointer;text-decoration:underline;font-weight:bold;">show_detail</div><pre id="detail4" style="display:none;">234</pre>Basically my css is not getting interpreted :(
    Edited by: Parul Garg on Feb 2, 2011 3:23 PM
    Edited by: Parul Garg on Feb 2, 2011 3:25 PM
    Edited by: Parul Garg on Feb 2, 2011 3:26 PM

  • Safari 8 not displaying lock icon for https secured websites

    It seems that Safari 8 (installed with Yosemite) is not showing the lock icon for HTTPS websites.
    I can't find a way to see the security certificates for secure websites.
    I switched the “Show full website address” setting in Safari's Preferences, but nothing happened.
    It's essential having this icon, or any way to tell if the site is secure or not.
    I don't see any other option in the menus or anywhere else in Safari to see a sites certificates.

    I'm not sure if Safari was updated since your question, but today the lock icon is in the address bar right next to the address
    This forum page shows:
    Or, a non-Apple site, like google, just shows a grey lock like this:

Maybe you are looking for

  • How can I access my iCloud account from my computer, when I'm running OSX Leopard?

    I have a Mac Book running Leopard and I don't have the iCloud icon in my settings.. How can I access my iCloud account/back up my computer to the cloud?

  • Ios 5.0.1 crashing, slow and other problems

    I am using an iPhone 4 running 5.0.1 and Im just fed up with it, as much as I loved the iPhone in the past Im afraid I have fallen out of love and I'm conteplating a breakup. Problems I have had with the version 5.*.* update: * Safari and the built i

  • How to start ipad2 without a cover?

    As a new owner of ipad2, I bought an after market leather cover which does not accommodate the cover which starts ipad.  How do I start the ipad without the cover?

  • Bypass 'quantize' setting for individual notes in Score Editor?

    Hallo, I hope there is an expert here on Score-Editor... Basically I am using a quantize setting of 4,12 and it does look nice that way, BUT there are just 2 notes, which need to be in 1/16 value. is there any way to just 'Defeat' quantize as it is p

  • Can't log in as guest

    I've set up guest access in the "accounts" preference pane, and Guest now shows up as an option at login. But when I click it, the window shudders as if I had entered the wrong password, and I am not logged in. I don't have parental controls switched