Package com.dubture.getcomposer.core.objects

Examples of com.dubture.getcomposer.core.objects.Person


    manager.add(editAction);
    manager.add(removeAction);
  }
 
  private void handleAdd() {
    PersonDialog diag = new PersonDialog(authorViewer.getTable().getShell(), new Person());
    if (diag.open() == Dialog.OK) {
      composerPackage.getAuthors().add(diag.getPerson());
      refresh();
    }
  }
View Full Code Here


      refresh();
    }
  }
 
  private void handleEdit() {
    Person author = (Person)((StructuredSelection)authorViewer.getSelection()).getFirstElement();
    PersonDialog diag = new PersonDialog(authorViewer.getTable().getShell(), author.clone());
    if (diag.open() == Dialog.OK) {
      author.setName(diag.getPerson().getName());
      author.setEmail(diag.getPerson().getEmail());
      author.setHomepage(diag.getPerson().getHomepage());
      author.setRole(diag.getPerson().getRole());
    }
  }
View Full Code Here

    Iterator<Object> it = selection.iterator();
    String[] names = new String[selection.size()];
    List<Person> persons = new ArrayList<Person>();

    for (int i = 0; it.hasNext(); i++) {
      Person person = (Person)it.next();
      persons.add(person);
      names[i] = person.getName();
    }

    MessageDialog diag = new MessageDialog(
        authorViewer.getTable().getShell(),
        "Remove Author" + (selection.size() > 1 ? "s" : ""),
View Full Code Here

   
    public void update(ViewerCell cell) {
      Object obj = cell.getElement();
     
      if (obj instanceof Person) {
        Person author = (Person)obj;
       
        StyledString styledString = new StyledString(author.getName());
       
        if (author.getEmail() != null && author.getEmail().trim() != "" && !author.getEmail().trim().equals("")) {
          styledString.append(" <" + author.getEmail().trim() + ">", StyledString.COUNTER_STYLER);
        }
       
        if (author.getHomepage() != null && author.getHomepage().trim() != "" && !author.getHomepage().trim().equals("")) {
          styledString.append(" - " + author.getHomepage().trim(), StyledString.DECORATIONS_STYLER);
        }
       
        cell.setText(styledString.toString());
        cell.setStyleRanges(styledString.getStyleRanges());
       
View Full Code Here

    clear();
    if (obj instanceof JSONArray) {
      for (Object pObj : (JSONArray)obj) {
        if (pObj instanceof JSONObject) {
          JSONObject p = (JSONObject)pObj;
          Person person = new Person(p);
          add(person);
        }
      }
    }
  }
View Full Code Here

    clear();
    if (obj instanceof LinkedList) {
      for (Object pObj : (LinkedList)obj) {
        if (pObj instanceof LinkedHashMap) {
          LinkedHashMap p = (LinkedHashMap)pObj;
          Person person = new Person(p);
          add(person);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.dubture.getcomposer.core.objects.Person

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.