コード例 #1
0
ファイル: ID3v11Tag.java プロジェクト: flyfire/temp
 public void setField(TagField field) {
   FieldKey genericKey = FieldKey.valueOf(field.getId());
   if (genericKey == FieldKey.TRACK) {
     setTrack(field.toString());
   } else {
     super.setField(field);
   }
 }
コード例 #2
0
 /**
  * Returns all selected qualifications.
  *
  * @return All qualifications
  */
 public List<Qualification> getQualifications() {
   List<Qualification> quals = new ArrayList<Qualification>();
   Set<?> set = (Set<?>) tags.getValue();
   if (set == null) return null;
   for (Object obj : set) quals.add(container.getItem(obj).getBean());
   return quals;
 }
コード例 #3
0
 /**
  * Add Field
  *
  * <p>
  *
  * <p>Overidden because there can only be one vendor set
  *
  * @param field
  */
 public void addField(TagField field) {
   if (field.getId().equals(VorbisCommentFieldKey.VENDOR.getFieldName())) {
     super.setField(field);
   } else {
     super.addField(field);
   }
 }
コード例 #4
0
ファイル: ID3v1Tag.java プロジェクト: devilcius/Predatoid
  public void setField(TagField field) {
    FieldKey genericKey = FieldKey.valueOf(field.getId());
    switch (genericKey) {
      case ARTIST:
        setArtist(field.toString());
        break;

      case ALBUM:
        setAlbum(field.toString());
        break;

      case TITLE:
        setTitle(field.toString());
        break;

      case GENRE:
        setGenre(field.toString());
        break;

      case YEAR:
        setYear(field.toString());
        break;

      case COMMENT:
        setComment(field.toString());
        break;
    }
  }
コード例 #5
0
  /**
   * Creates the field with the given container.
   *
   * @param container The container
   */
  public QualificationField(QualificationContainer container) {
    HorizontalLayout horLayout = new HorizontalLayout();
    horLayout.setWidth("100%");
    setCompositionRoot(horLayout);

    this.container = container;
    tags = new QualificationTagField();
    tags.setContainerDataSource(container);
    tags.setNewTokensAllowed(true);
    tags.setFilteringMode(Filtering.FILTERINGMODE_CONTAINS);
    horLayout.addComponent(tags);
    horLayout.setExpandRatio(tags, 1.0f);

    btnEdit = new Button();
    btnEdit.setDescription("Qualifikationen bearbeiten");
    btnEdit.addListener((ClickListener) this);
    horLayout.addComponent(btnEdit);
  }
コード例 #6
0
 /**
  * Sets the qualifications.
  *
  * @param quals The new qualifications
  */
 public void setQualifications(List<Qualification> quals) {
   for (Qualification qual : quals) tags.addToken(qual.getName());
 }