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

项目:mzmine2    文件:ChartGestureDragDiffHandler.java   
/**
 * use default orientation or orientation of axis
 * 
 * @param event
 * @return
 */
public Orientation getOrientation(ChartGestureEvent event) {
  ChartEntity ce = event.getEntity();
  if (ce instanceof AxisEntity) {
    JFreeChart chart = event.getChartPanel().getChart();
    PlotOrientation orient = PlotOrientation.HORIZONTAL;
    if (chart.getXYPlot() != null)
      orient = chart.getXYPlot().getOrientation();
    else if (chart.getCategoryPlot() != null)
      orient = chart.getCategoryPlot().getOrientation();

    Entity entity = event.getGesture().getEntity();
    if ((entity.equals(Entity.DOMAIN_AXIS) && orient.equals(PlotOrientation.VERTICAL))
        || (entity.equals(Entity.RANGE_AXIS) && orient.equals(PlotOrientation.HORIZONTAL)))
      return Orientation.HORIZONTAL;
    else
      return Orientation.VERTICAL;
  }
  return orient;
}
项目:ccu-historian    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:jfreechart    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:aya-lang    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:mzmine2    文件:ChartGestureEvent.java   
/**
 * The ValueAxis of this event's entity or null if the entity is different to an AxisEntity or if
 * the axis is not a ValueAxis
 * 
 * @return
 */
public ValueAxis getAxis() {
  if (entity != null && entity instanceof AxisEntity
      && ((AxisEntity) entity).getAxis() instanceof ValueAxis)
    return (ValueAxis) ((AxisEntity) entity).getAxis();
  else
    return null;
}
项目: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;
}
项目:populus    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:PI    文件:Axis.java   
/**
    * Created an entity for the axis.
    *
    * @param cursor  the initial cursor value.
    * @param state  the axis state after completion of the drawing with a
    *     possibly updated cursor position.
    * @param dataArea  the data area.
    * @param edge  the edge.
    * @param plotState  the PlotRenderingInfo from which a reference to the
    *     entity collection can be obtained.
    *
    * @since 1.0.13
    */
protected void createAndAddEntity(double cursor, AxisState state,
           Rectangle2D dataArea, RectangleEdge edge,
           PlotRenderingInfo plotState){

    if (plotState == null || plotState.getOwner() == null) {
           return;  // no need to create entity if we can´t save it anyways...
       }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)){
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                   state.getCursor(), dataArea.getWidth(),
                   cursor - state.getCursor());
    }
    else if(edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                   dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if(edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                   dataArea.getY(), cursor - state.getCursor(),
                   dataArea.getHeight());
    }
    else if(edge.equals(RectangleEdge.RIGHT)){
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                   state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
           e.add(new AxisEntity(hotspot, this));
       }
}
项目:ECG-Viewer    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:astor    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can´t save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:group-five    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:manydesigns.cn    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:buffer_bci    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:buffer_bci    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:proyecto-teoria-control-utn-frro    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}
项目:Memetic-Algorithm-for-TSP    文件:Axis.java   
/**
 * Created an entity for the axis.
 *
 * @param cursor  the initial cursor value.
 * @param state  the axis state after completion of the drawing with a
 *     possibly updated cursor position.
 * @param dataArea  the data area.
 * @param edge  the edge.
 * @param plotState  the PlotRenderingInfo from which a reference to the
 *     entity collection can be obtained.
 *
 * @since 1.0.13
 */
protected void createAndAddEntity(double cursor, AxisState state,
        Rectangle2D dataArea, RectangleEdge edge,
        PlotRenderingInfo plotState) {

    if (plotState == null || plotState.getOwner() == null) {
        return;  // no need to create entity if we can't save it anyways...
    }
    Rectangle2D hotspot = null;
    if (edge.equals(RectangleEdge.TOP)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(),
                state.getCursor(), dataArea.getWidth(),
                cursor - state.getCursor());
    }
    else if (edge.equals(RectangleEdge.BOTTOM)) {
        hotspot = new Rectangle2D.Double(dataArea.getX(), cursor,
                dataArea.getWidth(), state.getCursor() - cursor);
    }
    else if (edge.equals(RectangleEdge.LEFT)) {
        hotspot = new Rectangle2D.Double(state.getCursor(),
                dataArea.getY(), cursor - state.getCursor(),
                dataArea.getHeight());
    }
    else if (edge.equals(RectangleEdge.RIGHT)) {
        hotspot = new Rectangle2D.Double(cursor, dataArea.getY(),
                state.getCursor() - cursor, dataArea.getHeight());
    }
    EntityCollection e = plotState.getOwner().getEntityCollection();
    if (e != null) {
        e.add(new AxisEntity(hotspot, this));
    }
}