List of usage examples for java.awt Color gray
Color gray
To view the source code for java.awt Color gray.
Click Source Link
From source file:MyStatsPanel.java
public MyStatsPanel(AdminGUI adminGUI, Statement statement) { this.adminGUI = adminGUI; this.statement = statement; pieChartPanel = createPieChartPanel(); pieChartPanel.setBackground(Color.GRAY); pieChartPanel.setPreferredSize(new Dimension(550, 260)); northPanel = new JPanel(new FlowLayout()); northPanel.setBackground(Color.GRAY); clockPanel = new MyClock("Advanced"); northPanel.add(clockPanel);/* w w w . ja v a 2 s. c om*/ statsPanel = setFields(); add(northPanel, BorderLayout.NORTH); add(statsPanel, BorderLayout.CENTER); add(pieChartPanel, BorderLayout.SOUTH); setUpGUI(); }
From source file:com.okmich.hackerday.client.tool.dashboard.ReportItemPanel.java
/** * Creates new form ReportItemPanel/* www. jav a 2 s . com*/ * * @param title * @param handler */ public ReportItemPanel(String title, Handler handler) { this.handler = handler; this.handler.registerUI(this); //UI specifics this.title = title; setMinimumSize(new java.awt.Dimension(400, 300)); setLayout(new java.awt.BorderLayout()); setBorder(BorderFactory.createLineBorder(Color.GRAY)); // containPanel = new JPanel(new BorderLayout(5, 5)); // buildContainerPanel(); // add(containPanel, BorderLayout.NORTH); add(createChartPanel(), BorderLayout.CENTER); }
From source file:ExtendedParagraphExample.java
public static void createDocumentStyles(StyleContext sc) { Style defaultStyle = sc.getStyle(StyleContext.DEFAULT_STYLE); // Create and add the main document style Style mainStyle = sc.addStyle(mainStyleName, defaultStyle); StyleConstants.setLeftIndent(mainStyle, 16); StyleConstants.setRightIndent(mainStyle, 16); StyleConstants.setFirstLineIndent(mainStyle, 16); StyleConstants.setFontFamily(mainStyle, "serif"); StyleConstants.setFontSize(mainStyle, 12); // Create and add the constant width style Style cwStyle = sc.addStyle(charStyleName, null); StyleConstants.setFontFamily(cwStyle, "monospaced"); StyleConstants.setForeground(cwStyle, Color.white); // Create and add the heading style Style heading2Style = sc.addStyle(heading2StyleName, null); StyleConstants.setForeground(heading2Style, Color.red); StyleConstants.setFontSize(heading2Style, 16); StyleConstants.setFontFamily(heading2Style, "serif"); StyleConstants.setBold(heading2Style, true); StyleConstants.setLeftIndent(heading2Style, 8); StyleConstants.setFirstLineIndent(heading2Style, 0); // Create and add the extended para styles Style paraStyle = sc.addStyle(paraStyleName, null); Color bgColor = Color.gray; ExtendedStyleConstants.setParagraphBackground(paraStyle, bgColor); ExtendedStyleConstants.setParagraphBorder(paraStyle, BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2), BorderFactory.createCompoundBorder( BorderFactory.createEtchedBorder(bgColor.brighter(), bgColor.darker()), BorderFactory.createEmptyBorder(4, 4, 4, 4)))); }
From source file:org.jfree.chart.demo.CylinderChartDemo1.java
private static JFreeChart createChart(CategoryDataset categorydataset) { JFreeChart jfreechart = ChartFactory.createBarChart3D("Cylinder Chart Demo 1", "Category", "Value", categorydataset, PlotOrientation.VERTICAL, false, true, false); CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot(); Paint apaint[] = createPaint(); CustomCylinderRenderer customcylinderrenderer = new CustomCylinderRenderer(apaint); customcylinderrenderer.setGradientPaintTransformer( new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_HORIZONTAL)); customcylinderrenderer.setBaseOutlinePaint(Color.gray); customcylinderrenderer.setBaseOutlineStroke(new BasicStroke(0.3F)); customcylinderrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); categoryplot.setRenderer(customcylinderrenderer); return jfreechart; }
From source file:com.chris.brkopani.gui.analytics.Graph.java
public void createAndShowGui(JDesktopPane desk) throws SQLException { //? tabed pane ? WebLookAndFeel.install();/*from www. j a va 2s.co m*/ frame = new JInternalFrame("PieChart", true, true, true, true); frame.setFrameIcon(new ImageIcon("res/br.png")); frame.setBounds(530, 5, 520, 350); frame.getContentPane().getBackground(); // This will create the dataset PieDataset dataset = createDataset(); // based on the dataset we create the chart JFreeChart chart = createChart(dataset, "PieChart"); // we put the chart into a panel ChartPanel chartPanel = new ChartPanel(chart); chart.setBackgroundPaint(Color.GRAY); // default size chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); // add it to our application frame.add(chartPanel); frame.setVisible(true); desk.add(frame); }
From source file:org.codehaus.mojo.chronos.chart.ChartUtil.java
/** * Generate a {@link ValueMarker}./*w w w . ja v a2s. c o m*/ */ private static ValueMarker addValueMarker(String text, double x, boolean domain) { ValueMarker marker = new ValueMarker(x); marker.setPaint(Color.GRAY); marker.setLabel(text); if (domain) { marker.setLabelAnchor(RectangleAnchor.TOP_LEFT); marker.setLabelTextAnchor(TextAnchor.TOP_RIGHT); } else { marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT); marker.setLabelTextAnchor(TextAnchor.BOTTOM_RIGHT); } return marker; }
From source file:org.jfree.chart.demo.CylinderChartDemo2.java
private static JFreeChart createChart(CategoryDataset categorydataset) { JFreeChart jfreechart = ChartFactory.createBarChart3D("Cylinder Chart Demo 2", "Category", "Value", categorydataset, PlotOrientation.HORIZONTAL, false, true, false); CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot(); Paint apaint[] = createPaint(); CustomCylinderRenderer customcylinderrenderer = new CustomCylinderRenderer(apaint); customcylinderrenderer.setGradientPaintTransformer( new StandardGradientPaintTransformer(GradientPaintTransformType.CENTER_VERTICAL)); customcylinderrenderer.setBaseOutlinePaint(Color.gray); customcylinderrenderer.setBaseOutlineStroke(new BasicStroke(0.3F)); customcylinderrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator()); categoryplot.setRenderer(customcylinderrenderer); return jfreechart; }
From source file:jamel.gui.charts.JamelChart.java
/** * Returns the standard chart theme.//from w ww .j a v a2 s. c om * @return the standard chart theme. */ private static StandardChartTheme getNewChartTheme() { StandardChartTheme theme = new StandardChartTheme("Standard Chart Theme"); float size = theme.getExtraLargeFont().getSize2D(); Font titleFont = theme.getExtraLargeFont().deriveFont(size - 4); theme.setExtraLargeFont(titleFont); Font axisFont = theme.getRegularFont(); theme.setLargeFont(axisFont); theme.setChartBackgroundPaint(new Color(0, 0, 0, 1)); theme.setPlotBackgroundPaint(Color.WHITE); theme.setDomainGridlinePaint(Color.GRAY); theme.setRangeGridlinePaint(Color.GRAY); return theme; }
From source file:sturesy.votinganalysis.TimeChart.java
/** * Create a new TimeChart/* w w w.j a va 2 s . c o m*/ */ public TimeChart(Color background) { _background = background; if (_background == null) { _background = Color.GRAY; } _chartpanel = getXYSeriesChart(new HashSet<Vote>()); _ui = new TimeChartUI(_chartpanel); }
From source file:cl.almejo.vsim.gui.ColorScheme.java
public ColorScheme(String name) { _name = name;/*from w ww . ja v a 2 s.co m*/ _colors.put("background", Color.GRAY); _colors.put("bus-on", Color.RED); _colors.put("gates", Color.BLUE); _colors.put("ground", Color.GREEN); _colors.put("off", Color.BLACK); _colors.put("wires-on", Color.RED); _colors.put("signal", Color.RED); _colors.put("grid", Color.GRAY); _colors.put("label", Color.YELLOW); }