Package org.timepedia.chronoscope.client.canvas

Examples of org.timepedia.chronoscope.client.canvas.Bounds


    layout();
  }

  public void layout() {
    // start with center filling whole area
    Bounds center = new Bounds(getBounds());
    Bounds topBounds = top != null ? new Bounds(top.getPreferredBounds())
        : null;
    Bounds leftBounds = left != null ? new Bounds(left.getPreferredBounds())
        : null;
    Bounds rightBounds = right != null ? new Bounds(right.getPreferredBounds())
        : null;
    Bounds bottomBounds = bottom != null ? new Bounds(
        bottom.getPreferredBounds()) : null;

    // force center's left border to be after left component's right width
    if (leftBounds != null) {
      center.x = leftBounds.width;
View Full Code Here


    return this.valueAxis;
  }
 
  public void setBounds(Bounds b) {
    log("setBounds "+getType() + " " +b);
    this.bounds = new Bounds(b);
    if (null != layer) {
      layer.save();

      if (!b.equals(layer.getBounds())
       && null != parent && !layer.equals(parent.getLayer())) {
View Full Code Here

    this.bounds.width = width;
    if (null != layer) {
      layer.save();

      if(!bounds.equals(layer.getBounds())) {
        Bounds lb = layer.getBounds();
        log(layer.getLayerId() + " was:" + this.layer.getBounds());
        layer.setBounds(new Bounds(lb.x, lb.y, width, lb.height));
        log(layer.getLayerId() + " now:" + this.layer.getBounds());
      }

      layer.restore();
    }
View Full Code Here

    return null;
  }

  public void paint(XYPlot plot, Layer layer, double domainOrigin, double currentDomain) {
    layer.save();
    Bounds b = layer.getBounds();
    if (gssPlotProperties.bgColor instanceof CanvasPattern) {
      layer.setFillColor(Color.TRANSPARENT);
      layer.clearRect(b.x, b.y, b.width, b.height);
      layer.setComposite(Layer.COPY);
      layer.setFillColor(gssPlotProperties.bgColor);
View Full Code Here

    regions.clear();
  }


  protected String[] getRegions(double plotX, double plotY) {
    Bounds b = plot.getBounds();
    if (plotX < 0) { plotX = 0; }
    if (plotX > b.width) { plotX = b.width; }
    if (plotY < 0) { plotY = 0; }
    if (plotY > b.height) { plotY = b.height; }
    scratchX.clear();
View Full Code Here

  public void addClickable(int datasetIndex, int domainIndex, int dim, double domain, double range, double plotX, double plotY) {
    regionalize(datasetIndex, domainIndex, dim, domain, range, plotX, plotY);
  }

  public HashSet<RenderedPoint> getClickable(int plotX, int plotY) {
    Bounds b = plot.getBounds();
    String d = naturalize((plotX / b.width) * DOMAIN_REGIONS);
    String r = naturalize((plotY / b.height) * RANGE_REGIONS);

    return regions.get(d+","+r);
  }
View Full Code Here

    layer.save();

    lblHeight = StringSizer.getHeight(layer, "(X)", gssProperties);
    colAlignment = legendLabelsProperties.columnAligned;
    this.bounds.width = view.getWidth();
    Bounds b = calcBounds(layer, plot.getDatasets().size());
    bounds.height = b.height;
    layer.setBounds(bounds);

    layer.restore();
  }
View Full Code Here

  public void setView(View view) {
    this.view = view;
  }

  private Bounds calcBounds(Layer layer, int numDatasets) {
    Bounds b = new Bounds();
    draw(layer, b);
    return b;
  }
View Full Code Here

    log("getBounds right:"+rightPanel.getBounds());
    if (null != rightPanel.getLayer()) {
        log("getBounds "+rightPanel.getLayer().getLayerId()+" "+rightPanel.getLayer().getBounds());
    }

    Bounds bounding = new Bounds(leftPanel.getBounds(), rightPanel.getBounds());
    log("getBounds bounding bounds:"+bounding);
    return bounding;
  }
View Full Code Here

//  }

  public void initLeftLayer() {
    log ("initLeftLayer leftPanelBounds:"+leftPanelBounds);
    if (null == leftPanelBounds) {
      leftPanelBounds = new Bounds(0,0,49,view.getHeight()*0.75);
    }
    leftPanel.setLayer(view.getCanvas().createLayer(Layer.RANGE_AXIS_LEFT, leftPanelBounds));
  }
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.canvas.Bounds

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.