⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstractrenderer.java

📁 JFreeChartweb图表
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
            anchor = this.baseItemLabelRotationAnchor;
        }
        return anchor;

    }
    
    /**
     * Sets the rotation anchor for the item labels in ALL series.
     * 
     * @param anchor  the anchor (<code>null</code> permitted).
     */
    public void setItemLabelRotationAnchor(TextAnchor anchor) {
        this.itemLabelRotationAnchor = anchor;
    }

    /**
     * Sets the item label rotation anchor point for a series.
     * 
     * @param series  the series.
     * @param anchor  the anchor point.
     */
    public void setSeriesItemLabelRotationAnchor(int series, TextAnchor anchor) {
        this.itemLabelRotationAnchorList.set(series, anchor);
    }

    /**
     * Returns the base item label rotation anchor point.
     * 
     * @return The anchor point.
     */
    public TextAnchor getBaseItemLabelRotationAnchor() {
        return this.baseItemLabelRotationAnchor;
    }

    /**
     * Sets the base item label rotation anchor point.
     * 
     * @param anchor  the anchor point.
     */
    public void setBaseItemLabelRotationAnchor(TextAnchor anchor) {
        this.baseItemLabelRotationAnchor = anchor;
    }

    // ANGLE...

    /**
     * Returns the angle for an item label.
     * 
     * @param row  the row.
     * @param column  the column.
     * 
     * @return The angle (in radians).
     */
    public Number getItemLabelAngle(int row, int column) {
        return getSeriesItemLabelAngle(row);
    }

    /**
     * Returns the angle for all the item labels in a series.
     * 
     * @param series  the series.
     * 
     * @return The angle (in radians).
     */
    public Number getSeriesItemLabelAngle(int series) {

        // return the override, if there is one...
        if (this.itemLabelAngle != null) {
            return this.itemLabelAngle;
        }

        // otherwise look up the angle table
        Number angle = (Number) this.itemLabelAngleList.get(series);
        if (angle == null) {
            angle = this.baseItemLabelAngle;
        }
        return angle;

    }

    /**
     * Sets the angle for the item labels in ALL series (optional).
     * 
     * @param angle  the angle (<code>null</code> permitted).
     */
    public void setItemLabelAngle(Number angle) {
        this.itemLabelAngle = angle;
    }

    /**
     * Sets the angle for all item labels in a series.
     * 
     * @param series  the series.
     * @param angle  the angle.
     */
    public void setSeriesAngle(int series, Number angle) {
        this.itemLabelAngleList.set(series, angle);
    }

    /**
     * Returns the base item label angle.
     * 
     * @return The angle.
     */
    public Number getBaseItemLabelAngle() {
        return this.baseItemLabelAngle;
    }

    /**
     * Sets the base item label angle.
     * 
     * @param angle  the angle.
     */
    public void setBaseAngle(Number angle) {
        this.baseItemLabelAngle = angle;
    }

    /**
     * Adds a property change listener to the renderer.
     *
     * @param listener  the listener.
     */
    public void addPropertyChangeListener(PropertyChangeListener listener) {
        listeners.addPropertyChangeListener(listener);
    }

    /**
     * Removes a property change listener from the renderer.
     *
     * @param listener  the listener.
     */
    public void removePropertyChangeListener(PropertyChangeListener listener) {
        listeners.removePropertyChangeListener(listener);
    }

    /**
     * Notifies registered listeners that a property of the renderer has changed.
     *
     * @param propertyName  the name of the property.
     * @param oldValue  the old value.
     * @param newValue  the new value.
     */
    protected void firePropertyChanged(String propertyName, Object oldValue, Object newValue) {
        listeners.firePropertyChange(propertyName, oldValue, newValue);
    }

    /**
     * Tests this renderer for equality with another object.
     *
     * @param obj  the object.
     *
     * @return <code>true</code> or <code>false</code>.
     */
    public boolean equals(Object obj) {

        if (obj == null) {
            return false;
        }

        if (obj == this) {
            return true;
        }

        if (obj instanceof AbstractRenderer) {
            AbstractRenderer renderer = (AbstractRenderer) obj;

            boolean b2 = ObjectUtils.equal(this.paint, renderer.paint);
            boolean b3 = ObjectUtils.equal(this.paintList, renderer.paintList);
            boolean b4 = ObjectUtils.equal(this.basePaint, renderer.basePaint);

            boolean b5 = ObjectUtils.equal(this.outlinePaint, renderer.outlinePaint);
            boolean b6 = ObjectUtils.equal(this.outlinePaintList, renderer.outlinePaintList);
            boolean b7 = ObjectUtils.equal(this.baseOutlinePaint, renderer.baseOutlinePaint);

            boolean b8 = ObjectUtils.equal(this.stroke, renderer.stroke);
            boolean b9 = ObjectUtils.equal(this.strokeList, renderer.strokeList);
            boolean b10 = ObjectUtils.equal(this.baseStroke, renderer.baseStroke);

            boolean b11 = ObjectUtils.equal(this.outlineStroke, renderer.outlineStroke);
            boolean b12 = ObjectUtils.equal(this.outlineStrokeList, renderer.outlineStrokeList);
            boolean b13 = ObjectUtils.equal(this.baseOutlineStroke, renderer.baseOutlineStroke);

            boolean b35 = ObjectUtils.equal(this.shape, renderer.shape);
            boolean b36 = ObjectUtils.equal(this.shapeList, renderer.shapeList);
            boolean b37 = ObjectUtils.equal(this.baseShape, renderer.baseShape);

            boolean b14 = ObjectUtils.equal(this.itemLabelsVisible, renderer.itemLabelsVisible);
            boolean b15 = ObjectUtils.equal(this.itemLabelsVisibleList, 
                                            renderer.itemLabelsVisibleList);
            boolean b16 = ObjectUtils.equal(this.baseItemLabelsVisible, 
                                            renderer.baseItemLabelsVisible);

            boolean b17 = ObjectUtils.equal(this.itemLabelFont, renderer.itemLabelFont);
            boolean b18 = ObjectUtils.equal(this.itemLabelFontList, renderer.itemLabelFontList);
            boolean b19 = ObjectUtils.equal(this.baseItemLabelFont, renderer.baseItemLabelFont);
 
            boolean b20 = ObjectUtils.equal(this.itemLabelPaint, renderer.itemLabelPaint);
            boolean b21 = ObjectUtils.equal(this.itemLabelPaintList, renderer.itemLabelPaintList);
            boolean b22 = ObjectUtils.equal(this.baseItemLabelPaint, renderer.baseItemLabelPaint);

            boolean b23 = ObjectUtils.equal(this.itemLabelAnchor, renderer.itemLabelAnchor);
            boolean b24 = ObjectUtils.equal(this.itemLabelAnchorList, renderer.itemLabelAnchorList);
            boolean b25 = ObjectUtils.equal(this.baseItemLabelAnchor, renderer.baseItemLabelAnchor);

            boolean b26 = ObjectUtils.equal(this.itemLabelTextAnchor, renderer.itemLabelTextAnchor);
            boolean b27 = ObjectUtils.equal(this.itemLabelTextAnchorList, 
                                            renderer.itemLabelTextAnchorList);
            boolean b28 = ObjectUtils.equal(this.baseItemLabelTextAnchor, 
                                            renderer.baseItemLabelTextAnchor);

            boolean b29 = ObjectUtils.equal(this.itemLabelRotationAnchor, 
                                            renderer.itemLabelRotationAnchor);
            boolean b30 = ObjectUtils.equal(this.itemLabelRotationAnchorList, 
                                            renderer.itemLabelRotationAnchorList);
            boolean b31 = ObjectUtils.equal(this.baseItemLabelRotationAnchor, 
                                            renderer.baseItemLabelRotationAnchor);

            boolean b32 = ObjectUtils.equal(this.itemLabelAngle, renderer.itemLabelAngle);
            boolean b33 = ObjectUtils.equal(this.itemLabelAngleList, renderer.itemLabelAngleList);
            boolean b34 = ObjectUtils.equal(this.baseItemLabelAngle, renderer.baseItemLabelAngle);

            return b2 && b3 && b4 
                && b5 && b6 && b7 
                && b8 && b9 && b10 
                && b11 && b12 && b13 
                && b14 && b15 && b16 
                && b17 && b18 && b19 
                && b20 && b21 && b22 
                && b23 && b24 && b25 
                && b26 && b27 && b28 
                && b29 && b30 && b31 
                && b32 && b33 && b34 
                && b35 && b36 && b37;
        }

        return false;

    }
    
    /**
     * Returns an independent copy of the renderer.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException if some component of the renderer does not support 
     *         cloning.
     */
    protected Object clone() throws CloneNotSupportedException {
        AbstractRenderer clone = (AbstractRenderer) super.clone();
        
        // 'paint' : immutable, no need to clone reference
        if (this.paintList != null) {
            clone.paintList = (PaintList) this.paintList.clone();
        }
        // 'basePaint' : immutable, no need to clone reference
        
        // 'outlinePaint' : immutable, no need to clone reference
        if (this.outlinePaintList != null) {
            clone.outlinePaintList = (PaintList) this.outlinePaintList.clone();
        }
        // 'baseOutlinePaint' : immutable, no need to clone reference
        
        // 'stroke' : immutable, no need to clone reference
        if (this.strokeList != null) {
            clone.strokeList = (ObjectList) this.strokeList.clone();
        }
        // 'baseStroke' : immutable, no need to clone reference
        
        // 'outlineStroke' : immutable, no need to clone reference
        if (this.outlineStrokeList != null) {
            clone.outlineStrokeList = (ObjectList) this.outlineStrokeList.clone();
        }
        // 'baseOutlineStroke' : immutable, no need to clone reference
        
        if (this.shape != null) {
            clone.shape = ShapeUtils.clone(this.shape);
        }
        if (this.shapeList != null) {
            clone.strokeList = (ObjectList) this.strokeList.clone();
        }
        if (this.baseShape != null) {
            clone.baseShape = ShapeUtils.clone(this.baseShape);
        }
        
        // 'itemLabelsVisible' : immutable, no need to clone reference
        if (this.itemLabelsVisibleList != null) {
            clone.itemLabelsVisibleList = (BooleanList) this.itemLabelsVisibleList.clone();
        }
        // 'basePaint' : immutable, no need to clone reference
        
        // 'itemLabelFont' : immutable, no need to clone reference
        if (this.itemLabelFontList != null) {
            clone.itemLabelFontList = (ObjectList) this.itemLabelFontList.clone();
        }
        // 'baseItemLabelFont' : immutable, no need to clone reference

        // 'itemLabelPaint' : immutable, no need to clone reference
        if (this.itemLabelPaintList != null) {
            clone.itemLabelPaintList = (PaintList) this.itemLabelPaintList.clone();
        }
        // 'baseItemLabelPaint' : immutable, no need to clone reference
        
        // 'itemLabelAnchor' : immutable, no need to clone reference
        if (this.itemLabelAnchorList != null) {
            clone.itemLabelAnchorList = (ObjectList) this.itemLabelAnchorList.clone();
        }
        // 'baseItemLabelAnchor' : immutable, no need to clone reference

        // 'itemLabelTextAnchor' : immutable, no need to clone reference
        if (this.itemLabelTextAnchorList != null) {
            clone.itemLabelTextAnchorList = (ObjectList) this.itemLabelTextAnchorList.clone();
        }
        // 'baseItemLabelTextAnchor' : immutable, no need to clone reference

        // 'itemLabelRotationAnchor' : immutable, no need to clone reference
        if (this.itemLabelRotationAnchorList != null) {
            clone.itemLabelRotationAnchorList 
                = (ObjectList) this.itemLabelRotationAnchorList.clone();
        }
        // 'baseItemLabelRotationAnchor' : immutable, no need to clone reference

        // 'itemLabelAngle' : immutable, no need to clone reference
        if (this.itemLabelAngleList != null) {
            clone.itemLabelAngleList = (ObjectList) this.itemLabelAngleList.clone();
        }
        // 'baseItemLabelFont' : immutable, no need to clone reference

        return clone;
    }

    /**
     * Provides serialization support.
     *
     * @param stream  the output stream.
     *
     * @throws IOException  if there is an I/O error.
     */
    private void writeObject(ObjectOutputStream stream) throws IOException {

        stream.defaultWriteObject();
        SerialUtilities.writePaint(this.paint, stream);
        SerialUtilities.writePaint(this.basePaint, stream);
        SerialUtilities.writePaint(this.outlinePaint, stream);
        SerialUtilities.writePaint(this.baseOutlinePaint, stream);
        SerialUtilities.writeStroke(this.stroke, stream);
        SerialUtilities.writeStroke(this.baseStroke, stream);
        SerialUtilities.writeStroke(this.outlineStroke, stream);
        SerialUtilities.writeStroke(this.baseOutlineStroke, stream);
        SerialUtilities.writeShape(this.shape, stream);
        SerialUtilities.writeShape(this.baseShape, stream);
        SerialUtilities.writePaint(this.itemLabelPaint, stream);
        SerialUtilities.writePaint(this.baseItemLabelPaint, stream);

    }

    /**
     * Provides serialization support.
     *
     * @param stream  the input stream.
     *
     * @throws IOException  if there is an I/O error.
     * @throws ClassNotFoundException  if there is a classpath problem.
     */
    private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {

        stream.defaultReadObject();
        this.paint = SerialUtilities.readPaint(stream);
        this.basePaint = SerialUtilities.readPaint(stream);
        this.outlinePaint = SerialUtilities.readPaint(stream);
        this.baseOutlinePaint = SerialUtilities.readPaint(stream);
        this.stroke = SerialUtilities.readStroke(stream);
        this.baseStroke = SerialUtilities.readStroke(stream);
        this.outlineStroke = SerialUtilities.readStroke(stream);
        this.baseOutlineStroke = SerialUtilities.readStroke(stream);
        this.shape = SerialUtilities.readShape(stream);
        this.baseShape = SerialUtilities.readShape(stream);
        this.itemLabelPaint = SerialUtilities.readPaint(stream);
        this.baseItemLabelPaint = SerialUtilities.readPaint(stream);

    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -