/** * */ public mxGraphOutline(mxGraphComponent graphComponent) { addComponentListener(componentHandler); addMouseMotionListener(tracker); addMouseListener(tracker); setGraphComponent(graphComponent); setEnabled(true); setOpaque(true); }
/** * Checks if the triple buffer exists and creates a new one if * it does not. Also compares the size of the buffer with the * size of the graph and drops the buffer if it has a * different size. */ public void checkTripleBuffer() { if (tripleBuffer != null) { if (tripleBuffer.getWidth() != getWidth() || tripleBuffer.getHeight() != getHeight()) { // Resizes the buffer (destroys existing and creates new) destroyTripleBuffer(); } } if (tripleBuffer == null) { createTripleBuffer(getWidth(), getHeight()); } }
/** * Fires a property change event for <code>fitPage</code>. * * @param fitPage the fitPage to set */ public void setFitPage(boolean fitPage) { boolean oldValue = this.fitPage; this.fitPage = fitPage; if (updateScaleAndTranslate()) { repaintBuffer = true; updateFinder(false); } firePropertyChange("fitPage", oldValue, fitPage); }
/** * Fires a property change event for <code>drawLabels</code>. * * @param drawLabels the drawLabels to set */ public void setDrawLabels(boolean drawLabels) { boolean oldValue = this.drawLabels; this.drawLabels = drawLabels; repaintTripleBuffer(null); firePropertyChange("drawLabels", oldValue, drawLabels); }
/** * Fires a property change event for <code>tripleBuffered</code>. * * @param tripleBuffered the tripleBuffered to set */ public void setTripleBuffered(boolean tripleBuffered) { boolean oldValue = this.tripleBuffered; this.tripleBuffered = tripleBuffered; if (!tripleBuffered) { destroyTripleBuffer(); } firePropertyChange("tripleBuffered", oldValue, tripleBuffered); }
paintBackground(g); checkTripleBuffer(); destroyTripleBuffer(); repaintTripleBuffer(null); repaintClip.setHeight(repaintClip.getHeight() * scale); repaintTripleBuffer(repaintClip.getRectangle()); paintGraph(g); paintForeground(g);
if (updateScaleAndTranslate()) repaint(); firePropertyChange("graphComponent", oldValue, graphComponent);
mxUtils.fillClippedRect(g, 0, 0, getWidth(), getHeight()); g.setColor(getBackground()); mxUtils.fillClippedRect(g, 0, 0, getWidth(), getHeight());
/** * */ public void setVisible(boolean visible) { super.setVisible(visible); // Frees memory if the outline is hidden if (!visible) { destroyTripleBuffer(); } }
paintBackground(g); checkTripleBuffer(); destroyTripleBuffer(); repaintTripleBuffer(null); repaintClip.setHeight(repaintClip.getHeight() * scale); repaintTripleBuffer(repaintClip.getRectangle()); paintGraph(g); paintForeground(g);
if (updateScaleAndTranslate()) repaint(); firePropertyChange("graphComponent", oldValue, graphComponent);
mxUtils.fillClippedRect(g, 0, 0, getWidth(), getHeight()); g.setColor(getBackground()); mxUtils.fillClippedRect(g, 0, 0, getWidth(), getHeight());
/** * Fires a property change event for <code>antiAlias</code>. * * @param antiAlias the antiAlias to set */ public void setAntiAlias(boolean antiAlias) { boolean oldValue = this.antiAlias; this.antiAlias = antiAlias; repaintTripleBuffer(null); firePropertyChange("antiAlias", oldValue, antiAlias); }
/** * Fires a property change event for <code>tripleBuffered</code>. * * @param tripleBuffered the tripleBuffered to set */ public void setTripleBuffered(boolean tripleBuffered) { boolean oldValue = this.tripleBuffered; this.tripleBuffered = tripleBuffered; if (!tripleBuffered) { destroyTripleBuffer(); } firePropertyChange("tripleBuffered", oldValue, tripleBuffered); }
/** * */ public void setVisible(boolean visible) { super.setVisible(visible); // Frees memory if the outline is hidden if (!visible) { destroyTripleBuffer(); } }
/** * */ public mxGraphOutline(mxGraphComponent graphComponent) { addComponentListener(componentHandler); addMouseMotionListener(tracker); addMouseListener(tracker); setGraphComponent(graphComponent); setEnabled(true); setOpaque(true); }
/** * Checks if the triple buffer exists and creates a new one if * it does not. Also compares the size of the buffer with the * size of the graph and drops the buffer if it has a * different size. */ public void checkTripleBuffer() { if (tripleBuffer != null) { if (tripleBuffer.getWidth() != getWidth() || tripleBuffer.getHeight() != getHeight()) { // Resizes the buffer (destroys existing and creates new) destroyTripleBuffer(); } } if (tripleBuffer == null) { createTripleBuffer(getWidth(), getHeight()); } }
/** * Fires a property change event for <code>fitPage</code>. * * @param fitPage the fitPage to set */ public void setFitPage(boolean fitPage) { boolean oldValue = this.fitPage; this.fitPage = fitPage; if (updateScaleAndTranslate()) { repaintBuffer = true; updateFinder(false); } firePropertyChange("fitPage", oldValue, fitPage); }