private void invalidate() { if (diagram != null) { diagram.invalidate(); } } }
public void disableChangeEventMerging() { final boolean changeEventsMerged = numMergedChangeEvents > 0; numMergedChangeEvents = -1; if (changeEventsMerged) { invalidate(); } }
/** * Invoked when the component's size changes. */ @Override public void componentResized(ComponentEvent e) { if (diagram != null) { diagram.invalidate(); } } });
protected void invalidate() { if (diagram != null) { diagram.invalidate(); } }
public void setDrawGrid(boolean drawGrid) { if (this.drawGrid != drawGrid) { this.drawGrid = drawGrid; invalidate(); } }
public void contentsChanged(ListDataEvent e) { endmemberDiagram.invalidate(); } }
public void intervalAdded(ListDataEvent e) { endmemberDiagram.invalidate(); }
public void intervalRemoved(ListDataEvent e) { endmemberDiagram.invalidate(); }
public void setFont(Font font) { if (!ObjectUtils.equalObjects(this.font, font)) { this.font = font; invalidate(); } }
public void setTextGap(int textGap) { if (!ObjectUtils.equalObjects(this.font, font)) { this.textGap = textGap; invalidate(); } }
public void setMinorGridColor(Color minorGridColor) { if (!ObjectUtils.equalObjects(this.minorGridColor, minorGridColor)) { this.minorGridColor = minorGridColor; invalidate(); } }
public void setBackgroundColor(Color backgroundColor) { this.backgroundColor = backgroundColor; if (!ObjectUtils.equalObjects(this.backgroundColor, backgroundColor)) { this.backgroundColor = backgroundColor; invalidate(); } }
public void setMajorGridColor(Color majorGridColor) { if (!ObjectUtils.equalObjects(this.majorGridColor, majorGridColor)) { this.majorGridColor = majorGridColor; invalidate(); } }
public void setForegroundColor(Color foregroundColor) { if (!ObjectUtils.equalObjects(this.foregroundColor, foregroundColor)) { this.foregroundColor = foregroundColor; invalidate(); } }
public void removeAllGraphs() { if (getGraphCount() > 0) { for (DiagramGraph graph : graphs) { graph.setDiagram(null); } graphs.clear(); invalidate(); } }
public void removeGraph(DiagramGraph graph) { Guardian.assertNotNull("graph", graph); if (graphs.remove(graph)) { graph.setDiagram(null); invalidate(); } }
public void addGraph(DiagramGraph graph) { Guardian.assertNotNull("graph", graph); if (graphs.add(graph)) { graph.setDiagram(this); invalidate(); } }
public void setYAxis(DiagramAxis yAxis) { Guardian.assertNotNull("yAxis", yAxis); if (this.yAxis != yAxis) { if (this.yAxis != null) { this.yAxis.setDiagram(null); } this.yAxis = yAxis; this.yAxis.setDiagram(this); invalidate(); } }
public void setXAxis(DiagramAxis xAxis) { Guardian.assertNotNull("xAxis", xAxis); if (this.xAxis != xAxis) { if (this.xAxis != null) { this.xAxis.setDiagram(null); } this.xAxis = xAxis; this.xAxis.setDiagram(this); invalidate(); } }
public void setSelectedEndmemberIndex(int index) { int oldIndex = selectedEndmemberIndex; if (oldIndex == index) { return; } if (oldIndex >= 0 && endmemberDiagram.getGraphCount() > 0) { final DiagramGraph endmemberGraph = endmemberDiagram.getGraph(oldIndex); ((DefaultDiagramGraphStyle) endmemberGraph.getStyle()).setOutlineStroke(new BasicStroke(1.0f)); } selectedEndmemberIndex = index; if (selectedEndmemberIndex >= 0 && endmemberDiagram.getGraphCount() > 0) { final DiagramGraph endmemberGraph = endmemberDiagram.getGraph(selectedEndmemberIndex); ((DefaultDiagramGraphStyle) endmemberGraph.getStyle()).setOutlineStroke(new BasicStroke(2.0f)); } endmemberDiagram.invalidate(); propertyChangeSupport.firePropertyChange("selectedEndmemberIndex", oldIndex, selectedEndmemberIndex); }