Example usage for java.awt Color orange

List of usage examples for java.awt Color orange

Introduction

In this page you can find the example usage for java.awt Color orange.

Prototype

Color orange

To view the source code for java.awt Color orange.

Click Source Link

Document

The color orange.

Usage

From source file:sentimentanalyzer.ChartController.java

public void postTheTimeSeriesChartOnTheGUI_sentiment(JPanel timeSeriesChart, XYSeriesCollection dataset,
        String title, String y, String x, int row) {
    this.wordSentimentScore = ChartFactory.createXYLineChart(title, y, x, dataset, PlotOrientation.VERTICAL,
            true, true, false);//from  ww w . j  av a  2  s .c  om

    this.wordIndexesOnGraph.add(row);
    this.plot_sentiment = this.wordSentimentScore.getXYPlot();

    XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();

    //CHECK THIS
    renderer.setBaseShapesVisible(true);

    this.plot_sentiment.setRenderer(renderer);
    this.plot_sentiment.setOutlinePaint(Color.orange);

    NumberAxis rangeAxis = (NumberAxis) this.plot_sentiment.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    NumberAxis domainAxis = (NumberAxis) this.plot_sentiment.getDomainAxis();
    domainAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    this.wordSentimentScore.setBackgroundPaint(Color.white);
    this.wordSentimentScore.setBorderPaint(Color.ORANGE);
    ChartPanel CP = new ChartPanel(this.wordSentimentScore);
    timeSeriesChart.setLayout(new java.awt.BorderLayout());
    timeSeriesChart.add(CP, BorderLayout.CENTER);
    timeSeriesChart.revalidate();
}

From source file:br.edu.unifei.mestrado.view.GraphPartitioningVisualization.java

private void createView(final int partitions) {

    clusterer = new PartitionClusterer(partitions);

    final Graph<NodeWrapper, EdgeWrapper> graph = getGraph();

    // Create a simple layout frame
    // specify the Fruchterman-Rheingold layout algorithm
    layout = new AggregateLayout<NodeWrapper, EdgeWrapper>(new FRLayout<NodeWrapper, EdgeWrapper>(graph));

    vv = new VisualizationViewer<NodeWrapper, EdgeWrapper>(layout);
    vv.setBackground(Color.white);

    if (vertexLabelTransformer == null) {
        vertexLabelTransformer = new Transformer<NodeWrapper, String>() {
            @Override/*w  ww . j  ava  2 s  .  com*/
            public String transform(NodeWrapper v) {
                // TODO: voltar o D quando necessrio
                return "V" + v.getId() + ":" + v.getWeight();// + ":" +
                // v.getD();
            }
        };
    }
    vv.getRenderContext().setVertexLabelTransformer(vertexLabelTransformer);

    // MapTransformer.<NodeWrapper, String>
    // getInstance(LazyMap.<NodeWrapper, String> decorate(
    // new HashMap<NodeWrapper, String>(), new
    // ToStringLabeller<NodeWrapper>())));
    vv.getRenderContext().setEdgeLabelTransformer(edgeLabelTransformer);

    // UTIL: Alguma coisa, talvez o LazyMap no estava repintando a aresta
    // com o peso alterado

    // MapTransformer.<EdgeWrapper, String>
    // getInstance(LazyMap.<EdgeWrapper, String> decorate(
    // new HashMap<EdgeWrapper, String>(), new
    // ToStringLabeller<EdgeWrapper>() {
    // @Override
    // public String transform(EdgeWrapper v) {
    // logger.warn("A:" + v.getId() + ":" + v.getWeight());
    // return "A:" + v.getId() + ":" + v.getWeight();
    // }
    // })));
    // Tell the renderer to use our own customized color rendering

    vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line<NodeWrapper, EdgeWrapper>());

    vv.getRenderContext().setVertexShapeTransformer(vertexShapeTransformer);
    vv.getRenderContext().setVertexFillPaintTransformer(vertexFillPaintTransformer);
    vv.getRenderContext().setVertexDrawPaintTransformer(vertexDrawPaintTransformer);
    vv.getRenderContext().setVertexStrokeTransformer(vertexStrokeTransformer);

    vv.getRenderContext().setEdgeDrawPaintTransformer(new Transformer<EdgeWrapper, Paint>() {

        // UTIL: Define as cores das arestas
        @Override
        public Paint transform(EdgeWrapper linkToProcess) {
            // if para mostrar arestas com as duas pontas no mesmo vertices
            if (linkToProcess.getStartNode().getId() == linkToProcess.getEndNode().getId()) {
                return Color.red;
            }
            Set<NodeWrapper> nodes = vv.getPickedVertexState().getPicked();
            for (NodeWrapper node : nodes) {
                for (EdgeWrapper link : node.getEdges()) {
                    if (link.getId() == linkToProcess.getId()) {
                        return Color.orange;
                    }
                }
            }
            if (linkToProcess.isEdgeOnCut()) {
                return Color.green;
            }
            return Color.blue;
        }
    });

    // MapTransformer.<EdgeWrapper, Paint> getInstance(edgePaints));

    vv.getRenderContext().setEdgeStrokeTransformer(new Transformer<EdgeWrapper, Stroke>() {
        protected final Stroke THIN = new BasicStroke(1);
        // protected final Stroke THICK = new BasicStroke(2);
        protected final Stroke STRONG_THICK = new BasicStroke(3);

        public Stroke transform(EdgeWrapper e) {
            // if para mostrar arestas com as duas pontas no mesmo vertices
            if (e.getStartNode().getId() == e.getEndNode().getId()) {
                return STRONG_THICK;
            }

            // Paint c = edgePaints.get(e);
            // if (c == Color.red)
            return THIN;
            // else
            // return THIN;
        }
    });

    DefaultModalGraphMouse gm = new DefaultModalGraphMouse();
    vv.setGraphMouse(gm);

    groupVertices = new JToggleButton("Group Clusters");
    groupVertices.setSelected(true);

    groupVertices.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            clusterAndRecolor(layout, e.getStateChange() == ItemEvent.SELECTED,
                    getGroupCircleVertices().isSelected());
            vv.repaint();
        }
    });

    clusterAndRecolor(layout, groupVertices.isSelected(), getGroupCircleVertices().isSelected());

    Container content = getContentPane();
    content.add(new GraphZoomScrollPane(vv));
    JPanel south = new JPanel(new GridLayout(1, 4));
    JPanel grid1 = new JPanel(new GridLayout(2, 1));
    grid1.add(groupVertices);
    grid1.add(getGroupCircleVertices());
    south.add(grid1);

    final ScalingControl scaler = new CrossoverScalingControl();
    JButton plus = new JButton("+");
    plus.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scaler.scale(vv, 1.1f, vv.getCenter());
        }
    });
    JButton minus = new JButton("-");
    minus.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scaler.scale(vv, 1 / 1.1f, vv.getCenter());
        }
    });

    JPanel grid2 = new JPanel(new GridLayout(2, 1));
    grid2.setBorder(BorderFactory.createTitledBorder("Scale"));
    south.add(grid2);
    grid2.add(plus);
    grid2.add(minus);
    JPanel grid3 = new JPanel(new GridLayout(1, 2));
    south.add(grid3);
    grid3.add(getIterationLabel());
    grid3.add(getCutLabel());

    JPanel p = new JPanel();
    p.setBorder(BorderFactory.createTitledBorder("Mouse Mode"));
    p.add(gm.getModeComboBox());
    south.add(p);
    content.add(south, BorderLayout.SOUTH);
    vv.repaint();
}

From source file:ecg.ecgshow.ECGShowUI.java

private void createPressureData(long timeZone) {
    PressureData = new JPanel();
    PressuredateAxises = new DateAxis[1];
    SystolicPressureSeries = new TimeSeries[2];
    DiastolicPressureSeries = new TimeSeries[2];

    TimeSeriesCollection timeseriescollection = new TimeSeriesCollection();
    SystolicPressureSeries[0] = new TimeSeries("");
    SystolicPressureSeries[0].setMaximumItemAge(timeZone);
    SystolicPressureSeries[0].setMaximumItemCount(500);
    SystolicPressureSeries[1] = new TimeSeries("");
    SystolicPressureSeries[1].setMaximumItemAge(timeZone);
    SystolicPressureSeries[1].setMaximumItemCount(2);
    timeseriescollection.addSeries(SystolicPressureSeries[0]);
    timeseriescollection.addSeries(SystolicPressureSeries[1]);

    PressuredateAxises[0] = new DateAxis("");
    PressuredateAxises[0].setTickLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.016)));
    PressuredateAxises[0].setLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.018)));
    PressuredateAxises[0].setTickLabelsVisible(true);
    PressuredateAxises[0].setVisible(false);

    DiastolicPressureSeries[0] = new TimeSeries("");
    DiastolicPressureSeries[0].setMaximumItemAge(timeZone);
    DiastolicPressureSeries[0].setMaximumItemCount(500);
    DiastolicPressureSeries[1] = new TimeSeries("");
    DiastolicPressureSeries[1].setMaximumItemAge(timeZone);
    DiastolicPressureSeries[1].setMaximumItemCount(2);
    timeseriescollection.addSeries(DiastolicPressureSeries[0]);
    timeseriescollection.addSeries(DiastolicPressureSeries[1]);

    NumberAxis numberaxis = new NumberAxis("Pressure");
    numberaxis.setTickLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.016)));
    numberaxis.setLabelFont(new Font("SansSerif", 0, (int) (HEIGHT * 0.018)));
    numberaxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    numberaxis.setVisible(false);//from ww  w .j  a v a 2 s .c  om
    numberaxis.setLowerBound(0D);
    numberaxis.setUpperBound(200D);

    XYLineAndShapeRenderer xylineandshaperenderer = new XYLineAndShapeRenderer(true, false);
    xylineandshaperenderer.setSeriesPaint(0, Color.GREEN); //
    xylineandshaperenderer.setSeriesStroke(0, new BasicStroke(2)); //
    xylineandshaperenderer.setSeriesPaint(1, Color.LIGHT_GRAY); //
    xylineandshaperenderer.setSeriesStroke(1, new BasicStroke(5));

    xylineandshaperenderer.setSeriesPaint(2, Color.ORANGE); //
    xylineandshaperenderer.setSeriesStroke(2, new BasicStroke(2)); //
    xylineandshaperenderer.setSeriesPaint(3, Color.LIGHT_GRAY); //
    xylineandshaperenderer.setSeriesStroke(3, new BasicStroke(5));

    //XYPlot xyplot = new XYPlot(timeseriescollection, PressuredateAxises[0], numberaxis, xylineandshaperenderer);
    XYPlot xyplot = new XYPlot(timeseriescollection, dateAxises[0], numberaxis, xylineandshaperenderer);

    xyplot.setBackgroundPaint(Color.LIGHT_GRAY);
    xyplot.setDomainGridlinePaint(Color.LIGHT_GRAY);
    xyplot.setRangeGridlinePaint(Color.LIGHT_GRAY);
    xyplot.setAxisOffset(new RectangleInsets(5D, 5D, 5D, 5D));
    xyplot.setBackgroundPaint(Color.BLACK);

    JFreeChart jfreechart = new JFreeChart(xyplot);
    jfreechart.setBackgroundPaint(new Color(237, 237, 237));//?
    jfreechart.getLegend().setVisible(false);

    ChartPanel chartpanel = new ChartPanel(jfreechart, (int) (WIDTH * 0.155), (int) (HEIGHT * 0.18), 0, 0,
            Integer.MAX_VALUE, Integer.MAX_VALUE, true, true, false, true, false, false);

    chartpanel.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0) //??0
            , BorderFactory.createEmptyBorder() //????
    ));
    chartpanel.setMouseZoomable(false);
    PressureData.add(chartpanel);

}

From source file:de.codesourcery.eve.skills.ui.renderer.SkillTreeRenderer.java

private Color getColorForSkill(Skill s, ICharacter character) {

    if (character == null) {
        return Color.RED;
    }// w ww . j ava 2s  .  c o m

    if (character.hasSkill(s)) {
        return GREEN;
    } else if (character.canTrainSkill(s)) {
        return Color.ORANGE;
    }
    return Color.RED;
}

From source file:uk.co.real_logic.aeron.tools.perf_tools.AeronLatencyUnderLoadPublisher.java

private void generateScatterPlot() throws IOException {
    final BufferedImage image = new BufferedImage(1800, 1000, BufferedImage.TYPE_INT_ARGB);
    final Graphics2D g2 = image.createGraphics();
    final FontMetrics fm = g2.getFontMetrics();
    final String filename = "throughputency.png";
    final File imageFile = new File(filename);

    final int height = 940;
    double min = Double.MAX_VALUE;
    double max = Double.MIN_VALUE;
    for (final long timestamp : timestamps) {
        final double ts = timestamp / 1000.0;
        if (ts < min) {
            min = ts;/*w  w  w.java2  s. com*/
        }
        if (ts > max) {
            max = ts;
        }
    }
    final double stepY = height / max;

    g2.setColor(Color.white);
    g2.fillRect(0, 0, 1800, 1000);
    g2.setColor(Color.black);
    g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    g2.drawString("Latency ScatterPlot (microseconds)",
            900 - fm.stringWidth("Latency ScatterPlot (microseconds)") / 2, 20);
    g2.drawString("" + max, 10, 20);
    g2.drawLine(100, 20, 100, 960);
    g2.drawLine(100, 960, 1790, 960);
    int start = 0;
    int end = 100;
    final double width = 1690.0 / 7.0;
    g2.setColor(Color.red);
    plotSubset(g2, start, end, "10 msgs/sec", 100, width, stepY, means[0]);

    start = 100;
    end = 1100;
    g2.setColor(Color.green);
    plotSubset(g2, start, end, "100 msgs/sec", 100 + width, width, stepY, means[1]);

    start = 1100;
    end = 11100;
    g2.setColor(Color.blue);
    plotSubset(g2, start, end, "1K msgs/sec", 100 + width * 2, width, stepY, means[2]);

    start = 11100;
    end = 111100;
    g2.setColor(Color.cyan);
    plotSubset(g2, start, end, "10K msgs/sec", 100 + width * 3, width, stepY, means[3]);

    start = 111100;
    end = 1111100;
    g2.setColor(Color.magenta);
    plotSubset(g2, start, end, "100K msgs/sec", 100 + width * 4, width, stepY, means[4]);

    start = 1111100;
    end = 11111100;
    g2.setColor(Color.yellow);
    plotSubset(g2, start, end, "1M msgs/sec", 100 + width * 5, width, stepY, means[5]);

    start = 11111100;
    end = 41111100;
    g2.setColor(Color.orange);
    plotSubset(g2, start, end, "3M msgs/sec", 100 + width * 6, width, stepY, means[6]);

    ImageIO.write(image, "png", imageFile);
}

From source file:org.gumtree.vis.mask.ChartMaskingUtilities.java

private static void drawMaskBoarder(Graphics2D g2, Abstract2DMask mask) {
    g2.setPaint(Color.orange);
    g2.setStroke(new BasicStroke(1));
    Rectangle2D frame = mask.getRectangleFrame();
    g2.draw(frame);//from   ww w  . ja  v  a 2  s.com
    Rectangle2D dragPoint = new Rectangle2D.Double(frame.getMinX() - maskDragPointHalfWidth,
            frame.getMinY() - maskDragPointHalfWidth, maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getCenterX() - maskDragPointHalfWidth, frame.getMinY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getMaxX() - maskDragPointHalfWidth, frame.getMinY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getMaxX() - maskDragPointHalfWidth, frame.getCenterY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getMinX() - maskDragPointHalfWidth, frame.getCenterY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getMinX() - maskDragPointHalfWidth, frame.getMaxY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getCenterX() - maskDragPointHalfWidth, frame.getMaxY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    dragPoint.setRect(frame.getMaxX() - maskDragPointHalfWidth, frame.getMaxY() - maskDragPointHalfWidth,
            maskDragPointWidth, maskDragPointWidth);
    g2.fill(dragPoint);
    Color fillColor = new Color(250, 250, 50, 10);
    g2.setPaint(fillColor);
    g2.fill(mask.getShape());
}

From source file:coolmap.canvas.datarenderer.renderer.impl.NumberToColor.java

public NumberToColor() {
    setName("Number to Color");
    setDescription("Use color to represent numeric values");

    //initialize UI
    configUI.setLayout(new GridBagLayout());
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.HORIZONTAL;
    c.gridx = 0;//w  w w. j  a  va2s.  com
    c.gridy = 0;
    c.ipadx = 5;
    c.ipady = 5;
    c.insets = new Insets(5, 5, 5, 5);
    c.gridwidth = 2;
    //        c.weightx = 0.8;

    editor = new GradientEditorPanel();
    configUI.add(editor, c);

    c.gridx = 0;
    c.gridy++;
    c.gridwidth = 1;
    //        JButton button = new JButton("Apply");
    //        configUI.add(button, c);
    //        button.setToolTipText("Apply preset gradient");
    //
    //        button.addActionListener(new ActionListener() {
    //
    //            @Override
    //            public void actionPerformed(ActionEvent e) {
    //
    //                try {
    //                    GradientItem item = (GradientItem) presetColorComboBox.getSelectedItem();
    //
    //                    editor.clearColors();
    //
    //                    Color c[] = item.getColors();
    //                    float p[] = item.getPositions();
    //
    //                    editor.setStart(c[0]);
    //                    editor.setEnd(c[c.length - 1]);
    //
    //                    if (c.length > 2) {
    //                        for (int i = 1; i < c.length - 1; i++) {
    //                            editor.addColor(c[i], p[i]);
    //                        }
    //                    }
    //
    //                } catch (Exception ex) {
    //                    editor.clearColors();
    //                    editor.setStart(DEFAULT_MIN_COLOR);
    //                    editor.setEnd(DEFAULT_MAX_COLOR);
    //                }
    //
    //                updateRenderer();
    //            }
    //        });
    configUI.add(new JLabel("Preset palette:"), c);

    c.gridx = 1;
    c.gridwidth = 1;
    presetColorComboBox = new JComboBox();

    presetColorComboBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {

            try {
                GradientItem item = (GradientItem) presetColorComboBox.getSelectedItem();
                presetColorComboBox.setToolTipText(item.getToolTip());

                editor.clearColors();

                Color c[] = item.getColors();
                float p[] = item.getPositions();

                editor.setStart(c[0]);
                editor.setEnd(c[c.length - 1]);

                if (c.length > 2) {
                    for (int i = 1; i < c.length - 1; i++) {
                        editor.addColor(c[i], p[i]);
                    }
                }

                try {
                    Double[] ranges = item.getRanges();
                    if (ranges != null) {
                        minValueField.setText(ranges[0].toString());
                        maxValueField.setText(ranges[1].toString());
                        editor.setMinValue(ranges[0].floatValue());
                        editor.setMaxValue(ranges[1].floatValue());
                    }
                } catch (Exception ex) {
                    minValueField.setText("-1");
                    maxValueField.setText("1");
                    editor.setMinValue(-1);
                    editor.setMaxValue(1);
                }

            } catch (Exception ex) {
                editor.clearColors();
                editor.setStart(DEFAULT_MIN_COLOR);
                editor.setEnd(DEFAULT_MAX_COLOR);
            }
        }
    });

    //       
    configUI.add(presetColorComboBox, c);
    presetColorComboBox.setRenderer(new GradientComboItemRenderer());

    presetColorComboBox
            .addItem(new GradientItem(new Color[] { DEFAULT_MIN_COLOR, Color.BLACK, DEFAULT_MAX_COLOR },
                    new float[] { 0f, 0.5f, 1f }, "TBP", "Teal - Black - Pink"));

    presetColorComboBox.addItem(new GradientItem(new Color[] { Color.GREEN, Color.RED }, new float[] { 0f, 1f },
            "GR", "Green - Red"));

    presetColorComboBox.addItem(new GradientItem(new Color[] { Color.GREEN, Color.BLACK, Color.RED },
            new float[] { 0f, 0.5f, 1f }, "RBG", "Red - Black - Green"));

    presetColorComboBox.addItem(new GradientItem(new Color[] { Color.ORANGE, Color.BLUE },
            new float[] { 0f, 1f }, "OB", "Orange - Blue"));

    presetColorComboBox.addItem(new GradientItem(new Color[] { Color.ORANGE, Color.BLACK, Color.BLUE },
            new float[] { 0f, 0.5f, 1f }, "OBB", "Orange - Black - Blue"));

    presetColorComboBox.addItem(new GradientItem(new Color[] { Color.BLACK, Color.GREEN },
            new float[] { 0f, 1f }, "BG", "Black - Green"));

    presetColorComboBox
            .addItem(new GradientItem(new Color[] { Color.RED, UI.colorAKABENI, Color.BLACK, Color.BLACK },
                    new float[] { 0f, 0.05f, 0.051f, 1f }, "P.05", 0d, 1d, "P-value @ 0.05, Red to Black"));

    presetColorComboBox.setToolTipText(((GradientItem) presetColorComboBox.getSelectedItem()).getToolTip());

    c.gridx = 0;
    c.gridy++;
    c.gridwidth = 1;
    //        button = new JButton("Apply");
    //        
    //        button.setToolTipText("Apply preset data ranges");
    //        button.addActionListener(new ActionListener() {
    //
    //            @Override
    //            public void actionPerformed(ActionEvent e) {
    //                try {
    //                    MinMaxItem item = (MinMaxItem) (presetRangeComboBox.getSelectedItem());
    //                    minValueField.setText(item.getMinMax().lowerEndpoint().toString());
    //                    maxValueField.setText(item.getMinMax().upperEndpoint().toString());
    //                } catch (Exception ex) {
    //                    minValueField.setText("-1");
    //                    maxValueField.setText("1");
    //                }
    //
    //                updateRenderer();
    //            }
    //        });
    //        configUI.add(button, c);
    configUI.add(new JLabel("Preset range:"), c);

    c.gridx = 1;
    c.gridwidth = 1;
    presetRangeComboBox = new JComboBox();
    configUI.add(presetRangeComboBox, c);
    presetRangeComboBox.addItem(new DataMinMaxItem());
    presetRangeComboBox.addItem(new DefinedMinMaxItem(-1, 1));
    presetRangeComboBox.addItem(new DefinedMinMaxItem(0, 1));
    presetRangeComboBox.addItem(new DefinedMinMaxItem(-1, 0));
    presetRangeComboBox.addItem(new DefinedMinMaxItem(0, 100));

    presetRangeComboBox.addItemListener(new ItemListener() {

        @Override
        public void itemStateChanged(ItemEvent e) {
            try {
                MinMaxItem item = (MinMaxItem) (presetRangeComboBox.getSelectedItem());
                minValueField.setText(item.getMinMax().lowerEndpoint().toString());
                maxValueField.setText(item.getMinMax().upperEndpoint().toString());
            } catch (Exception ex) {
                minValueField.setText("-1");
                maxValueField.setText("1");
            }
        }
    });

    ////////////////////////////////////////////////////////////////////////////////
    //        c.weightx = 0.2;
    c.gridx = 0;
    c.gridy++;
    c.gridwidth = 1;
    configUI.add(new JLabel("Min value: "), c);
    c.gridx = 1;
    //        c.weightx = 0.3;
    configUI.add(minValueField, c);

    c.gridx = 0;
    c.gridy++;
    c.gridwidth = 1;
    configUI.add(new JLabel("Max value: "), c);
    c.gridx = 1;
    configUI.add(maxValueField, c);

    c.gridx = 0;
    c.gridy++;
    c.gridwidth = 1;
    JLabel label = Tools.createJLabel("Draw Sub-heatmap:", null,
            "Draw sub-heatmaps for collapsed ontology nodes", null);
    configUI.add(label, c);

    c.gridx = 1;
    drawSubMap = new JCheckBox();
    configUI.add(drawSubMap, c);

    c.gridx = 0;
    c.gridy++;
    c.gridwidth = 3;

    JButton button = new JButton("Update", UI.getImageIcon("refresh"));
    configUI.add(button, c);
    button.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            //hit button, redraw!

            updateRenderer();
        }
    });

    //        editor.applyButton.addActionListener(new ActionListener() {
    //
    //            @Override
    //            public void actionPerformed(ActionEvent e) {
    //                updateRenderer();
    //            }
    //        });
    toolTipLabel = new JLabel();
    toolTipLabel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    toolTipLabel.setBackground(UI.colorGrey3);
    toolTipLabel.setOpaque(true);
    toolTipLabel.setForeground(UI.colorBlack2);
    toolTipLabel.setFont(UI.fontPlain.deriveFont(12f));
}

From source file:org.jfree.chart.demo.JFreeChartDemoBase.java

/**
 * Create a horizontal bar chart./*from  w w  w. j av a 2 s .  c  o m*/
 *
 * @return a horizontal bar chart.
 */
public JFreeChart createHorizontalBarChart() {

    // create a default chart based on some sample data...
    final String title = this.resources.getString("bar.horizontal.title");
    final String domain = this.resources.getString("bar.horizontal.domain");
    final String range = this.resources.getString("bar.horizontal.range");

    final CategoryDataset data = DemoDatasetFactory.createCategoryDataset();
    final JFreeChart chart = ChartFactory.createBarChart(title, domain, range, data, PlotOrientation.HORIZONTAL,
            true, true, false);

    // then customise it a little...
    //        chart.getLegend().setAnchor(Legend.EAST);
    chart.setBackgroundPaint(new GradientPaint(0, 0, Color.white, 0, 1000, Color.orange));
    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setRangeCrosshairVisible(false);
    final NumberAxis axis = (NumberAxis) plot.getRangeAxis();
    axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    axis.setInverted(true);

    return chart;

}

From source file:com.icesoft.faces.component.outputchart.AbstractChart.java

public ColorMap() {
    this.put("black", Color.BLACK);
    this.put("blue", Color.BLUE);
    this.put("cyan", Color.CYAN);
    this.put("darkGray", Color.DARK_GRAY);
    this.put("gray", Color.GRAY);
    this.put("green", Color.GREEN);
    this.put("lightGray", Color.LIGHT_GRAY);
    this.put("magenta", Color.MAGENTA);
    this.put("orange", Color.ORANGE);
    this.put("pink", Color.PINK);
    this.put("red", Color.RED);
    this.put("white", Color.WHITE);
    this.put("yellow", Color.YELLOW);
}

From source file:bicat.gui.GraphicPane.java

/**
 * Default constructor, initializes some values.
 *//*  w  w w . ja  va 2s  .  c om*/
public GraphicPane() {

    geneList = null;
    graphDataList = null;
    filledRect = new Rectangle(0, 0);
    xStep = 10;
    yStep = 160; // sta ovo tacno znaci??? (size of the cells of the
    // visualized matrix?)

    colorWheel = new Color[8]; // samo 8?
    colorWheel[0] = Color.BLUE;
    colorWheel[1] = Color.CYAN;
    colorWheel[2] = Color.GREEN;
    colorWheel[3] = Color.MAGENTA;
    colorWheel[4] = Color.ORANGE;
    colorWheel[5] = Color.PINK;
    colorWheel[6] = Color.RED;
    colorWheel[7] = Color.YELLOW;

    //

    /*
     * DefaultPieDataset dpd = new DefaultPieDataset();
     * dpd.setValue("Category 1",50); dpd.setValue("Category 2",50);
     */

    // create a dataset...
    /*
     * DefaultPieDataset data = new DefaultPieDataset();
     * data.setValue("Java", new Double(43.2)); data.setValue("Visual
     * Basic", new Double(0.0)); data.setValue("C/C++", new Double(17.5));
     * 
     * JFreeChart chart = ChartFactory.createPieChart("Sample",data,
     * true,true,false); ChartFrame frame = new ChartFrame("See", chart);
     * frame.pack(); // this.add(frame); //frame.pack();
     * frame.setVisible(true);
     */

    /*
     * chart = ChartFactory.createXYLineChart("Expression Profiles of a
     * Bicluster","genes","conditions", new
     * org.jfree.data.xy.DefaultTableXYDataset(),
     * org.jfree.chart.plot.PlotOrientation.HORIZONTAL, false,false,false);
     * 
     * //ChartPanel cp = new ChartPanel(chart_1); chartPanel = new
     * ChartPanel(chart); this.add(chartPanel); //cp);
     * //,BorderLayout.WEST); this.setVisible(true);
     * //this.add("Proba",chart_1); //ChartFrame frame_1 = new
     * ChartFrame("XY",chart_1); //frame_1.pack();
     * //frame_1.setVisible(true);
     */

}