Example usage for java.awt Color cyan

List of usage examples for java.awt Color cyan

Introduction

In this page you can find the example usage for java.awt Color cyan.

Prototype

Color cyan

To view the source code for java.awt Color cyan.

Click Source Link

Document

The color cyan.

Usage

From source file:com.haulmont.cuba.desktop.sys.DesktopWindowManager.java

protected void showNotificationPopup(String popupText, NotificationType type) {
    JPanel panel = new JPanel(new MigLayout("flowy"));
    panel.setBorder(BorderFactory.createLineBorder(Color.gray));

    switch (type) {
    case WARNING:
    case WARNING_HTML:
        panel.setBackground(Color.yellow);
        break;/*from   w w w .ja va 2  s . co m*/
    case ERROR:
    case ERROR_HTML:
        panel.setBackground(Color.orange);
        break;
    default:
        panel.setBackground(Color.cyan);
    }

    JLabel label = new JLabel(popupText);
    panel.add(label);

    Dimension labelSize = DesktopComponentsHelper.measureHtmlText(popupText);

    int x = frame.getX() + frame.getWidth() - (50 + labelSize.getSize().width);
    int y = frame.getY() + frame.getHeight() - (50 + labelSize.getSize().height);

    PopupFactory factory = PopupFactory.getSharedInstance();
    final Popup popup = factory.getPopup(frame, panel, x, y);
    popup.show();

    panel.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            popup.hide();
        }
    });

    PointerInfo pointerInfo = MouseInfo.getPointerInfo();
    if (pointerInfo != null) {
        final Point location = pointerInfo.getLocation();
        final Timer timer = new Timer(3000, null);
        timer.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                PointerInfo currentPointer = MouseInfo.getPointerInfo();
                if (currentPointer == null) {
                    timer.stop();
                } else if (!currentPointer.getLocation().equals(location)) {
                    popup.hide();
                    timer.stop();
                }
            }
        });
        timer.start();
    }
}

From source file:biogenesis.Organism.java

private static int getTypeColor(Color c) {
    if (c.equals(Color.RED) || c.equals(Utils.ColorDARK_RED))
        return RED;
    if (c.equals(Color.GREEN) || c.equals(Utils.ColorDARK_GREEN))
        return GREEN;
    if (c.equals(Color.CYAN) || c.equals(Utils.ColorDARK_CYAN))
        return CYAN;
    if (c.equals(Color.BLUE) || c.equals(Utils.ColorDARK_BLUE))
        return BLUE;
    if (c.equals(Color.MAGENTA) || c.equals(Utils.ColorDARK_MAGENTA))
        return MAGENTA;
    if (c.equals(Color.PINK) || c.equals(Utils.ColorDARK_PINK))
        return PINK;
    if (c.equals(Color.ORANGE) || c.equals(Utils.ColorDARK_ORANGE))
        return ORANGE;
    if (c.equals(Color.WHITE) || c.equals(Utils.ColorDARK_WHITE))
        return WHITE;
    if (c.equals(Color.GRAY) || c.equals(Utils.ColorDARK_GRAY))
        return GRAY;
    if (c.equals(Color.YELLOW) || c.equals(Utils.ColorDARK_YELLOW))
        return YELLOW;
    if (c.equals(Utils.ColorBROWN))
        return BROWN;
    return NOCOLOR;
}

From source file:org.sakaiproject.sitestats.impl.ServerWideReportManagerImpl.java

private byte[] createDailyLoginChart(int width, int height) {
    IntervalXYDataset dataset1 = getDailyLoginsDataSet();
    IntervalXYDataset dataset2 = getDailySiteUserDataSet();

    if ((dataset1 == null) || (dataset2 == null)) {
        return generateNoDataChart(width, height);
    }//from   w w  w.  j  a  va 2s  .com

    // create plot ...
    XYItemRenderer renderer1 = new XYLineAndShapeRenderer(true, false);
    renderer1.setSeriesPaint(0, Color.RED);
    renderer1.setSeriesPaint(1, Color.BLUE);
    renderer1.setSeriesPaint(2, Color.RED);
    renderer1.setSeriesPaint(3, Color.BLUE);
    renderer1.setSeriesStroke(0, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
    renderer1.setSeriesStroke(1, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
    BasicStroke dashLineStroke = new BasicStroke(2, BasicStroke.CAP_BUTT, BasicStroke.JOIN_ROUND, 0,
            new float[] { 4 }, 0);
    renderer1.setSeriesStroke(2, dashLineStroke);
    renderer1.setSeriesStroke(3, dashLineStroke);

    DateAxis domainAxis = new DateAxis("");
    domainAxis.setTickUnit(new DateTickUnit(DateTickUnit.DAY, 7, new SimpleDateFormat("yyyy-MM-dd")));
    domainAxis.setTickMarkPosition(DateTickMarkPosition.START);
    domainAxis.setVerticalTickLabels(true);
    domainAxis.setLowerMargin(0.01);
    domainAxis.setUpperMargin(0.01);

    NumberAxis rangeAxis = new NumberAxis("count");
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    XYPlot plot1 = new XYPlot(dataset1, null, rangeAxis, renderer1);
    plot1.setBackgroundPaint(Color.lightGray);
    plot1.setDomainGridlinePaint(Color.white);
    plot1.setRangeGridlinePaint(Color.white);

    // add a second dataset and renderer...
    XYItemRenderer renderer2 = new XYLineAndShapeRenderer(true, false);
    renderer2.setSeriesStroke(0, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
    renderer2.setSeriesStroke(1, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
    renderer2.setSeriesStroke(2, new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_BEVEL));
    renderer2.setSeriesPaint(0, Color.GREEN);
    renderer2.setSeriesPaint(1, Color.BLACK);
    renderer2.setSeriesPaint(2, Color.CYAN);

    rangeAxis = new NumberAxis("count");
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    XYPlot plot2 = new XYPlot(dataset2, null, rangeAxis, renderer2);
    plot2.setBackgroundPaint(Color.lightGray);
    plot2.setDomainGridlinePaint(Color.white);
    plot2.setRangeGridlinePaint(Color.white);

    CombinedDomainXYPlot cplot = new CombinedDomainXYPlot(domainAxis);
    cplot.add(plot1, 3);
    cplot.add(plot2, 2);
    cplot.setGap(8.0);
    cplot.setDomainGridlinePaint(Color.white);
    cplot.setDomainGridlinesVisible(true);

    // return a new chart containing the overlaid plot...
    JFreeChart chart = new JFreeChart(null, JFreeChart.DEFAULT_TITLE_FONT, cplot, false);
    LegendTitle legend = new LegendTitle(cplot);
    chart.addSubtitle(legend);

    // set background
    chart.setBackgroundPaint(parseColor(statsManager.getChartBackgroundColor()));

    // set chart border
    chart.setPadding(new RectangleInsets(10, 5, 5, 5));
    chart.setBorderVisible(true);
    chart.setBorderPaint(parseColor("#cccccc"));

    // set anti alias
    chart.setAntiAlias(true);

    BufferedImage img = chart.createBufferedImage(width, height);
    final ByteArrayOutputStream out = new ByteArrayOutputStream();
    try {
        ImageIO.write(img, "png", out);
    } catch (IOException e) {
        log.warn("Error occurred while generating SiteStats chart image data", e);
    }
    return out.toByteArray();
}

From source file:UserInterface.SystemAdmin.ReportsJPanel.java

private void usageActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_usageActionPerformed

    int selectedRow = customerTable.getSelectedRow();

    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(null, "Select a customer first");
        return;/*from w  ww  . jav  a 2s.  c o  m*/
    }

    Customer customer = (Customer) customerTable.getValueAt(selectedRow, 0);

    if (customer.getWaterUsageHistory().size() == 0) {
        JOptionPane.showMessageDialog(null, "No water usage yet");
        return;
    }
    DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    for (WaterUsage waterUsage : customer.getWaterUsageHistory()) {
        dataset.setValue(waterUsage.getUsageVolume(), waterUsage.getDate(), "Usage Volume");
    }

    JFreeChart chart = ChartFactory.createBarChart("Customer Water Usage Trends over a period of time",
            "Time of Usage", "Gallons", dataset, PlotOrientation.VERTICAL, true, true, true);
    CategoryPlot p = chart.getCategoryPlot();
    p.setRangeGridlinePaint(Color.cyan);
    ChartFrame frame = new ChartFrame("Bar Char for Weight", chart);

    frame.setVisible(true);
    frame.setSize(450, 350);

}

From source file:ElectionGUI.java

private void loadElectionBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadElectionBtnActionPerformed
    if (!generalPreferencesCheckBox.isSelected()) {
        //Confirmation of discarding an election2D that is not saved
        boolean discard = true;
        if (election2D != null && !saved) {
            int response = JOptionPane.showConfirmDialog(null,
                    "Current " + "election is not saved, are you sure you want to load " + "an election?" + eol
                            + "Press \"No\" to save current " + "election in a file.",
                    "Confirm", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);

            if (response == JOptionPane.NO_OPTION) {
                discard = false;//from w ww  .j ava2s .co  m
            }
        }

        if (discard) {
            JFileChooser fileChooser = new JFileChooser();
            fileChooser.setCurrentDirectory(folder);
            int result = fileChooser.showOpenDialog(this);

            if (result == JFileChooser.APPROVE_OPTION) {
                folder = fileChooser.getCurrentDirectory();
                File selectedFile = fileChooser.getSelectedFile();
                Parse2dElection parser = new Parse2dElection();
                parser.parseFromFile(selectedFile);
                if (parser.getErr() == null) {
                    election2D = parser.getElection();
                    nTxtField.setText(String.valueOf(election2D.getNumberOfVoters()));
                    mTxtField.setText(String.valueOf(election2D.getNumberOfCandidates()));
                    kTxtField.setText(String.valueOf(election2D.getCommitteeSize()));
                    xLimit = parser.getxLimit();
                    xLimitTxtField.setText(String.valueOf(xLimit));
                    yLimit = parser.getyLimit();
                    yLimitTxtField.setText(String.valueOf(yLimit));
                    nClusters = parser.getnClusters();
                    nClusterTxtField.setText(String.valueOf(nClusters));
                    mClusters = parser.getmClusters();
                    mClusterTxtField.setText(String.valueOf(mClusters));

                    systemTxt.append("-Election loaded." + eol);
                    plotResultsBtn.setEnabled(true);
                    saveElectionBtn.setEnabled(true);
                    consistencyBtn.setEnabled(false);
                    saved = true;
                } else {
                    systemTxt.append(parser.getErr() + eol);
                }
            } else if (result == JFileChooser.CANCEL_OPTION) {
                systemTxt.append("-Loading cancelled." + eol);
            }
        }
    } else {
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.setCurrentDirectory(folder);
        int result = fileChooser.showOpenDialog(this);

        if (result == JFileChooser.APPROVE_OPTION) {
            folder = fileChooser.getCurrentDirectory();
            File selectedFile = fileChooser.getSelectedFile();
            ParseGeneralElection parser = new ParseGeneralElection();
            parser.parseFromFile(selectedFile);

            if (parser.getErr() == null) {
                ArrayList<Voter> voters = parser.getVoters();
                ArrayList<Candidate> candidates = parser.getCandidates();
                n = voters.size();
                m = candidates.size();
                try {
                    int x = Integer.parseInt(kTxtField.getText());
                    if (x < 1 || x > 100 || x > m) {
                        throw (new Exception());
                    }
                    k = x;
                } catch (Exception e) {
                    kTxtField.setBackground(Color.cyan);
                    kTxtField.setText("1");
                    k = 1;
                    systemTxt.append("-Committee size was invalid. It has " + "been set equal to 1." + eol);
                }

                electionGP = new Election(k, voters, candidates, false);
                plotResultsBtn.setEnabled(true);
                consistencyBtn.setEnabled(false);
                systemTxt
                        .append("-Election " + selectedFile.getName() + " has been loaded successfully." + eol);
            } else {
                systemTxt.append(parser.getErr() + eol);
            }
        } else if (result == JFileChooser.CANCEL_OPTION) {
            systemTxt.append("-Loading cancelled." + eol);
        }
    }
}

From source file:UserInterface.SystemAdmin.ReportsJPanel.java

private void flowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_flowActionPerformed
    int selectedRow = customerTable.getSelectedRow();
    if (selectedRow < 0) {
        JOptionPane.showMessageDialog(null, "Select a customer first");
        return;/* w  w  w . java2  s.  c  o  m*/
    }

    Customer customer = (Customer) customerTable.getValueAt(selectedRow, 0);

    DefaultCategoryDataset dataset = new DefaultCategoryDataset();
    for (SensorValue sensorValue : customer.getTargetSensor().getSensorValueList()) {
        dataset.addValue(sensorValue.getFlowrate(), "Date", sensorValue.getDate());
    }
    if (customer.getTargetSensor().getSensorValueList().size() == 1) {
        JFreeChart chart = ChartFactory.createBarChart(
                "Customer's water flowrate variation over a period of time", "Time of Usage",
                "FlowRate(gallons/sec)", dataset, PlotOrientation.VERTICAL, true, true, true);
        CategoryPlot p = chart.getCategoryPlot();
        p.setRangeGridlinePaint(Color.cyan);
        ChartFrame frame = new ChartFrame("Bar Char for Weight", chart);

        frame.setVisible(true);
        frame.setSize(450, 350);
    } else {
        JFreeChart chart = ChartFactory.createLineChart(
                "Customer's water flowrate variation over a period of time", "Time of Usage",
                "FlowRate(gallons/sec)", dataset, PlotOrientation.VERTICAL, true, true, true);
        CategoryPlot p = chart.getCategoryPlot();
        p.setRangeGridlinePaint(Color.cyan);
        ChartFrame frame = new ChartFrame("Bar Char for Weight", chart);
        RefineryUtilities.centerFrameOnScreen(frame);

        frame.setVisible(true);
        frame.setSize(450, 350);
    }

}

From source file:org.sakaiproject.sitestats.impl.chart.ChartServiceImpl.java

private static Color parseColor(String color) {
    if (color != null) {
        if (color.trim().startsWith("#")) {
            // HTML colors (#FFFFFF format)
            return new Color(Integer.parseInt(color.substring(1), 16));
        } else if (color.trim().startsWith("rgb")) {
            // HTML colors (rgb(255, 255, 255) format)
            String values = color.substring(color.indexOf("(") + 1, color.indexOf(")"));
            String rgb[] = values.split(",");
            return new Color(Integer.parseInt(rgb[0].trim()), Integer.parseInt(rgb[1].trim()),
                    Integer.parseInt(rgb[2].trim()));
        } else {/*from www .  j av  a 2 s .  c  om*/
            // Colors by name
            if (color.equalsIgnoreCase("black"))
                return Color.black;
            if (color.equalsIgnoreCase("grey"))
                return Color.gray;
            if (color.equalsIgnoreCase("yellow"))
                return Color.yellow;
            if (color.equalsIgnoreCase("green"))
                return Color.green;
            if (color.equalsIgnoreCase("blue"))
                return Color.blue;
            if (color.equalsIgnoreCase("red"))
                return Color.red;
            if (color.equalsIgnoreCase("orange"))
                return Color.orange;
            if (color.equalsIgnoreCase("cyan"))
                return Color.cyan;
            if (color.equalsIgnoreCase("magenta"))
                return Color.magenta;
            if (color.equalsIgnoreCase("darkgray"))
                return Color.darkGray;
            if (color.equalsIgnoreCase("lightgray"))
                return Color.lightGray;
            if (color.equalsIgnoreCase("pink"))
                return Color.pink;
            if (color.equalsIgnoreCase("white"))
                return Color.white;
        }
    }
    LOG.info("Unable to parse body background-color (color:" + color + "). Assuming white.");
    return Color.white;
}

From source file:org.jfree.chart.demo.JFreeChartDemoBase.java

/**
 * Displays an XY chart that is periodically updated by a background thread.  This is to
 * demonstrate the event notification system that automatically updates charts as required.
 *
 * @return a chart.//  w  w  w .  j a  va 2s  . co  m
 */
public JFreeChart createCombinedAndOverlaidDynamicXYChart() {

    // chart title and axis labels...
    final String title = this.resources.getString("combined.dynamic.title");
    final String subtitleStr = this.resources.getString("combined.dynamic.subtitle");
    final String domainAxisLabel = this.resources.getString("combined.dynamic.domain");
    final String[] ranges = this.resources.getStringArray("combined.dynamic.ranges");

    // setup sample base 2-series dataset
    final SampleXYDataset data = new SampleXYDataset();

    // create some SubSeriesDatasets and CombinedDatasets to test events
    final XYDataset series0 = new SubSeriesDataset(data, 0);
    final XYDataset series1 = new SubSeriesDataset(data, 1);

    final CombinedDataset combinedData = new CombinedDataset();
    combinedData.add(series0);
    combinedData.add(series1);

    // create common time axis
    final NumberAxis timeAxis = new NumberAxis(domainAxisLabel);
    timeAxis.setTickMarksVisible(true);
    timeAxis.setAutoRangeIncludesZero(false);

    // make one vertical axis for each (vertical) chart
    final NumberAxis[] valueAxis = new NumberAxis[4];
    for (int i = 0; i < valueAxis.length; i++) {
        valueAxis[i] = new NumberAxis(ranges[i]);
        valueAxis[i].setAutoRangeIncludesZero(false);
    }

    final CombinedDomainXYPlot plot = new CombinedDomainXYPlot(timeAxis);

    // add subplot1...
    final XYItemRenderer renderer0 = new StandardXYItemRenderer();
    final XYPlot subplot0 = new XYPlot(series0, null, valueAxis[0], renderer0);
    plot.add(subplot0, 1);

    // add subplot2...
    final XYItemRenderer renderer1 = new StandardXYItemRenderer();
    final XYPlot subplot1 = new XYPlot(series1, null, valueAxis[1], renderer1);
    plot.add(subplot1, 1);

    // add subplot3...
    final XYPlot subplot2 = new XYPlot(series0, null, valueAxis[2], new StandardXYItemRenderer());
    subplot2.setDataset(1, series1);
    subplot2.setRenderer(1, new StandardXYItemRenderer());
    plot.add(subplot2, 1);

    // add subplot4...
    final XYItemRenderer renderer3 = new StandardXYItemRenderer();
    final XYPlot subplot3 = new XYPlot(data, null, valueAxis[3], renderer3);
    plot.add(subplot3, 1);

    final JFreeChart chart = new JFreeChart(title, JFreeChart.DEFAULT_TITLE_FONT, plot, true);

    // then customise it a little...
    final TextTitle subtitle = new TextTitle(subtitleStr, new Font("SansSerif", Font.BOLD, 12));
    chart.addSubtitle(subtitle);
    chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, 1000, Color.cyan));

    // setup thread to update base Dataset
    final SampleXYDatasetThread update = new SampleXYDatasetThread(data);
    final Thread thread = new Thread(update);
    thread.start();

    return chart;

}

From source file:org.sakaiproject.sitestats.impl.ServerWideReportManagerImpl.java

public static Color parseColor(String color) {
    if (color != null) {
        if (color.trim().startsWith("#")) {
            // HTML colors (#FFFFFF format)
            return new Color(Integer.parseInt(color.substring(1), 16));
        } else if (color.trim().startsWith("rgb")) {
            // HTML colors (rgb(255, 255, 255) format)
            String values = color.substring(color.indexOf("(") + 1, color.indexOf(")"));
            String rgb[] = values.split(",");
            return new Color(Integer.parseInt(rgb[0].trim()), Integer.parseInt(rgb[1].trim()),
                    Integer.parseInt(rgb[2].trim()));
        } else {//from  w  w w.j  ava 2  s . c o  m
            // Colors by name
            if (color.equalsIgnoreCase("black"))
                return Color.black;
            if (color.equalsIgnoreCase("grey"))
                return Color.gray;
            if (color.equalsIgnoreCase("yellow"))
                return Color.yellow;
            if (color.equalsIgnoreCase("green"))
                return Color.green;
            if (color.equalsIgnoreCase("blue"))
                return Color.blue;
            if (color.equalsIgnoreCase("red"))
                return Color.red;
            if (color.equalsIgnoreCase("orange"))
                return Color.orange;
            if (color.equalsIgnoreCase("cyan"))
                return Color.cyan;
            if (color.equalsIgnoreCase("magenta"))
                return Color.magenta;
            if (color.equalsIgnoreCase("darkgray"))
                return Color.darkGray;
            if (color.equalsIgnoreCase("lightgray"))
                return Color.lightGray;
            if (color.equalsIgnoreCase("pink"))
                return Color.pink;
            if (color.equalsIgnoreCase("white"))
                return Color.white;
        }
    }
    log.info("Unable to parse body background-color (color:" + color + "). Assuming white.");
    return Color.white;
}

From source file:com.att.aro.diagnostics.GraphPanel.java

/**
 * Creating Alarm triggered data for graph plot
 *///  w  w  w. j  a va2 s  .c o m
private static void populateAlarmPlot(XYPlot plot, TraceData.Analysis analysis) {

    final XYIntervalSeriesCollection alarmDataCollection = new XYIntervalSeriesCollection();
    if (analysis != null) {

        // Remove old annotation from previous plots
        Iterator<XYPointerAnnotation> pointers = pointerAnnotation.iterator();
        while (pointers.hasNext()) {
            plot.removeAnnotation(pointers.next());
        }
        pointerAnnotation.clear();

        final Map<AlarmType, XYIntervalSeries> seriesMap = new EnumMap<AlarmType, XYIntervalSeries>(
                AlarmType.class);
        for (AlarmType eventType : AlarmType.values()) {
            XYIntervalSeries series = new XYIntervalSeries(eventType);
            seriesMap.put(eventType, series);
            alarmDataCollection.addSeries(series);
        }
        final List<AlarmInfo> alarmInfos = analysis.getAlarmInfos();
        final Map<Double, AlarmInfo> eventMap = new HashMap<Double, AlarmInfo>();
        final Map<Double, ScheduledAlarmInfo> eventMapPending = new HashMap<Double, ScheduledAlarmInfo>();
        List<ScheduledAlarmInfo> pendingAlarms = getHasFiredAlarms(analysis.getScheduledAlarms());
        Iterator<ScheduledAlarmInfo> iterPendingAlarms = pendingAlarms.iterator();
        double firedTime = 0;
        while (iterPendingAlarms.hasNext()) {
            ScheduledAlarmInfo scheduledEvent = iterPendingAlarms.next();
            AlarmType pendingAlarmType = scheduledEvent.getAlarmType();
            if (pendingAlarmType != null) {
                firedTime = (scheduledEvent.getTimeStamp() - scheduledEvent.getRepeatInterval()) / 1000;
                seriesMap.get(pendingAlarmType).add(firedTime, firedTime, firedTime, 1, 0.8, 1);
                eventMapPending.put(firedTime, scheduledEvent);
                logger.fine("populateAlarmScheduledPlot type:\n" + pendingAlarmType + "\ntime "
                        + scheduledEvent.getTimeStamp() + "\nrepeating " + firedTime);
            }
        }

        Iterator<AlarmInfo> iter = alarmInfos.iterator();
        while (iter.hasNext()) {
            AlarmInfo currEvent = iter.next();
            if (currEvent != null) {
                AlarmType alarmType = currEvent.getAlarmType();
                if (alarmType != null) {
                    firedTime = currEvent.getTimeStamp() / 1000;

                    /*
                     * Catching any alarms align to quanta as being
                     * inexactRepeating alarms
                     */
                    if ((currEvent.getTimestampElapsed() / 1000) % 900 < 1) {
                        seriesMap.get(alarmType).add(firedTime, firedTime, firedTime, 1, 0, 0.7);

                        // Adding an arrow to mark these inexactRepeating alarms
                        XYPointerAnnotation xypointerannotation = new XYPointerAnnotation(alarmType.name(),
                                firedTime, 0.6, 3.92699082D);
                        xypointerannotation.setBaseRadius(20D);
                        xypointerannotation.setTipRadius(1D);
                        pointerAnnotation.add(xypointerannotation);
                        plot.addAnnotation(xypointerannotation);

                        logger.info("SetInexactRepeating alarm type: " + alarmType + " time " + firedTime
                                + " epoch " + currEvent.getTimestampEpoch() + " elapsed:\n"
                                + currEvent.getTimestampElapsed() / 1000);
                    } else {
                        seriesMap.get(alarmType).add(firedTime, firedTime, firedTime, 1, 0, 0.5);
                    }
                    eventMap.put(firedTime, currEvent);
                }
            }
        }
        XYItemRenderer renderer = plot.getRenderer();
        renderer.setSeriesPaint(alarmDataCollection.indexOf(AlarmType.RTC_WAKEUP), Color.red);

        renderer.setSeriesPaint(alarmDataCollection.indexOf(AlarmType.RTC), Color.pink);

        renderer.setSeriesPaint(alarmDataCollection.indexOf(AlarmType.ELAPSED_REALTIME_WAKEUP), Color.blue);

        renderer.setSeriesPaint(alarmDataCollection.indexOf(AlarmType.ELAPSED_REALTIME), Color.cyan);

        renderer.setSeriesPaint(alarmDataCollection.indexOf(AlarmType.UNKNOWN), Color.black);

        // Assign ToolTip to renderer
        renderer.setBaseToolTipGenerator(new XYToolTipGenerator() {
            @Override
            public String generateToolTip(XYDataset dataset, int series, int item) {
                AlarmInfo info = eventMap.get(dataset.getX(series, item));
                Date epochTime = new Date();
                if (info != null) {

                    epochTime.setTime((long) info.getTimestampEpoch());

                    StringBuffer displayInfo = new StringBuffer(rb.getString("alarm.tooltip.prefix"));
                    displayInfo.append(MessageFormat.format(rb.getString("alarm.tooltip.content"),
                            info.getAlarmType(), info.getTimeStamp() / 1000, epochTime.toString()));
                    if ((info.getTimestampElapsed() / 1000) % 900 < 1) {
                        displayInfo.append(rb.getString("alarm.tooltip.setInexactRepeating"));
                    }
                    displayInfo.append(rb.getString("alarm.tooltip.suffix"));
                    return displayInfo.toString();
                }
                ScheduledAlarmInfo infoPending = eventMapPending.get(dataset.getX(series, item));
                if (infoPending != null) {

                    epochTime.setTime(
                            (long) (infoPending.getTimestampEpoch() - infoPending.getRepeatInterval()));

                    StringBuffer displayInfo = new StringBuffer(rb.getString("alarm.tooltip.prefix"));
                    displayInfo.append(MessageFormat.format(rb.getString("alarm.tooltip.contentWithName"),
                            infoPending.getAlarmType(),
                            (infoPending.getTimeStamp() - infoPending.getRepeatInterval()) / 1000,
                            epochTime.toString(), infoPending.getApplication(),
                            infoPending.getRepeatInterval() / 1000));
                    displayInfo.append(rb.getString("alarm.tooltip.suffix"));
                    return displayInfo.toString();
                }
                return null;
            }
        });

    }

    plot.setDataset(alarmDataCollection);
}