Example usage for java.awt Color WHITE

List of usage examples for java.awt Color WHITE

Introduction

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

Prototype

Color WHITE

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

Click Source Link

Document

The color white.

Usage

From source file:com.mirth.connect.client.ui.AttachmentExportDialog.java

private void initComponents() {
    binaryButton = new JRadioButton("Binary");
    binaryButton.setSelected(true);/*from   w ww .j a  v a  2  s.com*/
    binaryButton.setBackground(Color.white);
    binaryButton.setFocusable(false);

    textButton = new JRadioButton("Text");
    textButton.setBackground(Color.white);
    textButton.setFocusable(false);

    ButtonGroup typeButtonGroup = new ButtonGroup();
    typeButtonGroup.add(binaryButton);
    typeButtonGroup.add(textButton);

    serverButton = new JRadioButton("Server");
    serverButton.setBackground(Color.white);
    serverButton.setFocusable(false);

    localButton = new JRadioButton("My Computer");
    localButton.setBackground(Color.white);
    localButton.setSelected(true);
    localButton.setFocusable(false);

    browseButton = new MirthButton("Browse...");

    localButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            browseButton.setEnabled(true);
            fileField.setText(null);
        }
    });

    serverButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            browseButton.setEnabled(false);
            fileField.setText(null);
        }
    });

    ButtonGroup locationButtonGroup = new ButtonGroup();
    locationButtonGroup.add(serverButton);
    locationButtonGroup.add(localButton);

    browseButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            browseSelected();
        }
    });

    fileField = new JTextField();

    exportButton = new JButton("Export");
    cancelButton = new JButton("Cancel");

    exportButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            export();
        }
    });

    cancelButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            setVisible(false);
        }
    });
}

From source file:DashboardInterface.TensionSpeedDial.java

public TensionSpeedDial(JPanel parentIn) {
    super(new BorderLayout());
    parent = parentIn;/* ww  w. j av  a 2 s .c o m*/
    dataset1 = new DefaultValueDataset(0D);
    dataset2 = new DefaultValueDataset(0D);
    pipe = MessagePipeline.getInstance();
    pipe.attach(this);
    DialPlot dialplot = new DialPlot();
    dialplot.setView(0.0D, 0.0D, 1.0D, 1.0D);
    dialplot.setDataset(0, dataset1);
    dialplot.setDataset(1, dataset2);
    setBackground(Color.WHITE);
    StandardDialFrame standarddialframe = new StandardDialFrame();
    standarddialframe.setBackgroundPaint(Color.lightGray);
    standarddialframe.setForegroundPaint(Color.darkGray);

    dialplot.setDialFrame(standarddialframe);

    DialBackground dialbackground = new DialBackground(Color.LIGHT_GRAY);

    dialbackground.setGradientPaintTransformer(
            new StandardGradientPaintTransformer(GradientPaintTransformType.VERTICAL));
    dialplot.setBackground(dialbackground);

    DialTextAnnotation dialtextannotation = new DialTextAnnotation("Tension (lbf)");
    dialtextannotation.setFont(new Font("Dialog", 1, 12));
    dialtextannotation.setPaint(Color.RED);
    dialtextannotation.setRadius(0.47999999999999996D);
    dialplot.addLayer(dialtextannotation);

    DialTextAnnotation dialtextannotation2 = new DialTextAnnotation("Speed (kts)");
    dialtextannotation2.setFont(new Font("Dialog", 1, 12));
    dialtextannotation2.setPaint(Color.BLUE);
    dialtextannotation2.setRadius(0.78999999999999996D);
    dialplot.addLayer(dialtextannotation2);

    /*DialValueIndicator dialvalueindicator = new DialValueIndicator(0);
    dialvalueindicator.setFont(new Font("Dialog", 0, 10));
    dialvalueindicator.setOutlinePaint(Color.BLACK);
    dialvalueindicator.setRadius(0.84999999999999998D);
    dialvalueindicator.setAngle(-90D);
    dialplot.addLayer(dialvalueindicator);
            
    DialValueIndicator dialvalueindicator1 = new DialValueIndicator(1);
    dialvalueindicator1.setFont(new Font("Dialog", 0, 10));
    dialvalueindicator1.setOutlinePaint(Color.BLACK);
    dialvalueindicator1.setRadius(0.60999999999999998D);
    dialvalueindicator1.setAngle(-90D);
    dialplot.addLayer(dialvalueindicator1);*/

    StandardDialScale standarddialscale = new StandardDialScale(0D, 90D, -120D, -300D, 10D, 4);
    standarddialscale.setTickRadius(0.88D);
    standarddialscale.setTickLabelOffset(0.14999999999999999D);
    standarddialscale.setTickLabelFont(new Font("Dialog", 0, 14));
    standarddialscale.setTickLabelPaint(Color.BLUE);
    standarddialscale.setMajorTickPaint(Color.BLUE);
    standarddialscale.setMinorTickPaint(Color.BLUE);
    dialplot.addScale(0, standarddialscale);

    StandardDialScale standarddialscale1 = new StandardDialScale(0.0D, 2500D, -120D, -300D, 500D, 4);
    standarddialscale1.setTickRadius(0.5D);
    standarddialscale1.setTickLabelOffset(0.14999999999999999D);
    standarddialscale1.setTickLabelFont(new Font("Dialog", 0, 10));
    standarddialscale1.setTickLabelPaint(Color.RED);
    standarddialscale1.setMajorTickPaint(Color.RED);
    standarddialscale1.setMinorTickPaint(Color.RED);
    dialplot.addScale(1, standarddialscale1);

    dialplot.mapDatasetToScale(1, 1);

    org.jfree.chart.plot.dial.DialPointer.Pointer pointer = new org.jfree.chart.plot.dial.DialPointer.Pointer(
            0);
    pointer.setFillPaint(Color.BLUE);
    dialplot.addPointer(pointer);

    org.jfree.chart.plot.dial.DialPointer.Pointer pin = new org.jfree.chart.plot.dial.DialPointer.Pointer(1);
    pin.setRadius(0.55000000000000004D);
    pin.setFillPaint(Color.RED);
    dialplot.addPointer(pin);

    DialCap dialcap = new DialCap();
    dialcap.setRadius(0.10000000000000001D);
    dialplot.setCap(dialcap);

    Dimension size = parent.getBounds().getSize();
    int width = parent.getWidth();
    int height = parent.getHeight();

    width = 200;

    JFreeChart jfreechart = new JFreeChart(dialplot);
    jfreechart.setBackgroundPaint(Color.WHITE);
    ChartPanel chartpanel = new ChartPanel(jfreechart);
    chartpanel.setPreferredSize(new Dimension(width, width));

    add(chartpanel);
}

From source file:D20140128.ApacheXMLGraphicsTest.TilingPatternExample.java

/**
 * Default constructor.//from w  w  w.  ja v  a 2 s. co m
 */
public TilingPatternExample() {
    //Created TexturePaint instance
    this.tile = new BufferedImage(40, 20, BufferedImage.TYPE_INT_RGB);
    Graphics2D tileg2d = tile.createGraphics();
    tileg2d.setBackground(Color.WHITE);
    tileg2d.clearRect(0, 0, tile.getWidth(), tile.getHeight());
    tileg2d.setColor(Color.BLUE);
    tileg2d.fillOval(2, 2, tile.getWidth() - 2, tile.getHeight() - 2);
    tileg2d.dispose();
    Rectangle2D rect = new Rectangle2D.Double(2, 2, tile.getWidth() / 2.0, tile.getHeight() / 2.0);
    this.paint = new TexturePaint(tile, rect);
}

From source file:com.etest.view.tq.charts.SubjectTestLineChart.java

public static JFreeChart difficultIndex(int tqCoverageId) {
    DefaultCategoryDataset dataset = new DefaultCategoryDataset();

    for (CellItem ci : CellItemDAO.getItemAnalysisResult(tqCoverageId)) {
        dataset.setValue((int) (ci.getDifficultIndex() * 100), "Difficulty Index",
                String.valueOf(ci.getItemNo()));
    }//from  ww w.  j  a  va  2s . c o  m

    JFreeChart chart = ChartFactory.createLineChart("Item Analysis Report", "Item No.", "Difficulty Index (%)",
            dataset, PlotOrientation.VERTICAL, true, true, false);

    chart.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setRangeGridlinePaint(Color.white);

    // customise the range axis...
    NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // customise the renderer...
    LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer();
    renderer.setShapesVisible(true);
    renderer.setDrawOutlines(true);
    renderer.setUseFillPaint(true);
    renderer.setFillPaint(Color.white);

    return chart;
}

From source file:RendererSample.java

public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
        int row, int column) {
    Component renderer = DEFAULT_RENDERER.getTableCellRendererComponent(table, value, isSelected, hasFocus, row,
            column);//from  w  w  w  . java 2 s .  c  o  m
    ((JLabel) renderer).setOpaque(true);
    Color foreground, background;
    if (isSelected) {
        foreground = Color.yellow;
        background = Color.green;
    } else {
        if (row % 2 == 0) {
            foreground = Color.blue;
            background = Color.white;
        } else {
            foreground = Color.white;
            background = Color.blue;
        }
    }
    renderer.setForeground(foreground);
    renderer.setBackground(background);
    return renderer;
}

From source file:customprogressindicatordemo.WeatherData.java

public WeatherData() {
    setBackground(Color.WHITE);
    setLayout(new BorderLayout());
    JLabel lbl = new JLabel("World-Wide Weather Data");
    add(lbl, BorderLayout.NORTH);

    String[] columnNames = { "City", "Temperature" };
    JTable table = new JTable(getData(), columnNames);

    table.setPreferredScrollableViewportSize(new Dimension(500, 70));
    table.setFillsViewportHeight(true);/*from   ww  w . j  av a  2 s  .co  m*/

    //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    scrollPane.setBackground(Color.WHITE);

    //Add the scroll pane to this panel.
    add(scrollPane, BorderLayout.SOUTH);
}

From source file:Main.java

public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
        boolean cellHasFocus) {
    CheckComboStore store = (CheckComboStore) value;
    checkBox.setText(store.id);/* ww w  . ja  va 2  s  . c o m*/
    checkBox.setSelected(((Boolean) store.state).booleanValue());
    checkBox.setBackground(isSelected ? Color.red : Color.white);
    checkBox.setForeground(isSelected ? Color.white : Color.black);
    return checkBox;
}

From source file:netplot.BarPlotPanel.java

private JFreeChart createChart() {
    collection = new XYSeriesCollection();
    collection.addSeries(series);/*w w w .  j ava2  s  . c om*/
    dataset = new XYBarDataset(collection, 0.9);

    chart = ChartFactory.createXYBarChart(plotTitle, "", false, "", dataset, PlotOrientation.VERTICAL,
            enableLegend, true, true);

    plot = (XYPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.WHITE);
    plot.setDomainGridlinePaint(Color.DARK_GRAY);
    plot.setRangeGridlinePaint(Color.DARK_GRAY);
    NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
    domainAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    renderer = (XYBarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(true);
    return chart;
}

From source file:amicity.graph.pc.gui.JungGraphViewer.java

public JungGraphViewer(JungGraph aGraph) {
    this.graph = aGraph;

    this.setLayout(new BorderLayout());
    layout = new StaticLayout<Node, Edge>(graph);
    vv = new VisualizationViewer<Node, Edge>(layout);

    vv.setBackground(Color.white);

    vv.getRenderContext().setVertexLabelTransformer(new NodeTransformer());
    vv.getRenderContext().setEdgeLabelTransformer(new EdgeTransformer());
    vv.getRenderContext().setVertexStrokeTransformer(new NodeStrokeTransformer(vv));
    vv.getRenderContext().setEdgeLabelRenderer(new DefaultEdgeLabelRenderer(Color.YELLOW));
    vv.getRenderer().getVertexLabelRenderer().setPosition(Position.CNTR);

    Transformer<Node, Shape> vertexSize = new Transformer<Node, Shape>() {
        public Shape transform(Node i) {
            int length = i.getLabel().length() * 10;
            length = length > 30 ? length : 30;
            return new Rectangle(-20, -10, length, 30);
        }/*from   ww w  .j av a 2s .c  om*/
    };
    vv.getRenderContext().setVertexShapeTransformer(vertexSize);

    final GraphZoomScrollPane panel = new GraphZoomScrollPane(vv);
    panel.setPreferredSize(new Dimension(400, 400));
    add(panel, BorderLayout.CENTER);
}

From source file:PlotsBuilding.PlotPanel.java

public PlotPanel(ArrayList<PlotsData> plotscollection, Plotcr frame) {
    pointsPanel = new JPanel();
    pointsPanel.setLayout(new BoxLayout(pointsPanel, BoxLayout.X_AXIS));
    cursorInfo = new JTextArea(2, 10);
    cursorInfo.setVisible(true);/*from  w w w.jav a2  s .  c  om*/
    chartPanel = new ChartPanel(fillCollection(plotscollection));
    chartPanel.addChartMouseListener(new MyChartMouseListener());
    chartPanel.setPreferredSize(new Dimension(800, 450));
    pointsPanel.setMaximumSize(new Dimension(chartPanel.getWidth(), 70));
    pointsPanel.add(cursorInfo);
    chartPanel.setBackground(Color.WHITE);
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    add(chartPanel);
    add(pointsPanel);
}