[8u40] API review: (RT-38192) CSS support for Region as	graphicProperty on Labeled
    David Grieve 
    david.grieve at oracle.com
       
    Wed Aug  6 22:59:58 UTC 2014
    
    
  
In as much as CSS styles can be considered API, I propose the following 
CSS API change for Labeled's -fx-graphic property. This will allow an 
SVG path to be used as the value on Labeled's -fx-graphic property. See 
https://javafx-jira.kenai.com/browse/RT-38192
Proposed CSS API for Labeled:
Allow -fx-graphic to be either a uri or an svg-path
      -fx-graphic: [ <uri> | <svg-path> ]
If -fx-graphic is a svg-path, a Region will be set as the Labeled's 
graphicProperty. This Region will be given the style-class 'graphic'.
Example:
     .button { -fx-graphic: "M2,0 L5,4 L8,0 L10,0 L10,2 L6,5 L10,8 
L10,10 L8,10 L5,6 L2,10 L0,10 L0,8 L4,5 L0,2 L0,0 Z"; }
     .button > .graphic { -fx-background-fill: red; -fx-min-width: 10; 
-fx-min-height: 10; }
    
    
More information about the openjfx-dev
mailing list