< prev index next >

application/org.openjdk.jmc.ui/src/main/java/org/openjdk/jmc/ui/charts/XYDataRenderer.java

Print this page




  27  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  31  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 package org.openjdk.jmc.ui.charts;
  34 
  35 import java.awt.Color;
  36 import java.awt.FontMetrics;
  37 import java.awt.Graphics2D;
  38 import java.awt.Point;
  39 import java.awt.Rectangle;
  40 import java.awt.Shape;
  41 import java.awt.geom.Point2D;
  42 import java.util.ArrayList;
  43 import java.util.Collections;
  44 
  45 import org.openjdk.jmc.common.IDisplayable;
  46 import org.openjdk.jmc.common.unit.IQuantity;
  47 import org.openjdk.jmc.common.unit.LinearUnit;
  48 import org.openjdk.jmc.common.unit.UnitLookup;
  49 import org.openjdk.jmc.common.util.ColorToolkit;
  50 import org.openjdk.jmc.ui.charts.AWTChartToolkit.IColorProvider;
  51 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.IBucket;
  52 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.ILane;
  53 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.IPoint;
  54 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.ITick;
  55 
  56 public class XYDataRenderer implements IXDataRenderer {
  57 
  58         private static abstract class SeriesEntry<U> {
  59                 final IQuantitySeries<U> series;
  60                 transient XYQuantities<U> points;
  61 
  62                 SeriesEntry(IQuantitySeries<U> series) {
  63                         this.series = series;
  64                 }
  65 
  66                 void updatePointsCache(SubdividedQuantityRange xRange) {
  67                         // FIXME: Improve to simply adjust the XYQuantities.xRange if xRange is compatible.




  27  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  29  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  30  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  31  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32  */
  33 package org.openjdk.jmc.ui.charts;
  34 
  35 import java.awt.Color;
  36 import java.awt.FontMetrics;
  37 import java.awt.Graphics2D;
  38 import java.awt.Point;
  39 import java.awt.Rectangle;
  40 import java.awt.Shape;
  41 import java.awt.geom.Point2D;
  42 import java.util.ArrayList;
  43 import java.util.Collections;
  44 
  45 import org.openjdk.jmc.common.IDisplayable;
  46 import org.openjdk.jmc.common.unit.IQuantity;

  47 import org.openjdk.jmc.common.unit.UnitLookup;
  48 import org.openjdk.jmc.common.util.ColorToolkit;
  49 import org.openjdk.jmc.ui.charts.AWTChartToolkit.IColorProvider;
  50 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.IBucket;
  51 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.ILane;
  52 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.IPoint;
  53 import org.openjdk.jmc.ui.charts.IChartInfoVisitor.ITick;
  54 
  55 public class XYDataRenderer implements IXDataRenderer {
  56 
  57         private static abstract class SeriesEntry<U> {
  58                 final IQuantitySeries<U> series;
  59                 transient XYQuantities<U> points;
  60 
  61                 SeriesEntry(IQuantitySeries<U> series) {
  62                         this.series = series;
  63                 }
  64 
  65                 void updatePointsCache(SubdividedQuantityRange xRange) {
  66                         // FIXME: Improve to simply adjust the XYQuantities.xRange if xRange is compatible.


< prev index next >