|
|
@@ -0,0 +1,207 @@
|
|
|
+package org.leumasjaffe.charsheet.view.inventory;
|
|
|
+
|
|
|
+import javax.swing.JPanel;
|
|
|
+import java.awt.GridBagLayout;
|
|
|
+import java.awt.GridBagConstraints;
|
|
|
+import java.awt.Insets;
|
|
|
+import javax.swing.JLabel;
|
|
|
+import javax.swing.JTextField;
|
|
|
+import java.awt.Dimension;
|
|
|
+import java.awt.Font;
|
|
|
+import java.awt.Color;
|
|
|
+import javax.swing.SwingConstants;
|
|
|
+import java.awt.Component;
|
|
|
+import javax.swing.Box;
|
|
|
+
|
|
|
+public class ShieldPanel extends JPanel {
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+ private JTextField nameField;
|
|
|
+ private JTextField armorBonusField;
|
|
|
+ private JTextField weightField;
|
|
|
+ private JTextField checkField;
|
|
|
+ private JTextField spellField;
|
|
|
+ private JTextField propField;
|
|
|
+
|
|
|
+ public ShieldPanel(String string) {
|
|
|
+ setPreferredSize(new Dimension(280, 70));
|
|
|
+ GridBagLayout gridBagLayout = new GridBagLayout();
|
|
|
+ gridBagLayout.columnWidths = new int[]{0, 0};
|
|
|
+ gridBagLayout.rowHeights = new int[]{0, 0, 0};
|
|
|
+ gridBagLayout.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ gridBagLayout.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
|
|
|
+ setLayout(gridBagLayout);
|
|
|
+
|
|
|
+ JPanel panel = new JPanel();
|
|
|
+ GridBagConstraints gbc_panel = new GridBagConstraints();
|
|
|
+ gbc_panel.insets = new Insets(0, 0, 0, 0);
|
|
|
+ gbc_panel.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel.gridx = 0;
|
|
|
+ gbc_panel.gridy = 0;
|
|
|
+ add(panel, gbc_panel);
|
|
|
+ GridBagLayout gbl_panel = new GridBagLayout();
|
|
|
+ gbl_panel.columnWidths = new int[]{0, 0, 0, 0, 0};
|
|
|
+ gbl_panel.rowHeights = new int[]{0, 0, 0, 0};
|
|
|
+ gbl_panel.columnWeights = new double[]{1.0, 1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};
|
|
|
+ panel.setLayout(gbl_panel);
|
|
|
+
|
|
|
+ JLabel lblArmorprotectiveItem = new JLabel("SHIELD/PROTECTIVE ITEM");
|
|
|
+ lblArmorprotectiveItem.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ lblArmorprotectiveItem.setForeground(Color.WHITE);
|
|
|
+ lblArmorprotectiveItem.setOpaque(true);
|
|
|
+ lblArmorprotectiveItem.setBackground(Color.BLACK);
|
|
|
+ lblArmorprotectiveItem.setFont(new Font("Tahoma", Font.BOLD, 10));
|
|
|
+ GridBagConstraints gbc_lblArmorprotectiveItem = new GridBagConstraints();
|
|
|
+ gbc_lblArmorprotectiveItem.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_lblArmorprotectiveItem.insets = new Insets(0, 0, 0, 1);
|
|
|
+ gbc_lblArmorprotectiveItem.gridheight = 2;
|
|
|
+ gbc_lblArmorprotectiveItem.gridx = 0;
|
|
|
+ gbc_lblArmorprotectiveItem.gridy = 0;
|
|
|
+ panel.add(lblArmorprotectiveItem, gbc_lblArmorprotectiveItem);
|
|
|
+
|
|
|
+ Component verticalStrut = Box.createVerticalStrut(20);
|
|
|
+ verticalStrut.setMinimumSize(new Dimension(0, 10));
|
|
|
+ verticalStrut.setMaximumSize(new Dimension(32767, 10));
|
|
|
+ verticalStrut.setPreferredSize(new Dimension(0, 10));
|
|
|
+ GridBagConstraints gbc_verticalStrut = new GridBagConstraints();
|
|
|
+ gbc_verticalStrut.insets = new Insets(0, 0, 0, 0);
|
|
|
+ gbc_verticalStrut.gridx = 2;
|
|
|
+ gbc_verticalStrut.gridy = 0;
|
|
|
+ panel.add(verticalStrut, gbc_verticalStrut);
|
|
|
+
|
|
|
+ JLabel lblAcBonus = new JLabel("AC BONUS");
|
|
|
+ lblAcBonus.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ lblAcBonus.setForeground(Color.WHITE);
|
|
|
+ lblAcBonus.setOpaque(true);
|
|
|
+ lblAcBonus.setBackground(Color.BLACK);
|
|
|
+ lblAcBonus.setFont(new Font("Tahoma", Font.BOLD, 8));
|
|
|
+ GridBagConstraints gbc_lblAcBonus = new GridBagConstraints();
|
|
|
+ gbc_lblAcBonus.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_lblAcBonus.insets = new Insets(0, 0, 0, 1);
|
|
|
+ gbc_lblAcBonus.gridx = 1;
|
|
|
+ gbc_lblAcBonus.gridy = 1;
|
|
|
+ panel.add(lblAcBonus, gbc_lblAcBonus);
|
|
|
+
|
|
|
+ JLabel lblWeight = new JLabel("WEIGHT");
|
|
|
+ lblWeight.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ lblWeight.setForeground(Color.WHITE);
|
|
|
+ lblWeight.setOpaque(true);
|
|
|
+ lblWeight.setBackground(Color.BLACK);
|
|
|
+ lblWeight.setFont(new Font("Tahoma", Font.BOLD, 8));
|
|
|
+ GridBagConstraints gbc_lblWeight = new GridBagConstraints();
|
|
|
+ gbc_lblWeight.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_lblWeight.insets = new Insets(0, 0, 0, 1);
|
|
|
+ gbc_lblWeight.gridx = 2;
|
|
|
+ gbc_lblWeight.gridy = 1;
|
|
|
+ panel.add(lblWeight, gbc_lblWeight);
|
|
|
+
|
|
|
+ JLabel lblCheckPenalty = new JLabel("CHECK PENALTY");
|
|
|
+ GridBagConstraints gbc_lblCheckPenalty = new GridBagConstraints();
|
|
|
+ gbc_lblCheckPenalty.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_lblCheckPenalty.insets = new Insets(0, 0, 0, 1);
|
|
|
+ gbc_lblCheckPenalty.gridx = 3;
|
|
|
+ gbc_lblCheckPenalty.gridy = 1;
|
|
|
+ panel.add(lblCheckPenalty, gbc_lblCheckPenalty);
|
|
|
+ lblCheckPenalty.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ lblCheckPenalty.setForeground(Color.WHITE);
|
|
|
+ lblCheckPenalty.setOpaque(true);
|
|
|
+ lblCheckPenalty.setBackground(Color.BLACK);
|
|
|
+ lblCheckPenalty.setFont(new Font("Tahoma", Font.BOLD, 8));
|
|
|
+
|
|
|
+ nameField = new JTextField();
|
|
|
+ GridBagConstraints gbc_nameField = new GridBagConstraints();
|
|
|
+ gbc_nameField.insets = new Insets(0, 0, 0, 0);
|
|
|
+ gbc_nameField.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_nameField.gridx = 0;
|
|
|
+ gbc_nameField.gridy = 2;
|
|
|
+ panel.add(nameField, gbc_nameField);
|
|
|
+ nameField.setColumns(10);
|
|
|
+
|
|
|
+ armorBonusField = new JTextField();
|
|
|
+ GridBagConstraints gbc_armorBonusField = new GridBagConstraints();
|
|
|
+ gbc_armorBonusField.insets = new Insets(0, 0, 0, 0);
|
|
|
+ gbc_armorBonusField.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_armorBonusField.gridx = 1;
|
|
|
+ gbc_armorBonusField.gridy = 2;
|
|
|
+ panel.add(armorBonusField, gbc_armorBonusField);
|
|
|
+ armorBonusField.setColumns(10);
|
|
|
+
|
|
|
+ weightField = new JTextField();
|
|
|
+ GridBagConstraints gbc_weightField = new GridBagConstraints();
|
|
|
+ gbc_weightField.insets = new Insets(0, 0, 0, 0);
|
|
|
+ gbc_weightField.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_weightField.gridx = 2;
|
|
|
+ gbc_weightField.gridy = 2;
|
|
|
+ panel.add(weightField, gbc_weightField);
|
|
|
+ weightField.setColumns(10);
|
|
|
+
|
|
|
+ checkField = new JTextField();
|
|
|
+ GridBagConstraints gbc_checkField = new GridBagConstraints();
|
|
|
+ gbc_checkField.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_checkField.gridx = 3;
|
|
|
+ gbc_checkField.gridy = 2;
|
|
|
+ panel.add(checkField, gbc_checkField);
|
|
|
+ checkField.setColumns(10);
|
|
|
+
|
|
|
+ JPanel panel_1 = new JPanel();
|
|
|
+ GridBagConstraints gbc_panel_1 = new GridBagConstraints();
|
|
|
+ gbc_panel_1.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_1.gridx = 0;
|
|
|
+ gbc_panel_1.gridy = 1;
|
|
|
+ add(panel_1, gbc_panel_1);
|
|
|
+ GridBagLayout gbl_panel_1 = new GridBagLayout();
|
|
|
+ gbl_panel_1.columnWidths = new int[]{0, 0, 0};
|
|
|
+ gbl_panel_1.rowHeights = new int[]{0, 0, 0};
|
|
|
+ gbl_panel_1.columnWeights = new double[]{0.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_1.rowWeights = new double[]{0.0, 0.0, Double.MIN_VALUE};
|
|
|
+ panel_1.setLayout(gbl_panel_1);
|
|
|
+
|
|
|
+ JLabel lblSpellFailure = new JLabel("SPELL FAILURE");
|
|
|
+ lblSpellFailure.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ lblSpellFailure.setForeground(Color.WHITE);
|
|
|
+ lblSpellFailure.setOpaque(true);
|
|
|
+ lblSpellFailure.setBackground(Color.BLACK);
|
|
|
+ lblSpellFailure.setFont(new Font("Tahoma", Font.BOLD, 8));
|
|
|
+ GridBagConstraints gbc_lblSpellFailure = new GridBagConstraints();
|
|
|
+ gbc_lblSpellFailure.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_lblSpellFailure.insets = new Insets(0, 0, 0, 1);
|
|
|
+ gbc_lblSpellFailure.gridx = 0;
|
|
|
+ gbc_lblSpellFailure.gridy = 0;
|
|
|
+ panel_1.add(lblSpellFailure, gbc_lblSpellFailure);
|
|
|
+
|
|
|
+ JLabel lblSpecialProperties = new JLabel("SPECIAL PROPERTIES");
|
|
|
+ lblSpecialProperties.setHorizontalAlignment(SwingConstants.CENTER);
|
|
|
+ lblSpecialProperties.setForeground(Color.WHITE);
|
|
|
+ lblSpecialProperties.setOpaque(true);
|
|
|
+ lblSpecialProperties.setBackground(Color.BLACK);
|
|
|
+ lblSpecialProperties.setFont(new Font("Tahoma", Font.BOLD, 8));
|
|
|
+ GridBagConstraints gbc_lblSpecialProperties = new GridBagConstraints();
|
|
|
+ gbc_lblSpecialProperties.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_lblSpecialProperties.insets = new Insets(0, 0, 0, 1);
|
|
|
+ gbc_lblSpecialProperties.gridx = 1;
|
|
|
+ gbc_lblSpecialProperties.gridy = 0;
|
|
|
+ panel_1.add(lblSpecialProperties, gbc_lblSpecialProperties);
|
|
|
+
|
|
|
+ spellField = new JTextField();
|
|
|
+ GridBagConstraints gbc_spellField = new GridBagConstraints();
|
|
|
+ gbc_spellField.insets = new Insets(0, 0, 0, 0);
|
|
|
+ gbc_spellField.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_spellField.gridx = 0;
|
|
|
+ gbc_spellField.gridy = 1;
|
|
|
+ panel_1.add(spellField, gbc_spellField);
|
|
|
+ spellField.setColumns(10);
|
|
|
+
|
|
|
+ propField = new JTextField();
|
|
|
+ GridBagConstraints gbc_propField = new GridBagConstraints();
|
|
|
+ gbc_propField.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_propField.gridx = 1;
|
|
|
+ gbc_propField.gridy = 1;
|
|
|
+ panel_1.add(propField, gbc_propField);
|
|
|
+ propField.setColumns(10);
|
|
|
+ // TODO Auto-generated constructor stub
|
|
|
+ }
|
|
|
+
|
|
|
+}
|