Ignore:
Timestamp:
05/10/18 16:04:51 (6 years ago)
Author:
davidb
Message:

Reworking of the code-base to separate logic from graphics. This version of Expeditee now supports a JFX graphics as an alternative to SWING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/items/widgets/charts/AbstractValueAxis.java

    r919 r1102  
    2020
    2121import java.awt.BasicStroke;
    22 import java.awt.Color;
    2322import java.awt.Stroke;
    2423
     24import org.expeditee.core.Colour;
     25import org.expeditee.gio.swing.SwingConversions;
    2526import org.expeditee.gui.Frame;
    2627import org.expeditee.items.Text;
     
    5657
    5758        @Override
    58         public void setSourceColor(Color c) {
     59        public void setSourceColor(Colour c) {
    5960                super.setSourceColor(c);
    6061                if (getChart() == null)
     
    7071                                        .setTickLabelPaint(Axis.DEFAULT_TICK_LABEL_PAINT);
    7172                } else {
    72                         plot.getDomainAxis().setLabelPaint(c);
    73                         plot.getRangeAxis().setLabelPaint(c);
    74                         plot.getDomainAxis().setTickLabelPaint(c);
    75                         plot.getRangeAxis().setTickLabelPaint(c);
     73                        plot.getDomainAxis().setLabelPaint(SwingConversions.toSwingColor(c));
     74                        plot.getRangeAxis().setLabelPaint(SwingConversions.toSwingColor(c));
     75                        plot.getDomainAxis().setTickLabelPaint(SwingConversions.toSwingColor(c));
     76                        plot.getRangeAxis().setTickLabelPaint(SwingConversions.toSwingColor(c));
    7677                }
    7778        }
    7879
    7980        @Override
    80         public void setSourceBorderColor(Color c) {
     81        public void setSourceBorderColor(Colour c) {
    8182                super.setSourceBorderColor(c);
    8283                if (getChart() == null)
     
    8990                        plot.getRangeAxis().setTickMarkPaint(Plot.DEFAULT_OUTLINE_PAINT);
    9091                } else {
    91                         Color brighter = c.brighter();
    92                         plot.setDomainGridlinePaint(brighter);
    93                         plot.setRangeGridlinePaint(brighter);
    94                         plot.getDomainAxis().setTickMarkPaint(c);
    95                         plot.getRangeAxis().setTickMarkPaint(c);
     92                        Colour brighter = c.brighter();
     93                        plot.setDomainGridlinePaint(SwingConversions.toSwingColor(brighter));
     94                        plot.setRangeGridlinePaint(SwingConversions.toSwingColor(brighter));
     95                        plot.getDomainAxis().setTickMarkPaint(SwingConversions.toSwingColor(c));
     96                        plot.getRangeAxis().setTickMarkPaint(SwingConversions.toSwingColor(c));
    9697                }
    9798        }
Note: See TracChangeset for help on using the changeset viewer.