Drag image flicker in Canvas on iBooks 3.1

Hi,
I'm new with Epub3, I'm trying to drag image in Canvas HTML5, when i drag the image in Canvas, it seem flicker and not smooth,  but it work well in iBooks 3.0.2.
When this epub done, the iBooks 3.1 just released, so i dont want to redo it again.
Does anybody know this problem? pls help me
Thank in advance.

You've tried tapping on the Collections button at the top of the bookshelf to see if they are in a different collection ? If not then do you have a copy of them in the Books part of your computer's iTunes library (though PDFs aren't iTunes purchases, if you've done 'transfer purchases' whilst they were on the iPad then they should have copied over) ?
ibooks and PDFs aren't included in a device's backup, so if they aren't in your computer's iTunes library and/or you don't have your own backup copy of them then they won't be on your computer (for info there isn't an iBooks app/program for a Mac or PC).

Similar Messages

  • When dragging an image onto a fresh canvas, the resizing feature presnaps the image into the canvas size. I can confirm that this has not happened to me in previous projects. I've also tested this problem by making a new larger document size and dragging

    Contexts: I am very competent with GFX and have worked on many projects.
    When dragging an image onto a fresh canvas, the resizing feature presnaps the image into the canvas size. I can confirm that this has not happened to me in previous projects. I've also tested this problem by making a new larger document size and dragging in the same render. It snaps again. I don't want to re-size from the canvas dimensions, I want to resize from the render's original dimensions.

    Ap_Compsci_student_13 wrote:
    ok sorry but doesn't sscce say to post the whole code?the first S is Short, and yes, it needs to be all the code needed to illustrate the problem and let use reproduce it. If you were developing a new Web framework, your example might be short, but for a student game it's very long.

  • How can you find out an individual image size from multiple images on a canvas

    This is probably a really really simple question but I can't for the life of me find how I can find out an individual image size from multiple images on a canvas. eg I have 3 photos i want to arrange 1 large and the other two next to it half the size. How can I edit individual image size on the canvas as when I select the image on a sperate layer I want to resize it just resizes the entire canvas and not the individual image
    Thanks

    I want to know they exact dimensions though. You can get them by dragging to the 0,0 corner and then reading off of the ruler scale on the sides but its fiddily as you have to zoom right in and work it out. I know in photoshop there is a ruler but is there any other way in Elements?

  • Shapes are already on Ai CC Library but can't drag them to the canvas, why?

    I created some images on Adobe Shape and saved them for Illustrator CC; I can see them on the Ai Library but can't drag them to the canvas. If I double-click on one thumbnail this message appears: This item isn’t directly editable in Illustrator, but it can be placed in a document. To place the item, drag it into an open document.
    - I thought that it CAN be editable in Ai.
    - Drag doesn't happen.
    Can you please tell me what to do?
    Thanks.

    Hello sarahginax,
    You may need to enable 'manual mode' in the iPhone, then drag these songs to the iPhone. At that point you should be able to remove the songs as desired.
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    If still unable to remove these entries, you'll need to backup and restore the iPhone.
    iOS: How to back up and restore your content
    http://support.apple.com/kb/HT1766
    Cheers,
    Allen

  • Dragged image source in dragdropHandler

    1) i have to drag and drop images from tile list to
    canvas(copy)
    2) my images are coming from database
    3) in drag drop function how to access dragged image
    4) here is the code

    1) i have to drag and drop images from tile list to
    canvas(copy)
    2) my images are coming from database
    3) in drag drop function how to access dragged image
    4) here is the code

  • Help displaying an image using the canvas!!!!!!!!

    Hey guys
    I don't know whether I am not grasping some concepts well.I have been going mad trying to get the code working
    Here is the code
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.io.*;
    * @author Administrator
    * @version
    public class MyMIDlet extends javax.microedition.midlet.MIDlet implements CommandListener{
    private Display display;
    private MyCanvas canvas;
    private Command exitcommand = new Command("Exit",Command.SCREEN,1);
    private Image source;
    public MyMIDlet() {
    protected void startApp() throws MIDletStateChangeException{
    if (display == null){
    initMIDlet();
    protected void pauseApp() {
    protected void destroyApp(boolean unconditional)throws MIDletStateChangeException {
    exitMIDlet();
    public void commandAction(Command c, Displayable d) {
    if (c == exitcommand){
    exitMIDlet();
    protected void initMIDlet() {
    display = Display.getDisplay(this);
    canvas = new MyCanvas(this);
    System.err.println("Canvas instiated succesfully");
    canvas.addCommand(exitcommand);
    canvas.setCommandListener(this);
    display.setCurrent(canvas);
    public void exitMIDlet() {
    notifyDestroyed();
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    import java.io.*;
    public class MyCanvas extends Canvas implements Runnable {
    private MIDlet midlet;
    private Image offscreen;
    private Image currentimage;
    private Graphics g;
    //MID profile application
    /** Creates a new instance of MyCanvas */
    public MyCanvas(MIDlet midlet) {
    this.midlet = midlet;
    try{
    currentimage = Image.createImage("/bird0.png");
    }catch(IOException e){
    System.err.println(e.getMessage());
    if (currentimage!= null){
    System.err.println("Image create successfully");
    }else{
    System.err.println("Image not created");
    try{
    Thread t = new Thread(this);
    t.start();
    }catch(Execption e){}
    protected void paint(Graphics g){
    Graphics saved = g;
    int x = getWidth();
    int y = getHeight();
    g.setColor(255,255,255);
    g.drawImage(currentimage,x,y,g.TOP|g.VCENTER);
    public void run() {
    repaint();
    I know for a fact that the Canvas class 's paint method is called by the system and not the application. This poses a problem for me because I am not sure how to pass the image to the piant method, so that it can be painted.
    When I run the program(using J2ME wtk04), this is the outcome.
    Image created succesfully
    Canvas instiatiated successfully
    null
    Here are my questions
    1) when is the paint method precisely called by the system?after a reference to the canvas class is created?
    2) is it wise to create the image when instiating the canvas class?( initially created the image using a separate thread)-when sould the image be created?
    3)how to let the application know when to use the image when painting the display area?
    I am just trying the logistics here. It is very crucial to me to understand the bolts of this as the core f my project fouses on the man machine interface development.(For the project, the cilent application is quering for the map using HTTP)
    I use a png file of size 161 bytes. Is that too big for testing purposes.
    I would all the help that I can get. thanks in advance

    1) when is the paint method precisely called by the system?after a reference to the canvas class is created?
    After the canvas is set as the current display, and after that, after the repaint() is called.
    2) is it wise to create the image when instiating the canvas class?( initially created the image using a separate thread)-when sould the image be created?
    It's better to create the image in the very begining of the program e.g. in the midlet initialization. You can call the created image as often as you like later on
    3)how to let the application know when to use the image when painting the display area?
    you have to tell it :))
    you can use if-then, switch, or anything else
    and you can use clipping too

  • How to drag image in left panel then drop into right panel??

    Dear friends.
    I have following code, it is runnable, just add two jpg image files is ok, to run.
    I tried few days to drag image from left panel then drop into right panel or vice versa, but not success, can any GUI guru help??
    Thanks.
    Sunny
    [1]. main code/calling code:
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ImagePanelCall extends JComponent {
         public  JSplitPane ImagePanelCall() {
              setPreferredSize(new Dimension(1200,300));
              JSplitPane          sp = new JSplitPane();
              sp.setPreferredSize(new Dimension(1200,600));
              sp.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
              add(sp);
              ImagePanel     ip = new ImagePanel();
              ImagePanel     ip1 = new ImagePanel();
              ip.setPreferredSize(new Dimension(600,300));
              ip1.setPreferredSize(new Dimension(600,300));
              sp.setLeftComponent(ip);// add left part
              sp.setRightComponent(ip1);// add right part
              sp.setVisible(true);
              return sp;
         public static void main(String[] args) {
              JFrame frame = new JFrame("Test transformable images");
              ImagePanelCall  ic = new ImagePanelCall();
              frame.setPreferredSize(new Dimension(1200,600));
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add(ic.ImagePanelCall(), BorderLayout.CENTER);
              frame.pack();
              frame.setVisible(true);
    }[2]. code 2
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ImagePanel extends JComponent {
         private static final Cursor DEFAULT_CURSOR = new Cursor(Cursor.DEFAULT_CURSOR);
         private static final Cursor MOVE_CURSOR = new Cursor(Cursor.MOVE_CURSOR);
         private static final Cursor VERTICAL_RESIZE_CURSOR = new Cursor(Cursor.N_RESIZE_CURSOR);
         private static final Cursor HORIZONTAL_RESIZE_CURSOR = new Cursor(Cursor.W_RESIZE_CURSOR);
         private static final Cursor NW_SE_RESIZE_CURSOR = new Cursor(Cursor.NW_RESIZE_CURSOR);
         private static final Cursor NE_SW_RESIZE_CURSOR = new Cursor(Cursor.NE_RESIZE_CURSOR);
         public Vector images;
         * Create an ImagePanel with two images in.
         * A MouseHandler instance is added as mouse listener and mouse motion listener.
         public ImagePanel() {
              images = new Vector();
              images.add(new TransformableImage("swing/dnd/Bird.gif"));
              images.add(new TransformableImage("swing/dnd/Cat.gif"));
              setPreferredSize(new Dimension(600,600));
              MouseHandler mh = new MouseHandler();
              addMouseListener(mh);
              addMouseMotionListener(mh);
         * Simply paint all the images contained in the Vector images, calling their method draw(Graphics2D, ImageObserver).
         public void paintComponent(Graphics g) {
              Graphics2D g2D = (Graphics2D)g;
              for (int i = images.size()-1; i>=0; i--) {     
                   ((TransformableImage)images.get(i)).draw(g2D, this);
         * Inner class defining the behavior of the mouse.
         final class MouseHandler extends MouseInputAdapter {
              private TransformableImage draggedImage;
              private int transformation;
              private int dx, dy;
              public void mouseMoved(MouseEvent e) {
                   Point p = e.getPoint();
                   TransformableImage image = getImageAt(p);
                   if (image != null) {
                        transformation = image.getTransformation(p);
                        setConvenientCursor(transformation);
                   else {
                        setConvenientCursor(-1);
              public void mousePressed(MouseEvent e) {
                   Point p = e.getPoint();
                   draggedImage = getImageAt(p);
                   if (draggedImage!=null) {
                        dx = p.x-draggedImage.x;
                        dy = p.y-draggedImage.y;
              public void mouseDragged(MouseEvent e) {
                   if (draggedImage==null) {
                        return;
                   Point p = e.getPoint();
                   repaint(draggedImage.x,draggedImage.y,draggedImage.width+1,draggedImage.height+1);
                   draggedImage.transform(p, transformation,dx,dy);
                   repaint(draggedImage.x,draggedImage.y,draggedImage.width+1,draggedImage.height+1);
              public void mouseReleased(MouseEvent e) {
                   Point p = e.getPoint();
                   draggedImage = null;
         * Utility method used to get the image located at a Point p.
         * Returns null if there is no image at this point.
         private final TransformableImage getImageAt(Point p) {
              TransformableImage image = null;
              for (int i = 0, n = images.size(); i<n; i++) {     
                   image = (TransformableImage)images.get(i);
                   if (image.contains(p)) {
                        return(image);
              return(null);
         * Sets the convenient cursor according the the transformation (i.e. the position of the mouse over the image).
         private final void setConvenientCursor(int transfo) {
              Cursor currentCursor = getCursor();
              Cursor newCursor = null;
              switch (transfo) {
                   case TransformableImage.MOVE : newCursor = MOVE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_TOP : newCursor = VERTICAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_BOTTOM : newCursor = VERTICAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_LEFT : newCursor = HORIZONTAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_RIGHT : newCursor = HORIZONTAL_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_TOP_LEFT_CORNER : newCursor = NW_SE_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_TOP_RIGHT_CORNER : newCursor = NE_SW_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_BOTTOM_LEFT_CORNER : newCursor = NE_SW_RESIZE_CURSOR;
                        break;
                   case TransformableImage.RESIZE_BOTTOM_RIGHT_CORNER : newCursor = NW_SE_RESIZE_CURSOR;
                        break;
                   default : newCursor = DEFAULT_CURSOR;
              if (newCursor != null && currentCursor != newCursor) {
                   setCursor(newCursor);
         public static void main(String[] args) {
              JFrame frame = new JFrame("Test transformable images");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.getContentPane().add(new ImagePanel(), BorderLayout.CENTER);
              frame.pack();
              frame.setVisible(true);
    }[3]. code 3
    import java.awt.*;
    import javax.swing.*;
    import java.awt.image.*;
    public final class TransformableImage extends Rectangle {
         public static final int MOVE = 0;
         public static final int RESIZE_TOP = 10;
         public static final int RESIZE_BOTTOM = 20;
         public static final int RESIZE_RIGHT = 1;
         public static final int RESIZE_LEFT = 2;
         public static final int RESIZE_TOP_RIGHT_CORNER = 11;
         public static final int RESIZE_TOP_LEFT_CORNER = 12;
         public static final int RESIZE_BOTTOM_RIGHT_CORNER = 21;
         public static final int RESIZE_BOTTOM_LEFT_CORNER = 22;
         public static final int BORDER_THICKNESS = 5;
         public static final int MIN_THICKNESS = BORDER_THICKNESS*2;
         private static final Color borderColor = Color.black;
         private Image image;
         * Create an TransformableImage from the image file filename.
         * The TransformableImage bounds (inherited from the class Rectangle) are setted to the corresponding values.
         public TransformableImage(String filename) {
              ImageIcon ic = new ImageIcon(filename);
              image = ic.getImage();
              setBounds(0,0,ic.getIconWidth(), ic.getIconHeight());
         * Draw the image rescaled to fit the bounds.
         * A black rectangle is drawn around the image.
         public final void draw(Graphics2D g, ImageObserver observer) {
              Color oldColor = g.getColor();
              g.setColor(borderColor);
              g.drawImage(image, x, y, width, height, observer);
              g.draw(this);
              g.setColor(oldColor);
         * Return an int corresponding to the transformation available according to the mouse location on the image.
         * If the point p is in the border, with a thickness of BORDER_THICKNESS, around the image, the corresponding
         * transformation is returned (RESIZE_TOP, ..., RESIZE_BOTTOM_LEFT_CORNER).
         * If the point p is located in the center of the image (i.e. out of the border), the MOVE transformation is returned.
         * We allways suppose that p is contained in the image bounds.
         public final int getTransformation(Point p) {
              int px = p.x;
              int py = p.y;
              int transformation = 0;
              if (py<(y+BORDER_THICKNESS)) {
                   transformation += RESIZE_TOP;
              else
              if (py>(y+height-BORDER_THICKNESS-1)) {
                   transformation += RESIZE_BOTTOM;
              if (px<(x+BORDER_THICKNESS)) {
                   transformation += RESIZE_LEFT;
              else
              if (px>(x+width-BORDER_THICKNESS-1)) {
                   transformation += RESIZE_RIGHT;
              return(transformation);
         * Move the left side of the image, verifying that the width is > to the MIN_THICKNESS.
         public final void moveX1(int px) {
              int x1 = x+width;
              if (px>x1-MIN_THICKNESS) {
                   x = x1-MIN_THICKNESS;
                   width = MIN_THICKNESS;
              else {
                   width += (x-px);
                   x = px;               
         * Move the right side of the image, verifying that the width is > to the MIN_THICKNESS.
         public final void moveX2(int px) {
              width = px-x;
              if (width<MIN_THICKNESS) {
                   width = MIN_THICKNESS;
         * Move the top side of the image, verifying that the height is > to the MIN_THICKNESS.
         public final void moveY1(int py) {
              int y1 = y+height;
              if (py>y1-MIN_THICKNESS) {
                   y = y1-MIN_THICKNESS;
                   height = MIN_THICKNESS;
              else {
                   height += (y-py);
                   y = py;               
         * Move the bottom side of the image, verifying that the height is > to the MIN_THICKNESS.
         public final void moveY2(int py) {
              height = py-y;
              if (height<MIN_THICKNESS) {
                   height = MIN_THICKNESS;
         * Apply a given transformation with the given Point to the image.
         * The shift values dx and dy are needed for move tho locate the image at the same relative position from the cursor (p).
         public final void transform(Point p, int transformationType, int dx, int dy) {
              int px = p.x;
              int py = p.y;
              switch (transformationType) {
                   case MOVE : x = px-dx; y = py-dy;
                        break;
                   case RESIZE_TOP : moveY1(py);
                        break;
                   case RESIZE_BOTTOM : moveY2(py);
                        break;
                   case RESIZE_LEFT : moveX1(px);
                        break;
                   case RESIZE_RIGHT : moveX2(px);
                        break;
                   case RESIZE_TOP_LEFT_CORNER : moveX1(px);moveY1(py);
                        break;
                   case RESIZE_TOP_RIGHT_CORNER : moveX2(px);moveY1(py);
                        break;
                   case RESIZE_BOTTOM_LEFT_CORNER : moveX1(px);moveY2(py);
                        break;
                   case RESIZE_BOTTOM_RIGHT_CORNER : moveX2(px);moveY2(py);
                        break;
                   default :
    }

    I gave you a simple solution in your other posting. You never responded to the suggestion stating why the given solution wouldn't work, so it can't be that urgent.

  • Drag and Drop - Drag Image

    I'm using the Flex DragManager in an AdvancedDataGrid with
    HierarchicalData to allow the user to drag and drop tree nodes to
    re-order them. It is working fine. The problem I am having is with
    the drag image. The drag image does not always show up. It seems
    like it will appear for one drag and drop. Then if I try to drag
    another tree node I do not get the drag image there is just a line
    to show I'm dragging something.
    When I say drag image I mean the faded image of the text of
    the tree node which appears as I drag the tree node.
    I am using the following properties on the AdvancedDataGrid
    to enable drag and drop:
    dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
    Now if set dragMoveEnabled="false" then I do get a drag image
    everytime. But I need move the tree nodes around not copy them so I
    need dragMoveEnabled="true".
    Thank you

    I'm using the Flex DragManager in an AdvancedDataGrid with
    HierarchicalData to allow the user to drag and drop tree nodes to
    re-order them. It is working fine. The problem I am having is with
    the drag image. The drag image does not always show up. It seems
    like it will appear for one drag and drop. Then if I try to drag
    another tree node I do not get the drag image there is just a line
    to show I'm dragging something.
    When I say drag image I mean the faded image of the text of
    the tree node which appears as I drag the tree node.
    I am using the following properties on the AdvancedDataGrid
    to enable drag and drop:
    dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
    Now if set dragMoveEnabled="false" then I do get a drag image
    everytime. But I need move the tree nodes around not copy them so I
    need dragMoveEnabled="true".
    Thank you

  • Problem with image resize after canvas resize in CS6

    In previous versions I have been able to resize the canvas and then resize the image.  For example resize the canvas to 250px x 250 px.  Then resize the image to the same.
    Here is the process I am using:
    Duplicate the layer and then hide it. 
    Resize the canvas (Image > Canvas Size) to 250px x 250 px. 
    Un-hide the layer and then resize the image (Image > Image Size).  When I go into Image>Image Size it says that the image is already 250px x 250px.  However if I try to transform the scale the image is the original size and not 250px x 250px
    The reason for needing this is I resize image size (in bulk) and the canvas size using the batch process (file>automate>batch) and actions.   I loaded the actions file I used in previous versions, but that did not work correctly.  I then went in to do this manually and got the same results.
    Any ideas??

    Please post the Action set *.atn file and name of the action in the set. 
    What you wrote seems like normal operation.
    Duplicate the layer and then hide it. 
    Resize the canvas (Image > Canvas Size) to 250px x 250 px. 
    Un-hide the layer and then resize the image (Image > Image Size).  When I go into Image>Image Size it says that the image is already 250px x 250px.  However if I try to transform the scale the image is the original size and not 250px x 250px
    There is no reason to hide and unhide the layer.
    When you change Canvas Size the only layer the may actually get changed is the "Background Layer" for the bankground layer does not suppoty tranparency so Pixels of some color will be added to the background layer if your increasing canvas size or Pixels will be cropped off the background layer if you decreasing canvas size.  Canvas Size = Document Size = Image size.  Canvas size change does not change the size of other layer.  Only their position over the canvas may change.  Layers other then the background layer can be any size. They can be the same size as the canvas size or they may be larger or smaler then the canvas size and they can have any aspect ratio and any shape.  As you saw when you ise free transform on your layer.

  • What is the best kind of images should we use in iBook Author?

    We are using a png image in a keynote inside our iBook.
    But we are loosing the quality of the image when we reduce the box size of the keynote.
    Is png the best kind of images for a keynote in iBook Author? Is there a better kind of image to use?
    For example, we are using a png image in a Pop-Over widget, and it is perfectly clear.
    But if we use the same image in the first slide of a keynote, the image showed in the iBook is not as clear.
    TX

    See Optimizing performance in your iBooks Author books
    Basically jpg for digital photos and png for everything else.

  • Custom Cursor and Drag Image in 1.4 DnD

    What is the proper way to provide a custom cursor and drag image in 1.4 DnD? Say we initiate the drag on a component that supports data transfer (such as a JTree).

    Well, this is strange. My app was locking up (100% CPU) when using DND from windows Explorer.
    I noticed that another part of the same appliction was working perfictly. The difference: JFrame .vs. JDialog. I switched the offending JDialog to a JFrame and all works perfictly now!
    java version "1.4.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
    Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)
    I would like to switch back at some point, but my g.setXORMode() problem is a much bigger issue for us. (That is, once you enter the XOR mode, you can not go back!)

  • Clear system drag image

    Hi,
    When using drag and drop (in a JTree) under Solaris, a drag image appears. I would like to clear this image to display only the image I have created.
    When I run my app under Windows, there's no problem, only my image is displayed. Could somone please help me ?
    Thanks,
    Gwenaelle

    Actually, there's no drag image : what I took for a drag image was just the default drag & drop icon under Unix. Now I just need to replace it by a customized icon.

  • IPhoto '08 - can't drag images

    Unable to drag folders of images from desktop or CD into an iPhoto album. Unable to drag images from iPhoto to Desktop.

    deloresj:
    Welcome to the Apple Discussions. It might be a font problem. iPhoto relies on the Helvetica font to show the number of files selected and being dragged. Open Font Book and make sure you have the Helvetica font installed and activated. If it is, deactivated it and then reactivate it. That should jump start iPhoto's dragging capability.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 08 libraries. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Implementing drag and drop across components with drag image...

    Hey all,
    Finally got the hang of drag and drop. Not too hard, but a little time consuming. I found an article showing how to capture and drag a BufferedImage within a JTree. When you click and drag a node, it creates a BufferedImage of the node on screen and "ghosts" it a bit, which has a very appealing effect.
    However, when I try to drag this image to a JList component, it disappears. So I created the same affect in the JList component. Now you can drag the image from the tree to the list and vice versa. However, the problem is, the image does not "fly over" the borders of the two components (butted up against each other) with the mouse. The image seems to go under the borders, while the mouse floats above everything.
    What I would like to do is be able to drag the image all over the application, perhaps even the desktop in the case of a SDI application. I want to be able to see this image drag from my Java app over the Windows Explorer folder, just like how you can do that with Windows Explorer, dragging an image of the selected node into any app that supports the drop. I know we can handle the "transfer" data from explorer and vice versa, but how to be able to keep an image with the mouse?
    My best guess is somehow using the Glass pane, grabbing a ref to its BufferedImage (if that is even what is there), and drawing the dragged item in that pane. But, then, how will the image move over the desktop outside of the app, where a glass pane is not?
    Is there a way to draw on top of anything, anywhere, but still be able to redraw the background as the image moves with the mouse? There are times where the image may be big, so I don't want to have to capture the underlying screen as an image covering the size of the drag image to restore it as the drag image moves around.
    Thank you.

    We know cursors support some degree of transparence because they have shapes other than blocks.
    I've done some playing around with
    Toolkit.getDefaultToolkit().createCustomCursor(....);The sad news is, it seems that as soon as a pixel's alpha value is greater than 0, it automatically becomes 100% opaque.
    The best you can do, is to take your image, and divide it into a pixel-checkerboard, and set the alpha value of alternating pixels to 0.
    e.g.
    BufferedImage i = new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB);
            int[] data = ((DataBufferInt)i.getRaster().getDataBuffer()).getData();
            boolean on = true;
            for (int z=0; z<data.length; z++)
                if (on)
                    data[z] = 0xffffffff;
                else
                    data[z] = 0x00000000;
                on = !on;
                if (z%32==0) on = !on;
            Cursor hazyWhite = Toolkit.getDefaultToolkit().createCustomCursor(i, new Point(0,0), "hw");

  • My drag images disappear when they are dropped on a correct drop target during the drag and drop interaction.

    What am I missing. The opacity is at 100%. The drop target is a highlighted box from objects. I am using Captivate 8.

    Hi there,
    You might want to make sure your Depth setting is not set to Back instead of Front on your drop target(s).
    The Depth setting is accessed via the Drag and Drop window/panel under Format setting while you have your drop target selected.
    If your Depth setting is set to Back, especially if your opacity is set to 100% on your highlight box/drop target, your drag image would go behind your drop target giving the effect of disappearing behind your highlight box - especially if the drop target is larger than the drag image.

Maybe you are looking for

  • How can i use the same id on two different laptops?

    When trying to use the same login on two different laptops so that i can connect my nook to either depending on which one is free, i get the error that the id is already in use on another computer?

  • Connecting a new Windows 7 computer to Verizon internet

    Hello - I will be adding a brand new computer with Windows 7 to my friend's current Verizon internet service, High Speed Internet (DSL). Do I need to know any username/password or other configuration information to establish the internet connection o

  • Equivalent fields of Enterprise Service in SAP

    Hi , I have a requirement to get static and dynamic heirarchy of an employee in OM. I could not find any Enterprise Service which fulfills my requirement. I got some ESs which are partially helpful but i need to relate the ES fields to SAP fields. Pl

  • My account email has been changed ! I did not authorize this .

    So my account email has been changed and i did not authorize it .Why is SPotify not sending a security code so i can verify such a change  ? Now my account has been hacked for sure . What can i do ?  ? Cant reset password as that will go to new email

  • Sprint gave me the unlock code. Where do I put it in?

    I am moving an iphone 5 from Sprint to ATT. When I put in the ATT sim card, it said that the phone needed to be unlocked and that I should put in the Sprint sim. When I put in the Sprint sim, the phone works fine, but what do I need to enter the unlo