|
|
@@ -0,0 +1,387 @@
|
|
|
+package org.leumasjaffe.charsheet.view.summary;
|
|
|
+
|
|
|
+import javax.swing.JPanel;
|
|
|
+import java.awt.GridBagLayout;
|
|
|
+import java.awt.GridBagConstraints;
|
|
|
+import java.awt.Insets;
|
|
|
+import javax.swing.JTextField;
|
|
|
+import javax.swing.border.TitledBorder;
|
|
|
+
|
|
|
+import org.leumasjaffe.charsheet.entity.DDCharacter;
|
|
|
+import org.leumasjaffe.charsheet.view.StringHelper;
|
|
|
+
|
|
|
+import javax.swing.border.Border;
|
|
|
+import javax.swing.border.MatteBorder;
|
|
|
+import java.awt.Color;
|
|
|
+import java.awt.Font;
|
|
|
+import java.awt.Dimension;
|
|
|
+
|
|
|
+public class DescriptionPanel extends JPanel {
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ */
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+ private JTextField name;
|
|
|
+ private JTextField level;
|
|
|
+ private JTextField height;
|
|
|
+ private JTextField gender;
|
|
|
+ private JTextField age;
|
|
|
+ private JTextField size;
|
|
|
+ private JTextField player;
|
|
|
+ private JTextField deity;
|
|
|
+ private JTextField alignment;
|
|
|
+ private JTextField race;
|
|
|
+ private JTextField skin;
|
|
|
+ private JTextField hair;
|
|
|
+ private JTextField eyes;
|
|
|
+ private JTextField weight;
|
|
|
+
|
|
|
+ private DDCharacter model;
|
|
|
+
|
|
|
+ public DescriptionPanel() {
|
|
|
+ setMinimumSize(new Dimension(600, 120));
|
|
|
+ setMaximumSize(new Dimension(600, 120));
|
|
|
+ setPreferredSize(new Dimension(600, 120));
|
|
|
+ setOpaque(false);
|
|
|
+ GridBagLayout gridBagLayout = new GridBagLayout();
|
|
|
+ gridBagLayout.columnWidths = new int[]{0, 0, 0};
|
|
|
+ gridBagLayout.rowHeights = new int[]{0, 0};
|
|
|
+ gridBagLayout.columnWeights = new double[]{1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gridBagLayout.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ setLayout(gridBagLayout);
|
|
|
+
|
|
|
+ JPanel panel = new JPanel();
|
|
|
+ panel.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel = new GridBagConstraints();
|
|
|
+ gbc_panel.insets = new Insets(0, 0, 0, 5);
|
|
|
+ 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};
|
|
|
+ gbl_panel.rowHeights = new int[]{0, 0, 0, 0};
|
|
|
+ gbl_panel.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel.rowWeights = new double[]{1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ panel.setLayout(gbl_panel);
|
|
|
+
|
|
|
+ JPanel panel_4 = new JPanel();
|
|
|
+ panel_4.setPreferredSize(new Dimension(10, 30));
|
|
|
+ panel_4.setMinimumSize(new Dimension(10, 30));
|
|
|
+ panel_4.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_4 = new GridBagConstraints();
|
|
|
+ gbc_panel_4.insets = new Insets(0, 0, 5, 0);
|
|
|
+ gbc_panel_4.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_4.gridx = 0;
|
|
|
+ gbc_panel_4.gridy = 0;
|
|
|
+ panel.add(panel_4, gbc_panel_4);
|
|
|
+ GridBagLayout gbl_panel_4 = new GridBagLayout();
|
|
|
+ gbl_panel_4.columnWidths = new int[]{0, 0};
|
|
|
+ gbl_panel_4.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panel_4.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_4.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ panel_4.setLayout(gbl_panel_4);
|
|
|
+
|
|
|
+ final Border lineBorder = new MatteBorder(0, 0, 1, 0, Color.BLACK);
|
|
|
+ final int borderAlign = TitledBorder.LEADING;
|
|
|
+ final int titlePos = TitledBorder.BELOW_BOTTOM;
|
|
|
+ final Font titleFont = new Font("Tahoma", Font.PLAIN, 8);
|
|
|
+ final Color titleColor = Color.BLACK;
|
|
|
+
|
|
|
+ name = new JTextField();
|
|
|
+ name.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ name.setMinimumSize(new Dimension(6, 30));
|
|
|
+ name.setPreferredSize(new Dimension(6, 30));
|
|
|
+ name.setBorder(new TitledBorder(lineBorder, "CHARACTER NAME", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_name = new GridBagConstraints();
|
|
|
+ gbc_name.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_name.gridx = 0;
|
|
|
+ gbc_name.gridy = 0;
|
|
|
+ panel_4.add(name, gbc_name);
|
|
|
+ name.setColumns(10);
|
|
|
+
|
|
|
+ JPanel panel_3 = new JPanel();
|
|
|
+ panel_3.setPreferredSize(new Dimension(10, 30));
|
|
|
+ panel_3.setMinimumSize(new Dimension(10, 30));
|
|
|
+ panel_3.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_3 = new GridBagConstraints();
|
|
|
+ gbc_panel_3.insets = new Insets(0, 0, 5, 0);
|
|
|
+ gbc_panel_3.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_3.gridx = 0;
|
|
|
+ gbc_panel_3.gridy = 1;
|
|
|
+ panel.add(panel_3, gbc_panel_3);
|
|
|
+ GridBagLayout gbl_panel_3 = new GridBagLayout();
|
|
|
+ gbl_panel_3.columnWidths = new int[]{0, 0};
|
|
|
+ gbl_panel_3.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panel_3.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_3.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ panel_3.setLayout(gbl_panel_3);
|
|
|
+
|
|
|
+ level = new JTextField();
|
|
|
+ level.setEditable(false);
|
|
|
+ level.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ level.setMinimumSize(new Dimension(6, 30));
|
|
|
+ level.setPreferredSize(new Dimension(6, 30));
|
|
|
+ level.setColumns(10);
|
|
|
+ level.setBorder(new TitledBorder(lineBorder, "CLASS AND LEVEL", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_level = new GridBagConstraints();
|
|
|
+ gbc_level.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_level.gridx = 0;
|
|
|
+ gbc_level.gridy = 0;
|
|
|
+ panel_3.add(level, gbc_level);
|
|
|
+
|
|
|
+ JPanel panel_2 = new JPanel();
|
|
|
+ panel_2.setPreferredSize(new Dimension(10, 30));
|
|
|
+ panel_2.setMinimumSize(new Dimension(10, 30));
|
|
|
+ panel_2.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_2 = new GridBagConstraints();
|
|
|
+ gbc_panel_2.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_2.gridx = 0;
|
|
|
+ gbc_panel_2.gridy = 2;
|
|
|
+ panel.add(panel_2, gbc_panel_2);
|
|
|
+ GridBagLayout gbl_panel_2 = new GridBagLayout();
|
|
|
+ gbl_panel_2.columnWidths = new int[]{0, 0, 0, 0, 0};
|
|
|
+ gbl_panel_2.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panel_2.columnWeights = new double[]{1.0, 1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_2.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ panel_2.setLayout(gbl_panel_2);
|
|
|
+
|
|
|
+ size = new JTextField();
|
|
|
+ size.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ size.setMinimumSize(new Dimension(6, 30));
|
|
|
+ size.setPreferredSize(new Dimension(6, 30));
|
|
|
+ size.setColumns(10);
|
|
|
+ size.setBorder(new TitledBorder(lineBorder, "SIZE", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_size = new GridBagConstraints();
|
|
|
+ gbc_size.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_size.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_size.gridx = 0;
|
|
|
+ gbc_size.gridy = 0;
|
|
|
+ panel_2.add(size, gbc_size);
|
|
|
+
|
|
|
+ age = new JTextField();
|
|
|
+ age.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ age.setMinimumSize(new Dimension(6, 30));
|
|
|
+ age.setPreferredSize(new Dimension(6, 30));
|
|
|
+ age.setColumns(10);
|
|
|
+ age.setBorder(new TitledBorder(lineBorder, "AGE", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_age = new GridBagConstraints();
|
|
|
+ gbc_age.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_age.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_age.gridx = 1;
|
|
|
+ gbc_age.gridy = 0;
|
|
|
+ panel_2.add(age, gbc_age);
|
|
|
+
|
|
|
+ gender = new JTextField();
|
|
|
+ gender.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ gender.setMinimumSize(new Dimension(6, 30));
|
|
|
+ gender.setPreferredSize(new Dimension(6, 30));
|
|
|
+ gender.setColumns(10);
|
|
|
+ gender.setBorder(new TitledBorder(lineBorder, "GENDER", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_gender = new GridBagConstraints();
|
|
|
+ gbc_gender.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_gender.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_gender.gridx = 2;
|
|
|
+ gbc_gender.gridy = 0;
|
|
|
+ panel_2.add(gender, gbc_gender);
|
|
|
+
|
|
|
+ height = new JTextField();
|
|
|
+ height.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ height.setMinimumSize(new Dimension(6, 30));
|
|
|
+ height.setPreferredSize(new Dimension(6, 30));
|
|
|
+ height.setColumns(10);
|
|
|
+ height.setBorder(new TitledBorder(lineBorder, "HEIGHT", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_height = new GridBagConstraints();
|
|
|
+ gbc_height.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_height.gridx = 3;
|
|
|
+ gbc_height.gridy = 0;
|
|
|
+ panel_2.add(height, gbc_height);
|
|
|
+
|
|
|
+ JPanel panel_1 = new JPanel();
|
|
|
+ panel_1.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_1 = new GridBagConstraints();
|
|
|
+ gbc_panel_1.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_1.gridx = 1;
|
|
|
+ gbc_panel_1.gridy = 0;
|
|
|
+ add(panel_1, gbc_panel_1);
|
|
|
+ GridBagLayout gbl_panel_1 = new GridBagLayout();
|
|
|
+ gbl_panel_1.columnWidths = new int[]{0, 0};
|
|
|
+ gbl_panel_1.rowHeights = new int[]{0, 0, 0, 0};
|
|
|
+ gbl_panel_1.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_1.rowWeights = new double[]{1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ panel_1.setLayout(gbl_panel_1);
|
|
|
+
|
|
|
+ JPanel panel_7 = new JPanel();
|
|
|
+ panel_7.setPreferredSize(new Dimension(10, 30));
|
|
|
+ panel_7.setMinimumSize(new Dimension(10, 30));
|
|
|
+ panel_7.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_7 = new GridBagConstraints();
|
|
|
+ gbc_panel_7.insets = new Insets(0, 0, 5, 0);
|
|
|
+ gbc_panel_7.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_7.gridx = 0;
|
|
|
+ gbc_panel_7.gridy = 0;
|
|
|
+ panel_1.add(panel_7, gbc_panel_7);
|
|
|
+ GridBagLayout gbl_panel_7 = new GridBagLayout();
|
|
|
+ gbl_panel_7.columnWidths = new int[]{0, 0};
|
|
|
+ gbl_panel_7.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panel_7.columnWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_7.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ panel_7.setLayout(gbl_panel_7);
|
|
|
+
|
|
|
+ player = new JTextField();
|
|
|
+ player.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ player.setMinimumSize(new Dimension(6, 30));
|
|
|
+ player.setPreferredSize(new Dimension(6, 30));
|
|
|
+ player.setColumns(10);
|
|
|
+ player.setBorder(new TitledBorder(lineBorder, "PLAYER", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_player = new GridBagConstraints();
|
|
|
+ gbc_player.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_player.gridx = 0;
|
|
|
+ gbc_player.gridy = 0;
|
|
|
+ panel_7.add(player, gbc_player);
|
|
|
+
|
|
|
+ JPanel panel_6 = new JPanel();
|
|
|
+ panel_6.setPreferredSize(new Dimension(10, 30));
|
|
|
+ panel_6.setMinimumSize(new Dimension(10, 30));
|
|
|
+ panel_6.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_6 = new GridBagConstraints();
|
|
|
+ gbc_panel_6.insets = new Insets(0, 0, 5, 0);
|
|
|
+ gbc_panel_6.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_6.gridx = 0;
|
|
|
+ gbc_panel_6.gridy = 1;
|
|
|
+ panel_1.add(panel_6, gbc_panel_6);
|
|
|
+ GridBagLayout gbl_panel_6 = new GridBagLayout();
|
|
|
+ gbl_panel_6.columnWidths = new int[]{0, 0, 0, 0};
|
|
|
+ gbl_panel_6.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panel_6.columnWeights = new double[]{1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_6.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ panel_6.setLayout(gbl_panel_6);
|
|
|
+
|
|
|
+ race = new JTextField();
|
|
|
+ race.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ race.setMinimumSize(new Dimension(6, 30));
|
|
|
+ race.setPreferredSize(new Dimension(6, 30));
|
|
|
+ race.setColumns(10);
|
|
|
+ race.setBorder(new TitledBorder(lineBorder, "RACE", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_race = new GridBagConstraints();
|
|
|
+ gbc_race.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_race.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_race.gridx = 0;
|
|
|
+ gbc_race.gridy = 0;
|
|
|
+ panel_6.add(race, gbc_race);
|
|
|
+
|
|
|
+ alignment = new JTextField();
|
|
|
+ alignment.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ alignment.setMinimumSize(new Dimension(6, 30));
|
|
|
+ alignment.setPreferredSize(new Dimension(6, 30));
|
|
|
+ alignment.setColumns(10);
|
|
|
+ alignment.setBorder(new TitledBorder(lineBorder, "ALIGNMENT", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_alignment = new GridBagConstraints();
|
|
|
+ gbc_alignment.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_alignment.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_alignment.gridx = 1;
|
|
|
+ gbc_alignment.gridy = 0;
|
|
|
+ panel_6.add(alignment, gbc_alignment);
|
|
|
+
|
|
|
+ deity = new JTextField();
|
|
|
+ deity.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ deity.setMinimumSize(new Dimension(6, 30));
|
|
|
+ deity.setPreferredSize(new Dimension(6, 30));
|
|
|
+ deity.setColumns(10);
|
|
|
+ deity.setBorder(new TitledBorder(lineBorder, "DEITY", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_deity = new GridBagConstraints();
|
|
|
+ gbc_deity.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_deity.gridx = 2;
|
|
|
+ gbc_deity.gridy = 0;
|
|
|
+ panel_6.add(deity, gbc_deity);
|
|
|
+
|
|
|
+ JPanel panel_5 = new JPanel();
|
|
|
+ panel_5.setPreferredSize(new Dimension(10, 30));
|
|
|
+ panel_5.setMinimumSize(new Dimension(10, 30));
|
|
|
+ panel_5.setOpaque(false);
|
|
|
+ GridBagConstraints gbc_panel_5 = new GridBagConstraints();
|
|
|
+ gbc_panel_5.fill = GridBagConstraints.BOTH;
|
|
|
+ gbc_panel_5.gridx = 0;
|
|
|
+ gbc_panel_5.gridy = 2;
|
|
|
+ panel_1.add(panel_5, gbc_panel_5);
|
|
|
+ GridBagLayout gbl_panel_5 = new GridBagLayout();
|
|
|
+ gbl_panel_5.columnWidths = new int[]{0, 0, 0, 0, 0};
|
|
|
+ gbl_panel_5.rowHeights = new int[]{0, 0};
|
|
|
+ gbl_panel_5.columnWeights = new double[]{1.0, 1.0, 1.0, 1.0, Double.MIN_VALUE};
|
|
|
+ gbl_panel_5.rowWeights = new double[]{1.0, Double.MIN_VALUE};
|
|
|
+ panel_5.setLayout(gbl_panel_5);
|
|
|
+
|
|
|
+ weight = new JTextField();
|
|
|
+ weight.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ weight.setMinimumSize(new Dimension(6, 30));
|
|
|
+ weight.setPreferredSize(new Dimension(6, 30));
|
|
|
+ weight.setColumns(10);
|
|
|
+ weight.setBorder(new TitledBorder(lineBorder, "WEIGHT", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_weight = new GridBagConstraints();
|
|
|
+ gbc_weight.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_weight.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_weight.gridx = 0;
|
|
|
+ gbc_weight.gridy = 0;
|
|
|
+ panel_5.add(weight, gbc_weight);
|
|
|
+
|
|
|
+ eyes = new JTextField();
|
|
|
+ eyes.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ eyes.setMinimumSize(new Dimension(6, 30));
|
|
|
+ eyes.setPreferredSize(new Dimension(6, 30));
|
|
|
+ eyes.setColumns(10);
|
|
|
+ eyes.setBorder(new TitledBorder(lineBorder, "EYES", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_eyes = new GridBagConstraints();
|
|
|
+ gbc_eyes.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_eyes.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_eyes.gridx = 1;
|
|
|
+ gbc_eyes.gridy = 0;
|
|
|
+ panel_5.add(eyes, gbc_eyes);
|
|
|
+
|
|
|
+ hair = new JTextField();
|
|
|
+ hair.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ hair.setMinimumSize(new Dimension(6, 30));
|
|
|
+ hair.setPreferredSize(new Dimension(6, 30));
|
|
|
+ hair.setColumns(10);
|
|
|
+ hair.setBorder(new TitledBorder(lineBorder, "HAIR", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_hair = new GridBagConstraints();
|
|
|
+ gbc_hair.insets = new Insets(0, 0, 0, 5);
|
|
|
+ gbc_hair.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_hair.gridx = 2;
|
|
|
+ gbc_hair.gridy = 0;
|
|
|
+ panel_5.add(hair, gbc_hair);
|
|
|
+
|
|
|
+ skin = new JTextField();
|
|
|
+ skin.setMaximumSize(new Dimension(2147483647, 30));
|
|
|
+ skin.setMinimumSize(new Dimension(6, 30));
|
|
|
+ skin.setPreferredSize(new Dimension(6, 30));
|
|
|
+ skin.setColumns(10);
|
|
|
+ skin.setBorder(new TitledBorder(lineBorder, "SKIN", borderAlign, titlePos, titleFont, titleColor));
|
|
|
+ GridBagConstraints gbc_skin = new GridBagConstraints();
|
|
|
+ gbc_skin.fill = GridBagConstraints.HORIZONTAL;
|
|
|
+ gbc_skin.gridx = 3;
|
|
|
+ gbc_skin.gridy = 0;
|
|
|
+ panel_5.add(skin, gbc_skin);
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setModel(DDCharacter model) {
|
|
|
+ this.model = model;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void updateModel() {
|
|
|
+ this.name.setText(this.model.getName());
|
|
|
+ this.player.setText(this.model.getPlayer());
|
|
|
+ this.level.setText(this.model.getClassAndLevelString());
|
|
|
+ this.race.setText(this.model.getRace());
|
|
|
+ this.alignment.setText(StringHelper.toString(this.model.getAlignment()));
|
|
|
+ this.deity.setText(this.model.getDeity());
|
|
|
+ this.size.setText(StringHelper.toString(this.model.getSize()));
|
|
|
+ this.age.setText(StringHelper.toString(this.model.getAge(), -1));
|
|
|
+ this.gender.setText(StringHelper.toString(this.model.getGender()));
|
|
|
+ this.height.setText(this.model.getHeight());
|
|
|
+ this.weight.setText(StringHelper.toString(this.model.getWeight(), -1));
|
|
|
+ this.eyes.setText(this.model.getEyes());
|
|
|
+ this.hair.setText(this.model.getHair());
|
|
|
+ this.skin.setText(this.model.getSkin());
|
|
|
+ }
|
|
|
+
|
|
|
+}
|