private void paintRows(Graphics g, ColorsDispatcher dispatcher, Iterator<Entry<String, AbstractGraphRow>> it, boolean rowsWithLabel) { while (it.hasNext()) { Entry<String, AbstractGraphRow> row = it.next(); if (row.getValue().isDrawOnChart() && row.getValue().isDrawValueLabel() == rowsWithLabel) { //eto Color color = reSetColors ? dispatcher.getNextColor() : row.getValue().getColor(); Color color = row.getValue().getColor() != null ? row.getValue().getColor() : dispatcher.getNextColor(); paintRow(g, row.getValue(), row.getKey(), color); } } }
@Override public void clearData() { startTimeRef = 0; clearRowsFromCompositeModels(getModel().getName()); model.clear(); modelAggregate.clear(); colors.reset(); graphPanel.clearRowsTab(); updateGui(); repaint(); }
@Override public void clearData() { startTimeRef = 0; clearRowsFromCompositeModels(getModel().getName()); model.clear(); modelAggregate.clear(); colors.reset(); graphPanel.clearRowsTab(); updateGui(); repaint(); }
private void paintRows(Graphics g, ColorsDispatcher dispatcher, Iterator<Entry<String, AbstractGraphRow>> it, boolean rowsWithLabel) { while (it.hasNext()) { Entry<String, AbstractGraphRow> row = it.next(); if (row.getValue().isDrawOnChart() && row.getValue().isDrawValueLabel() == rowsWithLabel) { //eto Color color = reSetColors ? dispatcher.getNextColor() : row.getValue().getColor(); Color color = row.getValue().getColor() != null ? row.getValue().getColor() : dispatcher.getNextColor(); paintRow(g, row.getValue(), row.getKey(), color); } } }
@Override public void mouseClicked(MouseEvent e) { log.debug("mouse click [" + e.getX() + "," + e.getY() + "] ClickCount[" + e.getClickCount() + "]"); if (e.getClickCount() == 2) { for (Entry<String, AbstractGraphRow> row : model.entrySet()) { AbstractGraphRow agr = row.getValue(); if (agr != null) { Rectangle r = agr.getLegendColorBox(); if (r != null) { Rectangle slightlyLargerTarget = r.getBounds(); slightlyLargerTarget.height += 4; slightlyLargerTarget.width += 2; boolean hit = slightlyLargerTarget.contains(e.getPoint()); log.debug("hit [" + hit + "] rectangle [" + slightlyLargerTarget.toString() + "] point [" + e.getPoint() + "]"); if (hit) { row.getValue().setColor(colors.getNextColor()); } } } } updateGui(null); } //repaint(); } }
@Override public void mouseClicked(MouseEvent e) { log.debug("mouse click [" + e.getX() + "," + e.getY() + "] ClickCount[" + e.getClickCount() + "]"); if (e.getClickCount() == 2) { for (Entry<String, AbstractGraphRow> row : model.entrySet()) { AbstractGraphRow agr = row.getValue(); if (agr != null) { Rectangle r = agr.getLegendColorBox(); if (r != null) { Rectangle slightlyLargerTarget = r.getBounds(); slightlyLargerTarget.height += 4; slightlyLargerTarget.width += 2; boolean hit = slightlyLargerTarget.contains(e.getPoint()); log.debug("hit [" + hit + "] rectangle [" + slightlyLargerTarget.toString() + "] point [" + e.getPoint() + "]"); if (hit) { row.getValue().setColor(colors.getNextColor()); } } } } updateGui(null); } //repaint(); } }
if (!model.containsKey(rowName)) { CompositeGraphRow compositeRow = new CompositeGraphRow(row); compositeRow.setColor(colors.getNextColor()); model.put(rowName, compositeRow);
row = it.next(); Color color = row.getValue().getColor() != null ? row.getValue().getColor() : colors.getNextColor();
row = it.next(); Color color = row.getValue().getColor() != null ? row.getValue().getColor() : colors.getNextColor();
log.debug("%#@ Found null row displayLabel[" + displayLabel + "] and label [" + label + "]"); row.setColor(overrideColor != null ? overrideColor : colors.getNextColor()); if (log.isDebugEnabled()) log.debug("%#@ new row.getColor() [" + (row.getColor() == null ? "null" : row.getColor().toString()) + "]");
log.debug("%#@ Found null row displayLabel[" + displayLabel + "] and label [" + label + "]"); row.setColor(overrideColor != null ? overrideColor : colors.getNextColor()); if (log.isDebugEnabled()) log.debug("%#@ new row.getColor() [" + (row.getColor() == null ? "null" : row.getColor().toString()) + "]");