Example usage for java.awt Font BOLD

List of usage examples for java.awt Font BOLD

Introduction

In this page you can find the example usage for java.awt Font BOLD.

Prototype

int BOLD

To view the source code for java.awt Font BOLD.

Click Source Link

Document

The bold style constant.

Usage

From source file:net.pms.encoders.FFmpegDVRMSRemux.java

@Override
public JComponent config() {
    FormLayout layout = new FormLayout("left:pref, 3dlu, p, 3dlu, 0:grow", "p, 3dlu, p, 3dlu, 0:grow");
    PanelBuilder builder = new PanelBuilder(layout);
    builder.setBorder(Borders.EMPTY_BORDER);
    builder.setOpaque(false);/*  w  w  w  . j av a2  s .c  o  m*/

    CellConstraints cc = new CellConstraints();

    JComponent cmp = builder.addSeparator(Messages.getString("FFmpegDVRMSRemux.1"), cc.xyw(1, 1, 5));
    cmp = (JComponent) cmp.getComponent(0);
    cmp.setFont(cmp.getFont().deriveFont(Font.BOLD));

    builder.addLabel(Messages.getString("FFmpegDVRMSRemux.0"), cc.xy(1, 3));
    altffpath = new JTextField(configuration.getFfmpegAlternativePath());
    altffpath.addKeyListener(new KeyAdapter() {
        @Override
        public void keyReleased(KeyEvent e) {
            configuration.setFfmpegAlternativePath(altffpath.getText());
        }
    });
    builder.add(altffpath, cc.xyw(3, 3, 3));

    return builder.getPanel();
}

From source file:ca.sqlpower.architect.swingui.ProfileGraphPanel.java

public ProfileGraphPanel(ProfilePanel panel, int rowCount) {
    this.profilePanel = panel;
    this.rowCount = rowCount;

    FormLayout displayLayout = new FormLayout("4dlu, default, 4dlu, 100dlu, 4dlu, fill:default:grow, 4dlu", // columns
            "4dlu, default, 6dlu"); // rows
    CellConstraints cc = new CellConstraints();

    validResultsPanel = ProfileGraphPanel.logger.isDebugEnabled() ? new FormDebugPanel(displayLayout)
            : new JPanel(displayLayout);
    validResultsPanel.setBorder(BorderFactory.createEtchedBorder());

    Font bodyFont = validResultsPanel.getFont();
    Font titleFont = bodyFont.deriveFont(Font.BOLD, bodyFont.getSize() * 1.25F);

    title = new JLabel("Column Name");
    title.setFont(titleFont);/* w  w  w.  j  a  v a 2 s .  c  om*/

    PanelBuilder pb = new PanelBuilder(displayLayout, validResultsPanel);
    pb.add(title, cc.xyw(2, 2, 5));

    int row = 4;
    rowCountDisplay = makeInfoRow(pb, "RowCount", row);
    row += 2;
    nullableLabel = makeInfoRow(pb, "Nullable", row);
    row += 2;
    nullCountLabel = makeInfoRow(pb, "Null Count", row);
    row += 2;
    nullPercentLabel = makeInfoRow(pb, "% Null Records", row);
    row += 2;
    minLengthLabel = makeInfoRow(pb, "Minimum Length", row);
    row += 2;
    maxLengthLabel = makeInfoRow(pb, "Maximum Length", row);
    row += 2;
    uniqueCountLabel = makeInfoRow(pb, "Unique Values", row);
    row += 2;
    uniquePercentLabel = makeInfoRow(pb, "% Unique", row);
    row += 2;
    minValue = makeInfoRow(pb, "Minimum Value", row);
    row += 2;
    maxValue = makeInfoRow(pb, "Maximum Value", row);
    row += 2;
    avgValue = makeInfoRow(pb, "Average Value", row);
    row += 2;

    freqValueTable = new FreqValueTable(null);
    freqValueSp = new JScrollPane(freqValueTable);

    pb.appendRow("fill:10dlu:grow");
    pb.appendRow("fill:default:grow");
    pb.add(freqValueSp, cc.xyw(2, row + 1, 3));

    // Now add something to represent the chart
    JFreeChart createPieChart = ChartFactory.createPieChart("", new DefaultPieDataset(new DefaultKeyedValues()),
            false, false, false);
    chartPanel = new ChartPanel(createPieChart);
    chartPanel.setPreferredSize(new Dimension(300, 300));

    if (panel.getProfileManager().getWorkspaceContainer() instanceof ArchitectSession
            && ((ArchitectSession) panel.getProfileManager().getWorkspaceContainer()).isEnterpriseSession()) {
        pb.add(new JLabel("Column Profile Notes"), cc.xy(6, 2));
        notesField = new JTextArea();
        notesField.setLineWrap(true);
        notesField.setWrapStyleWord(true);
        JScrollPane notesScroll = new JScrollPane(notesField);
        notesScroll.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
        notesScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        pb.add(notesScroll, cc.xywh(6, 4, 1, row - 4));

        pb.appendRow("fill:4dlu:grow");
        pb.appendRow("4dlu");

        pb.add(chartPanel, cc.xy(6, row + 1));
    } else {
        pb.appendRow("fill:4dlu:grow");
        pb.appendRow("4dlu");
        pb.add(chartPanel, cc.xywh(6, 4, 1, row - 2));
    }

    invalidResultsPanel = new JPanel(new BorderLayout());
    invalidResultsLabel = new JLabel("No error message yet");
    invalidResultsPanel.add(invalidResultsLabel);

    displayArea = new JPanel(new GridLayout(1, 1));
    displayArea.setPreferredSize(validResultsPanel.getPreferredSize());
}

From source file:com.xilinx.kintex7.ThermoPlot.java

public void createPlot() {
    dset = new DefaultValueDataset(50);
    plot = new ThermometerPlot(dset);
    plot.setRange(0, 125);//  w  ww  .ja  v a  2s .  c  o m
    //plot.setFollowDataInSubranges(true);
    //plot.setUseSubrangePaint(false);
    plot.setThermometerStroke(new BasicStroke(2.0f));
    plot.setSubrange(ThermometerPlot.NORMAL, 0, 60);
    plot.setSubrange(ThermometerPlot.WARNING, 60, 85);
    plot.setSubrange(ThermometerPlot.CRITICAL, 86, 125);

    plot.setThermometerPaint(Color.BLACK);
    plot.setOutlineVisible(false);
    plot.setBackgroundAlpha(0);
    plot.setMercuryPaint(Color.ORANGE);
    plot.setUnits(ThermometerPlot.UNITS_NONE);
    chart = new JFreeChart("", plot);
    TextTitle ttitle = new TextTitle("Temperature (\u2103)", new Font("Temperature (\u2103)", Font.BOLD, 15));
    ttitle.setPaint(Color.WHITE);
    chart.setTitle(ttitle);
    chart.setBackgroundPaint(new Color(133, 133, 133));
    //chart.setTitle("");
}

From source file:com.sec.ose.osi.ui.frm.main.identification.patternmatch.JPanPatternMatchMain.java

/**
 * This method initializes this/*w  ww  .j a  va  2  s. c  o  m*/
 * 
 * @return void
 */
private void initialize() {
    GridBagConstraints gridBagConstraints41 = new GridBagConstraints();
    gridBagConstraints41.gridx = 0;
    gridBagConstraints41.gridwidth = 2;
    gridBagConstraints41.anchor = GridBagConstraints.NORTHWEST;
    gridBagConstraints41.weighty = 0.01;
    gridBagConstraints41.weightx = 1.0;
    gridBagConstraints41.gridy = 1;
    GridBagConstraints gridBagConstraints3 = new GridBagConstraints();
    gridBagConstraints3.gridx = 0;
    gridBagConstraints3.anchor = GridBagConstraints.NORTHWEST;
    gridBagConstraints3.gridwidth = 2;
    gridBagConstraints3.weighty = 1.0;
    gridBagConstraints3.insets = new Insets(0, 20, 0, 0);
    gridBagConstraints3.gridy = 3;
    jLabelLicense = new JLabel();
    jLabelLicense.setText("License :");
    jLabelLicense.setFont(new Font("Dialog", Font.PLAIN, 12));
    jLabelComponent = new JLabel();
    jLabelComponent.setText("Component :");
    jLabelComponent.setFont(new Font("Dialog", Font.PLAIN, 12));
    jLabelBinding = new JLabel();
    jLabelBinding.setText("Binding Type :");
    jLabelBinding.setFont(new Font("Dialog", Font.PLAIN, 12));
    this.setLayout(new GridBagLayout());
    this.setSize(570, 480);
    this.setBorder(BorderFactory.createTitledBorder(null, "Identification Information",
            TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION,
            new Font("Dialog", Font.BOLD, 12), new Color(51, 51, 51)));
    this.setLocation(new Point(0, 0));
    this.add(getJScrollPaneFolder(), gridBagConstraints3);
    this.add(getJScrollPanePanel(), gridBagConstraints41);

    getJRadioButtonNotContain().setSelected(false);
    getJRadioButtonThird().setSelected(false);
    getJRadioButtonIKnow().setSelected(true);
    getJScrollPaneFolder().setVisible(true);
}

From source file:no.uio.medicine.virsurveillance.charts.BoxAndWhiskerChart_AWT.java

public BoxAndWhiskerChart_AWT(String applicationTitle, String chartTitle, String xTitle, String yTitle,
        ArrayList<ArrayList<Float>> singleSerieDataPoints, ArrayList<String> singleSerieCategories,
        String singleSerieTitle) {

    super(applicationTitle);

    this.chartTitle = chartTitle;
    this.xAxisTitle = xTitle;
    this.yAxisTitle = yTitle;
    this.Title = applicationTitle;

    this.dataPoints = new ArrayList<>();
    this.dataPoints.add(singleSerieDataPoints);
    this.categories = new ArrayList<>();
    this.categories.add(singleSerieCategories);
    this.seriesTitles = new ArrayList<>();
    this.seriesTitles.add(singleSerieTitle);

    BoxAndWhiskerCategoryDataset dataset = (BoxAndWhiskerCategoryDataset) createDataset(this.dataPoints,
            this.categories, this.seriesTitles);

    final CategoryAxis xAxis = new CategoryAxis(xTitle);
    final NumberAxis yAxis = new NumberAxis(yTitle);
    yAxis.setAutoRangeIncludesZero(false);
    this.renderer = new BoxAndWhiskerRenderer();
    this.renderer.setFillBox(false);

    this.renderer.setToolTipGenerator(new BoxAndWhiskerToolTipGenerator());
    this.plot = new CategoryPlot(dataset, xAxis, yAxis, this.renderer);

    final JFreeChart chart = new JFreeChart(chartTitle, new Font("SansSerif", Font.BOLD, 14), this.plot, true);
    chart.setBackgroundPaint(Color.white);
    this.chartPanel = new ChartPanel(chart);
    this.chartPanel.setBackground(Color.white);
    this.chartPanel.setPreferredSize(new java.awt.Dimension(1200, 500));
    setContentPane(chartPanel);//  www. j a v a2  s .co  m
    this.setDefaultCloseOperation(HIDE_ON_CLOSE);

}

From source file:piramide.interaction.reasoner.FuzzyReasonerWizardFacade.java

@Override
public void generateMembershipFunctionGraph(boolean isInput, boolean isDevices, String variableName,
        RegionDistributionInfo[] linguisticTerms, OutputStream destination, int width, int height,
        Geolocation geo, DecayFunctions decayFunction, Calendar when) {
    BufferedImage img;//from ww w  . ja v a2 s. c  om
    if (variableName == null) {
        img = createErrorMessagesImage("Error generating graph: variableName not provided");
    } else if (linguisticTerms == null) {
        img = createErrorMessagesImage("Error generating graph: linguisticTerms not provided");
    } else if (isInput && isDevices && !isValidDeviceVariableName(variableName)) {
        img = createErrorMessagesImage("Error generating graph: invalid device variable name: " + variableName);
    } else if (isInput && !isDevices && !isValidUserVariableName(variableName)) {
        img = createErrorMessagesImage("Error generating graph: invalid user variable name: " + variableName);
    } else {
        try {
            final WarningStore warningStore = new WarningStore();
            final net.sourceforge.jFuzzyLogic.rule.Variable variable = processVariable(isInput, isDevices,
                    variableName, linguisticTerms, geo, decayFunction, when, warningStore);

            final JFreeChart theChart = variable.chart(false);

            final String[] messages = warningStore.getMessages();
            if (messages.length > 0) {
                final Font font = TextTitle.DEFAULT_FONT;
                final Font bigBold = new Font(font.getName(), Font.BOLD, font.getSize() + 2);
                final Font bold = new Font(font.getName(), Font.BOLD, font.getSize());

                theChart.addSubtitle(new TextTitle("WARNINGS:", bigBold, Color.RED, Title.DEFAULT_POSITION,
                        Title.DEFAULT_HORIZONTAL_ALIGNMENT, Title.DEFAULT_VERTICAL_ALIGNMENT,
                        Title.DEFAULT_PADDING));
                for (String message : messages)
                    theChart.addSubtitle(new TextTitle(message, bold, Color.RED, Title.DEFAULT_POSITION,
                            Title.DEFAULT_HORIZONTAL_ALIGNMENT, Title.DEFAULT_VERTICAL_ALIGNMENT,
                            Title.DEFAULT_PADDING));
            }
            img = theChart.createBufferedImage(width, height);

        } catch (FuzzyReasonerException e) {
            e.printStackTrace();
            img = createErrorMessagesImage("Error generating graph: " + e.getMessage());
        }
    }

    try {
        final ImageEncoder myEncoder = ImageEncoderFactory.newInstance("png");
        myEncoder.encode(img, destination);
        destination.flush();
        destination.close();
    } catch (IOException e) {
        // Cry
        e.printStackTrace();
        return;
    }
}

From source file:com.intel.stl.ui.main.view.HealthHistoryView.java

/**
 * @param title
 * @param controller
 */
public HealthHistoryView() {
    this(UIConstants.H1_FONT.deriveFont(Font.BOLD));
}

From source file:com.xilinx.kintex7.PowerChart.java

private void makeChart() {
    dataset = new DefaultCategoryDataset();
    chart = ChartFactory.createBarChart("", "Time Interval", "", dataset, PlotOrientation.HORIZONTAL, true,
            true, false);/*from w  w w  .  j  av a2 s. c o  m*/

    TextTitle ttitle = new TextTitle(title, new Font(title, Font.BOLD, 15));
    ttitle.setPaint(Color.WHITE);
    chart.setTitle(ttitle);
    chart.setBackgroundPaint(bg);

    CategoryPlot plot = chart.getCategoryPlot();
    plot.setDomainGridlinesVisible(false);
    plot.setRangeGridlinesVisible(false);

    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    ValueAxis axis = plot.getRangeAxis();
    axis.setUpperBound(6.0);
    axis.setLowerBound(0.0);
    axis.setTickLabelPaint(new Color(185, 185, 185));

    CategoryAxis caxis = plot.getDomainAxis();
    caxis.setTickLabelPaint(new Color(185, 185, 185));
    caxis.setLabelPaint(new Color(185, 185, 185));

    renderer.setItemMargin(0);
    renderer.setSeriesPaint(0, new Color(0x17, 0x7b, 0x7c));
    renderer.setSeriesPaint(1, new Color(0xa2, 0x45, 0x73));
    renderer.setSeriesPaint(2, new Color(0xff, 0x80, 0x40));
    renderer.setSeriesPaint(3, new Color(0x6f, 0x2c, 0x85));
    renderer.setBaseToolTipGenerator(
            new StandardCategoryToolTipGenerator("{0}:{2}", new DecimalFormat("0.000")));
    addDummy();
}

From source file:com.xilinx.kintex7.DMABarChart.java

private void makeChart() {
    dataset = new DefaultCategoryDataset();
    chart = ChartFactory.createBarChart("", "Time Interval", "Throughput (Gbps)", dataset,
            PlotOrientation.VERTICAL, true, true, false);
    chart.setBackgroundPaint(bg);/*from w  w w.  j  a v a  2 s .  co m*/
    TextTitle ttitle = new TextTitle(title, new Font(title, Font.BOLD, 15));
    ttitle.setPaint(Color.WHITE);
    chart.setTitle(ttitle);

    CategoryPlot plot = chart.getCategoryPlot();
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);
    ValueAxis axis = plot.getRangeAxis();
    axis.setUpperBound(30.0);
    axis.setLowerBound(0.0);
    axis.setTickLabelPaint(new Color(185, 185, 185));
    axis.setLabelPaint(new Color(185, 185, 185));

    CategoryAxis caxis = plot.getDomainAxis();
    caxis.setTickLabelPaint(new Color(185, 185, 185));
    caxis.setLabelPaint(new Color(185, 185, 185));

    renderer.setItemMargin(0);
    renderer.setSeriesPaint(0, new Color(0, 0, 0x80));
    renderer.setSeriesPaint(1, new Color(0, 0x80, 0xff));
    renderer.setSeriesPaint(2, new Color(0xa2, 0x45, 0x73));
    renderer.setBaseToolTipGenerator(
            new StandardCategoryToolTipGenerator("{0}:{2}", new DecimalFormat("0.000")));
    //renderer.setMaximumBarWidth(0.05);
    addDummy();
}

From source file:com.xilinx.virtex7.DMABarChart.java

private void makeChart() {
    dataset = new DefaultCategoryDataset();
    chart = ChartFactory.createBarChart("", "Time Interval", "Throughput (Gbps)", dataset,
            PlotOrientation.VERTICAL, true, true, false);
    chart.setBackgroundPaint(bg);/*from w  w  w  . j  a  v  a2s .co  m*/
    TextTitle ttitle = new TextTitle(title, new Font(title, Font.BOLD, 15));
    ttitle.setPaint(Color.WHITE);
    chart.setTitle(ttitle);

    CategoryPlot plot = chart.getCategoryPlot();
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);
    ValueAxis axis = plot.getRangeAxis();
    axis.setUpperBound(64.0);
    axis.setLowerBound(0.0);
    axis.setTickLabelPaint(new Color(185, 185, 185));
    axis.setLabelPaint(new Color(185, 185, 185));

    CategoryAxis caxis = plot.getDomainAxis();
    caxis.setTickLabelPaint(new Color(185, 185, 185));
    caxis.setLabelPaint(new Color(185, 185, 185));

    renderer.setItemMargin(0);
    renderer.setSeriesPaint(0, new Color(0, 0, 0x80));
    renderer.setSeriesPaint(1, new Color(0, 0x80, 0xff));
    renderer.setSeriesPaint(2, new Color(0xa2, 0x45, 0x73));
    renderer.setSeriesPaint(3, new Color(0x40, 0xa1, 0xff));
    renderer.setSeriesPaint(4, new Color(0xa1, 0x60, 0x98));
    renderer.setBaseToolTipGenerator(
            new StandardCategoryToolTipGenerator("{0}:{2}", new DecimalFormat("0.000")));
    //renderer.setMaximumBarWidth(0.05);
    addDummy();
}