Package org.timepedia.chronoscope.client.canvas

Examples of org.timepedia.chronoscope.client.canvas.Bounds.inside()


  public boolean click(int x, int y) {
    Bounds b = creditsLabel.getBounds();
    double nx = x - getBounds().x - getLayer().getBounds().x;
    double ny = y - getBounds().y - getLayer().getBounds().y;
    if (b.inside((int) nx, (int) ny)) {
      if (clickHandler != null) {
        clickHandler.onOverlayClick(null, x, y);
      }
    }
    return false;
View Full Code Here


   */
  protected Object getComponent(int x, int y, XYPlot plot) {
    Bounds plotBounds = plot.getBounds();

    // First check if (x,y) hit the center plot
    if ((null != plotBounds) && (plotBounds.inside(x, y))) {
      Overlay o = plot.getOverlayAt(x, y);
      if (o != null && (o instanceof Draggable) && ((Draggable)o).isDraggable()) {
        return o;
      }
      return plot;
View Full Code Here

      Bounds oaPanelBounds = oaPanel.getBounds();
      double viewOffsetX = layerBounds.x + oaPanel.getLayerOffsetX();
      double viewOffsetY = layerBounds.y + oaPanel.getLayerOffsetY();
      Bounds oaPanelAbsBounds = new Bounds(viewOffsetX, viewOffsetY,
          oaPanelBounds.width, oaPanelBounds.height);
      if (oaPanelAbsBounds.inside(x, y)) {
        return oaPanel.getValueAxis();
      }
    }

    return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.