Example usage for java.awt.font TextAttribute LIGATURES_ON

List of usage examples for java.awt.font TextAttribute LIGATURES_ON

Introduction

In this page you can find the example usage for java.awt.font TextAttribute LIGATURES_ON.

Prototype

Integer LIGATURES_ON

To view the source code for java.awt.font TextAttribute LIGATURES_ON.

Click Source Link

Document

Request standard optional ligatures.

Usage

From source file:net.sf.jasperreports.engine.fill.SimpleTextLineWrapper.java

protected boolean determineComplexLayout(Font font) {
    // this tries to emulate the tests in Font.getStringBounds()
    //FIXME use font.hasLayoutAttributes() instead of this?
    Map<TextAttribute, ?> fontAttributes = font.getAttributes();
    Object kerning = fontAttributes.get(TextAttribute.KERNING);
    Object ligatures = fontAttributes.get(TextAttribute.LIGATURES);
    return (kerning != null && TextAttribute.KERNING_ON.equals(kerning))
            || (ligatures != null && TextAttribute.LIGATURES_ON.equals(ligatures)) || font.isTransformed();
}

From source file:wsattacker.sso.openid.attacker.gui.MainGui.java

/**
 * Creates new form MainGui//from w ww  .  j a  v  a 2 s  . co m
 */
public MainGui() {
    initComponents();

    analyzerIdpServerConfigurationGui.setIdp(IdpType.ANALYZER);
    analyzerIdpHtmlConfigurationGui.setIdp(IdpType.ANALYZER);
    analyzerIdpXrdsConfigurationGui.setIdp(IdpType.ANALYZER);
    analyzerIdpValidDataGui.setIdp(IdpType.ANALYZER);
    analyzerIdpAttackDataGui.setIdp(IdpType.ANALYZER);
    //analyzerIdpAttackOverviewGui.setIdp(IdpType.ANALYZER);

    Map<TextAttribute, Integer> fontAttributes = new HashMap<>();
    fontAttributes.put(TextAttribute.UNDERLINE, TextAttribute.LIGATURES_ON);
    boldUnderline = new Font(Font.SANS_SERIF, Font.BOLD, defaultFont.getSize()).deriveFont(fontAttributes);

    splitPane.setRightComponent(attackerIdpServerConfigurationGui);
    attackerIdpServerConfigurationButton.setFont(boldUnderline);

    // ========== Attacker IdP Task Pane ==========
    removeBackgroundFromButton(attackerIdpServerConfigurationButton);
    attackerIdpServerConfigurationButton.addActionListener(this);
    attackerIdpTaskPane.add(attackerIdpServerConfigurationButton);

    removeBackgroundFromButton(attackerIdpHtmlDiscoveryButton);
    attackerIdpHtmlDiscoveryButton.addActionListener(this);
    attackerIdpTaskPane.add(attackerIdpHtmlDiscoveryButton);

    removeBackgroundFromButton(attackerIdpXrdsDiscoveryButton);
    attackerIdpXrdsDiscoveryButton.addActionListener(this);
    attackerIdpTaskPane.add(attackerIdpXrdsDiscoveryButton);

    removeBackgroundFromButton(attackerIdpValidDataButton);
    attackerIdpValidDataButton.addActionListener(this);
    attackerIdpTaskPane.add(attackerIdpValidDataButton);

    removeBackgroundFromButton(attackerIdpAttackDataButton);
    attackerIdpAttackDataButton.addActionListener(this);
    attackerIdpTaskPane.add(attackerIdpAttackDataButton);

    removeBackgroundFromButton(attackerIdpAttackOverviewButton);
    attackerIdpAttackOverviewButton.addActionListener(this);
    attackerIdpTaskPane.add(attackerIdpAttackOverviewButton);

    // ========== Analyzer IdP Task Pane ==========
    removeBackgroundFromButton(analyzerIdpServerConfigurationButton);
    analyzerIdpServerConfigurationButton.addActionListener(this);
    analyzerIdpTaskPane.add(analyzerIdpServerConfigurationButton);

    removeBackgroundFromButton(analyzerIdpHtmlDiscoveryButton);
    analyzerIdpHtmlDiscoveryButton.addActionListener(this);
    analyzerIdpTaskPane.add(analyzerIdpHtmlDiscoveryButton);

    removeBackgroundFromButton(analyzerIdpXrdsDiscoveryButton);
    analyzerIdpXrdsDiscoveryButton.addActionListener(this);
    analyzerIdpTaskPane.add(analyzerIdpXrdsDiscoveryButton);

    removeBackgroundFromButton(analyzerIdpValidDataButton);
    analyzerIdpValidDataButton.addActionListener(this);
    analyzerIdpTaskPane.add(analyzerIdpValidDataButton);

    removeBackgroundFromButton(analyzerIdpAttackDataButton);
    analyzerIdpAttackDataButton.addActionListener(this);
    analyzerIdpTaskPane.add(analyzerIdpAttackDataButton);
    analyzerIdpAttackDataButton.setEnabled(false); // disable

    removeBackgroundFromButton(analyzerIdpAttackOverviewButton);
    analyzerIdpAttackOverviewButton.addActionListener(this);
    analyzerIdpTaskPane.add(analyzerIdpAttackOverviewButton);

    // ========== Evaluation Task Pane ==========
    removeBackgroundFromButton(evaluationButton);
    evaluationButton.addActionListener(this);
    evaluationTaskPane.add(evaluationButton);

    removeBackgroundFromButton(reportButton);
    reportButton.addActionListener(this);
    evaluationTaskPane.add(reportButton);

    // ========== Log Task Pane ==========
    removeBackgroundFromButton(logButton);
    logButton.addActionListener(this);
    logTaskPane.add(logButton);
}