示例#1
0
    public GamePanel() {
      notes.setBorder(new EtchedBorder());

      // layout
      int w1[] = {BORDER, 10, 0, 5, 0, 10, 5, 0, BORDER};
      int h1[] = {BORDER, 0, 20, 0, 5, 0, 10, 0, 10, 0, 10, 0, 30, 0, 10, 0, 10, 0, BORDER};

      HIGLayout layout = new HIGLayout(w1, h1);
      layout.setColumnWeight(8, 1);
      this.setLayout(layout);

      HIGConstraints c = new HIGConstraints();

      this.add(new JLabel(Utils.getLocalString(GDF_GAME_NAME)), c.rcwh(2, 3, 1, 1, "r"));
      this.add(gameName, c.rcwh(2, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_NOTES)), c.rcwh(4, 8, 1, 1, "l"));
      this.add(makeScrollPane(notes), c.rcwh(6, 8, 1, 14, "lrtb"));

      this.add(new JLabel(Utils.getLocalString(GDF_COMMENT)), c.rcwh(6, 3, 1, 1, "r"));
      this.add(comment, c.rcwh(6, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_GAME_URI)), c.rcwh(8, 3, 1, 1, "r"));
      this.add(gameURI, c.rcwh(8, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_GAME_ID)), c.rcwh(10, 3, 1, 1, "r"));
      this.add(gameID, c.rcwh(10, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_JUDGE_NAME)), c.rcwh(12, 3, 1, 1, "r"));
      this.add(judgeName, c.rcwh(12, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_MOD_NAME)), c.rcwh(14, 3, 1, 1, "r"));
      this.add(modName, c.rcwh(14, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_MOD_EMAIL)), c.rcwh(16, 3, 1, 1, "r"));
      this.add(modEmail, c.rcwh(16, 5, 1, 1, "lr"));

      this.add(new JLabel(Utils.getLocalString(GDF_MOD_URI)), c.rcwh(18, 3, 1, 1, "r"));
      this.add(modURI, c.rcwh(18, 5, 1, 1, "lr"));
    } // GamePanel()
示例#2
0
    public PlayerPanel(Power power) {
      this.power = power;

      notes.setBorder(new EtchedBorder());

      for (int i = 0; i < email.length; i++) {
        email[i] = Utils.createEmailTextField(COLUMNS);
      }

      // layout
      int w1[] = {BORDER, 0, 5, 0, 15, 0, 5, 0, BORDER};
      int h1[] = {BORDER, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 10, 0, 5, 0, BORDER};

      HIGLayout layout = new HIGLayout(w1, h1);
      layout.setColumnWeight(5, 1);
      layout.setRowWeight(12, 1);
      this.setLayout(layout);

      HIGConstraints c = new HIGConstraints();

      this.add(new JLabel(Utils.getLocalString(PDF_NAME)), c.rcwh(2, 2, 1, 1, "r"));
      this.add(name, c.rcwh(2, 4, 1, 1, "l"));

      this.add(new JLabel(Utils.getLocalString(PDF_URI)), c.rcwh(4, 2, 1, 1, "r"));
      this.add(uri, c.rcwh(4, 4, 1, 1, "l"));

      this.add(new JLabel(Utils.getLocalString(PDF_NOTES)), c.rcwh(10, 2, 1, 1, "l"));
      this.add(makeScrollPane(notes), c.rcwh(12, 2, 7, 1, "lrtb"));

      for (int i = 0; i < email.length; i++) {
        int row = 2 + (i * 2);
        this.add(
            new JLabel(Utils.getLocalString(PDF_EMAIL) + " " + String.valueOf(i + 1)),
            c.rcwh(row, 6, 1, 1, "r"));
        this.add(email[i], c.rcwh(row, 8, 1, 1, "l"));
      }
    } // PlayerPanel()