B4J Question java.lang.IllegalArgumentException: Parsed value is not an Effect

Discussion in 'B4J Questions' started by le_toubib, Apr 7, 2015.

  1. le_toubib

    le_toubib Active Member Licensed User

    hi all

    i m using the following css code , and finally it working well ,

    Code:
    root {
        display: block;
    }

    .root {
         -fx-background-image: url("background.jpg");
    }



    .button {
        -fx-text-fill: white;
        -fx-font-family: "Arial Narrow";
        -fx-font-weight: bold;
        -fx-background-color: linear-gradient(#61a2b1, #2A5058);
        -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
    }

    .button:hover {
        -fx-background-color: linear-gradient(#2A5058, #61a2b1);
    }

    .button:pressed, .button:default:hover:pressed {
      -fx-background-color: white;
      -fx-text-fill: #1d1d1d;
    }

    .tree-cell .label {
        -fx-font-size: 9pt;
        -fx-wrap-text: true;
    }


    .combo-box .list-cell
    {
        -fx-font-size: 11pt;
        -fx-text-fill: black;
        -fx-padding: 3 0 2 7;
        -fx-cell-size: 5.66667em;
        -fx-wrap-text: true;
    }

    .combo-box-popup .list-view
    {
        -fx-background-insets: 0, 1;
        -fx-wrap-text: true;
    }   

    .combo-box-popup .list-view .list-cell
    {
        -fx-padding: 3 0 2 7;
        -fx-wrap-text: true;
    }
    .combo-box-popup .list-view .list-cell:filled:selected, .combo-box-popup .list-view .list-cell:filled:selected:hover

    {
        -fx-wrap-text: true;
    }
    .combo-box-popup .list-view .list-cell:filled:hover
    {
        -fx-wrap-text: true;
    }

    .combo-box-base 
    {
        -fx-font-size: 10pt;
        -fx-background-radius: 15, 15, 15, 15;
        -fx-padding: 0;
        -fx-wrap-text: true;
        -fx-cell-size: 4.66667em;
    }
    .combo-box-base:hover
    {
        -fx-wrap-text: true;
    }
    .combo-box-base:showing
    {
        -fx-wrap-text: true;
    }
    .combo-box-base:focused {
        -fx-background-radius: 16.4, 14, 15, 13;
        -fx-background-insets: -1.4, 0, 1, 2;
        -fx-cell-size: 2.66667em;
        -fx-wrap-text: true;
    }
    .combo-box-base:disabled {
        -fx-opacity: .4;
        -fx-wrap-text: true;
    }

    .label {
        -fx-font-size: 11pt;
        -fx-font-family: "Segoe UI Semibold";
        -fx-text-fill: black;
        -fx-border-radius: 10, 10;
        -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
        -fx-wrap-text: true;
    }

    .label-bright {
        -fx-font-size: 11pt;
        -fx-font-family: "Segoe UI Semibold";
        -fx-text-fill: blue;
        -fx-border-radius: 10, 10;
        -fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 5, 0.0 , 0 , 1 );
        -fx-wrap-text: true;
    }

    .label-cb {
        -fx-font-size: 11pt;
        -fx-opacity: 1;
        -fx-wrap-text: true;
    }


    .label-lblcb {
        -fx-font-size: 11pt;
        -fx-opacity: 1;
        -fx-padding: 0 0 0 0;
        -fx-border-radius: 10, 10;
        -fx-text-fill: blue;
        -fx-effect: Blend;
        -fx-wrap-text: true;
    }

    .label-small {
        -fx-font-size: 8pt;
        -fx-opacity: 0.7;
        -fx-effect: Blend;
        -fx-wrap-text: true;
    }

    .label-header {
        -fx-font-size: 20pt;
        -fx-font-family: "Segoe UI Light";
        -fx-text-fill: blue;
        -fx-border-radius: 10, 10;
        -fx-wrap-text: true;
    }


    .text-field {
        -fx-font-size: 12pt;
        -fx-font-family: "Segoe UI Semibold";
        -fx-border-radius: 10, 10;
        -fx-wrap-text: true;
    }

    it worked fine , but i receive the following warning several times during execution .


    Code:
    Apr 072015 9:27:06 PM javafx.scene.CssStyleHelper calculateValue
    WARNING: caught:
    java.lang.IllegalArgumentException: Parsed value 
    is not an Effect
        at com.sun.javafx.css.converters.EffectConverter.convert(EffectConverter.java:
    60)
        at com.sun.javafx.css.converters.EffectConverter.convert(EffectConverter.java:
    42)
        at javafx.scene.CssStyleHelper.calculateValue(CssStyleHelper.java:
    1431)
        at javafx.scene.CssStyleHelper.lookup(CssStyleHelper.java:
    1016)
        at javafx.scene.CssStyleHelper.transitionToState(CssStyleHelper.java:
    690)
        at javafx.scene.Node.impl_processCSS(
    Node.java:8889)
        at javafx.scene.Parent.impl_processCSS(Parent.java:
    1250)
        at javafx.scene.control.Control.impl_processCSS(
    Control.java:872)
        at javafx.scene.Parent.impl_processCSS(Parent.java:
    1281)
        at javafx.scene.control.Control.impl_processCSS(
    Control.java:872)
        at javafx.scene.Parent.impl_processCSS(Parent.java:
    1281)
        at javafx.scene.control.Control.impl_processCSS(
    Control.java:872)
        at javafx.scene.Node.processCSS(
    Node.java:8732)


    what am i doing wrong ?
     
  2. le_toubib

    le_toubib Active Member Licensed User

    solved by removing the lines :
    -fx-effect: Blend;
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice