private Stroke getLineStroke() { if (chartSettings.getLineWidth() > 1) { lineStroke = new BasicStroke(chartSettings.getLineWidth(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); } else { lineStroke = new BasicStroke(chartSettings.getLineWidth()); } return lineStroke; } }
private Stroke getLineStroke() { if (chartSettings.getLineWidth() > 1) { lineStroke = new BasicStroke(chartSettings.getLineWidth(), BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND); } else { lineStroke = new BasicStroke(chartSettings.getLineWidth()); } return lineStroke; } }
@Override protected void processPoint(Graphics2D g2d, int granulation) { if(chartSettings.getLineWidth() == 0) return; boolean valid = isChartPointValid(x, y); if (mustDrawFirstZeroingLine && valid) { mustDrawFirstZeroingLine = false; prevX = x; } if (prevX >= 0) { if (valid) { if (prevY >= chartRect.y && y >= chartRect.y) { g2d.drawLine(prevX, prevY, x, y); } else if (prevY >= chartRect.y && y < chartRect.y) { int x1 = (x - prevX) * (chartRect.y - prevY) / (y - prevY) + prevX; g2d.drawLine(prevX, prevY, x1, chartRect.y); } else if (prevY < chartRect.y && y >= chartRect.y) { int x1 = (x - prevX) * (chartRect.y - prevY) / (y - prevY) + prevX; g2d.drawLine(x1, chartRect.y, x, y); } } } } }
@Override protected void processPoint(Graphics2D g2d, int granulation) { if(chartSettings.getLineWidth() == 0) return; boolean valid = isChartPointValid(x, y); if (mustDrawFirstZeroingLine && valid) { mustDrawFirstZeroingLine = false; prevX = x; } if (prevX >= 0) { if (valid) { if (prevY >= chartRect.y && y >= chartRect.y) { g2d.drawLine(prevX, prevY, x, y); } else if (prevY >= chartRect.y && y < chartRect.y) { int x1 = (x - prevX) * (chartRect.y - prevY) / (y - prevY) + prevX; g2d.drawLine(prevX, prevY, x1, chartRect.y); } else if (prevY < chartRect.y && y >= chartRect.y) { int x1 = (x - prevX) * (chartRect.y - prevY) / (y - prevY) + prevX; g2d.drawLine(x1, chartRect.y, x, y); } } } } }
private void processFinalLines(AbstractGraphRow row, Graphics2D g2d) { if (chartSettings.getLineWidth() == 0) { return; } Stroke oldStroke = null; if (row.isDrawLine() && chartSettings.isDrawFinalZeroingLines()) { if (row.isDrawThickLines()) { oldStroke = g2d.getStroke(); g2d.setStroke(chartSettings.getThickStroke()); } g2d.drawLine(prevX, Math.max(prevY, chartRect.y), (int) (prevX + dxForDVal), chartRect.y + chartRect.height); if (row.isDrawThickLines()) { g2d.setStroke(oldStroke); } } }
private void processFinalLines(AbstractGraphRow row, Graphics2D g2d) { if (chartSettings.getLineWidth() == 0) { return; } Stroke oldStroke = null; if (row.isDrawLine() && chartSettings.isDrawFinalZeroingLines()) { if (row.isDrawThickLines()) { oldStroke = g2d.getStroke(); g2d.setStroke(chartSettings.getThickStroke()); } g2d.drawLine(prevX, Math.max(prevY, chartRect.y), (int) (prevX + dxForDVal), chartRect.y + chartRect.height); if (row.isDrawThickLines()) { g2d.setStroke(oldStroke); } } }
@Override protected void postPaintRow(AbstractGraphRow row, Graphics2D g2d) { if(chartSettings.getLineWidth() == 0) return;
@Override protected void postPaintRow(AbstractGraphRow row, Graphics2D g2d) { if(chartSettings.getLineWidth() == 0) return;
jCheckBoxDrawMarkers.setSelected(!markerOptionDisabled); float width = parent.getGraphPanelChart().getChartSettings().getLineWidth(); if (width % 1 == 0) { jComboBoxLineWidth.setSelectedItem((int) width);
jCheckBoxDrawMarkers.setSelected(!markerOptionDisabled); float width = parent.getGraphPanelChart().getChartSettings().getLineWidth(); if (width % 1 == 0) { jComboBoxLineWidth.setSelectedItem((int) width);