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:it.eng.spagobi.engines.chart.bo.charttypes.dialcharts.SBISpeedometer.java
/** * Creates a chart of type speedometer.// ww w . j a v a2s. com * * @param chartTitle the chart title. * @param dataset the dataset. * * @return A chart speedometer. */ public JFreeChart createChart(DatasetMap datasets) { logger.debug("IN"); Dataset dataset = (Dataset) datasets.getDatasets().get("1"); DialPlot plot = new DialPlot(); plot.setDataset((ValueDataset) dataset); plot.setDialFrame(new StandardDialFrame()); plot.setBackground(new DialBackground()); if (dialtextuse) { DialTextAnnotation annotation1 = new DialTextAnnotation(dialtext); annotation1.setFont(styleTitle.getFont()); annotation1.setRadius(0.7); plot.addLayer(annotation1); } DialValueIndicator dvi = new DialValueIndicator(0); dvi.setFont(new Font(labelsValueStyle.getFontName(), Font.PLAIN, labelsValueStyle.getSize())); dvi.setPaint(labelsValueStyle.getColor()); plot.addLayer(dvi); StandardDialScale scale = new StandardDialScale(lower, upper, -120, -300, 10.0, 4); if (!(increment > 0)) { logger.warn("increment cannot be less than 0, put default to 0.1"); increment = 0.01; } scale.setMajorTickIncrement(increment); // if (!( minorTickCount > 0)){ // logger.warn("minor tick count cannot be less than 0, put default to 1"); // minorTickCount = 1; // } scale.setMinorTickCount(minorTickCount); scale.setTickRadius(0.88); scale.setTickLabelOffset(0.15); //set tick label style Font tickLabelsFont = new Font(labelsTickStyle.getFontName(), Font.PLAIN, labelsTickStyle.getSize()); scale.setTickLabelFont(tickLabelsFont); scale.setTickLabelPaint(labelsTickStyle.getColor()); plot.addScale(0, scale); plot.addPointer(new DialPointer.Pin()); DialCap cap = new DialCap(); plot.setCap(cap); // sets intervals for (Iterator iterator = intervals.iterator(); iterator.hasNext();) { KpiInterval interval = (KpiInterval) iterator.next(); StandardDialRange range = new StandardDialRange(interval.getMin(), interval.getMax(), interval.getColor()); range.setInnerRadius(0.52); range.setOuterRadius(0.55); plot.addLayer(range); } GradientPaint gp = new GradientPaint(new Point(), new Color(255, 255, 255), new Point(), new Color(170, 170, 220)); DialBackground db = new DialBackground(gp); db.setGradientPaintTransformer(new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL)); plot.setBackground(db); plot.removePointer(0); DialPointer.Pointer p = new DialPointer.Pointer(); p.setFillPaint(Color.yellow); plot.addPointer(p); logger.debug("OUT"); JFreeChart chart = new JFreeChart(name, plot); TextTitle title = setStyleTitle(name, styleTitle); chart.setTitle(title); if (subName != null && !subName.equals("")) { TextTitle subTitle = setStyleTitle(subName, styleSubTitle); chart.addSubtitle(subTitle); } chart.setBackgroundPaint(color); return chart; }
From source file:edu.uchc.octane.OctaneWindowControl.java
/** * Draw trajectory overlay on images //from ww w . j ava 2 s . c o m */ protected void drawOverlay() { if (!showOverlay_) { imp_.setOverlay(null); return; } GeneralPath path = new GeneralPath(); for (int i = 0; i < dataset_.getSize(); i++) { Trajectory v = dataset_.getTrajectoryByIndex(i); if (v.marked) { // path.append(new Arc2D.Double(v.get(0).x-0.15,v.get(0).y,0.3,0.3,0,360,Arc2D.OPEN), false); path.moveTo(v.get(0).x, v.get(0).y); for (int j = 1; j < v.size(); j++) { path.lineTo(v.get(j).x, v.get(j).y); } // path.append(new Rectangle2D.Double(v.get(v.size()-1).x-0.15,v.get(v.size()-1).y-0.15,0.3,0.3), false); } } imp_.setOverlay(path, Color.yellow, new BasicStroke(0.1f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND)); }
From source file:com.tiempometa.muestradatos.JReadTags.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY // //GEN-BEGIN:initComponents ResourceBundle bundle = ResourceBundle.getBundle("com.tiempometa.muestradatos.muestradatos"); dialogPane = new JPanel(); contentPanel = new JPanel(); label2 = new JLabel(); nextBibTextField = new JTextField(); statusLabel = new JLabel(); startReadingButton = new JButton(); bibLabel = new JLabel(); scrollPane1 = new JScrollPane(); tagReadTable = new JTable(); label3 = new JLabel(); tidTextField = new JTextField(); deleteSelectedButton = new JButton(); label4 = new JLabel(); epcTextField = new JTextField(); deleteReadButton = new JButton(); label1 = new JLabel(); dataToStoreComboBox = new JComboBox<>(); deleteAllButton = new JButton(); allowDuplicateBibsCheckBox = new JCheckBox(); buttonBar = new JPanel(); closeButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle(bundle.getString("JReadTags.this.title")); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); setResizable(false);//from w w w .ja v a2 s . c o m setIconImage( new ImageIcon(getClass().getResource("/com/tiempometa/resources/tiempometa_icon_large_alpha.png")) .getImage()); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== { dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(15)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(52)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(138)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(71)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(155)) }, new RowSpec[] { new RowSpec(Sizes.dluY(17)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(20)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(20)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(25)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label2 ---- label2.setText(bundle.getString("JReadTags.label2.text")); label2.setFont(new Font("Tahoma", Font.PLAIN, 36)); contentPanel.add(label2, cc.xywh(3, 5, 3, 1)); //---- nextBibTextField ---- nextBibTextField.setFont(new Font("Tahoma", Font.PLAIN, 36)); nextBibTextField.setHorizontalAlignment(SwingConstants.RIGHT); nextBibTextField.setText(bundle.getString("JReadTags.nextBibTextField.text")); contentPanel.add(nextBibTextField, cc.xy(7, 5)); //---- statusLabel ---- statusLabel.setText(bundle.getString("JReadTags.statusLabel.text")); statusLabel.setHorizontalAlignment(SwingConstants.CENTER); statusLabel.setBackground(Color.yellow); statusLabel.setOpaque(true); statusLabel.setFont(new Font("Tahoma", Font.BOLD, 20)); contentPanel.add(statusLabel, cc.xywh(9, 3, 1, 5)); //---- startReadingButton ---- startReadingButton.setText(bundle.getString("JReadTags.startReadingButton.text")); startReadingButton.setFont(new Font("Tahoma", Font.PLAIN, 14)); startReadingButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { startReadingButtonActionPerformed(e); } }); contentPanel.add(startReadingButton, cc.xywh(3, 7, 3, 1)); //---- bibLabel ---- bibLabel.setForeground(Color.red); bibLabel.setFont(new Font("Tahoma", Font.BOLD, 36)); bibLabel.setHorizontalAlignment(SwingConstants.CENTER); contentPanel.add(bibLabel, cc.xy(9, 9)); //======== scrollPane1 ======== { scrollPane1.setViewportView(tagReadTable); } contentPanel.add(scrollPane1, cc.xywh(3, 11, 7, 1)); //---- label3 ---- label3.setText(bundle.getString("JReadTags.label3.text")); label3.setHorizontalAlignment(SwingConstants.RIGHT); label3.setFont(new Font("Tahoma", Font.PLAIN, 14)); contentPanel.add(label3, cc.xy(3, 13)); //---- tidTextField ---- tidTextField.setFont(new Font("Tahoma", Font.PLAIN, 14)); contentPanel.add(tidTextField, cc.xy(5, 13)); //---- deleteSelectedButton ---- deleteSelectedButton.setText(bundle.getString("JReadTags.deleteSelectedButton.text")); deleteSelectedButton.setFont(new Font("Tahoma", Font.PLAIN, 14)); deleteSelectedButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { deleteSelectedButtonActionPerformed(e); } }); contentPanel.add(deleteSelectedButton, cc.xy(9, 13)); //---- label4 ---- label4.setText(bundle.getString("JReadTags.label4.text")); label4.setHorizontalAlignment(SwingConstants.RIGHT); label4.setFont(new Font("Tahoma", Font.PLAIN, 14)); contentPanel.add(label4, cc.xy(3, 15)); //---- epcTextField ---- epcTextField.setFont(new Font("Tahoma", Font.PLAIN, 14)); contentPanel.add(epcTextField, cc.xy(5, 15)); //---- deleteReadButton ---- deleteReadButton.setText(bundle.getString("JReadTags.deleteReadButton.text")); deleteReadButton.setFont(new Font("Tahoma", Font.PLAIN, 14)); deleteReadButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { deleteReadButtonActionPerformed(e); } }); contentPanel.add(deleteReadButton, cc.xy(9, 15)); //---- label1 ---- label1.setText(bundle.getString("JReadTags.label1.text")); label1.setHorizontalAlignment(SwingConstants.RIGHT); label1.setFont(new Font("Tahoma", Font.PLAIN, 14)); contentPanel.add(label1, cc.xy(3, 17)); //---- dataToStoreComboBox ---- dataToStoreComboBox.setModel(new DefaultComboBoxModel<>(new String[] { "EPC", "TID" })); dataToStoreComboBox.setFont(new Font("Tahoma", Font.PLAIN, 14)); contentPanel.add(dataToStoreComboBox, cc.xy(5, 17)); //---- deleteAllButton ---- deleteAllButton.setText(bundle.getString("JReadTags.deleteAllButton.text")); deleteAllButton.setFont(new Font("Tahoma", Font.PLAIN, 14)); deleteAllButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { deleteAllButtonActionPerformed(e); } }); contentPanel.add(deleteAllButton, cc.xy(9, 17)); //---- allowDuplicateBibsCheckBox ---- allowDuplicateBibsCheckBox.setText(bundle.getString("JReadTags.allowDuplicateBibsCheckBox.text")); contentPanel.add(allowDuplicateBibsCheckBox, cc.xy(5, 19)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout( new FormLayout(new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); //---- closeButton ---- closeButton.setText("Cerrar"); closeButton.setFont(new Font("Tahoma", Font.PLAIN, 14)); closeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { closeButtonActionPerformed(e); } }); buttonBar.add(closeButton, cc.xy(2, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); setSize(710, 675); setLocationRelativeTo(getOwner()); // //GEN-END:initComponents }
From source file:edu.umn.cs.spatialHadoop.OperationsParams.java
public static Color getColor(Configuration conf, String key, Color defaultValue) { String colorName = conf.get(key); if (colorName == null) return defaultValue; colorName = colorName.toLowerCase(); Color color = defaultValue;/*w w w .ja va 2 s . c o m*/ if (colorName.equals("red")) { color = Color.RED; } else if (colorName.equals("pink")) { color = Color.PINK; } else if (colorName.equals("blue")) { color = Color.BLUE; } else if (colorName.equals("cyan")) { color = Color.CYAN; } else if (colorName.equals("green")) { color = Color.GREEN; } else if (colorName.equals("black")) { color = Color.BLACK; } else if (colorName.equals("white")) { color = Color.WHITE; } else if (colorName.equals("gray")) { color = Color.GRAY; } else if (colorName.equals("yellow")) { color = Color.YELLOW; } else if (colorName.equals("orange")) { color = Color.ORANGE; } else if (colorName.equals("none")) { color = new Color(0, 0, 255, 0); } else if (colorName.matches("#[a-zA-Z0-9]{8}")) { String redHex = colorName.substring(1, 2); String greenHex = colorName.substring(3, 4); String blueHex = colorName.substring(5, 6); String opacityHex = colorName.substring(7, 8); int red = Integer.parseInt(redHex, 16); int green = Integer.parseInt(greenHex, 16); int blue = Integer.parseInt(blueHex, 16); int opacity = Integer.parseInt(opacityHex, 16); color = new Color(red, green, blue, opacity); } else { LOG.warn("Does not understand the color '" + conf.get(key) + "'"); } return color; }
From source file:net.sf.fspdfs.chartthemes.simple.SimpleSettingsFactory.java
/** * *//*from www. j a va 2s . c o m*/ public static final ChartThemeSettings createChartThemeSettings() { ChartThemeSettings settings = new ChartThemeSettings(); ChartSettings chartSettings = settings.getChartSettings(); chartSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); chartSettings.setBackgroundImage(new FileImageProvider("net/sf/fspdfs/chartthemes/simple/fspdfs.png")); chartSettings.setBackgroundImageAlignment(new Integer(Align.TOP_RIGHT)); chartSettings.setBackgroundImageAlpha(new Float(1f)); chartSettings.setBorderVisible(Boolean.TRUE); chartSettings.setBorderPaint(new ColorProvider(Color.GREEN)); chartSettings.setBorderStroke(new BasicStroke(1f)); chartSettings.setAntiAlias(Boolean.TRUE); chartSettings.setTextAntiAlias(Boolean.TRUE); chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings titleSettings = settings.getTitleSettings(); titleSettings.setShowTitle(Boolean.TRUE); titleSettings.setPosition(EdgeEnum.TOP); titleSettings.setForegroundPaint(new ColorProvider(Color.black)); titleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); titleSettings.getFont().setBold(Boolean.TRUE); titleSettings.getFont().setFontSize(22); titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); titleSettings.setVerticalAlignment(VerticalAlignment.TOP); titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings subtitleSettings = settings.getSubtitleSettings(); subtitleSettings.setShowTitle(Boolean.TRUE); subtitleSettings.setPosition(EdgeEnum.TOP); subtitleSettings.setForegroundPaint(new ColorProvider(Color.red)); subtitleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); subtitleSettings.getFont().setBold(Boolean.TRUE); subtitleSettings.setHorizontalAlignment(HorizontalAlignment.LEFT); subtitleSettings.setVerticalAlignment(VerticalAlignment.CENTER); subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); LegendSettings legendSettings = settings.getLegendSettings(); legendSettings.setShowLegend(Boolean.TRUE); legendSettings.setPosition(EdgeEnum.BOTTOM); legendSettings.setForegroundPaint(new ColorProvider(Color.black)); legendSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); legendSettings.getFont().setBold(Boolean.TRUE); legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM); //FIXMETHEME legendSettings.setBlockFrame(); legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); PlotSettings plotSettings = settings.getPlotSettings(); plotSettings.setOrientation(PlotOrientation.VERTICAL); // plotSettings.setForegroundAlpha(new Float(0.5f)); plotSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); // plotSettings.setBackgroundAlpha(new Float(0.5f)); plotSettings.setBackgroundImage(new FileImageProvider("net/sf/fspdfs/chartthemes/simple/fspdfs.png")); plotSettings.setBackgroundImageAlpha(new Float(0.5f)); plotSettings.setBackgroundImageAlignment(new Integer(Align.NORTH_WEST)); plotSettings.setLabelRotation(new Double(0)); plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); plotSettings.setOutlineVisible(Boolean.TRUE); plotSettings.setOutlinePaint(new ColorProvider(Color.red)); plotSettings.setOutlineStroke(new BasicStroke(1f)); plotSettings.setSeriesColorSequence(COLORS); // plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS); plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER); plotSettings.setSeriesStrokeSequence(STROKES); plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES); plotSettings.setDomainGridlineVisible(Boolean.TRUE); plotSettings.setDomainGridlinePaint(new ColorProvider(Color.DARK_GRAY)); plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f)); plotSettings.setRangeGridlineVisible(Boolean.TRUE); plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f)); plotSettings.getTickLabelFont().setFontName("Courier"); plotSettings.getTickLabelFont().setBold(Boolean.TRUE); plotSettings.getTickLabelFont().setFontSize(10); plotSettings.getDisplayFont().setFontName("Arial"); plotSettings.getDisplayFont().setBold(Boolean.TRUE); plotSettings.getDisplayFont().setFontSize(12); AxisSettings domainAxisSettings = settings.getDomainAxisSettings(); domainAxisSettings.setVisible(Boolean.TRUE); domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT); domainAxisSettings.setLinePaint(new ColorProvider(Color.green)); domainAxisSettings.setLineStroke(new BasicStroke(1f)); domainAxisSettings.setLineVisible(Boolean.TRUE); // domainAxisSettings.setLabel("Domain Axis"); domainAxisSettings.setLabelAngle(new Double(0.0)); domainAxisSettings.setLabelPaint(new ColorProvider(Color.magenta)); domainAxisSettings.getLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getLabelFont().setItalic(Boolean.TRUE); domainAxisSettings.getLabelFont().setFontName("Comic Sans MS"); domainAxisSettings.getLabelFont().setFontSize(12); domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); domainAxisSettings.setLabelVisible(Boolean.TRUE); domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan)); domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE); domainAxisSettings.getTickLabelFont().setFontName("Arial"); domainAxisSettings.getTickLabelFont().setFontSize(10); domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); domainAxisSettings.setTickLabelsVisible(Boolean.TRUE); domainAxisSettings.setTickMarksInsideLength(new Float(0.1f)); domainAxisSettings.setTickMarksOutsideLength(new Float(0.2f)); domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.ORANGE)); domainAxisSettings.setTickMarksStroke(new BasicStroke(1f)); domainAxisSettings.setTickMarksVisible(Boolean.TRUE); domainAxisSettings.setTickCount(new Integer(5)); AxisSettings rangeAxisSettings = settings.getRangeAxisSettings(); rangeAxisSettings.setVisible(Boolean.TRUE); rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT); rangeAxisSettings.setLinePaint(new ColorProvider(Color.yellow)); rangeAxisSettings.setLineStroke(new BasicStroke(1f)); rangeAxisSettings.setLineVisible(Boolean.TRUE); // rangeAxisSettings.setLabel("Range Axis"); rangeAxisSettings.setLabelAngle(new Double(Math.PI / 2.0)); rangeAxisSettings.setLabelPaint(new ColorProvider(Color.green)); rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE); rangeAxisSettings.getLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getLabelFont().setFontName("Comic Sans MS"); rangeAxisSettings.getLabelFont().setFontSize(12); rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); rangeAxisSettings.setLabelVisible(Boolean.TRUE); rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink)); rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE); rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getTickLabelFont().setFontName("Arial"); rangeAxisSettings.getTickLabelFont().setFontSize(10); rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE); rangeAxisSettings.setTickMarksInsideLength(new Float(0.2f)); rangeAxisSettings.setTickMarksOutsideLength(new Float(0.1f)); rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black)); rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f)); rangeAxisSettings.setTickMarksVisible(Boolean.TRUE); rangeAxisSettings.setTickCount(new Integer(6)); return settings; }
From source file:monitor.processing.OLD.Drawing3D.java
public void drawTree(BaseNode n, RealVector v) { Color c = Color.WHITE; if (n instanceof TransformNode) { //v = ((TransformNode) n).getTrasformMatrix().getColumnVector(3); v = ((TransformNode) n).getTrasformMatrix().operate(v); //stroke(0, 0, 255); // line((float) bef[0] * scale, (float) bef[1] * scale, (float) bef[2] * scale, (float) att[0] * scale, (float) att[1] * scale, (float) att[2] * scale); c = Color.BLACK;/*from www.ja v a 2s . com*/ } else if (n instanceof StaticMesh) { StaticMesh sm = (StaticMesh) n; if (sm.isTransparent()) { c = Color.BLUE; } else if (sm.isVisible()) { // System.out.println(n.getInfo()); // System.out.println(v); c = Color.RED; if (sm.getModel().contains("naohead") || sm.getModel().contains("naobody")) { c = Color.PINK; } } else { c = Color.CYAN; } } else if (n instanceof StaticMeshNode) { StaticMeshNode smn = (StaticMeshNode) n; if (smn.isTransparent()) { c = Color.GREEN; // cameraSceneX = (float)v.getEntry(0); // cameraSceneY = (float)v.getEntry(1); // cameraSceneZ = (float)v.getEntry(2); } else if (smn.isVisible()) { c = Color.YELLOW; } else { c = Color.MAGENTA; } } // if (n.getInfo().contains("naohead")){ // c = Color.CYAN; // pushMatrix(); // fill(c.getRed(), c.getGreen(), c.getBlue()); // // noStroke(); // translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)), (float) (scale * v.getEntry(2))); // box(50); // popMatrix(); // } pushMatrix(); fill(c.getRed(), c.getGreen(), c.getBlue()); noStroke(); translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)), (float) (scale * v.getEntry(2))); box(0.05f * scale); popMatrix(); if (n.getAddress() == selected) { path.add(v); pushMatrix(); fill(0, 255, 255, selectedAlpha); selectedAlpha += (selectedAlpha >= 255) ? -255 : 10; noStroke(); translate((float) (scale * v.getEntry(0)), (float) (-scale * v.getEntry(1)), (float) (scale * v.getEntry(2))); pushMatrix(); //rotateX(t); rotateZ(selectedTheta); selectedTheta += 1 / 8f; box(0.1f * scale); popMatrix(); // info rotateZ(PI / 2); rotateX(-PI / 2); translate(0.1f * scale, -0.1f * scale); fill(0); textSize(0.1f * scale); text(n.getInfo(), 0, 0, 0); popMatrix(); RealVector ant = null; int o = 0; for (RealVector w : path) { if (ant != null) { stroke(o, 255 - o, 0, 200); // System.out.println(ant); // System.out.println(w); line((float) ant.getEntry(0) * scale, (float) ant.getEntry(1) * -scale, (float) ant.getEntry(2) * scale, (float) w.getEntry(0) * scale, (float) w.getEntry(1) * -scale, (float) w.getEntry(2)); o += (o >= 255) ? -200 : 10; } ant = w; pushMatrix(); stroke(255, 255, 0, 200); translate((float) (scale * w.getEntry(0)), (float) (-scale * w.getEntry(1)), (float) (scale * w.getEntry(2))); box(2); popMatrix(); } } for (int a = n.getChildren().size() - 1; a >= 0; a--) { drawTree(((ArrayList<BaseNode>) n.getChildren()).get(a), v); } }
From source file:com.pusksesmas.form_statistik.statistik_keuangan_administrasi.java
private void tabelDataMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelDataMouseClicked if (vpil.getSelectedIndex() == 1) { int row = tabelData.getSelectedRow(); String jan = (tabelData.getModel().getValueAt(row, 0)).toString(); String feb = (tabelData.getModel().getValueAt(row, 1)).toString(); String mar = (tabelData.getModel().getValueAt(row, 2)).toString(); String apr = (tabelData.getModel().getValueAt(row, 3)).toString(); String mei = (tabelData.getModel().getValueAt(row, 4)).toString(); String jun = (tabelData.getModel().getValueAt(row, 5)).toString(); String jul = (tabelData.getModel().getValueAt(row, 6)).toString(); String agus = (tabelData.getModel().getValueAt(row, 7)).toString(); String sept = (tabelData.getModel().getValueAt(row, 8)).toString(); String okt = (tabelData.getModel().getValueAt(row, 9)).toString(); String nov = (tabelData.getModel().getValueAt(row, 10)).toString(); String des = (tabelData.getModel().getValueAt(row, 11)).toString(); DefaultCategoryDataset pieDataset = new DefaultCategoryDataset(); // pieDataset.setValue("Diagnosa", new Integer(jan)); pieDataset.setValue(new Integer(jan), "", "Januari"); pieDataset.setValue(new Integer(feb), "", "Februari"); pieDataset.setValue(new Integer(mar), "", "Maret"); pieDataset.setValue(new Integer(apr), "", "April"); pieDataset.setValue(new Integer(mei), "", "Mei"); pieDataset.setValue(new Integer(jun), "", "Juni"); pieDataset.setValue(new Integer(jul), "", "Juli"); pieDataset.setValue(new Integer(agus), "", "Agustus"); pieDataset.setValue(new Integer(sept), "", "September"); pieDataset.setValue(new Integer(okt), "", "Oktober"); pieDataset.setValue(new Integer(nov), "", "November"); pieDataset.setValue(new Integer(des), "", "Desember"); JFreeChart chart = ChartFactory.createBarChart3D("STATISTIK KEUANGAN ADMINISTRASI", "BULAN", "JUMLAH", (CategoryDataset) pieDataset, PlotOrientation.VERTICAL, false, true, false); chart.setBackgroundPaint(Color.yellow); chart.getTitle().setPaint(Color.red); final CategoryPlot p = chart.getCategoryPlot(); BarRenderer renderer = (BarRenderer) p.getRenderer(); DecimalFormat sdf = new DecimalFormat("RP #,##0"); renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator("{2}", sdf)); p.setRenderer(renderer);/* www.ja v a 2 s . com*/ renderer.setBasePositiveItemLabelPosition( new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.TOP_LEFT)); renderer.setItemLabelsVisible(true); chart.getCategoryPlot().setRenderer(renderer); p.setRangeGridlinePaint(Color.blue); p.setBackgroundPaint(Color.white); ChartFrame frame = new ChartFrame("barchart", chart); frame.setVisible(true); frame.setLocation(250, 100); frame.setSize(800, 600); } else if (vpil.getSelectedIndex() == 2) { int row = tabelData.getSelectedRow(); String jan = (tabelData.getModel().getValueAt(row, 0)).toString(); String feb = (tabelData.getModel().getValueAt(row, 1)).toString(); String mar = (tabelData.getModel().getValueAt(row, 2)).toString(); String apr = (tabelData.getModel().getValueAt(row, 3)).toString(); String mei = (tabelData.getModel().getValueAt(row, 4)).toString(); String jun = (tabelData.getModel().getValueAt(row, 5)).toString(); String jul = (tabelData.getModel().getValueAt(row, 6)).toString(); String agus = (tabelData.getModel().getValueAt(row, 7)).toString(); String sept = (tabelData.getModel().getValueAt(row, 8)).toString(); String okt = (tabelData.getModel().getValueAt(row, 9)).toString(); String nov = (tabelData.getModel().getValueAt(row, 10)).toString(); String des = (tabelData.getModel().getValueAt(row, 11)).toString(); DefaultPieDataset pieDataset = new DefaultPieDataset(); pieDataset.setValue("Januari", new Integer(jan)); pieDataset.setValue("Februari", new Integer(feb)); pieDataset.setValue("Maret", new Integer(mar)); pieDataset.setValue("April", new Integer(apr)); pieDataset.setValue("Mei", new Integer(mei)); pieDataset.setValue("Juni", new Integer(jun)); pieDataset.setValue("Juli", new Integer(jul)); pieDataset.setValue("Agustus", new Integer(agus)); pieDataset.setValue("September", new Integer(sept)); pieDataset.setValue("Oktober", new Integer(okt)); pieDataset.setValue("November", new Integer(nov)); pieDataset.setValue("Desember", new Integer(des)); JFreeChart chart = ChartFactory.createPieChart("STATISTIK KEUANGAN ADMINISTRASI", pieDataset, true, true, true); // PiePlot3D P = (PiePlot3D)chart.getPlot(); PiePlot P = (PiePlot) chart.getPlot(); //P.setForegroundAlpha(TOP_ALIGNMENT); ChartFrame frame = new ChartFrame("STATISTIK KEUANGAN ADMINISTRASI", chart); frame.setVisible(true); frame.setLocation(250, 100); frame.setSize(800, 600); } else { } }
From source file:net.sf.jasperreports.chartthemes.simple.SimpleSettingsFactory.java
/** * *//*from w ww . j a v a 2 s. c om*/ public static final ChartThemeSettings createChartThemeSettings() { ChartThemeSettings settings = new ChartThemeSettings(); ChartSettings chartSettings = settings.getChartSettings(); chartSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); chartSettings.setBackgroundImage( new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png")); chartSettings.setBackgroundImageAlignment(Align.TOP_RIGHT); chartSettings.setBackgroundImageAlpha(1f); chartSettings.setBorderVisible(Boolean.TRUE); chartSettings.setBorderPaint(new ColorProvider(Color.GREEN)); chartSettings.setBorderStroke(new BasicStroke(1f)); chartSettings.setAntiAlias(Boolean.TRUE); chartSettings.setTextAntiAlias(Boolean.TRUE); chartSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings titleSettings = settings.getTitleSettings(); titleSettings.setShowTitle(Boolean.TRUE); titleSettings.setPosition(EdgeEnum.TOP); titleSettings.setForegroundPaint(new ColorProvider(Color.black)); titleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); titleSettings.getFont().setBold(Boolean.TRUE); titleSettings.getFont().setFontSize(22f); titleSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); titleSettings.setVerticalAlignment(VerticalAlignment.TOP); titleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); TitleSettings subtitleSettings = settings.getSubtitleSettings(); subtitleSettings.setShowTitle(Boolean.TRUE); subtitleSettings.setPosition(EdgeEnum.TOP); subtitleSettings.setForegroundPaint(new ColorProvider(Color.red)); subtitleSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); subtitleSettings.getFont().setBold(Boolean.TRUE); subtitleSettings.setHorizontalAlignment(HorizontalAlignment.LEFT); subtitleSettings.setVerticalAlignment(VerticalAlignment.CENTER); subtitleSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); LegendSettings legendSettings = settings.getLegendSettings(); legendSettings.setShowLegend(Boolean.TRUE); legendSettings.setPosition(EdgeEnum.BOTTOM); legendSettings.setForegroundPaint(new ColorProvider(Color.black)); legendSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); legendSettings.getFont().setBold(Boolean.TRUE); legendSettings.setHorizontalAlignment(HorizontalAlignment.CENTER); legendSettings.setVerticalAlignment(VerticalAlignment.BOTTOM); //FIXMETHEME legendSettings.setBlockFrame(); legendSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); PlotSettings plotSettings = settings.getPlotSettings(); plotSettings.setOrientation(PlotOrientation.VERTICAL); // plotSettings.setForegroundAlpha(0.5f); plotSettings.setBackgroundPaint(new GradientPaintProvider(Color.green, Color.blue)); // plotSettings.setBackgroundAlpha(0.5f); plotSettings.setBackgroundImage( new FileImageProvider("net/sf/jasperreports/chartthemes/simple/jasperreports.png")); plotSettings.setBackgroundImageAlpha(0.5f); plotSettings.setBackgroundImageAlignment(Align.NORTH_WEST); plotSettings.setLabelRotation(0d); plotSettings.setPadding(new RectangleInsets(UnitType.ABSOLUTE, 1.1, 2.2, 3.3, 4.4)); plotSettings.setOutlineVisible(Boolean.TRUE); plotSettings.setOutlinePaint(new ColorProvider(Color.red)); plotSettings.setOutlineStroke(new BasicStroke(1f)); plotSettings.setSeriesColorSequence(COLORS); // plotSettings.setSeriesGradientPaintSequence(GRADIENT_PAINTS); plotSettings.setSeriesOutlinePaintSequence(COLORS_DARKER); plotSettings.setSeriesStrokeSequence(STROKES); plotSettings.setSeriesOutlineStrokeSequence(OUTLINE_STROKES); plotSettings.setDomainGridlineVisible(Boolean.TRUE); plotSettings.setDomainGridlinePaint(new ColorProvider(Color.DARK_GRAY)); plotSettings.setDomainGridlineStroke(new BasicStroke(0.5f)); plotSettings.setRangeGridlineVisible(Boolean.TRUE); plotSettings.setRangeGridlinePaint(new ColorProvider(Color.BLACK)); plotSettings.setRangeGridlineStroke(new BasicStroke(0.5f)); plotSettings.getTickLabelFont().setFontName("Courier"); plotSettings.getTickLabelFont().setBold(Boolean.TRUE); plotSettings.getTickLabelFont().setFontSize(10f); plotSettings.getDisplayFont().setFontName("Arial"); plotSettings.getDisplayFont().setBold(Boolean.TRUE); plotSettings.getDisplayFont().setFontSize(12f); AxisSettings domainAxisSettings = settings.getDomainAxisSettings(); domainAxisSettings.setVisible(Boolean.TRUE); domainAxisSettings.setLocation(AxisLocation.BOTTOM_OR_RIGHT); domainAxisSettings.setLinePaint(new ColorProvider(Color.green)); domainAxisSettings.setLineStroke(new BasicStroke(1f)); domainAxisSettings.setLineVisible(Boolean.TRUE); // domainAxisSettings.setLabel("Domain Axis"); domainAxisSettings.setLabelAngle(0.0d); domainAxisSettings.setLabelPaint(new ColorProvider(Color.magenta)); domainAxisSettings.getLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getLabelFont().setItalic(Boolean.TRUE); domainAxisSettings.getLabelFont().setFontName("Comic Sans MS"); domainAxisSettings.getLabelFont().setFontSize(12f); domainAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); domainAxisSettings.setLabelVisible(Boolean.TRUE); domainAxisSettings.setTickLabelPaint(new ColorProvider(Color.cyan)); domainAxisSettings.getTickLabelFont().setBold(Boolean.TRUE); domainAxisSettings.getTickLabelFont().setItalic(Boolean.FALSE); domainAxisSettings.getTickLabelFont().setFontName("Arial"); domainAxisSettings.getTickLabelFont().setFontSize(10f); domainAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); domainAxisSettings.setTickLabelsVisible(Boolean.TRUE); domainAxisSettings.setTickMarksInsideLength(0.1f); domainAxisSettings.setTickMarksOutsideLength(0.2f); domainAxisSettings.setTickMarksPaint(new ColorProvider(Color.ORANGE)); domainAxisSettings.setTickMarksStroke(new BasicStroke(1f)); domainAxisSettings.setTickMarksVisible(Boolean.TRUE); domainAxisSettings.setTickCount(5); AxisSettings rangeAxisSettings = settings.getRangeAxisSettings(); rangeAxisSettings.setVisible(Boolean.TRUE); rangeAxisSettings.setLocation(AxisLocation.TOP_OR_RIGHT); rangeAxisSettings.setLinePaint(new ColorProvider(Color.yellow)); rangeAxisSettings.setLineStroke(new BasicStroke(1f)); rangeAxisSettings.setLineVisible(Boolean.TRUE); // rangeAxisSettings.setLabel("Range Axis"); rangeAxisSettings.setLabelAngle(Math.PI / 2.0d); rangeAxisSettings.setLabelPaint(new ColorProvider(Color.green)); rangeAxisSettings.getLabelFont().setBold(Boolean.TRUE); rangeAxisSettings.getLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getLabelFont().setFontName("Comic Sans MS"); rangeAxisSettings.getLabelFont().setFontSize(12f); rangeAxisSettings.setLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 1, 1)); rangeAxisSettings.setLabelVisible(Boolean.TRUE); rangeAxisSettings.setTickLabelPaint(new ColorProvider(Color.pink)); rangeAxisSettings.getTickLabelFont().setBold(Boolean.FALSE); rangeAxisSettings.getTickLabelFont().setItalic(Boolean.TRUE); rangeAxisSettings.getTickLabelFont().setFontName("Arial"); rangeAxisSettings.getTickLabelFont().setFontSize(10f); rangeAxisSettings.setTickLabelInsets(new RectangleInsets(UnitType.ABSOLUTE, 0.5, 0.5, 0.5, 0.5)); rangeAxisSettings.setTickLabelsVisible(Boolean.TRUE); rangeAxisSettings.setTickMarksInsideLength(0.2f); rangeAxisSettings.setTickMarksOutsideLength(0.1f); rangeAxisSettings.setTickMarksPaint(new ColorProvider(Color.black)); rangeAxisSettings.setTickMarksStroke(new BasicStroke(1f)); rangeAxisSettings.setTickMarksVisible(Boolean.TRUE); rangeAxisSettings.setTickCount(6); return settings; }
From source file:com.pusksesmas.form_statistik.statistik_obat_masuk.java
private void tabelDataMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabelDataMouseClicked if (vpil.getSelectedIndex() == 1) { int row = tabelData.getSelectedRow(); String namaObat = (tabelData.getModel().getValueAt(row, 0)).toString(); String jan = (tabelData.getModel().getValueAt(row, 1)).toString(); String feb = (tabelData.getModel().getValueAt(row, 2)).toString(); String mar = (tabelData.getModel().getValueAt(row, 3)).toString(); String apr = (tabelData.getModel().getValueAt(row, 4)).toString(); String mei = (tabelData.getModel().getValueAt(row, 5)).toString(); String jun = (tabelData.getModel().getValueAt(row, 6)).toString(); String jul = (tabelData.getModel().getValueAt(row, 7)).toString(); String agus = (tabelData.getModel().getValueAt(row, 8)).toString(); String sept = (tabelData.getModel().getValueAt(row, 9)).toString(); String okt = (tabelData.getModel().getValueAt(row, 10)).toString(); String nov = (tabelData.getModel().getValueAt(row, 11)).toString(); String des = (tabelData.getModel().getValueAt(row, 12)).toString(); DefaultCategoryDataset pieDataset = new DefaultCategoryDataset(); // pieDataset.setValue("Diagnosa", new Integer(jan)); pieDataset.setValue(new Integer(jan), "", "Januari"); pieDataset.setValue(new Integer(feb), "", "Februari"); pieDataset.setValue(new Integer(mar), "", "Maret"); pieDataset.setValue(new Integer(apr), "", "April"); pieDataset.setValue(new Integer(mei), "", "Mei"); pieDataset.setValue(new Integer(jun), "", "Juni"); pieDataset.setValue(new Integer(jul), "", "Juli"); pieDataset.setValue(new Integer(agus), "", "Agustus"); pieDataset.setValue(new Integer(sept), "", "September"); pieDataset.setValue(new Integer(okt), "", "Oktober"); pieDataset.setValue(new Integer(nov), "", "November"); pieDataset.setValue(new Integer(des), "", "Desember"); JFreeChart chart = ChartFactory.createBarChart3D("STATISTIK PENERIMAAN OBAT\nNAMA OBAT: " + namaObat, "BULAN", "JUMLAH", (CategoryDataset) pieDataset, PlotOrientation.VERTICAL, false, true, false); chart.setBackgroundPaint(Color.yellow); chart.getTitle().setPaint(Color.red); final CategoryPlot p = chart.getCategoryPlot(); BarRenderer renderer = (BarRenderer) p.getRenderer(); DecimalFormat sdf = new DecimalFormat("#,##0"); renderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator("{2}", sdf)); p.setRenderer(renderer);/* w w w . j a v a 2s . co m*/ renderer.setBasePositiveItemLabelPosition( new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.TOP_CENTER)); renderer.setItemLabelsVisible(true); chart.getCategoryPlot().setRenderer(renderer); p.setRangeGridlinePaint(Color.blue); ChartFrame frame = new ChartFrame("barchart", chart); frame.setVisible(true); frame.setLocation(250, 100); frame.setSize(800, 600); } else if (vpil.getSelectedIndex() == 2) { int row = tabelData.getSelectedRow(); String jan = (tabelData.getModel().getValueAt(row, 1)).toString(); String feb = (tabelData.getModel().getValueAt(row, 2)).toString(); String mar = (tabelData.getModel().getValueAt(row, 3)).toString(); String apr = (tabelData.getModel().getValueAt(row, 4)).toString(); String mei = (tabelData.getModel().getValueAt(row, 5)).toString(); String jun = (tabelData.getModel().getValueAt(row, 6)).toString(); String jul = (tabelData.getModel().getValueAt(row, 7)).toString(); String agus = (tabelData.getModel().getValueAt(row, 8)).toString(); String sept = (tabelData.getModel().getValueAt(row, 9)).toString(); String okt = (tabelData.getModel().getValueAt(row, 10)).toString(); String nov = (tabelData.getModel().getValueAt(row, 11)).toString(); String des = (tabelData.getModel().getValueAt(row, 12)).toString(); DefaultPieDataset pieDataset = new DefaultPieDataset(); pieDataset.setValue("Januari", new Integer(jan)); pieDataset.setValue("Februari", new Integer(feb)); pieDataset.setValue("Maret", new Integer(mar)); pieDataset.setValue("April", new Integer(apr)); pieDataset.setValue("Mei", new Integer(mei)); pieDataset.setValue("Juni", new Integer(jun)); pieDataset.setValue("Juli", new Integer(jul)); pieDataset.setValue("Agustus", new Integer(agus)); pieDataset.setValue("September", new Integer(sept)); pieDataset.setValue("Oktober", new Integer(okt)); pieDataset.setValue("November", new Integer(nov)); pieDataset.setValue("Desember", new Integer(des)); JFreeChart chart = ChartFactory.createPieChart("STATISTIK PENERIMAAN OBAT", pieDataset, true, true, true); // PiePlot3D P = (PiePlot3D)chart.getPlot(); PiePlot P = (PiePlot) chart.getPlot(); //P.setForegroundAlpha(TOP_ALIGNMENT); ChartFrame frame = new ChartFrame("STATISTIK PENERIMAAN OBAT", chart); frame.setVisible(true); frame.setLocation(250, 100); frame.setSize(800, 600); } else { } }
From source file:edu.jhuapl.graphs.jfreechart.JFreeChartTimeSeriesGraphSourceTestCase.java
private void addPoint(Date d, List<TimePoint> points, Random r, String url, String tooltip) { double val = getNextRandomValue(r); Map<String, Object> md = new HashMap<String, Object>(); if (val >= 10 && val < 15) { md.put(GraphSource.ITEM_COLOR, Color.YELLOW); } else if (val >= 10 && val < 20) { md.put(GraphSource.ITEM_COLOR, Color.RED); }/*from w ww . j a v a 2 s . com*/ if (url != null) { md.put(GraphSource.ITEM_URL, url); } if (tooltip != null) { md.put(GraphSource.ITEM_TOOL_TIP, tooltip); } points.add(new TimePoint(d, val, md)); }