Search Results

Search found 4 results on 1 pages for 'daultimatetrooper'.

Page 1/1 | 1 

  • Grayscale image with colored spotlight in JavaFX

    - by DaUltimateTrooper
    I need a way to have a gray scale image in an ImageView and on mouse moved if the cursor position is in the ImageView bounds to show a colored spotlight on the mouse position. I have created a sample to help you understand what I need. This sample negates the colors of a colored image on the onMouseMoved event. package javafxapplication3; import javafx.scene.effect.BlendMode; import javafx.scene.Group; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.paint.Color; import javafx.scene.paint.RadialGradient; import javafx.scene.paint.Stop; import javafx.scene.Scene; import javafx.scene.shape.Circle; import javafx.stage.Stage; var spotlightX = 0.0; var spotlightY = 0.0; var visible = false; var anImage = Image { url: "{__DIR__}picture1.jpg" } Stage { title: "Spotlighting" scene: Scene { fill: Color.WHITE content: [ Group { blendMode: BlendMode.EXCLUSION content: [ ImageView { image: anImage onMouseMoved: function (me: MouseEvent) { if (me.x > anImage.width - 10 or me.x < 10 or me.y > anImage.height - 10 or me.y < 10) { visible = false; } else { visible = true; } spotlightX = me.x; spotlightY = me.y; } }, Group { id: "spotlight" content: [ Circle { visible: bind visible translateX: bind spotlightX translateY: bind spotlightY radius: 60 fill: RadialGradient { centerX: 0.5 centerY: 0.5 stops: [ Stop { offset: 0.1, color: Color.WHITE }, Stop { offset: 0.5, color: Color.BLACK }, ] } } ] } ] }, ] }, } I am a total newbie what can I say...

    Read the article

  • JAXB Customizations and List<Object>

    - by DaUltimateTrooper
    Hi everybody. I used JAXB to create some classes from an XSD. The result was not quite what I expected and most probably it can be customized. It created a generic list instead of 3 different lists. Can this be corrected somehow? @XmlElements({ @XmlElement(name = "M1", type = M1_Type.class), @XmlElement(name = "M2", type = M2_Type.class), @XmlElement(name = "M3", type = M3_Type.class) }) protected List<Object> m1Orm2OrM3; Is there a customization to fix this?

    Read the article

  • Richfaces Calendar Minimum and Maximum Dates

    - by DaUltimateTrooper
    Hello everybody! My problem is making the RichFaces calendar restricting the dates to be allowed to be chosen by the user. Let's say I want to allow only the dates of this month and the dates of the next month to be chosen by the user. I used the preloadDateRangeStart and preloadDateRangeEnd attributes but they did nothing. I created my own CalendarDataModel which uses the preloadDateRangeStart and preloadDateRangeEnd and enables the items but the calendar on the screen allows only the dates of the current month to be selected. Note that the preloadDateRangeStart is today's date and preloadDateRangeEnd is today's date plus 2 months. I am missing something here for sure. Can someone help me please?

    Read the article

1