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


Java RegularTimePeriod.getMiddleMillisecond方法代码示例

本文整理汇总了Java中org.jfree.data.time.RegularTimePeriod.getMiddleMillisecond方法的典型用法代码示例。如果您正苦于以下问题:Java RegularTimePeriod.getMiddleMillisecond方法的具体用法?Java RegularTimePeriod.getMiddleMillisecond怎么用?Java RegularTimePeriod.getMiddleMillisecond使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.data.time.RegularTimePeriod的用法示例。


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

示例1: calculateDateForPosition

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * Returns a {@link java.util.Date} corresponding to the specified position
 * within a {@link RegularTimePeriod}.
 *
 * @param period  the period.
 * @param position  the position (<code>null</code> not permitted).
 *
 * @return A date.
 */
private Date calculateDateForPosition(RegularTimePeriod period,
        DateTickMarkPosition position) {
    ParamChecks.nullNotPermitted(period, "period");
    Date result = null;
    if (position == DateTickMarkPosition.START) {
        result = new Date(period.getFirstMillisecond());
    }
    else if (position == DateTickMarkPosition.MIDDLE) {
        result = new Date(period.getMiddleMillisecond());
    }
    else if (position == DateTickMarkPosition.END) {
        result = new Date(period.getLastMillisecond());
    }
    return result;

}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:26,代码来源:DateAxis.java

示例2: calculateDateForPosition

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * Returns a {@link java.util.Date} corresponding to the specified position
 * within a {@link RegularTimePeriod}.
 *
 * @param period  the period.
 * @param position  the position ({@code null} not permitted).
 *
 * @return A date.
 */
private Date calculateDateForPosition(RegularTimePeriod period,
        DateTickMarkPosition position) {
    Args.nullNotPermitted(period, "period");
    Date result = null;
    if (position == DateTickMarkPosition.START) {
        result = new Date(period.getFirstMillisecond());
    }
    else if (position == DateTickMarkPosition.MIDDLE) {
        result = new Date(period.getMiddleMillisecond());
    }
    else if (position == DateTickMarkPosition.END) {
        result = new Date(period.getLastMillisecond());
    }
    return result;

}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:26,代码来源:DateAxis.java

示例3: calculateDateForPosition

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * Returns a {@link java.util.Date} corresponding to the specified position
 * within a {@link RegularTimePeriod}.
 *
 * @param period  the period.
 * @param position  the position (<code>null</code> not permitted).
 *
 * @return A date.
 */
private Date calculateDateForPosition(RegularTimePeriod period,
                                      DateTickMarkPosition position) {

    if (position == null) {
        throw new IllegalArgumentException("Null 'position' argument.");
    }
    Date result = null;
    if (position == DateTickMarkPosition.START) {
        result = new Date(period.getFirstMillisecond());
    }
    else if (position == DateTickMarkPosition.MIDDLE) {
        result = new Date(period.getMiddleMillisecond());
    }
    else if (position == DateTickMarkPosition.END) {
        result = new Date(period.getLastMillisecond());
    }
    return result;

}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:29,代码来源:DateAxis.java

示例4: calculateDateForPosition

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * Returns a {@link java.util.Date} corresponding to the specified position
 * within a {@link RegularTimePeriod}.
 *
 * @param period  the period.
 * @param position  the position (<code>null</code> not permitted).
 *
 * @return A date.
 */
private Date calculateDateForPosition(RegularTimePeriod period, 
                                      DateTickMarkPosition position) {
    
    if (position == null) {
        throw new IllegalArgumentException("Null 'position' argument.");   
    }
    Date result = null;
    if (position == DateTickMarkPosition.START) {
        result = new Date(period.getFirstMillisecond());
    }
    else if (position == DateTickMarkPosition.MIDDLE) {
        result = new Date(period.getMiddleMillisecond());
    }
    else if (position == DateTickMarkPosition.END) {
        result = new Date(period.getLastMillisecond());
    }
    return result;

}
 
开发者ID:nologic,项目名称:nabs,代码行数:29,代码来源:DateAxis.java

示例5: getX

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:OHLCSeriesCollection.java

示例6: getX

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:21,代码来源:OHLCSeriesCollection.java

示例7: getX

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:21,代码来源:OHLCSeriesCollection.java

示例8: getIndex

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
@Override
public int getIndex(RegularTimePeriod period) {
    return (int) ((period.getMiddleMillisecond() / 1000) - sampler.getOffset());
}
 
开发者ID:swift-lang,项目名称:swift-k,代码行数:5,代码来源:SeriesWrapper.java

示例9: createItem

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * Creates an array representing one item in a series.
 * 
 * @param t  the time period.
 * @param dir  the wind direction.
 * @param force  the wind force.
 * 
 * @return An array containing the specified items.
 */
private Object[] createItem(RegularTimePeriod t, int dir, int force) {
    return new Object[] { new Long(t.getMiddleMillisecond()), 
            new Integer(dir), new Integer(force) };
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:DefaultWindDatasetTests.java

示例10: createItem

import org.jfree.data.time.RegularTimePeriod; //导入方法依赖的package包/类
/**
 * Creates an array representing one item in a series.
 *
 * @param t  the time period.
 * @param dir  the wind direction.
 * @param force  the wind force.
 *
 * @return An array containing the specified items.
 */
private Object[] createItem(RegularTimePeriod t, int dir, int force) {
    return new Object[] {new Long(t.getMiddleMillisecond()),
            new Integer(dir), new Integer(force)};
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:14,代码来源:DefaultWindDatasetTest.java


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