JTree image question

I have a question about using images in a JTree.
I have like 2 parent nodes who both have a lot of child nodes now i know how to get an image for every node but how do i get 1 image for 1 parent with all his children and another image for the other parent with his children.

It is a programming problem because i dont know how to give echt DefaultMutableTreeNode his own picture. You should think of it like msn when you log in your contacts are in a Tree and your offline contacts have a red icon and online contacts have green one. I need to to the same for my program(chat program). But i can't figure out how but i know how to give alle the DefaultMutableTreeNode's a picture but i cant give individual one's a picture.
I hope i cleared things up :)

Similar Messages

  • Exporting Images Questions

    Hi,
    I basically understand all of LR except for the only part that matters - getting my images out of LR for various purposes such as standard printing, enlargements, work website, personal website (in the future), Facebook etc. I'll save most of my web-related questions for another thread.
    I don't have a printer, so I'm mostly interested in saving images to jpegs to take to a print shop (and possibly send online to some place like Shutterfly) and get them printed in good/high quality and untarnished (i.e. cropped or other manipulations by the print shop). I also live overseas in an undeveloped and unsophisticated country, so I have the language/concept challenge of explaining what I want to print shops. I'm having my own trouble with the concepts I also think in inches, but have to convert/work in cm.
    1) I'll start with the most dumb question. In the Export dialogue, is "Image Sizing" the physical size that I am trying to make the print?
    2) Is the aspect ratio affected by the Image Sizing settings? For example, if I have a 4:3 image but want it printed 4x6 inches or 5x7 or 8x10 etc. what happens in the Export dialogue? I think the image would get cropped, but I'm not sure
    3) What do I do for enlargements? For example, I want to make a 4x6 inch print and then a 20x30 inch print of the same image? What settings do I need to change? I assume with an enlarged image I need to be careful of exceeding the original file size. Next question...
    4) Is Image Sizing > "Don't Enlarge" the way to prevent the file size from exceeding the original file size? Or, is "Limit File Size to xxx" in File Settings the way to do this? I see no way  in LR of knowing what my original file size is; or what it is after some cropping - the file size changes after cropping, right?
    5) According to many (but not all), "Quality" in File Settings does not need to = 100. If I understand correctly, it's actually a 12-step scale that dramatically increases the file size in the last few steps of the scale with practically no discernible improvements. I wonder how the "Quality" setting might affect the print quality at various physical print sizes?  Should "Quality" be set differently for prints vs. web? I don't really know what the file size of the image is after exporting until I open the properties.
    6) A friend told me to just set print Resolution to 300 and web Resolution to 100 because it'll be easier to make calculations about pixels, image size and file sizes.
    My friend also showed me Photoshop (which I don't have), and it seemed easier to get information about physical size, pixels, image size etc. I also looked at the LR Print Module, but I don't see anything in the module that clarifies my confusion about the above questions. Maybe some answers above will also help me understand how to export/save/upload images for my web-related purposes.
    Ultimately, I think I'm trying to get a set of user presets for the various needs I might want and I apologize if I'm just not understanding the concepts or confusing them.
    Thanks
    Andrew

    Thank you Jim. It's getting me toward the right direction. I've been experimenting with all different types of export settings to try and learn what is happening in LR.
    I basically understand the concept of the # of pixels to print size.
    However, for example:
    1) I have an image from my OMD-EM1 that I shot in 4:3
    2) I crop it to 2x3/4x6 in the Develop module > Cropping Tool. (But, LR never shows the crop size or file size)
    3) I export it and set 6 inches by 4 inches in the Image Sizing dialog at 300 ppi
    (Let's leave Quality at 100 for ease)
    I fully understand that the image comes out at 1200x1800. The file size is 2.84 MB
    I can tell the print shop to print a 4x6 inch print. It won't be cropped and it should have good quality.
    4) Now I want a print of the same image at 20 inches x 30 inches (same aspect ratio and crop)
    5) I export it and set 30 inches by 20 inches in Image Sizing at 300 ppi (9000 by 6000 pixels)
    (Quality is the same at 100)
    The file size is now 37 MB. This is going to be a problem, right? Pixalation??
    If I go back to the original RAW file, the file size is 18 MB. Now, I have a file twice the size of the original.
    I was told that you don't ever want to exceed your original file size.
    If I drop the Quality to 90 and keep ppi at 300, then the file size is 16 MB.
    Or if I reduce the ppi to 150 (keeping Quality at 100), then the file size is about 10 MB.
    Is there going to be any difference in the final print?
    Btw, I don't see any way in LR to find out what my original file size is; my cropped file size or what my exported file size will be until after I export it and open the properties tab or scroll over it.
    I think Photoshop has a built-in print size/pixels/image size calculator.
    I have no idea what I would do if I manually cropped something to a non-typical aspect ratio and then wanted to print it. But, that's probably another topic/thread.
    Also, remember I live in Cambodia. I don't have the luxury of sending online to a quality print service or take to a real print shop. I have no idea what they use for printers here or how they set them up, but one problem is that they like to make everyone look "white"
    Thanks again and apologies again for not quite understanding.
    Andrew

  • AIR for iOS: Icons & Launch Image question

    Launch Image:
    AIR has been so changed since I used it last time, I can't really figure out anything, documentation is somewhat confusing to me. Could you anyone of you please answer my question? To some, it could be pretty simple.
    My app is exclusively for iPads, works only in Lanscape mode, so I've included 2 launch images, which name: Default.png & [email protected] (I named them after reading this: http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d129907d2886-8000.html)
    When I copied final .ipa file to my iPad 2, well, its launch image appeared in Portrait mode! So, I'm totally confused as how many launch images I need to provide and what should be their name? I use Flash Professional CC to publish, I've included all the launch images in Publishing settings, so is there any order I need to follow or order in Included Files just does not metter? Please keep it in consideration that this app is only for iPads (specified in Publishing dialouge box) and works only in Landscape mode (both, left and right).
    Icons:
    I followed the above mentioned webpage and provided Flash Professional CC these icons: 29x29, 48x48, 50x50, 58x58, 72x72, 100x100, 144x144 & 1024x1024. I know 50x50 icon is created by AIR from 48x48, yet I provided it and 512x512 icon is only for development purpose, we need to manually provide it while uploading it to App Store, so I did not provide it.
    When I copied final .IPA to iTunes, iTunes does not show App Icon as it used to show for development-ipa. So, I just want to confirm is it normal or I missed something?
    Lastly, I copied final .IPA to my iPad 2, when I started it, I noticed that first it show the 'launch image' in Portrait mode (as mentioned above) and after may be 1-2 seconds, the launch image gone and it showed blank (black) screen untill my app started. The blank black screen showed up for 3-4 seconds. Is it normal?
    Thanks.

    Hey Yusuf,
    "Default.png" is a portrait mode image for iPhone, iPhone 3 and iPhone 3GS.
    For iPad 1, 2 & Mini you will need a 1024x768 image called "Default-Landscape.png".
    For iPad 3 and 4 you will need a 2048x1536 "[email protected]".
    So all you have to do is include these launch images in the publish settings and that's it, there is no special order and you do not require any other "Default" images other than those two. This should also resolve your blank screen problem.
    It's normal for release builds not to show their App icon in iTunes, you'll notice that when you right click and press "Get Info" on an app you should be able to see the icon.
    Hope that helps,
    O.

  • Fixing Text and Image questions

    Is there a way to make the back ground translucent so that
    you can vagly see the background image. Like some way to change the
    opacity in a container?
    How come when I create a div tage and insert a picture in
    there. I hit enter right after the picture to type in text there is
    spacing from the top of the picture to the top of the container? I
    want it so that top of the picture still remains flush. I can't
    figure out how to keep it there.The only soluction I came up with
    is to hit shift enter then type txt below. That keeps the container
    flush with the top. Oh I forgot to mention I also have it set to
    float left. Can someone help me with this problem.
    One last question. I have test on the left hand side of the
    page going down, in a menu fashing. I hit shift enter after each
    row so the spacing is somewhat close. But when I try to indent a
    row it indents the whole thing. Is there a way to just indent a row
    buy itself if the row was created using shift enter?
    Thanks for being so helpful :)

    >>How come when I create a div tage and insert a
    picture in there. I
    hit enter right after the picture to type in text there is
    spacing from
    the top of the picture to the top of the container?
    I'll guess that you're using design view. When you hit
    <enter> and your
    cursor is to the right of your image, Dreamweaver puts the
    image in <p>
    tags. <p> tags have an inherent margin, which is why
    you're seeing space
    above the image. You can add some css code to the head of
    your page (or
    add it to your external style sheet) as such -
    p {margin: 0;}
    >>I hit shift enter after each row so the spacing is
    somewhat close.
    Try using css to control your spacing, instead of using
    shift-enter.
    Likewise, you can also use css to take care of your indents.
    BUT...it would be good to see your page, instead of guessing
    how you
    have set things up. Do you have a link?

  • Image question for mouse over.

    I hope this is a simple question.  Can I place a 150px wide image on my page and when you mouse over have the same photo pop up that is 300 px wide?  I know I can swap the images if they are both 150 px.  But I want to see the larger photo with the mouseover can someone explain or show me where to learn how to do this if I can even do it? Maybe it is not mouseover image swap and it is called something else? Thanks in advance.

    tl1_mc.visible=tl2_mc.visible=tl3_mc.visible=false;
    for(var i:int=1;i<4;i++){
       this["tl"+i+"_mc"].addEventListener(MouseEvent.MOUSE_OVER,overtl);
       this["tl"+i+"_mc"].addEventListener(MouseEvent.MOUSE_OUT,offtl);
    function overtl(e:MouseEvent=null):void{
       var n:int=int(e.currentTarget.name.substr(2,1));
       this["tl"+n+"_mc"].visible=true;
    function offtl(e:MouseEvent=null):void{
       var n:int=int(e.currentTarget.name.substr(2,1));
       this["tl"+n+"_mc"].visible=false;

  • Quick background image question

    I think this is a simple question, but maybe it's not.
    Basically I want an image to behave like the background images on
    Prada.com. It scales based upon
    width and crops the height. It seems to be anchored to the
    top-right corner, unless you get fairly narrow then it isn't
    anchored anymore, and it stops scaling the image. I have two large
    displays and no matter how wide I stretch my window it just keeps
    scaling the image. How would I go about doing this?

    "rileyflorence" <[email protected]> wrote in
    message
    news:gf27fd$b22$[email protected]..
    >I think this is a simple question, but maybe it's not.
    Basically I want an
    > image to behave like the background images on
    http://www.prada.com. It
    > scales
    > based upon width and crops the height. It seems to be
    anchored to the
    > top-right
    > corner, unless you get fairly narrow then it isn't
    anchored anymore, and
    > it
    > stops scaling the image. I have two large displays and
    no matter how wide
    > I
    > stretch my window it just keeps scaling the image. How
    would I go about
    > doing
    > this?
    Look for scale9 in the help.
    HTH;
    Amy

  • JTree sizing question...

    Hello:
    I have a JTree for which each cell contains a button. I have written a renderer that renders the button, and I realize that I have to do some special stuff to capture a click on the button. My question is unrelated to all of that.
    The problem is that over time, the labels on my buttons change (and may become longer (wider)), but the tree size does not change. In fact, when I update the button label and the tree is re-rendered the rendering of the button gets "chopped off". I've put the tree in a scroll pane, but this doesn't help - the right side of some of the buttons get cut off to the original tree size. I've tried lots of different variations on setPreferredSize, calling repaint, etc, and am not having any luck. I've put together a demonstration of this behavior in a smallish application that I'm posting here, where I create a 2 node tree with buttons that read "Hi", then I change the button labels to "Goodbye" and re-render. You'll see that the button's are cut off about halfway through the button.
    In case its important - I'm running java version 1.5.0_07 on a 32-bit Linux box.
    Any help would be greatly appreciated. Thanks in advance!
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.awt.*;
    public class JTreeQuestion
      public static void main(String [] args)
        JTreeFrame f = new JTreeFrame();
        f.pack();
        f.setLocation(30, 30);
        //Draws buttons with "Hi" (short string)
        f.setVisible(true);
        ButtonNode.updateString("Goodbye");
        //Draws buttons with longer string, buttons get "cut off"
        f.repaint();
    class JTreeFrame extends JFrame
      JTree tree;
      JScrollPane treeView;
      public JTreeFrame()
        super("My Tree");
        DefaultMutableTreeNode root;
        root = new DefaultMutableTreeNode(new ButtonNode());
        root.add(new DefaultMutableTreeNode(new ButtonNode()));
        tree = new JTree(root);
        tree.setCellRenderer(new ButtonNodeRenderer());
        treeView = new JScrollPane(tree);
        add(treeView);
    class ButtonNode
      public static String str = "Hi";
      public static void updateString(String inStr)
      { str = inStr; }
      String getStr()
      { return str; }
    class ButtonNodeRenderer extends DefaultTreeCellRenderer
      public Component getTreeCellRendererComponent(JTree tree,
                              Object value, boolean sel, boolean expanded,
                              boolean leaf, int row, boolean hasFocus)
        Box theBox = new Box(BoxLayout.X_AXIS);
        super.getTreeCellRendererComponent(tree, value, sel, expanded,
                                           leaf, row, hasFocus);
        DefaultMutableTreeNode jtreeNode = (DefaultMutableTreeNode)value;
        theBox.add(new JButton(((ButtonNode)jtreeNode.getUserObject()).getStr()));
        return (theBox);
    }

    For those who are interested. The DefaultTreeModel has a method named nodeChanged() that tells the tree model that a specific node has changed, and the model re-interprets the cell causing its sizse to change as necessary, so that the full button is rendered now.
    Basically what I did was instead of calling repain, I call a method that I wrote that loops through all the tree nodes, indicates they have changed, then repaint's, and it all works out. My trees are relatively small, so this is fine, but if others face the same problem, you'll probably want to selectively indicate which nodes have changed so the tree model doesn't have to do more work than necessary.

  • Rollover Image Question.....Help!

    http://www.amandacarpenterphotography.com/gallery.php
    Im building this web page more or less as a favor for my
    sister-in-law, and Im building it to further educate myself about
    Web Design.
    Simple question, the link above takes you to the "Gallery"
    section.
    What I want to do is when the you roll the mouse over the
    text on the left, (Gallery, Senior Photos, Engagements, etc) I want
    the picture on the right to change to whatever the mouse is
    hovering over. So like Engagements shows an engagement photo, while
    weddings shows a sample wedding photo, directly to the right of the
    text. I also want the image to pre-load.
    How can I do this? It sounds so simple but I can not figure
    out how to do it
    Thanks in advance
    Joe

    http://www.dwfaq.com/tutorials/basics/disjointed.asp
    "JSloanSDRE" <[email protected]> wrote in
    message
    news:f5g0dh$ngv$[email protected]..
    >
    http://www.amandacarpenterphotography.com/gallery.php
    >
    > Im building this web page more or less as a favor for my
    sister-in-law,
    > and Im
    > building it to further educate myself about Web Design.
    >
    > Simple question, the link above takes you to the
    "Gallery" section.
    >
    > What I want to do is when the you roll the mouse over
    the text on the
    > left,
    > (Gallery, Senior Photos, Engagements, etc) I want the
    picture on the right
    > to
    > change to whatever the mouse is hovering over. So like
    Engagements shows
    > an
    > engagement photo, while weddings shows a sample wedding
    photo, directly to
    > the
    > right of the text. I also want the image to pre-load.
    >
    > How can I do this? It sounds so simple but I can not
    figure out how to do
    > it
    >
    > Thanks in advance
    >
    > Joe
    >

  • Rollover images question + site deffinition tool

    Hi, I took a course in Dreamweave but unfortunately lost my notes.  I am making a gallery site for myself and would like to have roll over images where one rolls over a thumbnail at the bottom of the page and a larger image in the middle changes to the thumbnailed one.  Prefferably without the larger image reverting back to whatever image 0 was.  If wome one could please explain the simpleset way to do this, or direct me to a really simple explination, I would be very greatful.
    Also I have a question about the site deffinition tool.  Is there a way to use it that does not involve creating an extra folder?  I already have defined folders for a site and I would like that to be just it.
    Thank you for your help.

    Pure CSS Disjointed Image Rollovers.
    http://alt-web.com/DEMOS/CSS-Disjointed-Image-Rollover.shtml
    When you define your Local Site, DW asks you which folder to use.  If you've already created one on your local drive, use that one.
    Nancy O.
    Alt-Web Design & Publishing
    Web : Print : Graphics : Media
    http://alt-web.com/
    Twitter: http://twitter.com/altweb
    Blog: http://alt-web.blogspot.com/

  • Multiple Images Questions

    Hi,
    I am a total beginner with Flash however I have bought a
    template for my website and wish to make some additions to it.
    Basically when the template loads up it always has a main
    image present and the page options down one side. What I would like
    to do is have multiple images set for the opening image so that
    everytime you enter the site you will view a different main image.
    I'm sorry if I haven't explained this correctly. If you
    follow this link www.gsa.ac.uk and hit refresh a few times you
    should get what I mean.
    Is there some sort of online guide I can follow to do this ?
    Thanks
    Euan

    Aperture excels at converting your digital negatives from RAW, organizing them in any way you want, and developing each Image to be as good as you can make it.  It is not, however, a graphics program -- the difference being, primarily, that graphics programs are built from the ground up to perform compositing.  Photoshop, and the like, are excellent at compositing.  Aperture is not.
    The answers to your questions:
      1.  No.
      2.  This is actually a more complex question than it seems.  With Aperture you can Lift adjustments from any Image and Stamp them onto any other Images.  For panoramas, however, what you want is not "the same exposure _adjustment_", but rather the same final exposure.  There is no way to do this, afaik, in Aperture.  Good panorama stitching programs will make adjustments for you to even out the shot-to-shot variation in exposure.  You should not use any automatic exposure modes when capturing the pictures you intend to stitch together.
      3.  Let the panorama program do it for you.  I make RAW captures, convert and stack in Aperture, export as TIFFs, create the panorama (I've used Hugin  -- open source and free -- and found it excellent for my modest needs), import it into Aperture and set it as the Stack Pick.  I use Aperture to make adjustments to the imported panoramic Image.
    Message was edited by: Kirby Krieger -- link added.

  • DVD image question

    Hey this might be a question that should be posted within some other category but I wasnt sure if a pertucar ilife application has the capability.
    I have a mini dvd that has 2 sides and i would like to combine it into one single layer dvd. The total for the mini dvd is under 4 gigs.
    I wanted to know what program would allow me to do something like this. I tried toast 9 thinking they have the multiple dvd image functionality but that seems to be if 1 was windows and another was a mac image then it can combine it into 1 that both can read or something like that.
    That isnt what i am looking for. I have a 2 sided mini dvd that i would like to combine into 1 single regular dvd. Could I use iDVD or would I have to use something else.
    Also toast seems to make dvd images with a .toast extension that any other program doesnt recognize (other then taost).
    Help would be greatly appreciated.

    Here's how to do it with Toast. What you'll get is one DVD with two titles, but you can tell Toast to continuously play the titles so there won't be any break between them.
    1. Insert the mini DVD disc and choose DVD with the top button of the Toast Media Browser.
    2. When something appears in the browser window drag it to the Toast's Video window with DVD video selected as the format. You'll see a progress bar as Toast extracts the MPEG video files from the mini DVD.
    3. When that is done turn the mini disc over and repeat steps 1 and 2.
    4. Now that you have the content of the mini disc in the Toast window, edit the descriptions, scroll the thumbnail to a desired image and choose the menu style you want.
    5. Choose Save as Disc Image if you want to preview how it looks in DVD Player before burning to DVD. You mount the disc image by control-clicking on it and choosing Mount It.
    I have changed the .toast extension on video DVD disc images to .iso and they work fine with my LaCie Silverscreen that can automatically mount and play .iso images.

  • Before and after image question.

    Dear all,
    I have a similiar scenario below
    something i got off from previous post*****
    1000 10 10 (new)
    1000 10 8 (changed in the next day)
    then extractor will send like this.
    first load means when the entry is created in the source system.
    1000 10 10.
    after change to 8. source will send the entry like this
    1000 10 -2.
    My question is, when i do a FULL LOAD into the next ODS, i keep getting only -2 as my result, not 8. How can i solve this in my update rule?

    Hi again,
    The delta records from an ODS always gets before and after images. For the full update, the records are always read from active table so this will only get the after image. Now suppose you are having wrong data in ODS2, you have to selectively delete the records from ODS2 and then do a full repair from ODS1. Incase of overwrite update rule, you need not do a selectively delete. So if ur data in ODS2 is wrong, delete it first and then do a full repair. You ran a full repai without deleting the already existing data and this might have created the problem.
    Sriram

  • JTree#expandRow() Question

    JTree tree;
    //etc...
    1) /** Expand the tree */
    for (int i=0; i<tree.getRowCount(); i++)
         tree.expandRow(i);
    and tree.getRowCount() = 6
    2) /** Expand the tree */
    for (int i=0; i<6; i++)
         tree.expandRow(i);
    My tree has 6 rows, and each row has its own sub-tree hierarchy.
    I wonder why the first case will expand the whole tree, which includes
    the subtrees of each row.
    But in second case, it only expands the first 6 rows in the tree.
    So basically the question is why (1) and (2) have different tree view outputs??

    Well, after you expand row 1, the row count isn't 6 anymore, is it? It's something larger than that, depending on how many children the first node has.

  • JTree Updating question

    Hi there. I have two questions.
    I have a data structure that is being displayed in a JTree, so I made a Model and it works great. The data structure can be updated from non-gui interaction. The nodes don't change position or anything, its just the data that is displayed is changed. I handle it currently by calling a function in the model I made called nodesChanged(), which basically does the following:
    public void nodesChanged()
        int len = treeModelListeners.size();
        TreeModelEvent e = new TreeModelEvent(this, new Object[] {rootItem});
        for (int i = 0; i < len; i++) {
          ( (TreeModelListener) treeModelListeners.elementAt(i)).treeNodesChanged(e);
      }It does actually work, the changes are reflected in the JTree, but it seems a little expensive, and the updates to the actual data model could come at about 150 per second. To deal with that now, I just use a timer class that updates it about every 3/10's of a second, which does a pretty good job, but is there a more elegant way to do this? Something where the node is an observer of the data in the data structure (which are Observable objects)?
    The second question I have is when I do the above, sometimes the display name of the node will be larger than the value it had previously, but the Textbox (if that's what it is) doesn't grow, so I get a ... at the end.
    For example, if I have "Run" and it changes to "Stopped", it will show up as "Sto...".
    Any help would be great. TIA.

    well, you can start by making the node you put in the tree model event the lowest node in the tree that needs updating, instead of root.
    I don't know about the timer thing, cuz as far as I know, the listener will invoke code that will refresh the renderers, as opposed to painting where repaint calls can be merged into one. If you aren't getting that many updates all the time, you could implement something where the listener fires to an intermediate listener which will fire the info to the tree after a slight delay. That way if you get multiple updates, you can effectively ignore lots of them.
    The ... thing, I thought that treeNodesChanged was the appropriate method, although maybe it has to be for the specific node, not root.

  • Another transparent image question: so sorry

    So sorry to ask a question that is asked a lot, but i cannot seem to import a transparent logo successfully. The image is transparent in photoshop. Then, no matter if i import it as a .tiff or png or .psd, a black background appears in FCP.
    I tried all the previous suggestions, but still seem to be stuck.
    Thanks so much for your help!
    Kyle

    Not sure what the previous suggestions were but try this. In the Browser, ctrl click the image and go to item properties. Under format you'll see 'alpha' near the bottom, ctrl click on this (it'll probably say none/ignore) and select 'straight'
    That should do the trick.

Maybe you are looking for