Java 类org.jfree.chart.entity.XYAnnotationEntity 实例源码

项目:compomics-utilities    文件:VennDiagramPanel.java   
/**
 * Handles mouse clicks in the chart panel.
 *
 * @param event the chart mouse event
 */
private void mouseClickedInChart(ChartMouseEvent event) {

    ArrayList<ChartEntity> entities = getEntitiesForPoint(event.getTrigger().getPoint().x, event.getTrigger().getPoint().y);

    if (entities.isEmpty()) {
        return;
    }

    boolean dataPointFound = false;
    String dataPointTooltip = "";

    for (ChartEntity tempEntity : entities) {
        if (tempEntity instanceof XYAnnotationEntity) {
            if (((XYAnnotationEntity) tempEntity).getToolTipText() != null) {
                dataPointFound = true;
                dataPointTooltip = ((XYAnnotationEntity) tempEntity).getToolTipText();
            }
        }
    }

    if (dataPointFound) {
        String dataset = tooltipToDatasetMap.get(dataPointTooltip);
        JOptionPane.showMessageDialog(this, dataPointTooltip + ":\n" + vennDiagramResults.get(dataset), "Selected Values", JOptionPane.INFORMATION_MESSAGE);
    }
}
项目:compomics-utilities    文件:VennDiagramPanel.java   
/**
 * Handles mouse movements in the chart panel.
 *
 * @param event the chart mouse event
 */
private void mouseMovedInChart(ChartMouseEvent event) {

    ArrayList<ChartEntity> entities = getEntitiesForPoint(event.getTrigger().getPoint().x, event.getTrigger().getPoint().y);

    boolean dataPointFound = false;

    for (ChartEntity tempEntity : entities) {
        if (tempEntity instanceof XYAnnotationEntity) {
            if (((XYAnnotationEntity) tempEntity).getToolTipText() != null) {
                dataPointFound = true;
            }
        }
    }

    if (dataPointFound) {
        chartPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    } else {
        chartPanel.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    }
}
项目:parabuild-ci    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to 
 * a {@link PlotRenderingInfo} instance.
 * 
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info, 
                         Shape hotspot, int rendererIndex, 
                         String toolTipText, String urlText) {
    if (info == null) {
        return;  
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot, 
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:ccu-historian    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:jfreechart    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info ({@code null} permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:aya-lang    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:mzmine2    文件:ChartGesture.java   
/**
 * The gesture entity type
 * 
 * @param entity
 * @return
 */
public static Entity getGestureEntity(ChartEntity entity) {
  if (entity == null)
    return NONE;
  if (entity instanceof PlotEntity)
    return PLOT;
  if (entity instanceof AxisEntity) {
    AxisEntity e = (AxisEntity) entity;
    if (e.getAxis().getPlot() instanceof XYPlot) {
      XYPlot plot = ((XYPlot) e.getAxis().getPlot());
      for (int i = 0; i < plot.getDomainAxisCount(); i++)
        if (plot.getDomainAxis(i).equals(e.getAxis()))
          return DOMAIN_AXIS;
      for (int i = 0; i < plot.getRangeAxisCount(); i++)
        if (plot.getRangeAxis(i).equals(e.getAxis()))
          return RANGE_AXIS;
    }
    // else return basic axis
    return AXIS;
  }
  if (entity instanceof LegendItemEntity)
    return LEGEND_ITEM;
  if (entity instanceof XYItemEntity)
    return XY_ITEM;
  if (entity instanceof XYAnnotationEntity)
    return XY_ANNOTATION;
  if (entity instanceof TitleEntity) {
    if (((TitleEntity) entity).getTitle() instanceof TextTitle)
      return TEXT_TITLE;
    else
      return NON_TEXT_TITLE;
  }
  if (entity instanceof JFreeChartEntity)
    return JFREECHART;
  if (entity instanceof CategoryItemEntity)
    return CATEGORY_ITEM;
  return GENERAL;
}
项目:HTML5_WebSite    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:populus    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:PI    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:nabs    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to 
 * a {@link PlotRenderingInfo} instance.
 * 
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info, 
                         Shape hotspot, int rendererIndex, 
                         String toolTipText, String urlText) {
    if (info == null) {
        return;  
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot, 
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:ECG-Viewer    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:astor    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:opensim-gui    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to 
 * a {@link PlotRenderingInfo} instance.
 * 
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info, 
                         Shape hotspot, int rendererIndex, 
                         String toolTipText, String urlText) {
    if (info == null) {
        return;  
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot, 
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:group-five    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:manydesigns.cn    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:buffer_bci    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:buffer_bci    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:proyecto-teoria-control-utn-frro    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}
项目:Memetic-Algorithm-for-TSP    文件:AbstractXYAnnotation.java   
/**
 * A utility method for adding an {@link XYAnnotationEntity} to
 * a {@link PlotRenderingInfo} instance.
 *
 * @param info  the plot rendering info (<code>null</code> permitted).
 * @param hotspot  the hotspot area.
 * @param rendererIndex  the renderer index.
 * @param toolTipText  the tool tip text.
 * @param urlText  the URL text.
 */
protected void addEntity(PlotRenderingInfo info,
                         Shape hotspot, int rendererIndex,
                         String toolTipText, String urlText) {
    if (info == null) {
        return;
    }
    EntityCollection entities = info.getOwner().getEntityCollection();
    if (entities == null) {
        return;
    }
    XYAnnotationEntity entity = new XYAnnotationEntity(hotspot,
            rendererIndex, toolTipText, urlText);
    entities.add(entity);
}