• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Color类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jzy3d.colors.Color的典型用法代码示例。如果您正苦于以下问题:Java Color类的具体用法?Java Color怎么用?Java Color使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: fill

import org.jzy3d.colors.Color; //导入依赖的package包/类
/**
 * Create one point per column, assigning unique column color based on
 * column ({@link KeyVal.key}) name. Column are sorted in increasing
 * alphabetical order along Y axis. Value ({@link KeyVal.value}) is ploted
 * as a Z value for the current column
 * 
 * @param rows
 * @param vbo
 */
protected void fill(List<List<KeyVal<String, Float>>> rows, FloatVBO vbo) {
    int size = 0;
    KeyRankColorMapper<String, Float> coloring = new KeyRankColorMapper<String, Float>(rows, new ColorMapRainbow());
    for (int i = 0; i < rows.size(); i++) {
        List<KeyVal<String, Float>> row = rows.get(i);

        for (int j = 0; j < row.size(); j++) {
            KeyVal<String, Float> k = row.get(j);
            Color color = coloring.getColor(k);
            Coord3d c1 = new Coord3d(i, j, k.val);
            putPoint(vbo, size++, color, c1);
        }
    }
    vbo.getVertices().rewind();
    vbo.getIndices().rewind();
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:26,代码来源:VBOBuilderTableColumnsScatter3d.java


示例2: plot

import org.jzy3d.colors.Color; //导入依赖的package包/类
private static void plot(List<DateTime> events) {
    // Model
    TicToc.T.tic();
    HistogramDate hist = new HistogramDate(events);
    System.out.println(hist.getRanges().length + " bins");
    TicToc.T.tocShow("gen hist");

    // Drawable
    TicToc.T.tic();
    HistogramDate2d histogram = new HistogramDate2d(hist, Color.CYAN, Color.GRAY);
    TicToc.T.tocShow("made drawable");

    // Chart
    Chart chart = BigPicture.chart(histogram.getDrawable(), dims, Quality.Nicest);
    histogram.layout(chart);
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:17,代码来源:DemoHiveDatesInDateBar.java


示例3: reportBarChart

import org.jzy3d.colors.Color; //导入依赖的package包/类
private void reportBarChart(File output, String columnName, List<Float> values, StringBuffer html, int width, int height) throws IOException {
    String imageName = "1-column-" + columnName + "-density.png";
    File fileBarChart = new File(output, imageName);

    float min = Statistics.min(values);
    float max = Statistics.max(values);
    Histogram hist = new Histogram(min, max, 20);
    hist.add(values);

    Histogram2d histogram = new Histogram2d(hist);
    if (black)
        histogram.getDrawable().setWireframeColor(Color.WHITE);
    else
        histogram.getDrawable().setWireframeColor(Color.BLACK);

    Chart chart = BigPicture.offscreen(histogram.getDrawable(), Type.dd, width, height).view2d();
    if (black)
        chart.black();
    histogram.layout(chart);
    chart.screenshot(fileBarChart);

    html.append("<img src=\"" + imageName + "\"/>\n");
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:24,代码来源:TableAnalysis.java


示例4: getDelaunayChart

import org.jzy3d.colors.Color; //导入依赖的package包/类
/**
 * @param coordinates
 * @return
 */
public Chart getDelaunayChart(List<Coord3d> coordinates) {

	// Create the object to represent the function over the given range.
	Shape surface = Builder.buildDelaunay(coordinates);

	surface.setColorMapper(new ColorMapper(new ColorMapRainbow(),
			surface.getBounds().getZmin(), surface.getBounds().getZmax(), new Color(1, 1, 1,
					0.75f)));
	surface.setFaceDisplayed(true);
	surface.setWireframeDisplayed(true);
	AWTColorbarLegend legend = new AWTColorbarLegend(surface, new AxeBoxLayout());
	surface.setLegend(legend);

	// Create a chart
	Chart chart = new Chart(this.factory, Quality.Nicest, "awt", Settings.getInstance()
			.getGLCapabilities());
	chart.setAxeDisplayed(true);
	chart.getScene().getGraph().add(surface);

	return chart;
}
 
开发者ID:gsi-upm,项目名称:BARMAS,代码行数:26,代码来源:Plotter.java


示例5: populateChart

import org.jzy3d.colors.Color; //导入依赖的package包/类
public void populateChart() {
	chartHelper.getChartPoints().clear();
	final Object zComboSelection = zValueComboViewer.getStructuredSelection().getFirstElement();
	Object zAGREEElementData = null;

	if(zComboSelection != null) {
		zAGREEElementData = ((ChartElement)zComboSelection).getSimulationStateElement();
	}

	final List<YAxisTableItem> yAxisTableItems = chartHelper.getYAxisTableItems();
	final Color[] yElementColors = chartHelper.getYAxisTableItemColors();

	for(final YAxisTableItem yAxisTableItem : yAxisTableItems) {
		if(keyTableViewer.getTable().getItem(yAxisTableItems.indexOf(yAxisTableItem)).getChecked()) {
			updateChart(yAxisTableItem, zAGREEElementData, yElementColors[yAxisTableItems.indexOf(yAxisTableItem) % yElementColors.length]);
		}
	}
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:19,代码来源:VariablesChartDialog.java


示例6: createPoints

import org.jzy3d.colors.Color; //导入依赖的package包/类
private List<ChartPoint> createPoints(final Object yElementData, final Object zElementData, final Color color) {
	final List<ChartPoint> chartPoints = new ArrayList<>();
	for(int i = 0; i < engineState.getNumberOfFrames(); i++) {
		final Object xElementValue = currentSimulationSteps.get(i);
		final Object yElementValue = engineState.getElementValue(i, yElementData);

		if(xElementValue != null && yElementValue != null) {
			Object zElementValue = null;
			if(zElementData != null) {
				zElementValue = engineState.getElementValue(i, zElementData);
			}

			final ChartPoint chartPoint = chartHelper.createChartPoint(i, color);
			if(!chartHelper.setChartPointInfo(chartPoint, xElementValue, yElementValue, zElementValue)) {
				chartPoints.add(chartPoint);
			}
		}
	}

	return chartPoints;
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:22,代码来源:VariablesChartDialog.java


示例7: createPoints

import org.jzy3d.colors.Color; //导入依赖的package包/类
private List<ChartPoint> createPoints(final Object xElementData, final Object yElementData, final Object zElementData, final Color color) {
	final List<ChartPoint> chartPoints = new ArrayList<>();

	for(final SimulationEngineState state : simulationEngineStates) {
		final Object xElementValue = state.getElementValue(state.getNumberOfFrames()-1, xElementData);
		final Object yElementValue = state.getElementValue(state.getNumberOfFrames()-1, yElementData);

		if(xElementValue != null && yElementValue != null) {
			Object zElementValue = null;
			if(zElementData != null) {
				zElementValue = state.getElementValue(state.getNumberOfFrames()-1, zElementData);
			}

			final ChartPoint chartPoint = chartHelper.createChartPoint(simulationEngineStates.indexOf(state), color);
			if(!chartHelper.setChartPointInfo(chartPoint, xElementValue, yElementValue, zElementValue)) {
				chartPoints.add(chartPoint);
			}
		}
	}

	return chartPoints;
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:23,代码来源:SimulatePossibilitiesChartDialog.java


示例8: populateChart

import org.jzy3d.colors.Color; //导入依赖的package包/类
private void populateChart() {
	final Object xComboSelection = xValueComboViewer.getStructuredSelection().getFirstElement();
	final Object zComboSelection = zValueComboViewer.getStructuredSelection().getFirstElement();
	Object xChartElementData = null;
	Object zChartElementData = null;

	if(xComboSelection != null) {
		xChartElementData = ((ChartElement)xComboSelection).getSimulationStateElement();
	}

	if(zComboSelection != null) {
		zChartElementData = ((ChartElement)zComboSelection).getSimulationStateElement();
	}

	chartHelper.clearChartPoints();
	if(xChartElementData != null && (chartHelper.is2DChart() || (zChartElementData != null))) {
		final List<YAxisTableItem> yAxisTableItems = chartHelper.getYAxisTableItems();
		final Color[] yAxisTableItemColors = chartHelper.getYAxisTableItemColors();

		for(final YAxisTableItem yAxisTableItem : yAxisTableItems) {
			if(keyTableViewer.getTable().getItem(yAxisTableItems.indexOf(yAxisTableItem)).getChecked()) {
				updateChartPoints(xChartElementData, yAxisTableItem, zChartElementData, yAxisTableItemColors[yAxisTableItems.indexOf(yAxisTableItem) % yAxisTableItemColors.length]);
			}
		}
	}
}
 
开发者ID:smaccm,项目名称:smaccm,代码行数:27,代码来源:SimulatePossibilitiesChartDialog.java


示例9: makeRenderer

import org.jzy3d.colors.Color; //导入依赖的package包/类
private void makeRenderer(String string) {
    font = new Font("Arial", Font.PLAIN, FONT_SIZE);
    cellRenderer = new TextCellRenderer(5, string, font);// date 5
    cellRenderer.setHorizontalAlignement(Halign.LEFT);
    cellRenderer.setTextColor(java.awt.Color.GRAY);
    cellRenderer.setBorderDisplayed(CELL_HAS_BORDER);
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:8,代码来源:AxeTextAnnotation.java


示例10: drawDebugPoint

import org.jzy3d.colors.Color; //导入依赖的package包/类
private void drawDebugPoint(GL gl) {
    gl.getGL2().glPointSize(5);
    gl.getGL2().glBegin(GL.GL_POINTS);
    gl.getGL2().glColor4f(Color.RED.r, Color.RED.g, Color.RED.b, Color.RED.a);
    gl.getGL2().glVertex3f(pos.x, pos.y, pos.z);
    gl.getGL2().glEnd();
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:8,代码来源:AxeTextAnnotation.java


示例11: callWithAlphaFactor

import org.jzy3d.colors.Color; //导入依赖的package包/类
protected void callWithAlphaFactor(GL gl, Color c, float alpha) {
    if (gl.isGL2()) {
        gl.getGL2().glColor4f(c.r, c.g, c.b, c.a * alpha);
    } else {
        GLES2CompatUtils.glColor4f(c.r, c.g, c.b, c.a * alpha);
    }
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:8,代码来源:AxeTextAnnotation.java


示例12: main

import org.jzy3d.colors.Color; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
    DateTime start = new DateTime("2015-05-02T08:00:00");
    DateTime stop = new DateTime("2015-05-02T12:00:00");
    // evt = shift(now, evt);

    DateTimeGenerator gen = new DateTimeGenerator();
    List<DateTime> events = gen.makeGaussianEvents(start, N / 2, WIDTH, timeMode, N_EARLY);
    List<DateTime> events2 = gen.makeGaussianEvents(stop, N / 2, WIDTH, timeMode, N_EARLY);

    // Model
    TicToc.T.tic();
    HistogramDate hist = new HistogramDate(events);
    System.out.println(hist.ranges.length + " bins");
    //HistogramDate hist2 = new HistogramDate(events2);
    TicToc.T.tocShow("gen hist");

    // Drawable
    TicToc.T.tic();
    HistogramDate2d histogram = new HistogramDate2d(hist, Color.CYAN, Color.GRAY);
    //HistogramDate2d histogram2 = new HistogramDate2d(hist2, Color.MAGENTA, Color.GRAY);
    TicToc.T.tocShow("made drawable");

    // Chart
    Chart chart = BigPicture.chart(histogram.getDrawable(), dimensions, Quality.Nicest);
    //chart.add(histogram2.getDrawable());
    //if (Type.dd.equals(dimensions))
        histogram.layout(chart);
        chart.add(histogram.buildLine(hist));
    // chart.getView().setSquared(false);
    
    
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:33,代码来源:DemoDateBar.java


示例13: initColormap

import org.jzy3d.colors.Color; //导入依赖的package包/类
protected void initColormap(Set<K> keys, IColorMap colormap) {
    colors = new HashMap<K,Color>();
    MinMaxColormappable minmax = new MinMaxColormappable(0, keys.size());
    int i=0;
    for(K k: keys){
        Color c = colormap.getColor(minmax, i++);
        c.a = 0.75f;
        colors.put(k, c);//Color.RED);
    }
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:11,代码来源:KeyRankColorMapper.java


示例14: fill

import org.jzy3d.colors.Color; //导入依赖的package包/类
private void fill(List<Float> values2, FloatVBO vbo) {
    int k = 0;
    for(Float f: values2){
        Coord3d c = new Coord3d(k, f, Math.random());
        Color col = Color.RED;
        
        putPoint(vbo, k, col, c);
        //System.out.println(c);
        
        k++;
    }
    vbo.getVertices().rewind();
    vbo.getIndices().rewind();
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:15,代码来源:VBOBuilderLineStrip.java


示例15: fillSerie

import org.jzy3d.colors.Color; //导入依赖的package包/类
protected void fillSerie(final JavaRDD<Coord3d> coords, final String name, final Serie2d.Type type, final Serie2d serie) {
    for(Coord3d item: coords.collect()){
        Coord2d coord = new Coord2d(item.x, item.y);
        serie.add(coord, Color.BLUE);
    }
    System.out.println("added " + coords.count() + " points in serie " + name + " " + type);
}
 
开发者ID:jzy3d,项目名称:bigpicture,代码行数:8,代码来源:SparkRDDChartBuilder.java


示例16: pitchChangeAtWithInfo

import org.jzy3d.colors.Color; //导入依赖的package包/类
@Override
public void pitchChangeAtWithInfo(double time, float value, Object info) {

    if (info instanceof Period) {
        Coord2d c = new Coord2d(time, value);
        System.out.println(c.x); // Period period = (Period)info;
        if (Period.OCCLUSIVE.equals(info)) {
            pitchSerie.add(new Coord2d(time, value), Color.GRAY.clone());
        } else if (Period.NOTE.equals(info)) {
            pitchSerie.add(new Coord2d(time, value), settings.pitchColor.clone());
        }
        pitchCursorAnnotation.setValue((float) time);
    }

}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:16,代码来源:OcclusiveMonitor.java


示例17: showOnsetAsAxeAnnotation

import org.jzy3d.colors.Color; //导入依赖的package包/类
public void showOnsetAsAxeAnnotation(AxeBox axebox) {
	for (SoundEvent e : getVoice().onsetEvents) {
		AxeXLineAnnotation onset = new AxeXLineAnnotation();
		onset.setColor(Color.YELLOW);
		onset.setWidth(0.05f);
		onset.setValue(e.timeInSec);

		axebox.getAnnotations().add(onset);
	}
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:11,代码来源:VocoboxControllerWav2SynthRead.java


示例18: main

import org.jzy3d.colors.Color; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
    LineSegmentChart d = new LineSegmentChart();
    d.makeMidiNoteChart(duration);
    
    
    ChartLauncher.openChart(d.midiNoteChart);

    d.midiNoteSerie.add(0.0f, 0.1f, Color.RED);
    d.midiNoteSerie.add(0.1f, 0.2f, Color.BLUE);
    /*d.midiNoteSerie.addOff(0.2f, 0.3f, Color.GREEN);
    
    d.midiNoteSerie.add(0.3f, 0.5f, Color.RED);
    d.midiNoteSerie.add(0.4f, 0.6f, Color.RED);
    d.midiNoteSerie.addOff(0.5f, 0.7f, Color.RED);*/
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:16,代码来源:LineSegmentChart.java


示例19: alpha

import org.jzy3d.colors.Color; //导入依赖的package包/类
/**
 * Apply amplitude value or pitch confidence value to alphe according to settings
 */
protected void alpha(double time, float value, SynthMonitorCharts charts, MonitorSettings settings, Color c) {
    if (settings.pitchColorAlphaWithConfidence && !settings.pitchColorAlphaWithAmplitude)
        c.a = charts.currentConfidenceReadOnly;
    else if (!settings.pitchColorAlphaWithConfidence && settings.pitchColorAlphaWithAmplitude)
        c.a = charts.currentAmplitudeReadOnly;
    else if (settings.pitchColorAlphaWithConfidence && settings.pitchColorAlphaWithAmplitude)
        c.a = charts.currentAmplitudeReadOnly * charts.currentConfidenceReadOnly;
    c.a = c.a * settings.pitchColorAlphaFactor+0;
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:13,代码来源:PitchChartProcessorDefault.java


示例20: amplitudeChangeAt

import org.jzy3d.colors.Color; //导入依赖的package包/类
@Override
public void amplitudeChangeAt(double time, float value) {
    currentTimeReadOnly = time;
    currentAmplitudeReadOnly = value;

    Color c = settings.ampliColor.clone();
    c.a = currentConfidenceReadOnly;
    showAmplitude(time, value, c);
}
 
开发者ID:vocobox,项目名称:vocobox,代码行数:10,代码来源:SynthMonitorCharts.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java License类代码示例发布时间:2022-05-23
下一篇:
Java EventType类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap