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:uk.co.moonsit.sockets.GraphClient.java

private Color getAxisColor(int index) {
    switch (index) {
    case 0:/*from ww w.j  a v  a 2s.  c o  m*/
        return Color.BLACK;
    case 1:
        return Color.MAGENTA.darker();
    case 2:
        return Color.BLUE;
    case 3:
        return Color.RED;
    case 4:
        return Color.ORANGE.darker();

    }
    return Color.BLACK;
}

From source file:network.view.relacoesEntidadesUI.GraphViewEntity.java

@SuppressWarnings("deprecation")
public GraphViewEntity(Grafo g) {

    try {//from  w  w  w. ja v  a 2 s.  co m
        //this.grafo = g;
        graph = getGraph(g);
    } catch (Exception e) {
        graph = TestGraphs.getOneComponentGraph();
    }

    vv = paintGraph(graph, g);

    frame = new JFrame("Relao entre Entidades");
    Container content = frame.getContentPane();
    panel = new JPanel(new BorderLayout());
    panel.add(vv);

    content.add(panel);
    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frame.setIconImage(SwingResourceManager.getImage(GraphViewEntity.class,
            "/br/atech/smartsearch/view/images/logo-small.JPG"));
    dialog = new JDialog(frame);

    content = dialog.getContentPane();

    // create the BirdsEyeView for zoom/pan
    final edu.uci.ics.jung.visualization.BirdsEyeVisualizationViewer bird = new edu.uci.ics.jung.visualization.BirdsEyeVisualizationViewer(
            vv, 0.25f, 0.25f);

    JButton reset = new JButton("Sem Zoom");
    // 'reset' unzooms the graph via the Lens
    reset.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            bird.resetLens();
        }
    });
    final ScalingControl scaler = new ViewScalingControl();
    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, 0.9f, vv.getCenter());
        }
    });
    JButton help = new JButton("Ajuda");
    help.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            String zoomHelp = "<html><center>Arraste o retngulo azul para deslocar a imagem<p>"
                    + "Arraste um lado do retngulo para ajustar o zoom</center></html>";
            JOptionPane.showMessageDialog(dialog, zoomHelp);
        }
    });
    JPanel controls = new JPanel(new GridLayout(2, 2));
    controls.add(plus);
    controls.add(minus);
    controls.add(reset);
    controls.add(help);
    content.add(bird);
    content.add(controls, BorderLayout.SOUTH);

    JButton zoomer = new JButton("Mostrar tela de zoom");
    zoomer.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            dialog.pack();
            int w = dialog.getWidth() + 5;
            int h = dialog.getHeight() + 5; // 35;
            dialog.setLocation((int) (frame.getLocationOnScreen().getX() + frame.getWidth() - w),
                    (int) frame.getLocationOnScreen().getY() + frame.getHeight() - h);
            //dialog.show();
            dialog.setVisible(true);
            //bird.initLens();
        }
    });

    // [mcrb] Popup menu (Agrupar/Remover/Remover Selecao)
    popup = new JPopupMenu();

    menuItem = new JMenuItem("Agrupar Nodos");
    menuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            //TODO
        }
    });
    popup.add(menuItem);

    menuItem = new JMenuItem("Remover Nodo");
    menuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            myVertexDisplayPredicate.filter(true);
            clicksFiltro.add(selecionado);
            pr.setVertexPaintFunction(new MyVertexPaintFunction());
            vv.repaint();
        }
    });
    popup.add(menuItem);

    menuItem = new JMenuItem("Remover Seleo");
    menuItem.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            clicks = new ArrayList<Vertex>();
            pr.setVertexPaintFunction(new MyVertexPaintFunction());
            // para evitar que o 'ultimo selecionado permaneca em destaque:
            selecionado = null;
            vv.repaint();
        }
    });
    popup.add(menuItem);

    labelFiltroArestas = new JLabel("Apresentar arestas com tamanho maior que ");
    textFieldFiltroArestas = new JTextField(2);

    buttonFiltroArestas = new JButton("Filtrar");
    buttonEliminarFiltroArestas = new JButton("Remover Filtros");
    buttonEliminarFiltroArestas.setEnabled(false);

    buttonFiltroArestas.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            Object objValue = textFieldFiltroArestas.getText();
            try {
                new Integer((String) objValue).intValue();
            } catch (NumberFormatException ex) {
                objValue = "0";
                textFieldFiltroArestas.setText("");
            }
            espessurasSelecionadas.add(objValue);
            myEdgeDisplayPredicate.filter(true, espessurasSelecionadas.toArray());
            buttonEliminarFiltroArestas.setEnabled(true);
            vv.repaint();
        }
    });

    buttonEliminarFiltroArestas.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            textFieldFiltroArestas.setText("");
            espessurasSelecionadas = new ArrayList<Object>();
            myEdgeDisplayPredicate.filter(false, espessurasSelecionadas.toArray());
            vv.repaint();
        }
    });

    JPanel p = new JPanel();
    p.setLayout(new FlowLayout(FlowLayout.LEFT));

    // [inicio] acrescimo dos botoes de zoom
    JButton mais = new JButton();
    mais.setToolTipText("Ampliar");
    mais.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));
    mais.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scaler.scale(vv, 1.1f, vv.getCenter());
        }
    });
    JButton menos = new JButton();
    menos.setToolTipText("Reduzir");
    menos.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));
    menos.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scaler.scale(vv, 1 / 1.1f, vv.getCenter());
        }
    });
    // [fim] acrescimo dos botoes de zoom

    final Color[] cores = { Color.BLACK, Color.BLUE, Color.CYAN, Color.DARK_GRAY, Color.GRAY, Color.GREEN,
            Color.MAGENTA, Color.ORANGE, Color.RED };

    JButton agrupamento = new JButton("Agrupar");
    agrupamento.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            clusterAndRecolor(new SubLayoutDecorator(new FRLayout(graph)), 1, cores, true);
            vv.validate();
            vv.repaint();
        }
    });

    p.add(mais);
    p.add(menos);
    p.add(zoomer);
    p.add(labelFiltroArestas);
    p.add(textFieldFiltroArestas);
    p.add(buttonFiltroArestas);
    p.add(buttonEliminarFiltroArestas);
    p.add(agrupamento);

    frame.getContentPane().add(p, BorderLayout.NORTH);
    frame.setSize(900, 600);
    frame.setVisible(true);
}

From source file:edu.harvard.mcz.imagecapture.PositionTemplateEditor.java

/**
 * This method initializes jPanel   /*from w ww  .  j  a  va2  s. c o m*/
 *    
 * @return javax.swing.JPanel   
 */
private JPanel getJPanel() {
    if (jPanel == null) {
        GridBagConstraints gridBagConstraints24 = new GridBagConstraints();
        gridBagConstraints24.fill = GridBagConstraints.BOTH;
        gridBagConstraints24.gridy = 10;
        gridBagConstraints24.weightx = 1.0;
        gridBagConstraints24.anchor = GridBagConstraints.WEST;
        gridBagConstraints24.gridx = 1;
        GridBagConstraints gridBagConstraints113 = new GridBagConstraints();
        gridBagConstraints113.gridx = 0;
        gridBagConstraints113.anchor = GridBagConstraints.EAST;
        gridBagConstraints113.gridy = 10;
        jLabel9 = new JLabel();
        jLabel9.setText("Taxon Name Barcode");
        GridBagConstraints gridBagConstraints23 = new GridBagConstraints();
        gridBagConstraints23.fill = GridBagConstraints.BOTH;
        gridBagConstraints23.gridy = 13;
        gridBagConstraints23.weightx = 1.0;
        gridBagConstraints23.anchor = GridBagConstraints.WEST;
        gridBagConstraints23.gridx = 1;
        GridBagConstraints gridBagConstraints112 = new GridBagConstraints();
        gridBagConstraints112.gridx = 0;
        gridBagConstraints112.gridy = 13;
        GridBagConstraints gridBagConstraints22 = new GridBagConstraints();
        gridBagConstraints22.fill = GridBagConstraints.BOTH;
        gridBagConstraints22.gridy = 12;
        gridBagConstraints22.weightx = 1.0;
        gridBagConstraints22.anchor = GridBagConstraints.WEST;
        gridBagConstraints22.gridx = 1;
        GridBagConstraints gridBagConstraints111 = new GridBagConstraints();
        gridBagConstraints111.gridx = 0;
        gridBagConstraints111.gridy = 12;
        GridBagConstraints gridBagConstraints110 = new GridBagConstraints();
        gridBagConstraints110.gridx = 1;
        gridBagConstraints110.fill = GridBagConstraints.HORIZONTAL;
        gridBagConstraints110.gridwidth = 1;
        gridBagConstraints110.anchor = GridBagConstraints.NORTH;
        gridBagConstraints110.gridy = 14;
        jLabelFeedback = new JLabel();
        jLabelFeedback.setText(" ");
        GridBagConstraints gridBagConstraints21 = new GridBagConstraints();
        gridBagConstraints21.fill = GridBagConstraints.BOTH;
        gridBagConstraints21.gridy = 0;
        gridBagConstraints21.weightx = 2.0;
        gridBagConstraints21.anchor = GridBagConstraints.NORTHWEST;
        gridBagConstraints21.gridx = 1;
        GridBagConstraints gridBagConstraints13 = new GridBagConstraints();
        gridBagConstraints13.gridx = 0;
        gridBagConstraints13.anchor = GridBagConstraints.NORTHEAST;
        gridBagConstraints13.gridy = 0;
        jLabel8 = new JLabel();
        jLabel8.setText("ImageFile");
        GridBagConstraints gridBagConstraints18 = new GridBagConstraints();
        gridBagConstraints18.fill = GridBagConstraints.BOTH;
        gridBagConstraints18.gridy = 9;
        gridBagConstraints18.weightx = 1.0;
        gridBagConstraints18.anchor = GridBagConstraints.WEST;
        gridBagConstraints18.gridx = 1;
        GridBagConstraints gridBagConstraints17 = new GridBagConstraints();
        gridBagConstraints17.fill = GridBagConstraints.BOTH;
        gridBagConstraints17.gridy = 8;
        gridBagConstraints17.weightx = 1.0;
        gridBagConstraints17.anchor = GridBagConstraints.WEST;
        gridBagConstraints17.gridx = 1;
        GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
        gridBagConstraints16.fill = GridBagConstraints.BOTH;
        gridBagConstraints16.gridy = 7;
        gridBagConstraints16.weightx = 1.0;
        gridBagConstraints16.anchor = GridBagConstraints.WEST;
        gridBagConstraints16.gridx = 1;
        GridBagConstraints gridBagConstraints15 = new GridBagConstraints();
        gridBagConstraints15.fill = GridBagConstraints.BOTH;
        gridBagConstraints15.gridy = 6;
        gridBagConstraints15.weightx = 1.0;
        gridBagConstraints15.anchor = GridBagConstraints.WEST;
        gridBagConstraints15.gridx = 1;
        GridBagConstraints gridBagConstraints14 = new GridBagConstraints();
        gridBagConstraints14.fill = GridBagConstraints.BOTH;
        gridBagConstraints14.gridy = 5;
        gridBagConstraints14.weightx = 1.0;
        gridBagConstraints14.anchor = GridBagConstraints.WEST;
        gridBagConstraints14.gridx = 1;
        GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
        gridBagConstraints12.fill = GridBagConstraints.BOTH;
        gridBagConstraints12.gridy = 3;
        gridBagConstraints12.weightx = 1.0;
        gridBagConstraints12.anchor = GridBagConstraints.WEST;
        gridBagConstraints12.gridx = 1;
        GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
        gridBagConstraints11.gridx = 0;
        gridBagConstraints11.anchor = GridBagConstraints.EAST;
        gridBagConstraints11.gridy = 9;
        jLabel7 = new JLabel();
        jLabel7.setText("Specimen");
        jLabel7.setForeground(Color.ORANGE);
        GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
        gridBagConstraints10.gridx = 0;
        gridBagConstraints10.anchor = GridBagConstraints.EAST;
        gridBagConstraints10.gridy = 8;
        jLabel6 = new JLabel();
        jLabel6.setText("Tray Labels");
        jLabel6.setForeground(Color.CYAN);
        GridBagConstraints gridBagConstraints9 = new GridBagConstraints();
        gridBagConstraints9.gridx = 0;
        gridBagConstraints9.anchor = GridBagConstraints.EAST;
        gridBagConstraints9.gridy = 7;
        jLabel5 = new JLabel();
        jLabel5.setText("Pin Labels");
        jLabel5.setForeground(Color.MAGENTA);
        GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
        gridBagConstraints8.gridx = 0;
        gridBagConstraints8.anchor = GridBagConstraints.EAST;
        gridBagConstraints8.insets = new Insets(0, 3, 0, 0);
        gridBagConstraints8.gridy = 6;
        jLabel4 = new JLabel();
        jLabel4.setText("Taxon Name Label");
        jLabel4.setForeground(Color.BLUE);
        GridBagConstraints gridBagConstraints7 = new GridBagConstraints();
        gridBagConstraints7.gridx = 0;
        gridBagConstraints7.anchor = GridBagConstraints.EAST;
        gridBagConstraints7.gridy = 5;
        jLabel3 = new JLabel();
        jLabel3.setText("Barcode");
        jLabel3.setForeground(Color.RED);
        GridBagConstraints gridBagConstraints6 = new GridBagConstraints();
        gridBagConstraints6.gridx = 0;
        gridBagConstraints6.anchor = GridBagConstraints.EAST;
        gridBagConstraints6.gridy = 3;
        jLabel2 = new JLabel();
        jLabel2.setText("Image Size");
        GridBagConstraints gridBagConstraints5 = new GridBagConstraints();
        gridBagConstraints5.fill = GridBagConstraints.BOTH;
        gridBagConstraints5.gridy = 2;
        gridBagConstraints5.weightx = 1.0;
        gridBagConstraints5.anchor = GridBagConstraints.WEST;
        gridBagConstraints5.gridx = 1;
        GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
        gridBagConstraints4.fill = GridBagConstraints.BOTH;
        gridBagConstraints4.gridy = 1;
        gridBagConstraints4.weightx = 1.0;
        gridBagConstraints4.anchor = GridBagConstraints.WEST;
        gridBagConstraints4.gridx = 1;
        GridBagConstraints gridBagConstraints2 = new GridBagConstraints();
        gridBagConstraints2.gridx = 0;
        gridBagConstraints2.anchor = GridBagConstraints.EAST;
        gridBagConstraints2.gridy = 2;
        jLabel1 = new JLabel();
        jLabel1.setText("Name");
        GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
        gridBagConstraints1.gridx = 0;
        gridBagConstraints1.anchor = GridBagConstraints.EAST;
        gridBagConstraints1.gridy = 1;
        jLabel = new JLabel();
        jLabel.setText("Template ID");
        GridBagConstraints gridBagConstraints = new GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 11;
        jPanel = new JPanel();
        jPanel.setLayout(new GridBagLayout());
        jPanel.add(getJButtonSave(), gridBagConstraints);
        jPanel.add(jLabel, gridBagConstraints1);
        jPanel.add(jLabel1, gridBagConstraints2);
        jPanel.add(getJTextFieldTemplateId(), gridBagConstraints4);
        jPanel.add(getJTextFieldName(), gridBagConstraints5);
        jPanel.add(jLabel2, gridBagConstraints6);
        jPanel.add(jLabel3, gridBagConstraints7);
        jPanel.add(jLabel4, gridBagConstraints8);
        jPanel.add(jLabel5, gridBagConstraints9);
        jPanel.add(jLabel6, gridBagConstraints10);
        jPanel.add(jLabel7, gridBagConstraints11);
        jPanel.add(getJTextField2(), gridBagConstraints12);
        jPanel.add(getJTextField3(), gridBagConstraints14);
        jPanel.add(getJTextField4(), gridBagConstraints15);
        jPanel.add(getJTextField5(), gridBagConstraints16);
        jPanel.add(getJTextField6(), gridBagConstraints17);
        jPanel.add(getJTextField7(), gridBagConstraints18);
        jPanel.add(jLabel8, gridBagConstraints13);
        jPanel.add(getJTextField8(), gridBagConstraints21);
        jPanel.add(jLabelFeedback, gridBagConstraints110);
        jPanel.add(getJButton(), gridBagConstraints111);
        jPanel.add(getJTextFieldBarcodeScan(), gridBagConstraints22);
        jPanel.add(getJButton1(), gridBagConstraints112);
        jPanel.add(getJTextField(), gridBagConstraints23);
        jPanel.add(jLabel9, gridBagConstraints113);
        jPanel.add(getJTextField9(), gridBagConstraints24);
    }
    return jPanel;
}

From source file:com.bdb.weather.display.freeplot.HistoricalFreePlot.java

/**
 * Create the series for pressure values.
 * /*w  ww .j  a  v a  2  s .  co m*/
 * @param stroke The stroke that is used to draw the series
 * @param timeMethod The method that is used to "get" the date from the record
 */
private List<FreePlotSeries<HistoricalRecord>> createPressureSeries(Stroke stroke,
        Function<HistoricalRecord, TemporalAccessor> timeMethod) {
    List<FreePlotSeries<HistoricalRecord>> list = new ArrayList<>();
    int n = 0;
    list.add(new FreePlotSeries<>(BAROMETRIC_PRESSURE_SERIES_NAME, n++, Color.ORANGE, stroke,
            HistoricalRecord::getBaroPressure, timeMethod, INTERVAL_CLASS));

    return list;
}

From source file:uk.co.moonsit.sockets.GraphClient.java

private Color getSeriesColor(int index) {
    if (index > 10) {
        index = index % 11;//from w w w . ja v a 2s . c  om
    }
    switch (index) {
    case 0:
        return Color.BLUE.brighter().brighter();
    case 1:
        return Color.RED.brighter();
    case 2:
        return Color.GREEN.darker();
    case 3:
        return Color.CYAN.darker();
    case 4:
        return Color.ORANGE.darker();
    case 5:
        return Color.DARK_GRAY;
    case 6:
        return Color.MAGENTA;
    case 7:
        return Color.BLUE.darker().darker();
    case 8:
        return Color.CYAN.darker().darker();
    case 9:
        return Color.BLACK.brighter();
    case 10:
        return Color.RED.darker();
    }
    return Color.LIGHT_GRAY;
}

From source file:com.bdb.weather.display.freeplot.SummaryFreePlot.java

/**
 * Create the JFreeChart series for the Solar Radiation values.
 * //from  w w  w . j  a va 2  s.  c  o  m
 * @param stroke The stroke for the series
 */
private List<FreePlotSeries<SummaryRecord>> createSolarRadiationSeries(Stroke stroke) {
    List<FreePlotSeries<SummaryRecord>> list = new ArrayList<>();
    int n = 0;
    list.add(new FreePlotSeries<>(MAX_SOLAR_RADIATION_NAME, n++, Color.ORANGE, stroke,
            SummaryRecord::getMaxSolarRadiation, dateMethod, period));
    list.add(new FreePlotSeries<>(MEAN_SOLAR_RADIATION_NAME, n++, Color.PINK, stroke,
            SummaryRecord::getAvgSolarRadiation, dateMethod, period));

    return list;
}

From source file:com.juanhg.icewalker.IceWalkerApplet.java

public void paintEnergy() {
    if (model.remainEnergy()) {
        energySize = 33;/*from w  ww. ja  v a  2s .c  o m*/
    } else {
        energySize = 0;
    }

    Color color;
    double energy = model.getEnergyValue();
    if (energy > 0 && energy <= 200) {
        color = Color.red;
    } else if (energy > 200 && energy <= 400) {
        color = Color.orange;
    } else if (energy > 400 && energy <= 600) {
        color = Color.yellow;
    } else {
        color = Color.green;
    }

    chart.replacePlot(3, model.getEnergy(), "", color, energySize, true);
}

From source file:uk.ac.diamond.scisoft.analysis.rcp.views.HistogramView.java

@Override
public void createPartControl(Composite parent) {

    this.parent = parent;
    container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout(1, false));

    final Composite top = new Composite(container, SWT.NONE);
    top.setLayout(new GridLayout(3, false));
    top.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));

    final Label scheme = new Label(top, SWT.NONE);
    scheme.setText("Colour Scheme");
    cmbColourMap = new CCombo(top, SWT.BORDER | SWT.READ_ONLY);
    cmbColourMap.setToolTipText("Change the color scheme.");
    cmbColourMap.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    btnExpertMode = new Button(top, SWT.CHECK);
    btnExpertMode.setText("Expert");
    btnExpertMode.setToolTipText("Enable expert mode for customising colour channels");
    btnExpertMode.addSelectionListener(this);

    advancedComp = new Composite(container, SWT.NONE);
    //controlGroup.setText("RGB Settings");   // Looks a bit busy with this label
    advancedComp.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
    advancedComp.setLayout(new GridLayout(3, false));

    expertGroup = new Group(advancedComp, SWT.NONE);
    expertGroup.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1));
    expertGroup.setLayout(new GridLayout(3, false));
    {//from   w  w w .ja  v  a 2s  . co m
        Label lblRed = new Label(expertGroup, SWT.NONE);
        lblRed.setText("Red");
        cmbRedColour = new CCombo(expertGroup, SWT.BORDER | SWT.READ_ONLY);

        btnRedInverse = new Button(expertGroup, SWT.CHECK);
        btnRedInverse.setText("Inverse");
        btnRedInverse.addSelectionListener(this);

        Label lblGreen = new Label(expertGroup, SWT.NONE);
        lblGreen.setText("Green");
        cmbGreenColour = new CCombo(expertGroup, SWT.BORDER | SWT.READ_ONLY);
        btnGreenInverse = new Button(expertGroup, SWT.CHECK);
        btnGreenInverse.setText("Inverse");
        btnGreenInverse.addSelectionListener(this);

        Label lblBlue = new Label(expertGroup, SWT.NONE);
        lblBlue.setText("Blue");
        cmbBlueColour = new CCombo(expertGroup, SWT.BORDER | SWT.READ_ONLY);
        btnBlueInverse = new Button(expertGroup, SWT.CHECK);
        btnBlueInverse.setText("Inverse");
        btnBlueInverse.addSelectionListener(this);

        Label lblAlpha = new Label(expertGroup, SWT.NONE);
        lblAlpha.setText("Alpha");
        cmbAlpha = new CCombo(expertGroup, SWT.BORDER | SWT.READ_ONLY);
        btnAlphaInverse = new Button(expertGroup, SWT.CHECK);
        btnAlphaInverse.setText("Inverse");
        btnAlphaInverse.addSelectionListener(this);
    }
    expertGroup.setVisible(getPreferenceColourMapExpertMode());
    ((GridData) expertGroup.getLayoutData()).exclude = !getPreferenceColourMapExpertMode();

    threshPanel = new Group(advancedComp, SWT.NONE);
    threshPanel.setText("Mark's special threshhold"); // Looks a bit busy with this label
    threshPanel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
    threshPanel.setLayout(new GridLayout(2, false));
    {
        Label lblMinValue = new Label(threshPanel, SWT.NONE);
        lblMinValue.setText("Min threshold");
        spnMinValue = new Spinner(threshPanel, SWT.BORDER);
        spnMinValue.setMinimum(0);
        spnMinValue.setMaximum(100);
        spnMinValue.addSelectionListener(this);
        Label lblMaxValue = new Label(threshPanel, SWT.NONE);
        lblMaxValue.setText("Max threshold");
        spnMaxValue = new Spinner(threshPanel, SWT.BORDER);
        spnMaxValue.setMinimum(0);
        spnMaxValue.setMaximum(100);
        spnMaxValue.addSelectionListener(this);
    }
    threshPanel.setVisible(false);
    ((GridData) threshPanel.getLayoutData()).exclude = true;

    rangePanel = new Group(container, SWT.NONE);
    rangePanel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
    rangePanel.setLayout(new GridLayout(3, false));
    rangePanel.setText("Histogram range");
    {
        Label lblStartValue = new Label(rangePanel, SWT.NONE);
        lblStartValue.setText("Minimum");
        spnRangeStart = new FloatSpinner(rangePanel, SWT.BORDER);
        GridData gridData = new GridData(SWT.NONE, SWT.NONE, true, false);
        spnRangeStart.setLayoutData(gridData);
        spnRangeStart.addSelectionListener(this);
        sldMinValue = new Slider(rangePanel, SWT.BORDER);
        gridData = new GridData(SWT.FILL, SWT.NONE, true, false);
        gridData.minimumWidth = 90;
        sldMinValue.setLayoutData(gridData);
        sldMinValue.addSelectionListener(this);
        sldMinValue.setMinimum(0);
        sldMinValue.setMaximum(SLIDERSECTIONS);
        sldMinValue.setIncrement(1);
        Label lblStopValue = new Label(rangePanel, SWT.NONE);
        lblStopValue.setText("Maximum");
        gridData = new GridData(SWT.NONE, SWT.NONE, true, false);
        spnRangeStop = new FloatSpinner(rangePanel, SWT.BORDER);
        spnRangeStop.setLayoutData(gridData);
        spnRangeStop.addSelectionListener(this);
        spnRangeStart.setEnabled(false);
        spnRangeStop.setEnabled(false);
        sldMaxValue = new Slider(rangePanel, SWT.BORDER);
        gridData = new GridData(SWT.FILL, SWT.NONE, true, false);
        gridData.minimumWidth = 90;
        sldMaxValue.setLayoutData(gridData);
        sldMaxValue.addSelectionListener(this);
        sldMaxValue.setMinimum(0);
        sldMaxValue.setMaximum(SLIDERSECTIONS);
        sldMaxValue.setIncrement(1);

        spnRangeStart.setEnabled(false);
        spnRangeStop.setEnabled(false);
        sldMinValue.setEnabled(false);
        sldMaxValue.setEnabled(false);
    }
    {
        composite = new Composite(container, SWT.NONE);
        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        composite.setLayout(new FillLayout());

        histogramPlotter = new DataSetPlotter(PlottingMode.BARCHART, composite, false);
        histogramPlotter.setXAxisLabel("Intensity Value");
        histogramPlotter.setYAxisLabel("Count");
        histogramPlotter.setAxisModes(AxisMode.CUSTOM, AxisMode.LINEAR, AxisMode.LINEAR);
        histogramPlotter.setXTickLabelFormat(TickFormatting.plainMode);
        histogramPlotter.setXAxisValues(xAxis, 1);

        Plot1DGraphTable colourTable = histogramPlotter.getColourTable();
        Plot1DAppearance plotApp = new Plot1DAppearance(Color.RED, Plot1DStyles.SOLID, "");
        colourTable.addEntryOnLegend(plotApp);
        plotApp = new Plot1DAppearance(Color.GREEN, Plot1DStyles.SOLID, "");
        colourTable.addEntryOnLegend(plotApp);
        plotApp = new Plot1DAppearance(Color.BLUE, Plot1DStyles.SOLID, "");
        colourTable.addEntryOnLegend(plotApp);
        plotApp = new Plot1DAppearance(Color.ORANGE, Plot1DStyles.SOLID, "");
        colourTable.addEntryOnLegend(plotApp);
    }

    cmbColourMap.addSelectionListener(this);
    cmbRedColour.addSelectionListener(this);
    cmbGreenColour.addSelectionListener(this);
    cmbBlueColour.addSelectionListener(this);
    cmbAlpha.addSelectionListener(this);
    buildToolbar();
    GlobalColourMaps.InitializeColourMaps();
    fillupColourComboBoxes();
    fillupColourMapBox();
    buildGradientImage();
}

From source file:org.tsho.dmc2.core.chart.DmcLyapunovPlot.java

public LegendItemCollection getLegendItems() {
    if (type != AREA)
        return null;

    Stroke stroke = new BasicStroke(1.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_BEVEL);
    Shape shape = new Rectangle2D.Double(-3, -3, 6, 6);

    LegendItemCollection legendItems = new LegendItemCollection();
    legendItems.add(new LegendItem("both zero", "", shape, true, Color.black, stroke, Color.yellow, stroke));

    legendItems.add(new LegendItem("zero, positive", "", shape, true, Color.red, stroke, Color.yellow, stroke));

    legendItems/* w  w w .ja v a  2 s  .c om*/
            .add(new LegendItem("zero, negative", "", shape, true, Color.blue, stroke, Color.yellow, stroke));

    legendItems.add(
            new LegendItem("positive, negative", "", shape, true, Color.green, stroke, Color.yellow, stroke));

    legendItems
            .add(new LegendItem("both positive", "", shape, true, Color.orange, stroke, Color.yellow, stroke));

    legendItems.add(new LegendItem("both negative", "", shape, true, Color.pink, stroke, Color.yellow, stroke));

    return legendItems;
}

From source file:com.bdb.weather.display.freeplot.HistoricalFreePlot.java

/**
 * Create the series for wind values.// w  w w  .  j  av  a  2  s. co  m
 * 
 * @param stroke The stroke that is used to draw the series
 * @param timeMethod The method that is used to "get" the date from the record
 */
private List<FreePlotSeries<HistoricalRecord>> createWindSeries(Stroke stroke,
        Function<HistoricalRecord, TemporalAccessor> timeMethod) {
    List<FreePlotSeries<HistoricalRecord>> list = new ArrayList<>();
    int n = 0;
    list.add(new FreePlotSeries<>(SUSTAINED_WIND_SERIES_NAME, n++, Color.CYAN, stroke,
            HistoricalRecord::getAvgWindSpeed, timeMethod, INTERVAL_CLASS));
    list.add(new FreePlotSeries<>(SUSTAINED_WIND_SERIES_NAME, n++, Color.ORANGE, stroke,
            HistoricalRecord::getHighWindSpeed, timeMethod, INTERVAL_CLASS));
    list.add(new FreePlotSeries<>(WIND_GUST_SERIES_NAME, n++, Color.yellow, stroke,
            HistoricalRecord::getWindGustSpeed, timeMethod, INTERVAL_CLASS));

    return list;
}