ImageIO image renders slow in scroll pane

Hello all, I need some help understanding the behavior of BufferedImage(s)
retrieved from ImageIO.read(). The problem I am having is weird .. I load
a PNG image via ImageIO.read(), I use it to construct an ImageIcon which
is later used in a JLabel/JScrollPane for rendering. When I attempt
to scroll the image in the scroll pane, it is very chunky and slow.
If I load the same image with ImageIcon(byte[]), there is no problem. The
image on disk is 186k, when loaded from ImageIcon(), it consumes about
10M, when loaded with ImageIO about 5M is consumed ... when I scroll,
the memory usage increase about 9 MB, which can be collected immediatly
to return to 5M.
Is ImageIO doing some fancy optimization to preserve memory, if so ... how
can I alter the settings or turn it off completly. I tried setting
ImageIO.setUseCache(false); that did nothing as far as I can tell.
The code to load the image is as follows, I am just using the default right now.
      // perform base64 decoding from buffer
      ByteArrayInputStream bos = new ByteArrayInputStream(decoded);
      try
         image = ImageIO.read(bos);
      catch (IOException ioe)
      }Any help would be greatly appreciated!!!
Cheers,
Jody

I'm not sure if this is exactly what you are looking for but, here's code that works well for me:
private class MyJLabel extends JLabel {
    public void paintComponent(Graphics g) {
      super.paintComponent(g);
      Graphics2D g2d = (Graphics2D)g;
      URL imageLocation = MyJPanel.class.getResource("myImage.jpg");
      Image myImage = Toolkit.getDefaultToolkit().getImage (imageLocation);
      MediaTracker tracker = new MediaTracker (this);
      tracker.addImage(myImage, 0);
      try { tracker.waitForID(0); } catch (InterruptedException exception) { System.out.println("Image myImage.jpg wasn't loaded!"); }
      g2d.drawImage(myImage, 0, 0, getWidth(), getHeight, this);
}Once I reload images using the above method, image repainting is very quick. Extend the JLabel (MyJLabel) to overwrite the paint method as above. Should work fast when you do so. You can move the image retrieving code out of the paint method and into the 'MyJLabel' constructor.
How are you painting the icon and where are you retrieving the image? Can you post more code?
Regards,
Devyn

Similar Messages

  • Selecting Multiple Images from Scroll Pane

    Hi,
    I am quite a newbie to Java GUI and can't find a good example on something I wish to do. I got a scroll pane which actually loaded images as a Label. I do this program to upload the images. I already manage to upload the images somehow. But now the problem is I wish to remove the images from the scroll pane. It will be something like this.
    1. Try to put a check box on each JLabel with the image.
    2. Select multiple JLabel images by selecting the check boxes.
    3. Click on the "Remove" button will remove those JLabel Images which has a check box "checked"
    What I am not too sure is,
    how can I be able to detect a group of checkboxes which is checked inside the scroll pane. So that I can actually removes them from the scroll pane. Can anyone show me a good example for it?

    Keep the check boxes in a Collection of some sort. Iterate through it, calling isSelected() on each box.
    Or, add a listener to the checkboxes so that a list of selected images is updated whenever a box is checked or unchecked.
    One of these may suit better than the other depending on circumstances.

  • Putting an image in a scroll pane

    This is probably a simple question for most of you, but I need a little bit of help. How do I put a picture in a scroll pane?
    The problem I have is that I can load an image and display it, that works fine. However, let's say I am making a new frame (I generally use JFrames), and I want to have a scroll pane in it. Let's also say I have numerous buttons around the edges (using a BorderLayout, or something). How do I load an image, draw the image on-screen and have it so that it only shows up in the scroll pane without the scrollbars disappearing?
    I try to do it now, but for some reason the scroll bars of the scroll pane never show up. I can make the entire image be displayed by dragging the window edges bigger (the normal way you make windows bigger), and then I can see the entire picture. Unfortunately, the scroll bars on the scroll pane never show up if the window is too small to display the entire image. This is very puzzling, because I really don't know what I'm doing wrong. I have tried putting a panel in the scroll pane, and drawing on the panel, but still no scroll bars show up on the scroll pane if it is not big enough to show the entire picture / panel.
    I am sure that the solution is very simple, but right now that solution eludes me.

    There's an example in the swing tutorials that seems to me to do exactly what you want.
    See if http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html does the job, (less the border layout and buttons of course, but that shouldn't be too hard once you get the scroll bars working).
    I believe the default scrollbar policy will let the scroll bars appear only when needed based on the bounds and the preferred size.
    I used the example to set up a scrolling map (still just a gif image) and it works fine. If you still have trouble, you probably need to post the relevant section of code.

  • Can't get image in the scroll pane.

    I have written a program to show image in scrollpane. Image has put in the same directory of program. But Still I am not getting image in the scroll pane.
    Please have a look into program and let me know where I commit mistake.
    package com.lko.fx.controls;
    import javafx.application.Application;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.paint.Color;
    import javafx.stage.Stage;
    * @author Upadhyay
    public class ScrollPaneFx extends Application{
    private Scene scene;
    private Group root;
    * @param args
    public static void main(String args[]){
    launch(args);
    * @param primaryStage
    * @throws Exception
    @Override
    public void start(Stage primaryStage) throws Exception {
    root = new Group();
    scene = new Scene(root, 300, 240, Color.WHITE);
    scrollPaneDemo();
    primaryStage.setTitle("ScrollPane Demo");
    primaryStage.setScene(scene);
    primaryStage.show();
    private void scrollPaneDemo() {
    ImageView imgView = new ImageView(new Image(this.getClass().getResourceAsStream("img.png")));
    ScrollPane spane = new ScrollPane();
    spane.setContent(imgView);
    root.getChildren().add(spane);
    Thanks in Advance!
    Regards,
    Himanshu

    Ok, check whether it is the image loading or something else in your code. Is the result of the getClass().getResource() method null or not null? Once we know that we know which direction to hunt in.
    Also I assume you are running in an IDE. Which one? Make sure the build picks up images. Maven for example won't pick them up from your 'src/java' directory.

  • ImageIO PNG Writing Slow With Alpha Channel

    I'm writing a project that generates images with alpha channels, which I want to save in PNG format. Currently I'm using javax.ImageIO to do this, using statements such as:
    ImageIO.write(image, "png", file);
    I'm using JDK 1.5.0_06, on Windows XP.
    The problem is that writing PNG files is very slow. It can take 9 or 10 seconds to write a 640x512 pixel image, ending up at around 300kb! I have read endless documentation and forum threads today, some of which detail similar problems. This would be an example:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304]
    This surely must be resolvable, but after much searching I've yet to find a solution. If it makes any difference, I ONLY want to write png image, and ONLY with an alpha channel (not ever without), in case there are optimisations that that makes possible.
    If anyone can tell me how to address this problem, I'd be very grateful.
    Many thanks, Robert Redwood.

    This isn't a solution, but rather a refinement of the issue.
    Some of the sources I was reading were implying that the long save time might be due to a CPU heavy conversion process that had to take place before the BufferedImage could be saved. I decided to investigate:
    I loaded back in one of the (slowly) saved PNG images using ImageIO.read(file). Sure enough, the BufferedImage returned differed from the BufferedImage I had created. The biggest difference was the color model, which was DirectColorModel on the image I was generating, and was ComponentColorModel on the image I was loading back in.
    So I decided to manually convert the image to be the same as how it seemed to end up anyway. I wrote the following code:
          * Takes a BufferedImage object, and if the color model is DirectColorModel,
          * converts it to be a ComponentColorModel suitable for fast PNG writing. If
          * the color model is any other color model than DirectColorModel, a
          * reference to the original image is simply returned.
          * @param source The source image.
          * @return The converted image.
         public static BufferedImage convertColorModelPNG(BufferedImage source)
              if (!(source.getColorModel() instanceof DirectColorModel))
                   return source;
              ICC_Profile newProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB);
              ICC_ColorSpace newSpace = new ICC_ColorSpace(newProfile);
              ComponentColorModel newModel = new ComponentColorModel(newSpace, true, false, ComponentColorModel.TRANSLUCENT, DataBuffer.TYPE_BYTE);
              PixelInterleavedSampleModel newSampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, source.getWidth(), source.getHeight(), 4, source.getWidth() * 4, new int[] { 0, 1, 2, 3 });
              DataBufferByte newDataBuffer = new DataBufferByte(source.getWidth() * source.getHeight() * 4);
              ByteInterleavedRaster newRaster = new ByteInterleavedRaster(newSampleModel, newDataBuffer, new Point(0, 0));
              BufferedImage dest = new BufferedImage(newModel, newRaster, false, new Hashtable());
              int[] srcData = ((DataBufferInt)source.getRaster().getDataBuffer()).getData();
              byte[] destData = newDataBuffer.getData();
              int j = 0;
              byte argb = 0;
              for (int i = 0; i < srcData.length; i++)
                   j = i * 4;
                   argb = (byte)(srcData[i] >> 24);
                   destData[j] = argb;
                   destData[j + 1] = 0;
                   destData[j + 2] = 0;
                   destData[j + 3] = 0;
              //Graphics2D g2 = dest.createGraphics();
              //g2.drawImage(source, 0, 0, null);
              //g2.dispose();
              return dest;
         }My apologies if that doesn't display correctly in the post.
    Basically, I create a BufferedImage the hard way, matching all the parameters of the image I get when I load in a PNG with alpha channel.
    The last bit, (for simplicity), just makes sure I copy over the alpha channel of old image to the new image, and assumes the color was black. This doesn't make any real speed difference.
    Now that runs lightning quick, but interestingly, see the bit I've commented out? The alternative to setting the ARGB values was to just draw the old image onto the new image. For a 640x512 image, this command (drawImage) took a whopping 36 SECONDS to complete! This may hint that the problem is to do with conversion.
    Anyhow, I got rather excited. The conversion went quickly. Here's the rub though, the image took 9 seconds to save using ImageIO.write, just the same as if I had never converted it. :(
    SOOOOOOOOOOOO... Why have I told you all this?
    Well, I guess I think it narrows dow the problem, but eliminates some solutions (to save people suggesting them).
    Bottom line, I still need to know why saving PNGs using ImageIO is so slow. Is there any other way to fix this, short of writing my own PNG writer, and indeed would THAT fix the issue?
    For the record, I have a piece of C code that does this in well under a second, so it can't JUST be a case of 'too much number-crunching'.
    I really would appreciate any help you can give on this. It's very frustrating.
    Thanks again. Robert Redwood.

  • Panels in a row in a scroll pane.

    Hi,
    in my application, i have a UI frame, which contains a scroll pane that has a panel, which contains a few hundreds of panels, lined up vertically.
    Each of these panels contais an icon, a label, a text field and a few more label fields and more text fields(sometimes)
    When the UI cmes up the parent panel contains only a few(10-15) panels one below another and if we click on the icon, we need to add a few more panels below the panel that contains the label that was clicked.
    In the case, when we click on all the icons in the parent panel, then we need to add a lot of panels and we hit the out of memory exception.
    does anyone have a good solution here.
    The TreeTable UI item would have been perfect here but we can not use them because we dont want to change the look of the UI for backward compatibility reasons.
    Also, every time the icon was clicked, creating and ading the panels is very slow.
    Any help is greatly appreciated.
    regards.

    1. You could create a secondary storyline and edit B-roll into it. It will behave more like tracks. The secondary does have magnetic properties, which many people find hinders the free movement of B-roll.
    2. Again secondaries. But basically you're trying to make the application behave like a tracked application when its essence is to be trackless.
    3. Not seen this.
    4. Doesn't work in FCP. Use copy and paste attributes.
    5. Yes. The homemade titles and effects created in Motion live in a specific folder structure in your Movies folder. That can be shared and duplicated on any Mac with FCP.
    6. There is no one answer to that, events and projects are entirely separate from each other, except that specific events and projects reference each other. You can simplify things so a single event holds all the content for a single project and its versions.
    7. You can't change the import function. It's simply a file transfer as FCP edits it natively. You can select the clips in FCP and change the channel configuration.

  • Photos in album are only a hash-marked outline the image only shows when scrolling how can I see the image and open the photo?

    Photos in iPhoto album are only a hash-marked outline the image only shows when scrolling how can I see the image and open the photo?

    Make a temporary, backup copy (if you don't already have a backup copy) of the library and apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Select the options identified in the screenshot. 
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

  • Scroll pane refresh content

    I have background in as3, but this is my first attempt at
    building an application with classes.
    I have a scrollpane that populates with an image.
    MyScroll.as
    public var sp:ScrollPane=new ScrollPane();
    public var imagePath:String = "images/cover.jpg";
    public function createScrollPane(imagePath:String):void {
    sp.move(0,40);
    sp.source = imagePath;
    addChild(sp);
    I have a navigation at the bottom that returns the image name
    from an array that I want to refresh/load/source the scrollpane
    with, but none will work!
    SpreadNav.as
    public function _loadPage(evt:MouseEvent) {
    var str:String = evt.target.name;
    var mySlice = str.substr(10);
    myLoadImages.loadImage();
    myScrollCall.reCreateScrollPane(myNpXMLToArray.highArray[mySlice]);
    I also have a button generated that does reload the
    scrollpane, so I know that it can replace the source.
    MyScroll.as
    public function setClick():void {
    var refreshButton:Button = new Button();
    refreshButton.emphasized = true;
    refreshButton.label = "refreshPane()";
    refreshButton.move(10, 10);
    refreshButton.addEventListener(MouseEvent.CLICK,
    clickHandler);
    addChild(refreshButton);
    public function clickHandler(event:MouseEvent):void {
    sp.source = "images/1.jpg";
    But when I try to load it from the array nothing
    happens...and I have tried putting the image name right in there,
    from the array, refresh, source, contentPath is old, redraw(true)
    is old and I am running out of things to try
    MyScroll.as
    public function reCreateScrollPane(imagePath2:String):void {
    //imagePath2 = "images/cover.jpg";
    var url:String = "images/"+imagePath2;
    trace(url);
    sp.load(new URLRequest(url));
    trace("scroll pane refreshed");
    sp.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    sp.addEventListener(Event.COMPLETE, completeHandler);
    sp.source = "images/"+imagePath2;
    //sp.source = "images/cover.jpg";
    Can anyone suggest a solution?
    Thanks

    i wonder why i bother with this forum sometimes. i always end
    up answering my own questions an hour later. so the problem was
    that the testes.swf was using a startDrag function and the
    scrollPane in which it resided has its startDrag set to true. i
    guess you can't have both elements dragging at the same time. would
    cause serious upset. so yeah, there you go.

  • Turn off scroll pane component

    have scroll pane component applied to an image within a movieclip timeline. after clicking to the frame with the scroll pane, every frame thereafter has the scroll pane image in the background.

    hi kglad
    tried the empty keyframes (both main timeline and actionscript code). tried the removeChild ("removeChild(sp);"), but new to actionscript, so perhaps not correctly. looking up removeListeners (but didn't register a listener in the scrollpane script--registered listeners within main timeline, but this scrollpane AS is within a movieclip timeline). looked up null and that said it was only available in AS1. in AS3, flash6, windows if it helps. everything else is working correctly.
    thanks

  • Pulling text from a .txt to a scroll pane or text area

    Hi-
    I'm sure there's a way to do this, but I'm not exactly fluent in ActionScript.
    Basically, my whole website's going to be in Flash, but I want to be able to update one page (sort of a news/blog page) without having to edit the Flash file every time. I'm assuming the easiest way to do this would be to set up either a scroll pane or a text box and pull the text in from a .txt file (if there's a better way, please let me know). That way I could continue to add on to the .txt file, and Flash would always pull in the current version.
    So, my issues are:
    1. I have no idea where to start with the code for something like that. Is it a LoadVar? Do I physically put a scroll pane or a text area in the frame and put the action on that, or do I put the action on the frame and have it call up a text area component?
    2. Will the text scroll automatically, or is that something else I would have to add in? I plan on adding to this text file for awhile, so it could end up being a lot of text over time.
    3. Would I be able to format the text in the .txt at all? For instance, if I hit enter to put in a paragraph break, would that register once it's pulled into Flash, or would I have to put in an html paragraph break or something? That may be a dumb question, but as I said, I'm not exactly fluent in ActionScript (or any other programming language for that matter).
    Any help is definitely appreciated!
    Thanks!
    -Geoff

    I recommend you use an xml file rather than a text file for storing your content.  The main reason being that it tends to make thing more easily organizable, as well as easier to differentiate things like titles, contents, links, images, etc.
    You could start off using a TextArea component if you want, just to keep things simple.  If you want to format things you can use the htmlText property rather than the text proiperty when assigning your content.  That will allow you more control of the presentation.
    If you want to take the xml approach, you should search Google for "AS# XML tutorial" where you substitute whatever version you plan to use for the "#".  If you plan to use AS3, there is a good tutorial here: http://www.gotoandlearn.com/play?id=64

  • How to add a scroll pane for a panel.

    Hi
    i have a panel with some images drawn . i want a scroll pane added to this panel.
    I tried adding it but failed.
    Any suggestions please (
    here is my code.
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Panel;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    class frame extends JFrame
         public frame()
              JScrollPane pane=new JScrollPane();
              setContentPane(new  DrawClass());
              setSize(500,300);
              setBounds(200,300, 100, 500);
              setVisible(true);
    public class DrawClass extends JPanel implements ActionListener {
         public DrawClass(){
               public void paintComponent(Graphics g){
                          super.paintComponent(g);
                    String [] Filenames={"im3","im4","im5","im6"};
                   int imgX = 0;
                   int imgY = 10;
                   Toolkit toolkit = Toolkit.getDefaultToolkit();
                   Integer[] intArray = new Integer[Filenames.length];
                   for (int i = 0; i < Filenames.length; i++)
                        intArray[i] = new Integer(i);
                       if (Filenames[i] != "" )
                            //XMLFileParser r=new XMLFileParser();
                             Image img =toolkit.getImage( "/home/swathi/Desktop/Images/"+ Filenames[i]+ ".jpg" );
                           g.drawImage (img, imgX, imgY, this);                                       
                           imgY=imgY+100;                  
                       else
                            System.out.println("NO file Found");
               public static void main(String[] args){
               frame f =new frame();
              public void actionPerformed(ActionEvent e) {
                   // TODO Auto-generated method stub
         

    can you please help me in this code .....
    DrawClass.
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Panel;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    class frame extends JFrame
         public frame()
              setContentPane(new  DrawClass());
              setSize(500,300);
              setBounds(200,300, 100, 500);
              setVisible(true);
    public class DrawClass extends JPanel implements ActionListener {
         public DrawClass(){
               public void paintComponent(Graphics g){
                          super.paintComponent(g);
                    String [] Filenames={"im3","im4","im5","im6"};
                   int imgX = 0;
                   int imgY = 10;
                   Toolkit toolkit = Toolkit.getDefaultToolkit();
                   Integer[] intArray = new Integer[Filenames.length];
                   for (int i = 0; i < Filenames.length; i++)
                        intArray[i] = new Integer(i);
                       if (Filenames[i] != "" )
                            //XMLFileParser r=new XMLFileParser();
                             Image img =toolkit.getImage( "/home/swathi/Desktop/Images/"+ Filenames[i]+ ".jpg" );
                           g.drawImage (img, imgX, imgY, this);                                       
                           imgY=imgY+100;                  
                       else
                            System.out.println("NO file Found");
               public static void main(String[] args){
               frame f =new frame();
              public void actionPerformed(ActionEvent e) {
                   // TODO Auto-generated method stub
         ListClass
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Vector;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.dnd.*;
    import javax.swing.*;
    import java.awt.Component;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.image.ImageObserver;
    import java.awt.Toolkit;
    import javax.swing.*;
    import org.w3c.dom.Node;
         public class ListClass extends JPanel{
              ListClass(){
                   DrawClass d=new DrawClass();
              My question is how i can call a method of DrawClass which contains the drawn images ; in the List Class.
    its very urgent please.....

  • New to Applets: Problems wiht writing to files and with scroll panes.

    Hi, I've recently graduated from university and so I have limited experience in java programming and I'm having some trouble with JApplets (this is the first time I've made one). I'm trying to make a simple program that will allow users to pick one of a few background images from a list (a list of jpanels within a scroll pane) then at the click of a button will output a CSS with the background tag set to the image location. This is for use on a microsoft sharepoint site where each user has a My-Sit area which I want to be customizable.
    So far I've been creating this program as an application rather than a JApplet and just having another class that extends the JApplet Class which then displays the JFrame from the GUI Class. This initially didnt work because I was trying to add a window to a container so I kept programming it as an application until I got it working before trying to convert it to a JApplet. I solved the previous problem by changing my GUI class to extend JPanel instead of JFrame and it now displays correctly but with a coupe of issues.
    Firstly the applet will not create/write to the CSS file. I read that applets couldnt read/write to the users file system but they could to their own. The file I wish to write to is kept on the same machine as the applet so I'm not sure why this isn't working.
    Secondly the scroll panel is no longer working properly. This worked fine when I was still running the program as an application when the GUI still extended JFrame instead of JPanel (incidentally the program no longer runs as an application in this state) but now the scroll bar does not appear. This is a problem since I want the applet to remain the same size on the page even if I decide to add more backgrounds to the list. I tried setting the applet height/width to smaller values in the html file to see if the scroll bar would appear if the area was smaller than the GUI should be, but this just meant the bottom off the applet was cut off.
    Could anyone offer any suggestion as to why these thigns arnt working and how to fix them? If necessary I can post my source code here. Thanks in advance.

    Ok, well my program is made up of 4 classes, I hope this isnt too much to be posting. If any explaination is needed then I'll post that next. Theres lots of print lines scattered aroudn due to me trying to fix this and theres some stuff commented out from when the program used to be an application isntead of an applet.
    GUI Class, this was the main class until I made a JApplet Class
    public class AppletGUI extends JPanel{
        *GUI Components*
        //JFrames
        JFrame mainGUIFrame = new JFrame();
        JFrame changeBackgroundFrame = new JFrame();
        //JPanels (Sub-panels are indented)
        JPanel changeBackgroundJP = new JPanel(new BorderLayout());
            JPanel changeBackgroundBottomJP = new JPanel(new GridLayout(1,2));
        JPanel backgroundJP = new JPanel(new GridLayout(1,2));
        JPanel selectBackground = new JPanel(new GridLayout(1,2));
        //Jbuttons
        JButton changeBackgroundJB = new JButton("Change Background");
        JButton defaultStyleJB = new JButton("Reset Style");
        //JLabels
        JLabel changeBackgroundJL = new JLabel("Choose a Background from the Menu");
        JLabel backgroundJL = new JLabel();
        //JScrollPane
        JScrollPane backgroundList = new JScrollPane();
            JPanel backgroundListPanel = new JPanel(new GridLayout());
        //Action Listeners
        ButtonListener bttnLstnr = new ButtonListener();
        //Controllers
        CSSGenerator cssGenerator = new CSSGenerator();
        Backgrounds backgroundsController = new Backgrounds();
        backgroundMouseListener bgMouseListener = new backgroundMouseListener();
        //Flags
        Component selectedComponent = null;
        *Colour Changer*
        //this method is used to change the colour of a selected JP
        //selected JPs have their background darkered and when a
        //different JP is selected the previously seleced JP has its
        //colour changed back to it's original.
        public void changeColour(JPanel theJPanel, boolean isDarker){
        //set selected JP to a different colour
        Color tempColor = theJPanel.getBackground();
            if(isDarker){
                tempColor = tempColor.darker();
            else{
                tempColor = tempColor.brighter();
            theJPanel.setBackground(tempColor);
         //also find any sub-JPs and change their colour to match
         int j = theJPanel.getComponents().length;
         for(int i = 0; i < j; i++){
                String componentType = theJPanel.getComponent(i).getClass().getSimpleName();
                if(componentType.equals("JPanel")){
                    theJPanel.getComponent(i).setBackground(tempColor);
        *Populating the GUI*
        //backgroundList.add();
        //Populating the Backgrounds List
        *Set Component Size Method*
        public void setComponentSize(Component component, int width, int height){
        Dimension tempSize = new Dimension(width, height);
        component.setSize(tempSize);
        component.setMinimumSize(tempSize);
        component.setPreferredSize(tempSize);
        component.setMaximumSize(tempSize);     
        *Constructor*
        public AppletGUI() {
            //REMOVED CODE
            //AppletGUI.setDefaultLookAndFeelDecorated(true);
            //Component Sizes
            //setComponentSize
            //Adding Action Listeners to Components
            System.out.println("adding actions listeners to components");
            changeBackgroundJB.addActionListener(bttnLstnr);
            defaultStyleJB.addActionListener(bttnLstnr);
            //Populating the Change Background Menu
            System.out.println("Populating the window");
            backgroundsController.populateBackgroundsData();
            backgroundsController.populateBackgroundsList();
            //loops to add background panels to the JSP
            ArrayList<JPanel> tempBackgroundsList = new ArrayList<JPanel>();
            JPanel tempBGJP = new JPanel();
            tempBackgroundsList = backgroundsController.getBackgroundsList();
            int j = tempBackgroundsList.size();
            JPanel backgroundListPanel = new JPanel(new GridLayout(j,1));
            for(int i = 0; i < j; i++){
                tempBGJP = tempBackgroundsList.get(i);
                System.out.println("Adding to the JSP: " + tempBGJP.getName());
                //Add Mouse Listener
                tempBGJP.addMouseListener(bgMouseListener);
                backgroundListPanel.add(tempBGJP, i);
            //set viewpoing
            backgroundList.setViewportView(backgroundListPanel);
            /*TESTING
            System.out.println("\n\n TESTING!\n Printing Content of SCROLL PANE \n");
            j = tempBackgroundsList.size();
            for(int i = 0; i < j; i++){
                System.out.println(backgroundList.getComponent(i).getName());
            changeBackgroundJP.add(changeBackgroundJL, BorderLayout.NORTH);
            changeBackgroundJP.add(backgroundList, BorderLayout.CENTER);
            //changeBackgroundJP.add(tempBGJP, BorderLayout.CENTER);
            changeBackgroundJP.add(changeBackgroundBottomJP, BorderLayout.SOUTH);
            changeBackgroundBottomJP.add(changeBackgroundJB);
            changeBackgroundBottomJP.add(defaultStyleJB);
            System.out.println("Finsihed populating");
            //REMOVED CODE
            //adding the Background Menu to the GUI and settign the GUI options
            //AppletGUI.setDefaultLookAndFeelDecorated(true);
            //this.setResizable(true);
            //this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            this.setLocation(500,500);
            this.setSize(400,300);
            this.add(changeBackgroundJP);
        //REMOVED CODE
         *Main Method*
        public static void main(String[] args){
           System.out.println("Creating GUI");
           AppletGUI theGUI = new AppletGUI();
           theGUI.setVisible(true);
           System.out.println("GUI Displayed");
         *Button Listener Inner Class*
        public class ButtonListener implements ActionListener{
            //check which button is clicked
            public void actionPerformed(ActionEvent event) {
                AbstractButton theButton = (AbstractButton)event.getSource();
                //Default Style Button
                if(theButton == defaultStyleJB){
                    System.out.println("Default Style Button Clicked!");
                //Change Background Button
                if(theButton == changeBackgroundJB){
                    System.out.println("Change Background Button Clicked!");
                    String backgroundURL = cssGenerator.getBackground();
                    if(backgroundURL != ""){
                        cssGenerator.setBackgroundChanged(true);
                        cssGenerator.setBackground(backgroundURL);
                        cssGenerator.outputCSSFile();
                        System.out.println("Backgroudn Changed, CSS File Written");
                    else{
                        System.out.println("No Background Selected");
         *Mouse Listener Inner Class*
        public class backgroundMouseListener implements MouseListener{
            public void mouseClicked(MouseEvent e){
                //get component
                JPanel tempBackgroundJP = new JPanel();
                tempBackgroundJP = (JPanel)e.getComponent();
                System.out.println("Background Panel Clicked");
                //change component colour
                if(selectedComponent == null){
                    selectedComponent = tempBackgroundJP;
                else{
                    changeColour((JPanel)selectedComponent, false);
                    selectedComponent = tempBackgroundJP;
                changeColour((JPanel)selectedComponent, true);
                //set background URL
                cssGenerator.setBackground(tempBackgroundJP.getName());
            public void mousePressed(MouseEvent e){
            public void mouseReleased(MouseEvent e){
            public void mouseEntered(MouseEvent e){
            public void mouseExited(MouseEvent e){
    }JApplet Class, this is what I plugged the GUI into after I made the change from Application to JApplet.
    public class AppletTest extends JApplet{
        public void init() { 
            System.out.println("Creating GUI");
            AppletGUI theGUI = new AppletGUI();
            theGUI.setVisible(true);
            Container content = getContentPane();
            content.setBackground(Color.white);
            content.setLayout(new FlowLayout());
            content.add(theGUI);
            AppletGUI theGUI = new AppletGUI();
            theGUI.setVisible(true);
            setContentPane(theGUI);
            System.out.println("GUI Displayed");
        public static void main(String[] args){
            AppletTest at = new AppletTest();
            at.init();
            at.start();
    }The CSS Generator Class. This exists because once I have the basic program working I intend to expand upon it and add multiple tabs to the GUI, each one allowing the user to change different style options. Each style option to be changed will be changed wit ha different method in this class.
    public class CSSGenerator {
        //Variables
        String background = "";
        ArrayList<String> backgroundCSS;
        //Flags
        boolean backgroundChanged = false;
        //Sets and Gets
        //For Variables
        public void setBackground(String theBackground){
            background = theBackground;
        public String getBackground(){
            return background;
        //For Flags
        public void setBackgroundChanged(boolean isBackgroundChanged){
            backgroundChanged = isBackgroundChanged;
        public boolean getBackgroundChanged(){
            return backgroundChanged;
        //background generator
        public ArrayList<String> backgroundGenerator(String backgroundURL){
            //get the URL for the background
            backgroundURL = background;
            //creat a new array list of strings
            ArrayList<String> backgroundCSS = new ArrayList<String>();
            //add the strings for the background options to the array list
            backgroundCSS.add("body");
            backgroundCSS.add("{");
            backgroundCSS.add("background-image: url(" + backgroundURL + ");");
            backgroundCSS.add("background-color: #ff0000");
            backgroundCSS.add("}");
            return backgroundCSS;
        //Write CSS to File
        public void outputCSSFile(){
            try{
                //Create CSS file
                System.out.print("creating file");
                FileWriter cssWriter = new FileWriter("C:/Documents and Settings/Gwilym/My Documents/Applet Data/CustomStyle.css");
                System.out.print("file created");
                System.out.print("creating buffered writer");
                BufferedWriter out = new BufferedWriter(cssWriter);
                System.out.print("buffered writer created");
                //check which settings have been changed
                //check background flag
                if(getBackgroundChanged() == true){
                    System.out.print("retrieving arraylist");
                    ArrayList<String> tempBGOptions = backgroundGenerator(getBackground());
                    System.out.print("arraylist retrieved");
                    int j = tempBGOptions.size();
                    for(int i = 0; i < j ; i++){
                        System.out.print("writing to the file");
                        out.write(tempBGOptions.get(i));
                        out.newLine();
                        System.out.print("written to the file");
                out.close();
            }catch (Exception e){//Catch exception if any
                System.out.println("Error: Failed to write CSS file");
        /** Creates a new instance of CSSGenerator */
        public CSSGenerator() {
    }The Backgrounds Class. This class exists because I didnt want there to just be a hardcoded lsit of backgrounds, I wanted it to be possible to add new ones to the list without simply lettign users upload their own images (since the intended users are kids and this sharepoint site is used for educational purposes, I dont want them uplaoded inapropraite backgrounds) but I do want the site admin to be able to add more images to the list. for this reason the backgrounds are taken from a list in a text file that will be stored in the same location as the applet, the file specifies the background name, where it is stored, and where a thumbnail image is stored.
    public class Backgrounds {
        //Array Lists
        private ArrayList<JPanel> backgroundsList;
        private ArrayList<String> backgroundsData;
        //Set And Get Methods
        public ArrayList getBackgroundsList(){
            return backgroundsList;
        //ArrayList Population Methods
        public void populateBackgroundsData(){
            //decalre the input streams and create a new fiel hat points to the BackgroundsData file
            File backgroundsDataFile = new File("C:/Documents and Settings/Gwilym/My Documents/Applet Data/BackgroundsData.txt");
            FileInputStream backgroundsFIS = null;
            BufferedInputStream backgroundsBIS = null;
            DataInputStream backgroundsDIS = null;
            try {
                backgroundsFIS = new FileInputStream(backgroundsDataFile);
                backgroundsBIS = new BufferedInputStream(backgroundsFIS);
                backgroundsDIS = new DataInputStream(backgroundsBIS);
                backgroundsData = new ArrayList<String>();
                String inputtedData = null;
                //loops until it reaches the end of the file
                while (backgroundsDIS.available() != 0) {
                    //reads in the data to be stored in an array list
                    inputtedData = backgroundsDIS.readLine();
                    backgroundsData.add(inputtedData);
            //TESTING
            System.out.println("\n\nTESTING: populateBackgroundsData()");
            int j = backgroundsData.size();
            for(int i = 0; i < j; i++){
                System.out.println("Index " + i + " = " + backgroundsData.get(i));
            System.out.println("\n\n");
            //close all stremas
            backgroundsFIS.close();
            backgroundsBIS.close();
            backgroundsDIS.close();
            } catch (FileNotFoundException e) {
                System.out.println("Error: File Not Found");
            } catch (IOException e) {
                System.out.println("Error: IO Exception Thrown");
        public void populateBackgroundsList(){
            backgroundsList = new ArrayList<JPanel>();
            int j = backgroundsData.size();
            System.out.println("number of backgrounds = " + j);
            backgroundsList = new ArrayList<JPanel>();
            for(int i = 0; i < j; i++){
                String tempBackgroundData = backgroundsData.get(i);
                JPanel backgroundJP = new JPanel(new GridLayout(1,2));
                JLabel backgroundNameJL = new JLabel();               
                JLabel backgroundIconJL = new JLabel();
                //split the string string and egt the background name and URL
                String[] splitBGData = tempBackgroundData.split(",");
                String backgroundName = splitBGData[0];
                String backgroundURL = splitBGData[1];
                String backgroundIcon = splitBGData[2];
                System.out.println("\nbackgroundName = " + backgroundName);
                System.out.println("\nbackgroundURL = " + backgroundURL);
                System.out.println("\nbackgroundIcon = " + backgroundIcon + "\n");
                backgroundNameJL.setText(backgroundName);
                backgroundIconJL.setIcon(new javax.swing.ImageIcon(backgroundIcon));
                backgroundJP.add(backgroundNameJL);
                backgroundJP.add(backgroundIconJL);
                backgroundJP.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
                //Name the JP as the background URL so it can be found
                //May be useful sicne the data file may need to contain 3 fields in future
                //this is incase the preview image (icon) is different from the acctual background
                //most liekly in the case of more complex ppictures rather then repeating patterns
                backgroundJP.setName(backgroundURL);
                //Add the JP to the Array List
                backgroundsList.add(backgroundJP);
            //TESTING
            System.out.println("\n\nTESTING: populateBackgroundsList()");
            j = backgroundsList.size();
            for(int i = 0; i < j; i++){
                System.out.println("Index " + i + " = " + backgroundsList.get(i));
            System.out.println("\n\n");
    }So thats my program so far, if theres anythign that needs clarifying then please jsut ask. Thank you very much for the help!

  • Slow to scroll

    All of a sudden my Logic Pro X is super slow, even scrolling up and down through the tracks/up and down on the page to see tracks below off the screen, the program is slow, staggers, stops and starts. I have maybe 25 tracks but very little plugins running, never had this problem before, is there a reason I am missing?
    I do not have any plugins going that are not native to Logic X Pro
    I restarted my computer and the external hard drive I am running the files from, as well as my audio interface?

    Thank you so much, I downloaded and ran the program:
    When logic x is open, with me simple scrolling up and down the screen with my trackpad on a project with automation I got this (I am using Mavericks still never updated).
    I am going to try a brand new project and add automation and see if it happens right away.
    Problem description:
    Whenever I have automation in my project, the project slows down whenever I try to do something, even as simple as scrolling up and down the screen.
    EtreCheck version: 2.0.11 (98)
    Report generated December 2, 2014 at 10:52:05 AM EST
    Hardware Information: ℹ️
        MacBook Pro (Retina, 15-inch, Late 2013) (Verified)
        MacBook Pro - model: MacBookPro11,3
        1 2.3 GHz Intel Core i7 CPU: 4-core
        16 GB RAM Not upgradeable
            BANK 0/DIMM0
                8 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                8 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en0: 802.11 a/b/g/n/ac
    Video Information: ℹ️
        Intel Iris Pro -
        NVIDIA GeForce GT 750M - VRAM: 2048 MB
            Color LCD 2880 x 1800
            SyncMaster 1680 x 1050 @ 60 Hz
    System Software: ℹ️
        OS X 10.9.5 (13F34) - Uptime: 2 days 19:35:44
    Disk Information: ℹ️
        APPLE SSD SM0512F disk0 : (500.28 GB)
        S.M.A.R.T. Status: Verified
            EFI (disk0s1) <not mounted> : 210 MB
            Macintosh HD (disk0s2) /  [Startup]: 499.42 GB (151.74 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
    USB Information: ℹ️
        Inateck   512.11 GB
            S.M.A.R.T. Status: Verified
            EFI (disk1s1) <not mounted> : 210 MB
            KRF Crucial 512 (disk1s2) /Volumes/KRF Crucial 512 : 511.77 GB (204.20 GB free)
        Apple Internal Memory Card Reader
        Apple Inc. Apple Internal Keyboard / Trackpad
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Configuration files: ℹ️
        /etc/sysctl.conf - Exists
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Applications/AVG AntiVirus.app
        [not loaded]    com.avg.Antivirus.OnAccess.kext (14.0 - SDK 10.8) Support
            /Library/Extensions
        [loaded]    jp.co.roland.RDUSB0120Dev (1.5.2 - SDK 10.9) Support
    Startup Items: ℹ️
        RDUSB0120Startup: Path: /Library/StartupItems/RDUSB0120Startup
        Startup items are obsolete and will not work in future versions of OS X
    Launch Agents: ℹ️
        [not loaded]    com.adobe.AAM.Updater-1.0.plist Support
        [running]    com.adobe.AdobeCreativeCloud.plist Support
        [loaded]    com.google.keystone.agent.plist Support
    Launch Daemons: ℹ️
        [loaded]    com.adobe.fpsaud.plist Support
        [loaded]    com.google.keystone.daemon.plist Support
    User Launch Agents: ℹ️
        [loaded]    com.adobe.AAM.Updater-1.0.plist Support
        [invalid?]    com.citrixonline.GoToMeeting.G2MUpdate.plist Support
        [running]    com.spotify.webhelper.plist Support
    User Login Items: ℹ️
        iTunesHelper    Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Flux    Application (/Applications/Flux.app)
        Dropbox    Application (/Applications/Dropbox.app)
    Internet Plug-ins: ℹ️
        AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 Support
        FlashPlayer-10.6: Version: 15.0.0.239 - SDK 10.6 Support
        QuickTime Plugin: Version: 7.7.3
        Flash Player: Version: 15.0.0.239 - SDK 10.6 Support
        Default Browser: Version: 537 - SDK 10.9
        o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 Support
        googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 Support
        Silverlight: Version: 5.1.30514.0 - SDK 10.6 Support
    User Internet Plug-ins: ℹ️
        CitrixOnlineWebDeploymentPlugin: Version: 1.0.105 Support
    Safari Extensions: ℹ️
        Save to Pocket
    3rd Party Preference Panes: ℹ️
        Flash Player  Support
    Time Machine: ℹ️
        Skip System Files: NO
        Mobile backups: OFF
        Auto backup: YES
        Volumes being backed up:
            KRF Crucial 512: Disk size: 511.77 GB Disk used: 307.56 GB
        Destinations:
            External HD [Local]
            Total size: 2.00 TB
            Total number of backups: 22
            Oldest backup: 2014-05-10 03:45:27 +0000
            Last backup: 2014-12-02 09:51:52 +0000
            Size of backup disk: Excellent
                Backup size 2.00 TB > (Disk size 511.77 GB X 3)
    Top Processes by CPU: ℹ️
            65%    Logic Pro X
             6%    coreaudiod
             5%    WindowServer
             4%    Finder
             1%    fontd
    Top Processes by Memory: ℹ️
        1.07 GB    Logic Pro X
        945 MB    firefox
        533 MB    Finder
        275 MB    WindowServer
        120 MB    Dock
    Virtual Memory Information: ℹ️
        10.18 GB    Free RAM
        3.88 GB    Active RAM
        661 MB    Inactive RAM
        1.69 GB    Wired RAM
        5.01 GB    Page-ins
        27 MB    Page-outs

  • Datagrid Image Renderer Broken in CS SDK but not Flex project

    Within a Photoshop Extension, I have a DataGrid which has an inline custom image renderer whose dataprovider is an ArrayCollection called "photos"  representing a list of photos and some metadata properties.  One of the properties "fileName" is concatenated with a path to a thumbnail image such as source="{'LR_AUTO/imported/thumbs/' + data.fileName}".
    The dataprovider is bound to a LCDS DataService. When the extension is first launched, the dataservice initializes the dataprovider with the existing values for the "photos" arraycollection.  The thumbnail images are correctly shown.
    However, when the DataService receives a new row and updates the photos dataprovider, the datagrid's new row shows a broken image for the thumbnail even though the path is correct.  I have dumped the photos dataprovider and verified that all information is correct.  When I close Photoshop and relaunch it from Flash Builder, once again LCDS initializes the photos ArrayCollection and THEN the thumbnail that previously showed as broken show up correctly.
    I have a ColdFusion Directory Watcher Gateway that watches a directory where Lightroom auto-imports images from a tethered capture session.  When the camera sends Lightroom a new image, the new image is processed by Lightroom and moved to a target directory, and since ColdFusion's Directory Watcher is watching that targeted directory, ColdFusion will create a thumbnail image in a subfolder and notifiy LCDS that of the new image and related metadata.
    *** This is the interesting part *** When Lightroom places new images in the target directory, this is propogated to the Photoshop Extension's datagrid, and the new row shows up as described earlier, showing a broken image for the thumbnail.  BUT, instead of Lightroom, if I manually copy images to the folder where ColdFusion is watching, then exact same code path is exectuted and in the Photoshop Datagrid the new row appears and THE THUMBNAIL IMAGE shows up correctly.
    The difference seems to be only in how the images are put in the original target location.  The problem is when Lightroom puts them there, but it works when I put them there as a user.
    *** More Interesting Info *** I have the Flex code for the Photoshop Extension duplicated in a standalone, non-CSSDK project using Flex 3.4 which I launch in a browser.  I have mirrored the code in the Photoshop extension, but in this manner, the problem does not exist.  With plain Flex 3.4 in a browser, whenever LCDS notifies the datagrid of a new photo record, the datagrid's new row ALWAYS shows the thumbnail correctly.
    A primary difference in how the thumbnail image is rendered is that in a browser, the Flex 3.4 project accesses the image assets over the network, however, in the Photoshop Extension, the image asset WITH THE SAME RELATIVE PATH is accessed over the local file system.
    source="{'LR_AUTO/imported/thumbs/' + data.fileName}"
    So in the case of the browser, this path is a relative URL and the image is retrieved over HTTP, however, in the PS Extension, the same path represents a file system path relative to the project folder.
    Unfortunately, because the Flash Player (including APE) cannot access BOTH the network and the local filesystem, so I cannot change the Extension to use network access.
    ** The important part to remember is that when I stop the Flash Builder debug session and close Photoshop, then relaunch the debug with Photoshop, then all the images show up correctly in the Extension.
    Your advice is appreciated.
    Thank you!
    Steve
    ====================================================
    Environment
    ====================================================
    Photoshop CS5 Extended 12.01 x32
    Flash Builder 4
    CS SDK 1.02
    Extension Builder SDK 3.4
    MacBook Pro / OS X 10.5 / Intel Core 2 Duo 2.66 GHz / Procs: 1 / Cores: 2 / Memory: 8 GB
    App configured for Photoshop CS5 and Photoshop CS5 Extended
    ====================================================
    NewsAgencyPhotoshop.mxml
    ====================================================
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="com.stevenerat.news.*"
                    horizontalScrollPolicy="off" verticalScrollPolicy="off" verticalGap="0"
                    layout="vertical" horizontalAlign="left"  backgroundColor="#353535"
                    historyManagementEnabled="false"
                    creationComplete="init();">
        <mx:Script>
                public function handlePhotoClick(data:Object):void {
                    this.PreviewImageWindow = PreviewImage(PopUpManager.createPopUp(this,PreviewImage,true));
                    var filePath:String = data.dirPath + data.fileName;
                    PreviewImageWindow.addEventListener("imageOpenEvent",imageOpenListener);
                    PreviewImageWindow.addEventListener("imageCloseEvent",imageCloseListener);
                    PreviewImageWindow.addEventListener("imageSavedEvent",imageSaveListener);
                    PreviewImageWindow.setFileName(data.fileName);
                    PreviewImageWindow.setFilePath(filePath);
                    PreviewImageWindow.y = 0;
                    PreviewImageWindow.x = 0;
            ]]>
        </mx:Script>
        <mx:ArrayCollection id="photos"/>
        <NewsPhoto/>
        <mx:DataService id="ds" destination="NewsAgencyPhotos" autoSyncEnabled="true" autoCommit="true" conflict="conflictHandler(event)"/>
        <mx:Label text="News Agency Photos" fontSize="20" paddingBottom="30"/>
        <mx:Label text="Available Images" fontSize="15"/>
        <mx:DataGrid id="photoIPTC" dataProvider="{photos}" editable="true" width="220" rowCount="5" rowHeight="75" wordWrap="true">
            <mx:columns>
                <mx:DataGridColumn headerText="id" dataField="fileName" width="40" editable="false" sortDescending="true"/>
                <mx:DataGridColumn dataField="psLock" width="65" headerText="Status" editable="false" editorDataField="value">
                    <mx:itemEditor>
                        <mx:Component>
                            <mx:ComboBox editable="false">
                                <mx:dataProvider>
                                    <mx:String>New</mx:String>
                                    <mx:String>Open</mx:String>
                                    <mx:String>Edited</mx:String>
                                </mx:dataProvider>
                            </mx:ComboBox>
                        </mx:Component>
                    </mx:itemEditor>
                </mx:DataGridColumn>
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
            </mx:columns>
        </mx:DataGrid>
    </mx:Application>
    ====================================================
    A DUMP OF THE DATAPROVIDER
    in this case, one array item existed when launched, then a second was added
    while running.  The first has its thumbnail show, the second item has broken image
    ====================================================
    ------------------DUMP----------------------------
    (mx.collections::ArrayCollection)#0
      filterFunction = (null)
      length = 2
      list = (mx.data::DataList)#1
        fillParameters = (Array)#2
        length = 2
        localItems = (Array)#3
          [0] (com.stevenerat.news::NewsPhoto)#4
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_162.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 1
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
          [1] (com.stevenerat.news::NewsPhoto)#5
            aperture = "F10"
            cameraLens = "EF24-70mm f/2.8L USM"
            cameraModel = "Canon EOS 7D"
            city = ""
            copyrightNotice = "¬© Steven Erat 2011"
            country = ""
            creator = "Steven Erat"
            description = ""
            dirPath = "/Users/stevenerat/LR_AUTO/imported/"
            fileName = "ERAT_STEVEN_20110122_163.jpg"
            focalLen = "42.0 mm"
            headline = ""
            id = 2
            iso = "100"
            keywords = "Alt, Dramatic, Fashion, Girl, Glamorous, Glamour, Inked, Model, Portrait, SOPHA"
            psLock = "New"
            shutterSpeed = "1/128 sec"
            state = ""
        uid = "8BAC025E-60D1-11F1-3654-44BDB0D218CE"
        view = (mx.collections::ArrayCollection)#6
          filterFunction = (null)
          length = 2
          list = (mx.data::DataList)#1
          sort = (null)
          source = (null)
      sort = (null)
      source = (null)
    ------------------END_DUMP------------------------

    I expected that if my extension uses the local filesystem AND the network that I would get a Security Sandbox Exception as I recently described in this thread:
    http://forums.adobe.com/thread/791918?tstart=0
    However, I just tried changing my datagrid image renderer to access the thumbnail via HTTP and the thumbnail issue after Lightroom export does not happen.
                <mx:DataGridColumn headerText="Photo" dataField="fileName" width="80" editable="false">
                    <mx:itemRenderer>
                        <mx:Component>
                            <mx:HBox horizontalAlign="center" horizontalScrollPolicy="off" verticalScrollPolicy="off">
                                <mx:Image click="outerDocument.handlePhotoClick(data);" source="{'http://localhost:8500/LR_AUTO/imported/thumbs/' + data.fileName}" width="75" height="75"/>
                            </mx:HBox>
                        </mx:Component>
                    </mx:itemRenderer>
                </mx:DataGridColumn>
    Furthermore, I can also open the image via the Photoshop DOM, and it does open correctly.  It seems that I do have a solution now, although I'm not certain as to why I'm not getting a Security Sandbox Exception as I described in the other post.
    Thanks for reading.

  • Remove/Hide scroll bars in scroll panes.

    Hi all,
    I am pretty new to action script. I am building a photo gallery and I am loading the thumbnails from an XML file into a scroll pane dynamically. As the scroll pane fills up, it gets wider to accomodate the thumbnails. There is one row, and eventually, I want to have the user be able to mouse left or right and have the scroll pane scroll, versus clicking on the bar or the left/right arrows. However, in order to accomplish this, I need the scroll bars to disappear!
    Is there anyway to either remove or hide both the x and y scroll bars on a scroll pane? My scroll pane is called: thumbPane.
    Thanks in advance!
    -Rob

    Hello friend,
                       first select scrollpane.Then open parameters panel (if dont know go to window > properties > paramiters ) turn to OFF HorizontalScrollPolicy  and verticalScrollPoliy then left and right scroll Bar will not display.
    THANKS.

Maybe you are looking for

  • Verizon wifi hotspots and android devices

    Are the Verizon wifi hotspots available for use with use with anything but the extremely limited options verizon supports with its silly "wifi connect" tool. If that is the case - it would seem that this preticular feature is about is about as useful

  • Special G/L indicator H is not defined for down payments

    Can Any body help me please... I am giving the error details when i am posting Speical GL in F-37. Actually i want to post a Security Deposit made against Customer. Special G/L indicator H is not defined for down payments Message no. F5053 Diagnosis

  • How to make the strength of my powerbook wireless stronger?

    hi, im using powerbook g4 12inch and my friend is using ibook. my problem is she can get stronger signal than mine. for instance, she can get 4 networks and i only have one or none network listed. and another example is that she could get full range

  • Slow performance on opening data form in workspace

    hi, when we try to open a data form in workspace its taking more time to open. how increase the performance of it . its 11.1.2.2version,windows 2003 and 64-bit thanks in advance.

  • Lumia 925 died (got frozen) after s/w update

    Hi All - Last Thursday (August 8th) the handset loaded and I agreed to install updates for WP8. After a couple of hours of normal work, s/w crashed and screen showed "emergency calls only" with some strange date and time. Had no chanse to get in the