List of usage examples for java.awt Color orange
Color orange
To view the source code for java.awt Color orange.
Click Source Link
From source file:org.nbheaven.sqe.codedefects.history.controlcenter.panels.SQEHistoryPanel.java
/** Creates new form SQEHistoryPanel */ public SQEHistoryPanel() { historyChart = org.jfree.chart.ChartFactory.createStackedXYAreaChart(null, "Snapshot", "CodeDefects", perProjectDataSet, PlotOrientation.VERTICAL, false, true, false); historyChart.setBackgroundPaint(Color.WHITE); historyChart.getXYPlot().setRangeGridlinePaint(Color.BLACK); historyChart.getXYPlot().setDomainGridlinePaint(Color.BLACK); historyChart.getXYPlot().setBackgroundPaint(Color.WHITE); XYPlot plot = historyChart.getXYPlot(); plot.setForegroundAlpha(0.7f);/* ww w . j ava2 s.co m*/ // plot.getRenderer(); NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis(); domainAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); LogarithmicAxis rangeAxis = new LogarithmicAxis("CodeDefects"); rangeAxis.setStrictValuesFlag(false); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); plot.setRangeAxis(rangeAxis); StackedXYAreaRenderer2 categoryItemRenderer = new StackedXYAreaRenderer2(); //3D(); categoryItemRenderer.setSeriesPaint(0, Color.RED); categoryItemRenderer.setSeriesPaint(1, Color.ORANGE); categoryItemRenderer.setSeriesPaint(2, Color.YELLOW); plot.setRenderer(categoryItemRenderer); ChartPanel historyChartPanel = new ChartPanel(historyChart); historyChartPanel.setBorder(null); historyChartPanel.setPreferredSize(new Dimension(150, 200)); historyChartPanel.setBackground(Color.WHITE); initComponents(); historyView.setLayout(new BorderLayout()); historyView.add(historyChartPanel, BorderLayout.CENTER); JPanel selectorPanel = new JPanel(); selectorPanel.setOpaque(false); GroupLayout layout = new GroupLayout(selectorPanel); selectorPanel.setLayout(layout); // Turn on automatically adding gaps between components layout.setAutocreateGaps(true); // Turn on automatically creating gaps between components that touch // the edge of the container and the container. layout.setAutocreateContainerGaps(true); ParallelGroup horizontalParallelGroup = layout.createParallelGroup(GroupLayout.LEADING); SequentialGroup verticalSequentialGroup = layout.createSequentialGroup(); layout.setHorizontalGroup(layout.createSequentialGroup().add(horizontalParallelGroup)); layout.setVerticalGroup(verticalSequentialGroup); clearHistoryButton = new JButton(); clearHistoryButton.setEnabled(false); clearHistoryButton.setIcon(ImageUtilities .image2Icon(ImageUtilities.loadImage("org/nbheaven/sqe/codedefects/history/resources/trash.png"))); clearHistoryButton.setOpaque(false); clearHistoryButton.setFocusPainted(false); clearHistoryButton.setToolTipText( NbBundle.getBundle("org/nbheaven/sqe/codedefects/history/controlcenter/panels/Bundle") .getString("HINT_clear_button")); horizontalParallelGroup.add(clearHistoryButton); verticalSequentialGroup.add(clearHistoryButton); clearHistoryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (null != activeHistory) { activeHistory.clear(); } } }); Component createVerticalStrut = Box.createVerticalStrut(10); horizontalParallelGroup.add(createVerticalStrut); verticalSequentialGroup.add(createVerticalStrut); for (final QualityProvider provider : SQEUtilities.getProviders()) { final JToggleButton providerButton = new JToggleButton(); providerButton.setIcon(provider.getIcon()); providerButton.setOpaque(false); providerButton.setFocusPainted(false); horizontalParallelGroup.add(providerButton); verticalSequentialGroup.add(providerButton); ActionListener listener = new ActionListener() { public void actionPerformed(ActionEvent e) { if (providerButton.isSelected()) { addSelectedProvider(provider); } else { removeSelectedProvider(provider); } updateView(); } }; providerButton.addActionListener(listener); addSelectedProvider(provider); providerButton.setSelected(true); } historyView.add(selectorPanel, BorderLayout.EAST); }
From source file:jat.application.DE405Propagator.DE405PropagatorPlot.java
void addBodies() { int bodyNumber; // int x, y, z; VectorN BodyPos;/*from www. ja va 2 s . c om*/ EphemerisPlotData epd; LinePlot l; // central body gets as sphere switch (Eph.ephFrame) { case ICRF: plot.addSpherePlot("Sun", java.awt.Color.ORANGE, sb.Bodies[body.SUN.ordinal()].radius); break; case HEE: plot.addSpherePlot("Sun", java.awt.Color.ORANGE, sb.Bodies[body.SUN.ordinal()].radius); break; case ECI: plot.addSpherePlot("Earth", java.awt.Color.BLUE, sb.Bodies[body.EARTH.ordinal()].radius); break; case MEOP: plot.addSpherePlot("Earth", java.awt.Color.BLUE, sb.Bodies[body.EARTH.ordinal()].radius); break; default: break; } // other bodies get a point for (body b : body.values()) { bodyNumber = b.ordinal(); if (Eph.bodyGravOnOff[bodyNumber] == true) { try { BodyPos = Eph.get_planet_pos(b, dpMain.dpParam.simulationDate); addPoint(plot, body.name[bodyNumber], sb.Bodies[bodyNumber].color, BodyPos.x[0], BodyPos.x[1], BodyPos.x[2]); epd = new EphemerisPlotData(Eph, b, dpMain.dpParam.simulationDate, dpMain.dpParam.tf, 100); l = new LinePlot(body.name[bodyNumber], sb.Bodies[bodyNumber].color, epd.XYZ); l.closed_curve = false; plot.addPlot(l); } catch (IOException e) { e.printStackTrace(); } } } // VectorN EarthPos = null; // VectorN MoonPost0 = null; // VectorN MoonPostf = null; // VectorN SunPos = null; // try { // SunPos = Eph.get_planet_pos(body.SUN, dpMain.dpParam.simulationDate); // EarthPos = Eph.get_planet_pos(body.EARTH, // dpMain.dpParam.simulationDate); // MoonPost0 = Eph.get_planet_pos(body.MOON, // dpMain.dpParam.simulationDate); // MoonPostf = Eph.get_planet_pos(body.MOON, // dpMain.dpParam.simulationDate.plus(dpMain.dpParam.tf)); // } catch (IOException e) { // e.printStackTrace(); // } // addPoint(plot, "Sun", java.awt.Color.ORANGE, SunPos.x[0], // SunPos.x[1], SunPos.x[2]); // addPoint(plot, "Moon t0", java.awt.Color.GRAY, MoonPost0.x[0], // MoonPost0.x[1], MoonPost0.x[2]); // addPoint(plot, "Moon tf", java.awt.Color.GRAY, MoonPostf.x[0], // MoonPostf.x[1], MoonPostf.x[2]); // addPoint(plot, "Earth", java.awt.Color.MAGENTA, EarthPos.x[0], // EarthPos.x[1], EarthPos.x[2]); // EphemerisPlotData epd = new EphemerisPlotData(Eph, body.MOON, dpMain.dpParam.simulationDate, dpMain.dpParam.tf, // 100); // LinePlot lMoon = new LinePlot("Moon", Color.green, epd.XYZ); // lMoon.closed_curve = false; // plot.addPlot(lMoon); }
From source file:com.seleniumtests.it.driver.TestBrowserSnapshot.java
/** * Read the capture file to detect dimension * It assumes that picture background is white and counts the number of white pixels in width and height (first column and first row) * @return//from w w w . j a v a2 s .co m * @throws IOException */ private Dimension getViewPortDimension(File picture) throws IOException { BufferedImage image = ImageIO.read(picture); int width = 0; int height = 0; for (width = 0; width < image.getWidth(); width++) { Color color = new Color(image.getRGB(width, 0)); if (!(color.equals(Color.WHITE) || color.equals(Color.YELLOW) || color.equals(Color.ORANGE) || color.equals(Color.GREEN) || color.equals(Color.RED))) { break; } } for (height = 0; height < image.getHeight(); height++) { Color color = new Color(image.getRGB(5, height)); if (!(color.equals(Color.WHITE) || color.equals(Color.YELLOW) || color.equals(Color.ORANGE) || color.equals(Color.GREEN) || color.equals(Color.RED))) { break; } } return new Dimension(width, height); }
From source file:ar.com.fdvs.dj.test.StylesReport2Test.java
public DynamicReport buildReport() throws Exception { // Style detailStyle = new Style(); Style detailStyle = new StyleBuilder(false).setTransparency(Transparency.OPAQUE) .setBackgroundColor(new Color(200, 200, 230)).build(); Style headerStyle = new Style(); headerStyle.setFont(Font.ARIAL_MEDIUM_BOLD); headerStyle.getFont().setItalic(true); headerStyle.setBorderTop(Border.PEN_2_POINT); headerStyle.setBorderBottom(Border.THIN); headerStyle.setBackgroundColor(Color.blue); headerStyle.setTransparency(Transparency.OPAQUE); headerStyle.setTextColor(Color.white); headerStyle.setHorizontalAlign(HorizontalAlign.CENTER); headerStyle.setVerticalAlign(VerticalAlign.MIDDLE); headerStyle.setRotation(Rotation.LEFT); Style titleStyle = new Style(); titleStyle.setFont(new Font(10, Font._FONT_VERDANA, true)); Style numberStyle = new Style(); numberStyle.setHorizontalAlign(HorizontalAlign.RIGHT); Style amountStyle = new Style(); amountStyle.setHorizontalAlign(HorizontalAlign.RIGHT); amountStyle.setBackgroundColor(Color.cyan); amountStyle.setTransparency(Transparency.OPAQUE); amountStyle.setFont(Font.ARIAL_MEDIUM_BOLD); amountStyle.getFont().setUnderline(true); amountStyle.setPaddingBottom(new Integer(5)); Style oddRowStyle = new Style(); oddRowStyle.setBorder(Border.NO_BORDER); Color veryLightGrey = new Color(230, 230, 230); oddRowStyle.setBackgroundColor(veryLightGrey); oddRowStyle.setTransparency(Transparency.OPAQUE); Style variableStyle = new Style(); BeanUtils.copyProperties(variableStyle, amountStyle); variableStyle.setFont(Font.ARIAL_MEDIUM_BOLD); variableStyle.setBackgroundColor(Color.PINK); Style variableStyle2 = new Style(); BeanUtils.copyProperties(variableStyle2, amountStyle); variableStyle2.setFont(Font.ARIAL_MEDIUM_BOLD); variableStyle2.setBackgroundColor(Color.ORANGE); DynamicReportBuilder drb = new DynamicReportBuilder(); Integer margin = new Integer(20); drb.setTitle("November 2006 sales report") //defines the title of the report .setSubtitle("The items in this report correspond " + "to the main products: DVDs, Books, Foods and Magazines") .setTitleStyle(titleStyle).setTitleHeight(new Integer(30)) .setDefaultStyles(null, null, null, detailStyle).setSubtitleHeight(new Integer(20)) .setDetailHeight(new Integer(15)) // .setLeftMargin(margin) // .setRightMargin(margin) // .setTopMargin(margin) // .setBottomMargin(margin) .setPrintBackgroundOnOddRows(true).setOddRowBackgroundStyle(oddRowStyle) .setColumnsPerPage(new Integer(1)).setColumnSpace(new Integer(5)); AbstractColumn columnState = ColumnBuilder.getNew().setColumnProperty("state", String.class.getName()) .setTitle("State").setWidth(new Integer(85)).setStyle(detailStyle).setHeaderStyle(headerStyle) .build();/*from w w w. ja va 2 s. c o m*/ AbstractColumn columnBranch = ColumnBuilder.getNew().setColumnProperty("branch", String.class.getName()) .setTitle("Branch").setWidth(new Integer(85)).setStyle(detailStyle).setHeaderStyle(headerStyle) .build(); AbstractColumn columnaProductLine = ColumnBuilder.getNew() .setColumnProperty("productLine", String.class.getName()).setTitle("Product Line") .setWidth(new Integer(85)).setStyle(detailStyle).setHeaderStyle(headerStyle).build(); AbstractColumn columnaItem = ColumnBuilder.getNew().setColumnProperty("item", String.class.getName()) .setTitle("item").setWidth(new Integer(85)).setStyle(detailStyle).setHeaderStyle(headerStyle) .build(); AbstractColumn columnCode = ColumnBuilder.getNew().setColumnProperty("id", Long.class.getName()) .setTitle("ID").setWidth(new Integer(40)).setStyle(numberStyle).setHeaderStyle(headerStyle).build(); AbstractColumn columnaCantidad = ColumnBuilder.getNew().setColumnProperty("quantity", Long.class.getName()) .setTitle("Quantity").setWidth(new Integer(80)).setStyle(numberStyle).setHeaderStyle(headerStyle) .build(); AbstractColumn columnAmount = ColumnBuilder.getNew().setColumnProperty("amount", Float.class.getName()) .setTitle("Amount").setWidth(new Integer(90)).setPattern("$ 0.00").setStyle(amountStyle) .setHeaderStyle(headerStyle).build(); drb.addColumn(columnState); drb.addColumn(columnaItem); drb.addColumn(columnBranch); drb.addColumn(columnaProductLine); drb.addColumn(columnCode); drb.addColumn(columnaCantidad); drb.addColumn(columnAmount); DJGroup group = new GroupBuilder().setCriteriaColumn((PropertyColumn) columnState) .addFooterVariable(columnAmount, DJCalculation.SUM, variableStyle).build(); drb.addGroup(group); DJGroup group2 = new GroupBuilder().setCriteriaColumn((PropertyColumn) columnaItem) .addFooterVariable(columnAmount, DJCalculation.SUM).build(); drb.addGroup(group2); group2.setDefaulFooterVariableStyle(variableStyle2); drb.setUseFullPageWidth(true); DynamicReport dr = drb.build(); // saveXML(dr,"dynamicReport"); return dr; }
From source file:cl.apr.pdf.chart.BarChartAviso.java
public CustomRenderer() { this.colors = new Paint[] { Color.red, Color.blue, Color.green, Color.yellow, Color.orange, Color.cyan, Color.magenta, Color.blue }; }
From source file:com.busimu.core.dao.impl.UserMngDaoPolicyJpaImpl.java
private void initExampleData() throws Exception { EntityManager em = emf.createEntityManager(); try {//w w w . j a va 2 s .co m EntityTransaction tx = em.getTransaction(); tx.begin(); User player1 = new User("student@busimu.com", "ssssss", "s", User.Type.STUDENT); player1.setStatus(User.Status.ACTIVE); User player2 = new User("zhangsan@busimu.com", "123456", "", User.Type.STUDENT); player2.setStatus(User.Status.ACTIVE); User player3 = new User("lisi@busimu.com", "123456", "?", User.Type.STUDENT); player3.setStatus(User.Status.ACTIVE); User teacher = new User("teacher@busimu.com", "tttttt", "t", User.Type.TEACHER); teacher.setStatus(User.Status.ACTIVE); em.persist(player1); em.persist(player2); em.persist(player3); em.persist(teacher); Campaign campaign = teacher.createCampagin("", Campaign.Type.COURSE); SimMarket south = campaign.addMarket("??"); SimMarket central = campaign.addMarket("?"); SimMarket north = campaign.addMarket("?"); SimMarket east = campaign.addMarket("?"); SimMarket west = campaign.addMarket(""); SimCorporation ibm = south.addCorporation("IBM", new Color(128, 128, 255)); SimCorporation ericsson = south.addCorporation("Ericsson", Color.BLUE); SimCorporation oracle = south.addCorporation("Oracle", Color.RED); for (int i = 0; i < 8; i++) { campaign.addRound(); } player2.addCampaign(campaign); player3.addCampaign(campaign); em.persist(campaign); Team t1 = new Team("anoym1"); Team t2 = new Team("anoym2"); Team t3 = new Team("anoym3"); t1.addCorporation(ibm); t2.addCorporation(ericsson); t3.addCorporation(oracle); em.persist(t1); em.persist(t2); em.persist(t3); Campaign runningCampaign = teacher.createCampagin("", Campaign.Type.COURSE); SimMarket m1 = runningCampaign.addMarket(""); SimMarket m2 = runningCampaign.addMarket(""); SimMarket m3 = runningCampaign.addMarket(""); SimCorporation corp1 = m1.addCorporation("", Color.ORANGE); for (int i = 0; i < 3; i++) { runningCampaign.addRound(); } player1.addCampaign(runningCampaign); player2.addCampaign(runningCampaign); player3.addCampaign(runningCampaign); runningCampaign.setStatus(Campaign.Status.ONGOING); Team t11 = new Team("anoym11"); t11.addCorporation(corp1); t11.addUser(player1); t11.addUser(player2); t11.addUser(player3); em.persist(t11); tx.commit(); } finally { em.close(); } }
From source file:se.llbit.chunky.ui.Minimap.java
@Override public void paintComponent(Graphics g) { super.paintComponent(g); // NB lock the lock ordering here is critical! // we access ChunkMap via Chunky but here we also need to lock Chunky synchronized (chunky) { synchronized (this) { ChunkView mapView = chunky.getMapView(); WorldRenderer renderer = chunky.getWorldRenderer(); World world = chunky.getWorld(); ChunkSelectionTracker selection = chunky.getChunkSelection(); renderer.render(world, mapBuffer, Chunk.biomeRenderer, selection); mapBuffer.renderBuffered(g); renderer.renderPlayer(world, g, view, true); renderer.renderSpawn(world, g, view, true); // draw view rectangle g.setColor(Color.orange); g.drawRect((int) FastMath.round(mapView.x0 - view.x0), (int) FastMath.round(mapView.z0 - view.z0), FastMath.round(mapView.width / (float) mapView.scale), FastMath.round(mapView.height / (float) mapView.scale)); // draw North indicator g.setFont(font);/* www. j a v a 2 s . c o m*/ g.setColor(Color.red); g.drawString("N", view.width / 2 - 4, 12); g.setColor(Color.black); g.drawString(world.levelName(), 10, view.height - 10); } } }
From source file:com.orange.atk.atkUI.coregui.StatisticTool.java
/** * Creates the chart.//from ww w . j a v a2 s. c o m * * @param piedataset * the data set * @return the created chart */ private JFreeChart createChart(PieDataset piedataset) { JFreeChart jfreechart = ChartFactory.createPieChart3D("", piedataset, true, true, false); jfreechart.setBackgroundPaint(Color.lightGray); PiePlot pie3dplot = (PiePlot) jfreechart.getPlot(); pie3dplot.setStartAngle(0); pie3dplot.setDirection(Rotation.CLOCKWISE); pie3dplot.setForegroundAlpha(0.5F); pie3dplot.setNoDataMessage("No data to display"); pie3dplot.setSectionPaint(0, Color.GREEN);// passed pie3dplot.setSectionPaint(1, Color.RED);// failed pie3dplot.setSectionPaint(2, Color.ORANGE);// skipped pie3dplot.setSectionPaint(3, Color.LIGHT_GRAY);// not analysed pie3dplot.setToolTipGenerator(new MyToolTipGenerator()); pie3dplot.setLabelGenerator(new MySectionLabelGenerator()); pie3dplot.setLegendLabelGenerator(new MySectionLabelGenerator()); return jfreechart; }
From source file:SwingDnDTest.java
public static JTable table() { Object[][] cells = { { "Mercury", 2440.0, 0, false, Color.YELLOW }, { "Venus", 6052.0, 0, false, Color.YELLOW }, { "Earth", 6378.0, 1, false, Color.BLUE }, { "Mars", 3397.0, 2, false, Color.RED }, { "Jupiter", 71492.0, 16, true, Color.ORANGE }, { "Saturn", 60268.0, 18, true, Color.ORANGE }, { "Uranus", 25559.0, 17, true, Color.BLUE }, { "Neptune", 24766.0, 8, true, Color.BLUE }, { "Pluto", 1137.0, 1, false, Color.BLACK } }; String[] columnNames = { "Planet", "Radius", "Moons", "Gaseous", "Color" }; return new JTable(cells, columnNames); }
From source file:edu.ucla.stat.SOCR.chart.demo.BarChartDemo3.java
/** * Creates a sample chart.//from w ww .j a v a 2s . c o m * * @param dataset the dataset. * * @return a sample chart. */ protected JFreeChart createChart(CategoryDataset dataset) { JFreeChart chart = ChartFactory.createBarChart(chartTitle, // chart title domainLabel, // domain axis label rangeLabel, // range axis label dataset, // data PlotOrientation.VERTICAL, // the plot orientation !legendPanelOn, // include legend true, false); chart.setBackgroundPaint(Color.lightGray); // get a reference to the plot for further customisation... CategoryPlot plot = (CategoryPlot) chart.getPlot(); plot.setNoDataMessage("NO DATA!"); CategoryItemRenderer renderer = new CustomBarRenderer(new Paint[] { Color.red, Color.blue, Color.green, Color.yellow, Color.orange, Color.cyan, Color.magenta, Color.blue }); renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator()); renderer.setBaseItemLabelsVisible(true); ItemLabelPosition p = new ItemLabelPosition(ItemLabelAnchor.CENTER, TextAnchor.CENTER, TextAnchor.CENTER, 45.0); renderer.setBasePositiveItemLabelPosition(p); plot.setRenderer(renderer); CategoryMarker marker = new CategoryMarker("Category 3"); marker.setLabel("Special"); marker.setPaint(new Color(0xDD, 0xFF, 0xDD, 0x80)); marker.setAlpha(0.5f); marker.setLabelAnchor(RectangleAnchor.TOP_LEFT); marker.setLabelTextAnchor(TextAnchor.TOP_LEFT); marker.setLabelOffsetType(LengthAdjustmentType.CONTRACT); plot.addDomainMarker(marker, Layer.BACKGROUND); // change the margin at the top of the range axis... NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); rangeAxis.setLowerMargin(0.15); rangeAxis.setUpperMargin(0.15); BarRenderer seriesRenderer = (BarRenderer) plot.getRenderer(); seriesRenderer.setLegendItemLabelGenerator(new SOCRCategorySeriesLabelGenerator()); setCategorySummary(dataset); return chart; }