<commit_before>package jp.toastkid.jfx.common.control;

import java.util.Collections;

import com.sun.javafx.scene.control.behavior.BehaviorBase;
import com.sun.javafx.scene.control.skin.LabeledSkinBase;

import javafx.event.ActionEvent;
import javafx.scene.control.Label;

/**
 * Overwrite for register shortcut.
 *
 * @author <NAME>
 *
 */
public class ActionLabelSkin extends LabeledSkinBase<Label, BehaviorBase<Label>> {

    /**
     * Initialize with {@link ActionLabel}.
     * @param label {@link ActionLabel}
     */
    public ActionLabelSkin(final ActionLabel label) {
        super(label, new BehaviorBase<>(label, Collections.emptyList()));

        // Labels do not block the mouse by default, unlike most other UI Controls.
        consumeMouseEvents(false);

        registerChangeListener(label.labelForProperty(), "LABEL_FOR");

        if (label.getAccelerator() == null) {
            return;
        }
        getSkinnable().getScene().getAccelerators()
            .put(label.getAccelerator(), () -> label.getOnAction().handle(new ActionEvent()));
    }

    @Override
    protected void handleControlPropertyChanged(final String p) {<commit_msg>add accelerator text in ActionLabel.<commit_after>package jp.toastkid.jfx.common.control;

import java.util.Collections;

import com.sun.javafx.scene.control.behavior.BehaviorBase;
import com.sun.javafx.scene.control.skin.LabeledSkinBase;

import javafx.event.ActionEvent;
import javafx.scene.control.Label;

/**
 * Overwrite for register shortcut.
 *
 * @author <NAME>
 *
 */
public class ActionLabelSkin extends LabeledSkinBase<Label, BehaviorBase<Label>> {

    /**
     * Initialize with {@link ActionLabel}.
     * @param label {@link ActionLabel}
     */
    public ActionLabelSkin(final ActionLabel label) {
        super(label, new BehaviorBase<>(label, Collections.emptyList()));

        // Labels do not block the mouse by default, unlike most other UI Controls.
        consumeMouseEvents(false);

        registerChangeListener(label.labelForProperty(), "LABEL_FOR");

        if (label.getAccelerator() == null) {
            return;
        }

        label.setText(label.getText() + "\t|\t" + label.getAccelerator().getDisplayText());
        getSkinnable().getScene().getAccelerators()
            .put(label.getAccelerator(), () -> label.getOnAction().handle(new ActionEvent()));
    }

    @Override
    protected void handleControlPropertyChanged(final String p) {
{'fraction_non_alphanumeric': 0.12275693311582382, 'fraction_numerical': 0.0, 'mean_word_length': 3.4926739926739927, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5325420', 'n_tokens_mistral': 710, 'n_tokens_neox': 691, 'n_words': 147}