List of usage examples for java.awt Color YELLOW
Color YELLOW
To view the source code for java.awt Color YELLOW.
Click Source Link
From source file:visualizer.datamining.dataanalysis.NeighborhoodHit.java
private JFreeChart createChart(XYDataset xydataset) { JFreeChart chart = ChartFactory.createXYLineChart("Neighborhood Hit", "Number Neighbors", "Precision", xydataset, PlotOrientation.VERTICAL, true, true, false); chart.setBackgroundPaint(Color.WHITE); XYPlot xyplot = (XYPlot) chart.getPlot(); NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis(); numberaxis.setAutoRangeIncludesZero(false); xyplot.setDomainGridlinePaint(Color.BLACK); xyplot.setRangeGridlinePaint(Color.BLACK); xyplot.setOutlinePaint(Color.BLACK); xyplot.setOutlineStroke(new BasicStroke(1.0f)); xyplot.setBackgroundPaint(Color.white); xyplot.setDomainCrosshairVisible(true); xyplot.setRangeCrosshairVisible(true); xyplot.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] { Color.RED, Color.BLUE, Color.GREEN, Color.MAGENTA, Color.CYAN, Color.ORANGE, Color.BLACK, Color.DARK_GRAY, Color.GRAY, Color.LIGHT_GRAY, Color.YELLOW }, DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE, DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE)); XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer(); xylineandshaperenderer.setBaseShapesVisible(true); xylineandshaperenderer.setBaseShapesFilled(true); xylineandshaperenderer.setDrawOutlines(true); return chart; }
From source file:com.mindcognition.mindraider.ui.swing.concept.annotation.renderer.AbstractTextAnnotationRenderer.java
private void configureEditor(JTextArea annotationTextArea) { // TODO use colors from the configuration annotationTextArea.setForeground(Color.WHITE); annotationTextArea.setBackground(Color.BLACK); annotationTextArea.setCaretColor(Color.RED); annotationTextArea.setSelectionColor(Color.YELLOW); annotationTextArea.setLineWrap(true); annotationTextArea.setWrapStyleWord(true); annotationTextArea.setFont(TEXTAREA_FONT); ;// w ww. j av a 2s . c om // undo and redo undoManager = new UndoManager(); annotationTextArea.getDocument().addUndoableEditListener(new EditorUndoListner(undoManager, toolbar)); }
From source file:TrackerPanel.java
private void hideBackground(int[] cameraPixels) { depthMD = depthGen.getMetaData();// w ww . j a va 2 s . com ShortBuffer usersBuf = sceneMD.getData().createShortBuffer(); int userCount = 0; int maxUserCount = 0; int userCountMaxRow = 0; int maxY = 0; int row = 0; int rowCount = 0; while (usersBuf.remaining() > 0) { int pos = usersBuf.position(); short userID = usersBuf.get(); if (userID == 0) { // if not a user (i.e. is part of the background) cameraPixels[pos] = hideBGPixel; // make pixel transparent } else { userCount++; int y = imHeight - row; if (y > maxY) { maxY = y; } } rowCount++; if (rowCount == imWidth) { if (userCount > maxUserCount) { maxUserCount = userCount; userCountMaxRow = row; } row++; rowCount = 0; userCount = 0; } } int startPoint = imWidth * (imHeight - maxY); int finalPoint = startPoint + imWidth; if (maxY != 0) { printLine(startPoint, finalPoint, Color.YELLOW.getRGB()); } startPoint = imWidth * (userCountMaxRow); finalPoint = startPoint + imWidth; if (userCountMaxRow != 0) { SimpleHTTPPOSTRequester httpPost = new SimpleHTTPPOSTRequester(); try { httpPost.makeHTTPPOSTRequest(userCountMaxRow); } catch (ParseException e1) { e1.printStackTrace(); } Util.insertLastPoint(userCountMaxRow); int response = Util.analyzeLastFivePoints(); if (response == Util.NOT_READY) { printLine(startPoint, finalPoint, Color.RED.getRGB()); } else if (response == Util.READY) { printLine(startPoint, finalPoint, Color.WHITE.getRGB()); } else if (response == Util.GOING_UP) { printLine(startPoint, finalPoint, Color.GREEN.getRGB()); } else if (response == Util.GOING_DOWN) { printLine(startPoint, finalPoint, Color.PINK.getRGB()); } } }
From source file:org.csa.rstb.dat.toolviews.HaAlphaPlotPanel.java
private void initColorModels() { for (int j = 0; j <= 1; j++) { final int palSize = 256; final byte[] r = new byte[palSize]; final byte[] g = new byte[palSize]; final byte[] b = new byte[palSize]; final byte[] a = new byte[palSize]; r[0] = (byte) backgroundColor.getRed(); g[0] = (byte) backgroundColor.getGreen(); b[0] = (byte) backgroundColor.getBlue(); a[0] = (byte) backgroundColor.getAlpha(); final Palette pal = new Palette("Rainbow", new Color[] { Color.black, Color.blue, Color.cyan, Color.green, Color.yellow, Color.orange, Color.red }); for (int i = 1; i < 256; ++i) { float value = i / 255f; if (j == 0) value = (255 - i) / 255f; Color c = pal.lookupColor(value); r[i] = (byte) c.getRed(); g[i] = (byte) c.getGreen(); b[i] = (byte) c.getBlue(); a[i] = (byte) 255; }//from www. ja v a 2 s. c o m if (j == 0) { toggledColorModel = new IndexColorModel(8, palSize, r, g, b, a); } else { untoggledColorModel = new IndexColorModel(8, palSize, r, g, b, a); } } }
From source file:OptionDialogTest.java
public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; Rectangle2D rect = new Rectangle2D.Double(0, 0, getWidth() - 1, getHeight() - 1); g2.setPaint(Color.YELLOW); g2.fill(rect);/* w ww . j a v a 2 s .c o m*/ g2.setPaint(Color.BLUE); g2.draw(rect); }
From source file:net.sf.mzmine.chartbasics.chartthemes.ChartThemeFactory.java
/** * Creates the theme called "Karst". In this theme, the charts have a blue background and yellow * lines and labels.//from w ww . j av a 2s . c o m * * @return The "Karst" theme. */ public static EStandardChartTheme createKarstTheme() { EStandardChartTheme theme = new EStandardChartTheme(THEME.KARST, "Karst"); // Fonts theme.setExtraLargeFont(new Font("Arial", Font.BOLD, 20)); theme.setLargeFont(new Font("Arial", Font.BOLD, 11)); theme.setRegularFont(new Font("Arial", Font.PLAIN, 11)); theme.setSmallFont(new Font("Arial", Font.PLAIN, 11)); // Paint bg = new Color(50, 50, 202); // theme.setTitlePaint(Color.green); theme.setSubtitlePaint(Color.yellow); theme.setLegendBackgroundPaint(bg); theme.setLegendItemPaint(Color.yellow); theme.setChartBackgroundPaint(bg); theme.setPlotBackgroundPaint(bg); theme.setPlotOutlinePaint(Color.yellow); theme.setBaselinePaint(Color.white); theme.setCrosshairPaint(Color.red); theme.setLabelLinkPaint(Color.lightGray); theme.setTickLabelPaint(Color.yellow); theme.setAxisLabelPaint(Color.yellow); theme.setShadowPaint(Color.darkGray); theme.setItemLabelPaint(Color.yellow); theme.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] { Color.decode("0xFFFF00"), Color.decode("0x0036CC"), Color.decode("0xFF0000"), Color.decode("0xFFFF7F"), Color.decode("0x6681CC"), Color.decode("0xFF7F7F"), Color.decode("0xFFFFBF"), Color.decode("0x99A6CC"), Color.decode("0xFFBFBF"), Color.decode("0xA9A938"), Color.decode("0x2D4587") }, new Paint[] { Color.decode("0xFFFF00"), Color.decode("0x0036CC") }, new Stroke[] { new BasicStroke(2.0f) }, new Stroke[] { new BasicStroke(0.5f) }, DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE)); theme.setErrorIndicatorPaint(Color.lightGray); theme.setGridBandPaint(new Color(255, 255, 255, 20)); theme.setGridBandAlternatePaint(new Color(255, 255, 255, 40)); // axis Color transp = new Color(255, 255, 255, 200); theme.setRangeGridlinePaint(transp); theme.setDomainGridlinePaint(transp); theme.setAxisLinePaint(Color.yellow); theme.setMasterFontColor(Color.yellow); // axis offset theme.setAxisOffset(new RectangleInsets(0, 0, 0, 0)); return theme; }
From source file:visualizer.datamining.dataanalysis.NeighborhoodPreservation.java
private JFreeChart createChart(XYDataset xydataset) { JFreeChart chart = ChartFactory.createXYLineChart("Neighborhood Preservation", "Number Neighbors", "Precision", xydataset, PlotOrientation.VERTICAL, true, true, false); chart.setBackgroundPaint(Color.WHITE); XYPlot xyplot = (XYPlot) chart.getPlot(); NumberAxis numberaxis = (NumberAxis) xyplot.getRangeAxis(); numberaxis.setAutoRangeIncludesZero(false); xyplot.setDomainGridlinePaint(Color.BLACK); xyplot.setRangeGridlinePaint(Color.BLACK); xyplot.setOutlinePaint(Color.BLACK); xyplot.setOutlineStroke(new BasicStroke(1.0f)); xyplot.setBackgroundPaint(Color.white); xyplot.setDomainCrosshairVisible(true); xyplot.setRangeCrosshairVisible(true); xyplot.setDrawingSupplier(new DefaultDrawingSupplier( new Paint[] { Color.RED, Color.BLUE, Color.GREEN, Color.MAGENTA, Color.CYAN, Color.ORANGE, Color.BLACK, Color.DARK_GRAY, Color.GRAY, Color.LIGHT_GRAY, Color.YELLOW }, DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE, DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE)); XYLineAndShapeRenderer xylineandshaperenderer = (XYLineAndShapeRenderer) xyplot.getRenderer(); xylineandshaperenderer.setBaseShapesVisible(true); xylineandshaperenderer.setBaseShapesFilled(true); xylineandshaperenderer.setDrawOutlines(true); return chart; }
From source file:org.jls.toolbox.math.chart.XYBlockChart.java
/** * Permet de crer le graphique partir des paramtres spcifis. *//*from w ww .j ava 2s .c o m*/ private void createChart() { // Cration des axes NumberAxis xAxis = new NumberAxis(this.xTitle); xAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); xAxis.setLabelFont(new Font("Dialog", Font.BOLD, 14)); xAxis.setLowerMargin(0.0); xAxis.setUpperMargin(0.0); NumberAxis yAxis = new NumberAxis(this.yTitle); yAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); yAxis.setLabelFont(new Font("Dialog", Font.BOLD, 14)); yAxis.setLowerMargin(0.0); yAxis.setUpperMargin(0.0); this.renderer = new XYBlockRenderer(); PaintScale scale = new GrayPaintScale(0, 10); this.renderer.setPaintScale(scale); // Cration de la courbe this.plot = new XYPlot(this.dataset, xAxis, yAxis, this.renderer); // Cration du graphique this.chart = new JFreeChart(this.title, this.plot); this.chart.removeLegend(); createPaintScaleLegend(scale); setColorGradient(Color.yellow, Color.red, 0, 1); }
From source file:net.sf.profiler4j.console.ProjectDialog.java
/** * This method initializes rulesTable//from w w w . java2s . co m * * @return javax.swing.JTable */ private JTable getRulesTable() { if (rulesTable == null) { rulesTable = new JTable(); rulesTable.setModel(ruleTableModel); rulesTable.setRowMargin(4); rulesTable.setRowHeight(24); rulesTable.setFont(new Font("Monospaced", Font.PLAIN, 14)); TableColumn c; c = rulesTable.getColumnModel().getColumn(0); c.setMinWidth(300); c = rulesTable.getColumnModel().getColumn(1); c.setMinWidth(80); c.setMaxWidth(80); JComboBox editorCb = new JComboBox(); for (Rule.Action a : Rule.Action.values()) { editorCb.addItem(a); } c.setCellEditor(new DefaultCellEditor(editorCb)); c.setCellRenderer(new DefaultTableCellRenderer() { Font font = new Font("Monospaced", Font.BOLD, 13); @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); Rule.Action r = (Rule.Action) value; setHorizontalAlignment(CENTER); setFont(font); if (r == Rule.Action.ACCEPT) { setBackground(Color.GREEN); } else { setBackground(Color.RED); } if (isSelected) { setForeground(Color.YELLOW); } else { setForeground(Color.BLACK); } return this; } }); } return rulesTable; }
From source file:com.quinsoft.zeidon.objectbrowser.EntitySquare.java
@Override public void paint(Graphics g) { Graphics2D graphics2 = (Graphics2D) g; EntityDef entityDef = getEntityDef(); EntityCursor cursor = getView().cursor(entityDef); Color borderColor = Color.black; BasicStroke stroke = new BasicStroke(1); EntitySquare selectedSquare = oiDisplay.getSelectedEntity(); if (selectedSquare != null) { EntityDef selectedEntityDef = selectedSquare.getEntityDef(); if (selectedEntityDef.getRecursiveChild() == entityDef || selectedEntityDef.getRecursiveParent() == entityDef) { borderColor = Color.yellow; stroke = new BasicStroke(5); oiDisplay.setForRepaint(this); }//from w w w. ja v a 2s .c o m } if (selectedSquare == this) g.setColor(SELECTED_COLOR); else { switch (cursor.getStatus()) { case NULL: g.setColor(NULL_ENTITY); break; case OUT_OF_SCOPE: g.setColor(OUT_OF_SCOPE); break; case NOT_LOADED: g.setColor(NOT_LOADED); break; default: g.setColor(ENTITY_EXISTS); } } // Fill in the shape. graphics2.fillRoundRect(0, 0, size.width - 1, size.height - 1, 20, 20); // Draw the black outline. g.setColor(borderColor); RoundRectangle2D roundedRectangle = new RoundRectangle2D.Float(0, 0, size.width - 1, size.height - 1, 20, 20); graphics2.setStroke(stroke); graphics2.draw(roundedRectangle); // Write the entity name g.setColor(Color.black); graphics2.setFont(font); paintCenteredText(graphics2, env.getPainterScaleFactor(), entityDef.getName(), null); switch (cursor.getStatus()) { case NULL: paintCenteredText(graphics2, size.height / 2, "null", Color.WHITE); setToolTipText(cursor); break; case NOT_LOADED: paintCenteredText(graphics2, size.height / 2, "(Not yet loaded)", Color.WHITE); setToolTipText(entityDef.getName()); break; case OUT_OF_SCOPE: paintCenteredText(graphics2, size.height / 2, "(Out of Scope)", Color.WHITE); setToolTipText(entityDef.getName()); break; default: String s = getKeyString(cursor, entityDef, env); paintCenteredText(graphics2, size.height / 2, s, null); s = getSiblingCount(cursor); paintCenteredText(graphics2, size.height - env.getPainterScaleFactor(), s, null); setToolTipText(cursor); } }