コード例 #1
0
  public void setRecipient(String recipient) {
    if (!this.contacts.contains(recipient)) {
      recipient = ContactManager.getPlayerName(recipient);
      this.contacts.add(0, recipient);
    }

    this.targetSelect.getEditor().setItem(recipient);
    this.targetSelect.setSelectedItem(recipient);
  }
コード例 #2
0
    public SkillBuffPanel() {
      super("cast", "maxcast", new Dimension(80, 20), new Dimension(240, 20));

      SkillBuffFrame.this.typeSelect = new SkillTypeComboBox();
      SkillBuffFrame.this.skillSelect = new AutoFilterComboBox(KoLConstants.usableSkills, false);
      SkillBuffFrame.this.amountField = new AutoHighlightTextField();

      SkillBuffFrame.this.contacts =
          (LockableListModel) ContactManager.getMailContacts().getMirrorImage();
      SkillBuffFrame.this.targetSelect = new AutoFilterComboBox(SkillBuffFrame.this.contacts, true);

      VerifiableElement[] elements = new VerifiableElement[4];
      elements[0] = new VerifiableElement("Skill Type: ", SkillBuffFrame.this.typeSelect);
      elements[1] = new VerifiableElement("Skill Name: ", SkillBuffFrame.this.skillSelect);
      elements[2] = new VerifiableElement("# of Casts: ", SkillBuffFrame.this.amountField);
      elements[3] = new VerifiableElement("The Victim: ", SkillBuffFrame.this.targetSelect);

      this.setContent(elements);
    }