本文整理汇总了Java中org.jfree.data.time.TimePeriodAnchor.MIDDLE属性的典型用法代码示例。如果您正苦于以下问题:Java TimePeriodAnchor.MIDDLE属性的具体用法?Java TimePeriodAnchor.MIDDLE怎么用?Java TimePeriodAnchor.MIDDLE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jfree.data.time.TimePeriodAnchor
的用法示例。
在下文中一共展示了TimePeriodAnchor.MIDDLE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getX
/**
* Returns the x-value for a time period.
*
* @param period the time period (<code>null</code> not permitted).
*
* @return The x-value.
*/
protected synchronized long getX(RegularTimePeriod period) {
long result = 0L;
if (this.xPosition == TimePeriodAnchor.START) {
result = period.getFirstMillisecond();
}
else if (this.xPosition == TimePeriodAnchor.MIDDLE) {
result = period.getMiddleMillisecond();
}
else if (this.xPosition == TimePeriodAnchor.END) {
result = period.getLastMillisecond();
}
return result;
}
示例2: getX
/**
* Returns the x-value for a time period.
*
* @param period the time period (<code>null</code> not permitted).
*
* @return The x-value.
*/
protected synchronized long getX(RegularTimePeriod period) {
long result = 0L;
if (this.xPosition == TimePeriodAnchor.START) {
result = period.getFirstMillisecond();
}
else if (this.xPosition == TimePeriodAnchor.MIDDLE) {
result = period.getMiddleMillisecond();
}
else if (this.xPosition == TimePeriodAnchor.END) {
result = period.getLastMillisecond();
}
return result;
}
示例3: getX
/**
* Returns the x-value for a time period.
*
* @param period the time period ({@code null} not permitted).
*
* @return The x-value.
*/
protected synchronized long getX(RegularTimePeriod period) {
long result = 0L;
if (this.xPosition == TimePeriodAnchor.START) {
result = period.getFirstMillisecond();
}
else if (this.xPosition == TimePeriodAnchor.MIDDLE) {
result = period.getMiddleMillisecond();
}
else if (this.xPosition == TimePeriodAnchor.END) {
result = period.getLastMillisecond();
}
return result;
}