<commit_before>/*
 * Copyright ©1998-2021 by <NAME>. All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, version 2.0. If a copy of the MPL was not distributed with
 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This Source Code Form is "Incompatible With Secondary Licenses", as
 * defined by the Mozilla Public License, version 2.0.
 */

package com.trollworks.gcs.character;

import com.trollworks.gcs.page.DropPanel;
import com.trollworks.gcs.page.PageField;
import com.trollworks.gcs.page.PageHeader;
import com.trollworks.gcs.page.PageLabel;
import com.trollworks.gcs.ui.ThemeColor;
import com.trollworks.gcs.ui.layout.PrecisionLayout;
import com.trollworks.gcs.ui.layout.PrecisionLayoutAlignment;
import com.trollworks.gcs.ui.layout.PrecisionLayoutData;
import com.trollworks.gcs.ui.widget.Wrapper;
import com.trollworks.gcs.utility.I18n;
import com.trollworks.gcs.utility.text.Text;

import java.awt.Dimension;
import java.text.MessageFormat;
import javax.swing.SwingConstants;

/** The character hit location panel. */
public class HitLocationPanel extends DropPanel {

    /**
     * Creates a new hit location panel.
     *
     * @param sheet The sheet to display the data for.
     */
    public HitLocationPanel(CharacterSheet sheet) {
        super(new PrecisionLayout().setColumns(7).setSpacing(2, 0).setMargins(0), I18n.Text("Hit Locations"));

        addHorizontalBackground(createHeader(I18n.Text("Roll"), null), ThemeColor.HEADER);
        addVerticalBackground(createDivider(), ThemeColor.DIVIDER);
        createHeader(I18n.Text("Where"), null);
        addVerticalBackground(createDivider(), ThemeColor.DIVIDER);
        createHeader(I18n.Text("Penalty"), I18n.Text("The hit penalty for targeting a specific hit location"));
        addVerticalBackground(createDivider(), ThemeColor.DIVIDER);
        createHeader(I18n.Text("DR"), null);

        GURPSCharacter   character = sheet.getCharacter();
        HitLocationTable table     = character.getProfile().getHitLocationTable();
        boolean band = false;<commit_msg>The name of the body type is now shown in the hit location table<commit_after>/*
 * Copyright ©1998-2021 by <NAME>. All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, version 2.0. If a copy of the MPL was not distributed with
 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This Source Code Form is "Incompatible With Secondary Licenses", as
 * defined by the Mozilla Public License, version 2.0.
 */

package com.trollworks.gcs.character;

import com.trollworks.gcs.page.DropPanel;
import com.trollworks.gcs.page.PageField;
import com.trollworks.gcs.page.PageHeader;
import com.trollworks.gcs.page.PageLabel;
import com.trollworks.gcs.ui.ThemeColor;
import com.trollworks.gcs.ui.layout.PrecisionLayout;
import com.trollworks.gcs.ui.layout.PrecisionLayoutAlignment;
import com.trollworks.gcs.ui.layout.PrecisionLayoutData;
import com.trollworks.gcs.ui.widget.Wrapper;
import com.trollworks.gcs.utility.I18n;
import com.trollworks.gcs.utility.text.Text;

import java.awt.Dimension;
import java.text.MessageFormat;
import javax.swing.SwingConstants;

/** The character hit location panel. */
public class HitLocationPanel extends DropPanel {

    /**
     * Creates a new hit location panel.
     *
     * @param sheet The sheet to display the data for.
     */
    public HitLocationPanel(CharacterSheet sheet) {
        super(new PrecisionLayout().setColumns(7).setSpacing(2, 0).setMargins(0), String.format(I18n.Text("%s Locations"), sheet.getCharacter().getProfile().getHitLocationTable().toString()));

        addHorizontalBackground(createHeader(I18n.Text("Roll"), null), ThemeColor.HEADER);
        addVerticalBackground(createDivider(), ThemeColor.DIVIDER);
        createHeader(I18n.Text("Where"), null);
        addVerticalBackground(createDivider(), ThemeColor.DIVIDER);
        createHeader(I18n.Text("Penalty"), I18n.Text("The hit penalty for targeting a specific hit location"));
        addVerticalBackground(createDivider(), ThemeColor.DIVIDER);
        createHeader(I18n.Text("DR"), null);

        GURPSCharacter   character = sheet.getCharacter();
        HitLocationTable table     = character.getProfile().getHitLocationTable();
        boolean band = false;
{'fraction_non_alphanumeric': 0.11161835197443506, 'fraction_numerical': 0.014608536863729742, 'mean_word_length': 4.2042755344418055, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1696159', 'n_tokens_mistral': 1351, 'n_tokens_neox': 1293, 'n_words': 323}