Custom icon leaf tree

Hi developers,
I have one how to do question: In a tree I like to introduce a custom icon on each leaf.
For this, I tried to introduce at the icon column sql #WORKSPACE_IMAGES#picture.gif but nothing happened, instead if I use #IMAGE_PREFIX#standard_picture.gif it works, but I want to use my custom pictures uploaded in Shared Components->Images.
Is there any way to do this? Thank you in advance.

Hi "user11978562",
In APEX 4.0, bug 9893260 was logged against the handling of #WORKSPACE_IMAGES# and #APP_IMAGES# in the setting of custom icons on a tree. However, the fix for this issue was incorporated in the 4.0.1 patch release. It was also discussed on this related thread: Re: Syntax for icon in Tree element If you are running 4.0, then my recommendation would be to upgrade to our latest patch release, 4.0.2. If you are running on 4.0.1 or higher, then this may be a silly question, but is there a chance that the images you've uploaded are associated with a particular application? Maybe it's worth trying #APP_IMAGES# instead of #WORKSPACE_IMAGES#.
Regards,
Hilary

Similar Messages

  • 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;
    }

  • Custom Icon In Tree Parent Node

    I can't replace the default parent node icon. I'm able to
    replace the child nodes. I've attached my code. Any
    suggestions?

    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;
    }

  • Jtree leaf custom icons

    I created my own class that extands DefaultTreeCellRenderer and overrided the function getTreeCellRendererComponent.For now I see the customed icon on the leaf,but when I touch with the mouse the panel the vision of the leaf comes back to default.I tried to do repaint it's doesn't help me
    May be you have any suggestions?

    ok I did the following code in a previous project to handle a similer requirement
    It s from a large project so I'll only post a small part and hope that you can understand it
    If you dont just let me know which part
    package lrmk.client.nav;
    import lrmk.client.*;
    import lrmk.client.wnd.*;
    import javax.swing.tree.*;
    import java.awt.*;
    import javax.swing.*;
    public class NavCellRenderer implements javax.swing.tree.TreeCellRenderer
       DefaultTreeCellRenderer form_window  =  new DefaultTreeCellRenderer();
       DefaultTreeCellRenderer dialog_box   =  new DefaultTreeCellRenderer();
       DefaultTreeCellRenderer table_window =  new DefaultTreeCellRenderer();
       DefaultTreeCellRenderer custom =  new DefaultTreeCellRenderer();
       DefaultTreeCellRenderer def  =  new DefaultTreeCellRenderer();
       public NavCellRenderer(){
          form_window.setLeafIcon(ClientGlobals.getImageIcon("lrmk/client/images/form_icon.gif"));
          dialog_box.setLeafIcon(ClientGlobals.getImageIcon("lrmk/client/images/dialog_icon.gif"));
          table_window.setLeafIcon(ClientGlobals.getImageIcon("lrmk/client/images/table_icon.gif"));
       public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
          TreeCellRenderer r = def;
          NavNode nn = null;
          if (value instanceof NavNode)
             nn = (NavNode)value;
          if (nn != null && nn.getIcon() != null)
             r = custom;
             custom.setLeafIcon(nn.getIcon());
          else if (value instanceof WindowNavNode)
             WindowNavNode wnn = (WindowNavNode)value;
             if (CDialogBox.class.isAssignableFrom(wnn.getWndClass()))
                r = dialog_box;
             else
                String name = wnn.getWndClass().getName();
                name = name.substring(name.lastIndexOf("."));
                if (name.startsWith(".Frm"))
                   r = form_window;
                else if (name.startsWith(".Tbw"))
                   r = table_window;
          return r.getTreeCellRendererComponent(tree,value,selected,expanded,leaf,row,hasFocus);
    }

  • JTree custom icon help

    Hi, i am trying to get custom icon for specific nodes of a tree. In my customTreeCellrenderer that extends the default predecessor, i have this function. The problem is that, the icons are not set to the node i want but the node after that node. Anyone got any suggestions as to what i am doing wrong ?
    Thanks, Dave
         public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
              ImageIcon error = new ImageIcon("illegal.gif");
              super.getTreeCellRendererComponent(tree, value, sel,expanded, leaf, row,hasFocus);
              DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
              GroupNodeObject obj = (GroupNodeObject) node.getUserObject();
              if(node.getUserObject() instanceof GroupNodeObject){
                   if(obj.isIllegal()){
                        this.setLeafIcon(error);
                        this.setClosedIcon(error);
                        this.setOpenIcon(error);
                   }else{
                        this.setLeafIcon(getDefaultLeafIcon());
                        this.setClosedIcon(getDefaultClosedIcon());
                        this.setOpenIcon(getDefaultOpenIcon());
              return this;
         }

    may be the next node is instance of GroupNode!!
    just incase, check the code if the error is assigning the nodes!
    This code looks ok.

  • Simple question! Is it possible to have a custom icon for an app part?

    Hi All
    Title says it all: is it possible to have a custom icon for an app part / client web part?
    It used to be straightforward with the previous dev tools, but the ImageUrl was typically to a hive folder (which is obviously out of bounds now).
    I've "Binged" with no joy. None of the samples I've seen have a custom icon.
    So - can it be done?
    Regards
    Nigel

    Hi Nigel,
    Updating the AppIcon.png in Napa
    You can upload a new AppIcon.png in into the /Images folder in the file tree in Napa:
    Updating the AppIcon.png in Visual Studio 20102
    You can update a new AppIcon.png in into the Images folder in your Visual Studio solution:
    Keith Tuomi | Twitter: @itgroove_keith | Blog:
    http://yalla.itgroove.net
    Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you.

  • Custom icons 'unclickable' in icon view & not shown in coverflow

    Hi,
    I just got off the line with Apple support, who couldn't solve my problem and then just told me that Leopard didn't support what I was doeing and thus that it was not there problem. Very un-apple if you ask me...
    Here's the problem:
    I create custom icons for my movies by pasting images (Jpeg's or what have you) onto the icon in the 'Get info' window of a file. This works fine, however when I view the files in icon view I can't select the file by clicking on the icon, only by clicking on the text below. Strangly enough this problem dissapears when I edit the icon size in the 'View options' to a size equal too or smaller then 116x116. At this point I can select the file without any problem.
    The same sort of happens in coverflow. Here I can't see the icon in coverflow if the icons are fairly large. Once I reduce the size of the coverflow bar too the point where the icons are very small the custom icons reappear.
    The make the matter even more strange this problem only occurs with files where I created a custom icon for since I had Leopard installed. All custon icons created under 10.4 work fine.
    This indicates too me that Leopard has problem with handeling the resolution of icons.
    Note also that Leopard stores icon images in different sizes. Try copying an icon image from the 'Get info' window, then launch Preview, then select 'File' and 'New from Clipboard'. You will see that there are multiple images here.
    Anybody know how to solve this?

    Getting the same stupid behavior here!
    I had a lot of customized Tiger folder icons but now i've got no good tools for customizing these new huge Leopard ones.
    I began using *Icon Composer* from the developer tools after doing the graphics in Photoshop, then using IconDroplet to get them into a form where i can copy and paste them between *Get Info* windows. What a pain.
    Now i discover this bit where they're not clickable once i replace them! I didn't know about the behaviors when making them big in *Cover Flow* and small in Icon view until i read this.
    I've been snooping around but i haven't found what needs to be tweaked where to allow them to behave properly.
    !http://img228.imageshack.us/img228/5186/scottdartve1.png!

  • How to add Icon in Tree View in Forms 6.0 (URGENT..!)

    Hello All,
    I want to add icons in tree view (hierarchical tree) by using
    forms 6.0.
    So pls. help me to find out the solution for the same.
    thanks
    Pradeep
    null

    Pradeep (guest) wrote:
    : Hello All,
    : I want to add icons in tree view (hierarchical tree) by using
    : forms 6.0.
    : So pls. help me to find out the solution for the same.
    : thanks
    : Pradeep
    hello pradeep,
    for adding icons in the tree, u willhave to look closely to the
    data format for the tree.in the data format used for populating
    the tree we are supplying 5 fields. the state of the tree node
    (expanded or collapsed), the depth of the node w.r.t the parent
    node, the node value, the node label(what we see on the tree)
    and the node icon which we want to use. for the node icon we
    have to provide the entire path of the icon file. that's it.
    hope this will solve the problem
    null

  • Custom Icon Frustration

    I built an AS3 component and designed a custom icon.
    Right-clicked symbol in library, selected component definition and
    clicked on the icon button (under description) to set an icon.
    When I select custom... my finder pops up and I can navigate
    to any folder on my machine but I can't select an icon, all .pngs
    (and all other files) are greyed out.
    Possibly related, if I select one of the normal icons (button
    or something) it sets the icon correctly but I then can't set the
    icon back to the default icon and I still can't set a custom icon.
    I originally created the icons in photoshop, but I've also
    tried exporting them from Fireworks -- no luck. I also tried
    finding the default icons in my installation and editing them but
    sadly this didn't work either (maybe I looked in the wrong place).
    I'm using CS3 on Mac -- please tell me this isn't a bug, I
    really don't want to have to buy a windows copy of Flash just to
    add an icon to a component.

    It is a bug. Nivesh at Adobe support was kind enough to email
    me the solution: you need to enable Version Cue for file operations
    (Preferences / General category / Enable Version Cue).

  • Automatically create folders then attach custom icon to each folder.

    This is my current working script, does anyone know how I can now add customer icons to the folders in Applescript
    Many thanks
    Matt
    set theWeekNumber to ""
    repeat
    display dialog "Please enter the week number:" default answer theWeekNumber
    set theWeekNumber to text returned of result
    try
    if theWeekNumber = "" then error
    set theWeekNumber to theWeekNumber as number
    exit repeat
    on error
    set thePrefix to "INVALID ENTRY! "
    end try
    end repeat
    set theAFolder to "AFolder_WK" & theWeekNumber
    set theBFolder to "BFolder_WK" & theWeekNumber
    set theEnd to "_PSD"
    set theEnd2 to "todo"
    tell application "Finder"
    make folder at folder "Studio:Users:matthewchild:Desktop" with properties {name:theAFolder & theEnd}
    make folder at folder "Studio:Users:matthewchild:Desktop" with properties {name:theBFolder & theEnd}
    make folder at folder "Studio:Users:matthewchild:Desktop" with properties {name:theAFolder & theEnd2}
    make folder at folder "Studio:Users:matthewchild:Desktop" with properties {name:theBFolder & theEnd2}
    end tell

    The following script uses a handler that will set a custom icon to a file item. In this example, you are prompted for the icon file and the file item to set to the icon, but you can just pass the desired image and folder paths directly to the handler.
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px; height: 340px;
    color: #000000;
    background-color: #FFD891;
    overflow: auto;"
    title="this text can be pasted into the AppleScript Editor">
    -- assign an icon to a folder or file (requires Developer Tools)
    -- any image file can be used for the icon
    property startingDirectory : (path to home folder) -- a place for the file choice dialogs to start from
    on run -- example
    try -- check for tools
    get "/Developer/Tools/" as POSIX file as alias
    on error
    error "Developer Tools not installed"
    end try
    set iconFile to (choose file with prompt "Choose an image file for the icon:" default location startingDirectory)
    if (do shell script "/usr/bin/file " & quoted form of POSIX path of iconFile) does not contain "image" then -- check image file
    error "The icon file is not an image"
    end if
    tell application "Automator Runner" to tell open panel -- using this panel allows the choice of a file or folder
    set floating to true
    set can choose directories to true
    set can choose files to true
    set allows multiple selection to false
    call method "setShowsHiddenFiles:" of it with parameters {false}
    set title to "Select an item to set to the custom icon:"
    set prompt to "Set Icon" -- this is actually the button text
    activate
    if (display it in directory startingDirectory) is 0 then -- cancel button
    error number -128
    else
    my (setCustomIcon from iconFile to (it's path names as text)) -- just one item
    end if
    end tell
    end run
    to setCustomIcon from imageFile to destination
    Set the icon of a destination file item to the image contained in imageFile
    parameters - imageFile [various]: an imagefile for the icon (Finder alias or POSIX text)
    destination [various]: a destination item to set to the icon (Finder alias or POSIX text)
    returns [boolean]: true if icon is set, false otherwise
    set imageFile to imageFile as text
    if imageFile starts with "/" then -- check for POSIX file
    set imageFile to imageFile as POSIX file as alias
    else
    set imageFile to imageFile as alias
    end if
    set destination to destination as text
    if destination does not start with "/" then -- check for POSIX file
    set destination to POSIX path of destination
    end if
    try
    tell application "Finder" -- copy the icon image to a temporary file
    (duplicate imageFile to (path to temporary items) with replacing) as alias
    set tempImage to quoted form of POSIX path of the result
    end tell
    set tempResource to quoted form of (POSIX path of (((path to temporary items) as text) & "TempResource"))
    do shell script "/usr/bin/sips -i " & tempImage -- add a Finder icon to the image
    do shell script "/Developer/Tools/DeRez -only icns " & tempImage & " > " & tempResource -- get the icon resource
    do shell script "/usr/bin/file " & quoted form of destination -- determine the destination file type
    if the result contains "directory" then -- folder
    set theTarget to quoted form of (destination & "/Icon" & return) -- create Icon\r file
    set Command to "rm " & theTarget & "; " -- remove any existing custom icon
    set Command to Command & "/Developer/Tools/Rez -a " & tempResource & " -o " & theTarget & "; " -- add resource file to a folder
    set Command to Command & "/Developer/Tools/SetFile -a V " & theTarget & "; " -- make it invisible
    else -- file
    set Command to "/Developer/Tools/Rez -a " & tempResource & " -o " & quoted form of destination & "; " -- add resource to a file
    end if
    set Command to Command & "/Developer/Tools/SetFile -a C " & quoted form of destination -- set custom icon attribute
    do shell script Command -- do it
    on error errmess number errnum -- oops
    log errmess
    -- display alert "Error " & errnum message errmess buttons {"OK"}
    return false
    end try
    try -- remove temporary files
    do shell script "rm " & tempImage & space & tempResource
    end try
    tell application "Finder" to update (destination as POSIX file)
    return true
    end setCustomIcon
    </pre>

  • How to assign file extension and custom icon to executable?

    Hi all,
    I was reading an old thread about this issue:
    http://forums.ni.com/ni/board/message?board.id=170&thread.id=116925 
    I need to try to do this.  My application uses a custom file extension (i.e. .abc).  Upon installation I would like to:
    1.  Assign My App and custom icon to the file class (extension .abc).
    This could be done by manipluting the registry (http://msdn.microsoft.com/en-us/library/bb776856(VS.85).aspx)?  This could be a problem with Vista s unless registry operations occur during installation any changes are placed in a VirtualStore, correct?
    2.  Enable the double-clicking of .abc file type to pass the data in the file to my VI (exe). 
    According to the File Handling Guidelines of Jean-Pierre Drolet (http://www.openg.org/tiki/tiki-index.php?page=File+Handling+Guidelines) the best way to do this may be using LabVIEW as an ActiveX server.
    I know that when I build an executable (or installer?) there is the option to enable LabVIEW to act as an ActiveX server.  This much I know I need to do.
    I thought I would open this discussion again as others may be interested and there doesn't appear to be a completely clear solution available.  Please do contribute where you can.
    Cheers,
    Battler.

    battler. wrote:
    My application consists of Event Structure.
    How to register for ommand line event so that when a user double-clicks on a .abc file I can handle the opening of it?
    This needs to work (the files need to open) not only when the application is closed but also when it's already open.
    Anyone have ideas? 
    The solution to that is to implement a DDE server in your application (and add DDE entries to the registry on installation). There are still DDE functions in LabVIEW vi.lib\Platform\dde.llb but they are considered depreciated and have been removed from the palette, also because Microsoft is trying to tell everyone that DDE is depreciated and sort of unsupported too. But it is still the mechanisme to pass actions from the shell to running applications.
    I hesitate to send you over to lavag.org where there have been some discussions about this years ago. If you go there you would do good to employ a friendly attitude. That board is run all by enthusiasts and idealists and they are all great folks but react not very friendly to people with an attitude.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Mystery of the Disappearing Custom Icons

    iMac 2.66; 10.6.4
    I create simple custom icon labels for the docs & folders in my dock. I type a filename in TextEdit, take a screenshot of it, open the screenshot in GraphicConverter, and copy & paste it into the getinfo window of the doc or folder. Then I drag it to the dock. Now and then, with no pattern or seeming cause, the custom icons on one or more disappear. Some never disappear. Sometimes it'll be weeks with no problem, sometimes hours. I repair permissions twice a week without fail. I have no other issues going on. Anyone know why this is happening? I've searched the fora but can't find similar problems.

    jimbo66
    I tried helping another with a similar problem. He eventually found a solution from another post. http://discussions.apple.com/message.jspa?messageID=4499196#4499196
    Powerbook G4, MacBook Pro, Mac G5, Mac G4, Mac Mini   Mac OS X (10.4.8)  

  • Trouble with some documents: no custom icon, only generic appears

    I tried anything: rebuilt launch servcice, permission repair, daily, weekly, monthly scripts (using maintanace, onyx, etc...) BUT all the documents associated with Openoffice have no custom icon. I also tried reinstalling oo with no success. It happens with textedit and keynote (using "get info", open with, apply to all) and don't know why?
    Can anybody help me?
    Thanks!

    You could create a new admin user and move the data within each of these folders to the corresponding folder on the new account: Desktop, Documents. Library, Movies, Music, etc. You can di it most easily IMO, by copying your Home folder to DVD first. Alternatively, you could use Users/Shared for the data.
    But it would really be best to sort this issue in your present user.
    It would be a good idea to test with a new user though to see if the problem exists there.
    Create a new account, name it "test" and see how your OO & TE work in that User acct? (That will tell if your problem is systemwide or limited to your User acct.) This account is just for test, do nothing further with it.
    Open System Preferences >> Accounts >> "+" make it an admin account.
    Let us know and we'll troubleshoot this further.
    -mj
    [email protected]

  • Custom icons not showing up in installer dialogs

    What are the steps that are required to get a custom icon to show up in the installation dialogs?
    I have custom icons setup in the application descriptor xml file for my app... and they do show up in the OS after I install the application but I don't see the icon showing up in the install dialogs.
    Any ideas why the custom icons are not showing up in the installation dialogs?
    Here is what TweetDecks installation dialog looks like... (this is what I want)
    Here is screenshot of what my installation dialog looks like...

    You need to sign your app with a certificate that chains up to a trusted root certificate. In general that means you need to get a cert from verisign or someone like that. If you get the friendly warning dialog on the first installer screen rather than the scary one with lots of red x's, you should then see your image

  • Custom icon seems locked ... can't change it

    Powermac G5/10.4.6
    A while back I put custom icons on two partitions of a LaCie FW drive. I'd like to change the icons, but I can't select them in the "Get Info" window. I can change icons of other drives, just not these two partitions. When I click on the icon in the info window, it does not become "selected" (with the blue border around it.) Pasting does nothing and dragging an image into the Preview area of Get Info does nothing, either.
    I've got Read & Write permissions on both these drives.
    Any ideas?
    AG

    hi again,
    just follow the steps as i wrote them before. i'll put them here again w/ some more comments to walk you through
    1. double-click on the Terminal Application: Applications > Utilities > Terminal.
    2. a "Terminal" window pops up
    3. now enter the letters "cd", then a space, then drag the icon for the drive from a finder window into this Terminal window.
    4. hit return.
    now enter this: ls -lasF
    then hit return to see what's in that area.
    do you see a file in that listing called .VolumeIcon.icns ?
    post back if it's still not clear so far...
    to delete that file, enter in tothe same Terminal window the following command:
    sudo rm .VolumeIcon.icns
    then hit return.
    then enter your admin password and hit return.
    then enter ls -lasF again. this custom icon file will be gone now...
    cheers

Maybe you are looking for