4343import org .csstudio .javafx .rtplot .TraceType ;
4444import org .csstudio .javafx .rtplot .YAxis ;
4545import org .csstudio .javafx .rtplot .internal .NumericAxis ;
46+ import org .csstudio .javafx .rtplot .internal .YAxisImpl ;
47+ import org .csstudio .javafx .rtplot .internal .util .GraphicsUtils ;
4648import org .epics .util .array .ArrayDouble ;
4749import org .epics .util .array .ListNumber ;
4850import org .epics .vtype .Display ;
@@ -544,8 +546,10 @@ private void trackAxisChanges(final AxisWidgetProperty axis)
544546 axis .titleFont ().addUntypedPropertyListener (config_listener );
545547 axis .scaleFont ().addUntypedPropertyListener (config_listener );
546548 axis .visible ().addUntypedPropertyListener (config_listener );
547- if (axis instanceof YAxisWidgetProperty )
549+ if (axis instanceof YAxisWidgetProperty ) {
548550 ((YAxisWidgetProperty ) axis ).onRight ().addUntypedPropertyListener (config_listener );
551+ ((YAxisWidgetProperty ) axis ).gridColor ().addUntypedPropertyListener (config_listener );
552+ }
549553 }
550554
551555 /** Ignore changed axis properties
@@ -562,8 +566,10 @@ private void ignoreAxisChanges(final AxisWidgetProperty axis)
562566 axis .titleFont ().removePropertyListener (config_listener );
563567 axis .scaleFont ().removePropertyListener (config_listener );
564568 axis .visible ().removePropertyListener (config_listener );
565- if (axis instanceof YAxisWidgetProperty )
569+ if (axis instanceof YAxisWidgetProperty ) {
566570 ((YAxisWidgetProperty ) axis ).onRight ().removePropertyListener (config_listener );
571+ ((YAxisWidgetProperty ) axis ).gridColor ().removePropertyListener (config_listener );
572+ }
567573 }
568574
569575 private void yAxesChanged (final WidgetProperty <List <YAxisWidgetProperty >> property ,
@@ -632,7 +638,7 @@ private void updateConfig()
632638 final Color foreground = JFXUtil .convert (model_widget .propForeground ().getValue ());
633639 plot .setForeground (foreground );
634640 plot .setBackground (JFXUtil .convert (model_widget .propBackground ().getValue ()));
635- plot .setGridColor (JFXUtil .convert (model_widget .propGridColor ().getValue ()));
641+ // plot.setGridColor(JFXUtil.convert(model_widget.propGridColor().getValue()));
636642 plot .setTitleFont (JFXUtil .convert (model_widget .propTitleFont ().getValue ()));
637643 plot .setTitle (model_widget .propTitle ().getValue ());
638644
@@ -675,6 +681,18 @@ private void updateAxisConfig(final Axis<Double> plot_axis, final AxisWidgetProp
675681 plot_axis .setLabelFont (JFXUtil .convert (model_axis .titleFont ().getValue ()));
676682 plot_axis .setScaleFont (JFXUtil .convert (model_axis .scaleFont ().getValue ()));
677683 plot_axis .setVisible (model_axis .visible ().getValue ());
684+ if (plot_axis instanceof YAxisImpl ) {
685+ ((YAxisImpl )plot_axis ).setGridColor (
686+ GraphicsUtils .convert (
687+ JFXUtil .convert (
688+ ((YAxisWidgetProperty ) model_axis ).gridColor ().getValue ()
689+ )
690+ )
691+ );
692+ plot_axis .setColor (JFXUtil .convert (
693+ ((YAxisWidgetProperty ) model_axis ).gridColor ().getValue ()
694+ ));
695+ }
678696 }
679697
680698 private void updateRanges ()
0 commit comments