当前位置: 首页>>代码示例>>Java>>正文


Java Chart2D.DEBUG_SCALING属性代码示例

本文整理汇总了Java中info.monitorenter.gui.chart.Chart2D.DEBUG_SCALING属性的典型用法代码示例。如果您正苦于以下问题:Java Chart2D.DEBUG_SCALING属性的具体用法?Java Chart2D.DEBUG_SCALING怎么用?Java Chart2D.DEBUG_SCALING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在info.monitorenter.gui.chart.Chart2D的用法示例。


在下文中一共展示了Chart2D.DEBUG_SCALING属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: propertyChangeSynced

/**
 * @see info.monitorenter.gui.chart.axis.AAxis.APropertyChangeReactorSynced#propertyChangeSynced(java.beans.PropertyChangeEvent,
 *      info.monitorenter.gui.chart.axis.AAxis)
 */
@Override
protected boolean propertyChangeSynced(final PropertyChangeEvent changeEvent,
    final AAxis<?> receiver) {
  boolean result = false;
  if (Chart2D.DEBUG_SCALING) {
    System.out.println("pc-Xmin");
  }
  if (receiver.getAccessor().getDimension() == Chart2D.X) {
    final double value = ((Double) changeEvent.getNewValue()).doubleValue();
    if (value < receiver.m_min) {
      final ITrace2D trace = (ITrace2D) changeEvent.getSource();
      if (trace.isVisible()) {
        receiver.m_min = value;
        receiver.m_needsFullRescale = true;
        result = true;
      }
    } else if (value > receiver.m_min) {
      receiver.m_min = receiver.findMin();
      receiver.m_needsFullRescale = true;
      result = true;
    }
  }
  return result;
}
 
开发者ID:lcm-proj,项目名称:lcm,代码行数:28,代码来源:AAxis.java

示例2: scalePoint

/**
 * Internally rescales the given <code>{@link ITracePoint2D}</code> in the
 * dimension this axis works in.
 * <p>
 * 
 * @param point
 *          the point to scale (between 0.0 and 1.0) according to the internal
 *          bounds.
 */
protected final void scalePoint(final ITracePoint2D point) {
  final int axis = this.getAccessor().getDimension();
  if (axis == Chart2D.X) {
    point.setScaledX(this.getScaledValue(point.getX()));

  } else if (axis == Chart2D.Y) {
    point.setScaledY(this.getScaledValue(point.getY()));

  }
  if (Chart2D.DEBUG_SCALING) {
    // This is ok for fixed viewports that zoom!
    if ((point.getScaledX() > 1.0) || (point.getScaledX() < 0.0) || (point.getScaledY() > 1.0)
        || (point.getScaledY() < 0.0)) {
      System.out.println("Scaled Point " + point + " to [" + point.getScaledX() + ","
          + point.getScaledY() + "]");
    }
  }
}
 
开发者ID:lcm-proj,项目名称:lcm,代码行数:27,代码来源:AAxis.java


注:本文中的info.monitorenter.gui.chart.Chart2D.DEBUG_SCALING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。