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

le_toubib

Active Member
Licensed User
hi all

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

B4X:
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 .


B4X:
Apr 07, 2015 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 ?
 
Top