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


Java Chart2D.CHART_POSITION_RIGHT属性代码示例

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


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

示例1: createAccessor

/**
 * @see info.monitorenter.gui.chart.axis.AAxis#createAccessor(info.monitorenter.gui.chart.Chart2D,
 *      int, int)
 */
@Override
protected AChart2DDataAccessor createAccessor(final Chart2D chart, final int dimension,
    final int position) {
  AChart2DDataAccessor result;
  if (dimension == Chart2D.X) {
    // Don't allow a combination of dimension and position that is not usable:
    if ((position & (Chart2D.CHART_POSITION_BOTTOM | Chart2D.CHART_POSITION_TOP)) == 0) {
      throw new IllegalArgumentException("X axis only valid with top or bottom position.");
    }
    this.setAxisPosition(position);
    result = new XDataAccessor(chart);
  } else if (dimension == Chart2D.Y) {
    // Don't allow a combination of dimension and position that is not usable:
    if ((position & (Chart2D.CHART_POSITION_LEFT | Chart2D.CHART_POSITION_RIGHT)) == 0) {
      throw new IllegalArgumentException("Y axis only valid with left or right position.");
    }
    this.setAxisPosition(position);
    result = new YDataAccessor(chart);
  } else {
    throw new IllegalArgumentException("Dimension has to be Chart2D.X or Chart2D.Y!");
  }
  return result;
}
 
开发者ID:lcm-proj,项目名称:lcm,代码行数:27,代码来源:AxisLinear.java

示例2: createAccessor

/**
 * @see info.monitorenter.gui.chart.axis.AAxis#createAccessor(info.monitorenter.gui.chart.Chart2D,
 *      int, int)
 */
@Override
protected AAxis<T>.AChart2DDataAccessor createAccessor(final Chart2D chart, final int dimension,
    final int position) {
  AAxis<T>.AChart2DDataAccessor result;
  if (dimension == Chart2D.X) {
    // Don't allow a combination of dimension and position that is not usable:
    if ((position & (Chart2D.CHART_POSITION_BOTTOM | Chart2D.CHART_POSITION_TOP)) == 0) {
      throw new IllegalArgumentException("X axis only valid with top or bottom position.");
    }
    this.setAxisPosition(position);
    result = new XDataAccessor(chart);
  } else if (dimension == Chart2D.Y) {
    // Don't allow a combination of dimension and position that is not usable:
    if ((position & (Chart2D.CHART_POSITION_LEFT | Chart2D.CHART_POSITION_RIGHT)) == 0) {
      throw new IllegalArgumentException("Y axis only valid with left or right position.");
    }
    this.setAxisPosition(position);
    result = new YDataAccessor(chart);
  } else {
    throw new IllegalArgumentException("Dimension has to be Chart2D.X or Chart2D.Y!");
  }
  return result;
}
 
开发者ID:lcm-proj,项目名称:lcm,代码行数:27,代码来源:AAxisTransformation.java

示例3: createAccessor

/**
 * @see info.monitorenter.gui.chart.axis.AAxis#createAccessor(info.monitorenter.gui.chart.Chart2D,
 *      int, int)
 */
@Override
protected AChart2DDataAccessor createAccessor(final Chart2D chart, final int dimension,
    final int position) {
  AChart2DDataAccessor result;
  if (dimension == Chart2D.X) {
    // Don't allow a combination of dimension and position that is not usable:
    if ((position & (Chart2D.CHART_POSITION_BOTTOM | Chart2D.CHART_POSITION_TOP)) == 0) {
      throw new IllegalArgumentException("X axis only valid with top or bottom position.");
    }
    this.setAxisPosition(position);
    result = new XDataInverseAccessor(chart);
  } else if (dimension == Chart2D.Y) {
    // Don't allow a combination of dimension and position that is not usable:
    if ((position & (Chart2D.CHART_POSITION_LEFT | Chart2D.CHART_POSITION_RIGHT)) == 0) {
      throw new IllegalArgumentException("Y axis only valid with left or right position.");
    }
    this.setAxisPosition(position);
    result = new YDataInverseAccessor(chart);
  } else {
    throw new IllegalArgumentException("Dimension has to be Chart2D.X or Chart2D.Y!");
  }
  return result;
}
 
开发者ID:lcm-proj,项目名称:lcm,代码行数:27,代码来源:AxisInverse.java

示例4: paint

/**
 * @see info.monitorenter.gui.chart.IAxis#paint(java.awt.Graphics)
 */
public void paint(final Graphics g2d) {
  if (!this.m_visible) {
    return;
  }
  switch (this.getDimension() | this.getAxisPosition()) {
    case (Chart2D.X | Chart2D.CHART_POSITION_BOTTOM): {
      this.paintAxisXBottom(g2d);
      break;
    }
    case (Chart2D.X | Chart2D.CHART_POSITION_TOP): {
      this.paintAxisXTop(g2d);
      break;
    }
    case (Chart2D.Y | Chart2D.CHART_POSITION_LEFT): {
      this.paintAxisYLeft(g2d);
      break;
    }
    case (Chart2D.Y | Chart2D.CHART_POSITION_RIGHT): {
      this.paintAxisYRight(g2d);
      break;
    }
    default: {

      throw new IllegalStateException("No valid Chart position found for this axis: " + this);
    }
  }
}
 
开发者ID:lcm-proj,项目名称:lcm,代码行数:30,代码来源:AAxis.java


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