Package org.jfree.chart.entity

Examples of org.jfree.chart.entity.DataItemEntity


            EntityCollection entities = this.renderSourcePanel
                    .getChartRenderingInfo().getEntityCollection();

            for (ChartEntity ce : entities.getEntities()) {
                if (ce instanceof DataItemEntity) {
                    DataItemEntity e = (DataItemEntity) ce;

                    // simple check if the entity shape area contains the point
                    if (e.getArea().contains(new Point2D.Double(x, y))) {
                        select(e);
                    }
                }               
            }
        }
View Full Code Here


                for (ChartEntity ce : entities.getEntities()) {

                    if (ce instanceof DataItemEntity) {

                        DataItemEntity e = (DataItemEntity) ce;
                        boolean match;

                        if (e.getArea() instanceof Rectangle2D) {
                            Rectangle2D entityRect = (Rectangle2D) e.getArea();
                            // use fast rectangle to rectangle test
                            if (this.intersectionMode) {
                                match = selection.intersects(entityRect);
                            } else {
                                match = selection.contains(entityRect);
                            }
                        } else {
                            // general shape test
                            Area selectionShape = new Area(selection);
                            Area entityShape = new Area(e.getArea());

                            // fast test if completely inside the solution must be true
                            if (selectionShape.contains(entityShape.getBounds())) {
                                match = true;
                            } else {
View Full Code Here

                EntityCollection entities = this.renderSourcePanel
                        .getChartRenderingInfo().getEntityCollection();

                for (ChartEntity ce : entities.getEntities()) {
                    if (ce instanceof DataItemEntity) {
                        DataItemEntity e = (DataItemEntity) ce;
                        Area selectionShape = new Area(selection);
                        Area entityShape = new Area(e.getArea());

                        // fast test if completely inside the solution must be true
                        if (selectionShape.contains(entityShape.getBounds())) {
                            select(e);
                        } else {                       
View Full Code Here

TOP

Related Classes of org.jfree.chart.entity.DataItemEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.