How should a custom cursor image be constructed?

This relates to Java 1.7_u11 and JFX 2.2.4 on Windows 7 64 bit.
When I set a Node's cursor to Cursor.CROSSHAIR, the crosshair is displayed with complementary colour to its screen background (e.g. black on white, blue on yellow, etc.) However when I construct my own custom crosshair image, 32 pixels square, with transparent-white background pixels and opaque-black crosshair pixels, and create an ImageCursor from it to use as the cursor, it works fine, but always displays as black, irrespective of the background that it's being displayed over. I've tried various ways of creating the image.
So my question is, is there something special about the built-in Cursor images, and how should we emulate it for an ImageCursor? More generally, how does the 'blend mode' for cursor images work?
(Apologies if I'm displaying dismaying ignorance here.)

Hrm, I tried Crosshair on my Linux computer with different background fills in Scene and didn't notice any change in color. It was always a cross with white fill and black outline. I wonder if the appearance of certain cursors are OS specific.
Anyways, I don't see anything in the documentation to set that. If you want a more customizable cursor, submit an RFE to http://javafx-jira.kenai.com/

Similar Messages

  • What is the best format to import images into iBA? How should I compress my images before importing? What is the best file format? PNG? Jpeg?

    What is the best format to import images into iBA? How should I compress my images before importing? What is the best file format? PNG? Jpeg? I'm trying to figure out the best file format / compression for importing images into iBA. Also, does anyone know how iBA will compress the file? Are the assets attached (like a website) or flattened out? Does anyone know how iBA handles this? Many many thanks to anyone with insight into this.

    This question is largely answered by the following thread...
    https://discussions.apple.com/message/17805700#17805700

  • How to identify mouse cursor image?

    I am doing some testing in java- everything else so far is working, but I can't find out how to.. find which image the mouse pointer is. I need to be able to tell when a mouse cursor goes over a link and displays the right cursor. It switches between the default arrow, the little hand for links, and a custom cursor, but I don't know how to retrieve that information.
    Any ideas?
    At first I was going to just use screenshots- but cannot capture mouse cursor/icon that way, and this way would work better.
    Thanks!

    That would make sense, but I haven't found any functions on "get the cursor for the component", or of anything related to getting the cursor.
    I was going to use the robot to move to two specified points on the screen, but then I still have the issue of somehow retrieving any information about the cursor(aside from position/clicks). Would you know offhand which package/function(method) would have it? That one only showed stuff related to movement/events, no cursor information besides position/clicks.
    Thanks!
    Edited by: doomtoo on Sep 3, 2008 11:59 PM

  • How to create custom cursor??

    I want to create a new cursor using Toolkit.createCustomCursor(Image,Point,String),
    but Image can only accept .gif,.jpg file,it cannot know .cur,
    so if image's background's color is not equal to panel's background's,
    the cursor that show in the panel looks like malformed rectangle.
    so is there any better way to create a custom cursor??

    Create the cursor as a transparent gif if you need it to be transparent.
    nes

  • How To Update Custom ItemRenderer (Image) on DataGrid Edit

    I have an DataGrid with 2 columns, column 1 called "Name" and column 2 called "Actions".
    The "Name" column contains editable text and the "Actions" column uses a (inline) custom ItemRenderer which displays 2 icon images ( for Edit and Delete). All works fine. Clicking Edit or Delete calls the corrosponding outerDocument method.
    The feature I am trying to add is as follows: when someone double-clicks on the text in the Name column to edit it, I would like the edit icon in the Actions column to ( grow/shrink, change color  - or some such indication/reminder to click it ). Not seeing how to do this with the inline ItemRenderer, I created a custom item renderer class and, in that class, use mx:Resize to perform the "grow/shrink". I created a method called "pulse()" and, from within that renderer, all works well. ( for testing, I wired the icons click event to the pulse() method ). However, now I am not sure how to call that ItemRenderers "pulse()" method to perform the effect from the main DataGrid (when the user double-clicks on Name field to edit).
    The tried using the DataGrid's "itemEditBegin", which fires correctly, but from that point I am not sure how to access the selected rows edit icon in the "Action" column. ( to call its pulse() ) method.
    So any suggestions how I can achieve my end result? Being able to manipulate the edit icon in the "Actions" column, when the user double-clicks (edits) that row's "Name" column?
    If I'm going about it all wrong, feel free to offer alternative solutions.
    Any help would be appreciated.
    Thanks,
    ~e

    Hi,
      Check the  BAPI_MATERIAL_SAVEDATA ,in the BAPI  is there a table parameter EXTENSIONIN ?
    which you can use to pass the values for user defined fields to the BAPI..
    Regards
    Kiran Sure

  • How should I save Tritone image for import into InDesign?

    Photoshop only gives me 4 file format options, and InDesign CS4 only accepts one, .EPS
    Otherwise I got the error, "This files uses an unsupported color space."
    There are several .EPS options. I chose "Single File with Color Composite". However, I'm concerned because the image looks fine in Photoshop but a little faded when I import it into InDesign and then export it as a PDF.

    See the reply to your existing thread.
    Mylenium

  • How should i convert any image, audio and video into binary?

    I am going to prepare a Steganographer Software Using java.
    I want a code to convert any Image , audio and video files into binary structure.
    I am having very short time to accomlish my project, so please reply as early as possible.

    It's already binary.

  • I have an image of 12" width X 18" length, But i need a image size of 12 X 15 inches , how should i

    I have an image of 12" width X 18" length, But i need a image size of 12 X 15 inches , how should i resize with image elongating.?? Please help.

    What version of Acrobat are you using?
    While you can do some limited editing in Acrobat, PDF is considered a final format, and is not designed for general editing. It is best to do the editing in the application which created the PDF file.

  • CS6 - Custom Cursor & Button's icon

    I am trying to display a custom cursor when mouse is moving on a button which has icon.
    But the button's icon is always in front of my cursor image.
    How to make my cursor image on top?
    Belows is my code. Please tell me what's wrong.
    Thank you!
    <mx:Application... creationComplete = "init()>
    private var MyCursor:Shape = new Shape();
    private function init():void{
        // draw custom cursor
        MyCursor.graphics.clear();
        MyCursor.graphics.lineStyle(2, 0xFF0000, 1,true);
        MyCursor.graphics.drawCircle(0,0,6);
        MyCursor.graphics.moveTo(-3,-3);
        MyCursor.graphics.lineTo(4,4);
        MyCursor.visible = false;
        // add to the layer
        CursorLayer.addChild(MyCursor);
    private function ShowCustomCursor(e: MouseEvent):void
        Mouse.hide();
        MyCursor.x = e.stageX;
        MyCursor.y = e.stageY;
        MyCursor.visible = true;
    private funtion HideCustomCursor(e:MouseEvent):void
        Mouse.show();
        MyCursor.visible = false;
    <mx:UIComponent id = "CursorLayer" x ="0' y="0" width ="1000" height = "1000" blendMode="layer">
    <mx:Button id="btnTest" x="50" y="5" width="28" height="20" buttonMode="true"
    icon="@Embed(source='assets/btnTest.png')"
    mouseFocusEnabled="true"
    mouseMove="ShowCustomCursor(event)"
    mouseOut="HideCustomCursor(event)"
    tabEnabled="false"
    useHandCursor="true"/>

    that's because your cursor is sporadically moving over your interactive objects interfering with their mouseevents.
    to remedy, disable the mouseEnabled property of your cursor.

  • Windows 8 reset with custom recovery image

    Dear all,
    I searched for two days now without being able to find any Information:
    Is it possible to perform a reset with a custom recovery image on Windows 8 or Windows 8.1 ?
    I tried multiple scenarios but I always receive the error message, that some files are missing and that I need to insert an installation media.
    If I use e.g. Windows 8.1 Enterprise install.wim file all is working fine. But I would like to provide my users the options to make an OS refresh as well as OS reset with some preinstalled applications.
    If it's not possible to use one Image for both, any way to get two Images working, one for refresh and one for reset?
    The Internet is full of guides how to create custom recovery Images, but I can't find anything about reset and custom Images. Thanks a lot for your help in advance.
    Best regards
    Tobias

    Hi,
    I think we can create a recovery disc for refresh or reset via system image backup.
    Windows 8 (8.1) – How to Create a Recovery Disc/Drive/ Partition
    http://www.registryrecycler.com/blog/2013/08/windows-8-how-to-create-a-recovery-drive/
    Hope this could be helpful.
    Kate Li
    TechNet Community Support

  • How to make a custom cursor

    How do you make a custom Cursor with the Cursor class, so that I can use it in my program.
    And also, how do you make a LookAndFeel??

    To make a cursor use:
    createCustomCursor public Cursor createCustomCursor(Image cursor,
                                     Point hotSpot,
                                     String name)
                              throws IndexOutOfBoundsException, HeadlessException
    Creates a new custom cursor object. If the image to display is invalid, the cursor will be hidden
    (made completely transparent), and the hotspot will be set to (0, 0). Parameters:hotSpot - the X
    and Y of the large cursor's hot spot. The hotSpot values must be less than the Dimension returned
    by getBestCursorSize().name - a localized description of the cursor, for Java Accessibility use.
    Throws: IndexOutOfBoundsException - if the hotSpot values are outside the bounds of the cursor.

  • Custom cursor using image gets resized bigger

    I have created a custom cursor using the following code:
    ClassLoader cl = this.getClass().getClassLoader();     
    Toolkit tk = Toolkit.getDefaultToolkit();
    Image im = tk.getImage( cl.getResource("images/wallcursor.gif"));
    Cursor Custom_Cursor = tk.createCustomCursor(im,new Point(9,9),"Drawing wall");
    draftGrid.setCursor( Custom_Cursor );The cursor is loaded and it works, however - the image I use for the cursor is resized so it gets too big. Any clues on why this happens?
    btw; draftGrid is one of my own classes that extends JComponent.
    - bjorn

    Thanks for your replies guys.
    I tried your code KPSeal, and it works in resizing the cursor image back to its original size. However, a gray square of size 32,32 (which is returned by getBestCursorSize()) is shown round the cursor.
    Here is the updated code (yours hade some minor bugs)
    Image im = tk.getImage( cl.getResource("images/wallcursor.gif"));
    try {
           tracker.addImage(im, 0 );
           tracker.waitForID(0);
    } catch( InterruptedException ie ) {
           ie.printStackTrace();
    int w = im.getWidth(this);
    int h = im.getHeight(this);
    int pw = Toolkit.getDefaultToolkit().getBestCursorSize(w, h).width;
    int ph = Toolkit.getDefaultToolkit().getBestCursorSize(w, h).height;
    System.out.println("w="+w+", h="+h+" - pw="+pw+", ph="+ph);
    Image cim = createImage(pw, ph);
    cim.getGraphics().drawImage(im,0,0, this);                     
    Cursor Custom_Cursor = tk.createCustomCursor(cim,new Point(0,0),"Drawing wall");
    draftGrid.setCursor( Custom_Cursor );The System.out.println statement prints: w=18, h=13 - pw=32, ph=32
    If I try to do the createImage with w and h instead of pw and ph the same gray square (32,32) is created, and in addition the cursor's size is too big which was the probem to begin with ...
    - bjorn

  • I have installed a trial of Adobe illustrator on my macbook pro. I want to trace an image using the custom trace button but can't. Does anyone have any ideas how I could custom trace?

    I have installed a trial of Adobe illustrator on my macbook pro. It is the 2014 release of adobe illustrator. I want to trace an image using the custom trace button.
    I start a new document. Then I place my scanned pencil/colored pencil drawing, in to the document. I have tried scanning and then placing it as a jpeg, bitmap, and tiff file. I have tried scanning and then placing it, in color and in black and white. The scan mode I use is flatbed. Adobe illustrator allows me to select the default button and one of eleven preset buttons (e.g high fidelity photo), but it does not allow me to click the custom trace button. The custom trace button is grey while all the other buttons are white.
    Does anyone have any ideas how I could custom trace?

    It seems pointless to adjust it afterwards because it is then only a couple a pencil lines rather then a full drawing. And how do I adjust it afterwards? Would I do this using the different buttons under the window button?

  • How do I make a custom brush image in a gradient color scheme in Photoshop Elements 12?

    I want to make a custom brush image in a gradient color scheme.  I know how to change the hue jitter, but I want to "paint" the image with a gradient between two colors.  For example, I have an image of an octopus that I have used to create a custom brush.  I want the top of the octopus to be hot pink and gradually fade into a deep orange at the end of the tentacles.  Everything I've looked up just colors the background.  Thanks in advance!

    Try the following:
    Open the octopus image
    Open a Gradient Map Adjustment layer above this. There are several preset gradients, but in my version of the program I don't see one with pink to orange.
    When you double click on the gradient bar in the Adjustments palette, this will open up the Gradient Editor, where you can tailor the gradient to your specifications with color and opacity stops. (see below)
    This will apply the gradient to the entire picture. However, the adjustment layer has a built-in mask (the white rectangle).
    Left click on this and paint with a black brush to hide the gradient outside of the octopus. If you go too far, you can correct with a white brush.
    Now, as to the Gradient map adjustment layer, here is how to configure it:
    http://retouchpro.com/tutorials/?m=show&opt=printable&id=132

  • 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!)

Maybe you are looking for

  • Safari missing homepage in Lion

    Upgraded to Lion. Now everytime I quite Safari and reopen my "homepage" is the last website I visited. I have checked all prefrences to make sure new tabs and windows open with my "homepage". If I use the keyboard shortcut to get back to my "homepage

  • Device related bundles missing, User related OK.

    Device related bundles mising on devoices, user related ones OK. One devices with cache intact they work fine, but after zac cc and zac ref bypasscache they are gone. Have tried to restart zenserver (single primary) no change Rebuilt internal sybase

  • *.Indd file made in CS3 will not open in CS6, ideas?

    There are many files made in CS# but this one happens to not pen up in CS6. The file has some embedded jpg files file size is @ 300mb

  • OEM Part 2

    hi dear, I want to upgrade my OMS server 10.2.0.1 to 10.2.0.5 I downloaded the patch 10.2.0.5 and read the README.txt Part of the README is: 1.2 Enter the following command to extract the installation files: $ unzip GridControl_10.2.0.5_<platform nam

  • Block PO if net price above 50K for Particular PO type

    Hi SAP gurus, My user required to block PO if the net price is above 50K for particular PO Type. the situation is like this ;- PO Type : ZNR This PO type got two condition of release, 1 - if PO below 10K, only 1 person need to release this PO 2  - if