Search in sources :

Example 1 with TeamMember

use of teamdash.team.TeamMember in project processdash by dtuma.

the class WBSEditor method buildTeamMenu.

private JMenu buildTeamMenu(String initials, DataTableModel dataModel) {
    JMenu result = new JMenu("Team");
    result.setMnemonic('T');
    if (isMode(MODE_PLAIN))
        result.add(new ShowTeamMemberListEditorMenuItem());
    TeamMember m = null;
    if (initials != null)
        m = teamProject.getTeamMemberList().findTeamMember(initials);
    if (m != null) {
        if (!readOnly) {
            WatchCoworkerTimesMenuItem watchMenu = new WatchCoworkerTimesMenuItem(dataModel);
            result.add(new OptimizeEditingForIndivMenuItem(m, watchMenu));
            result.add(watchMenu);
        }
        // make nodes visible if they have a data problem and they are
        // assigned to this user
        ErrorNotesColumn.showNodesWithErrors(teamProject.getWBS(), null, new AssignedToMemberTest(dataModel, m));
    }
    result.add(new ShowTeamTimePanelMenuItem());
    if (showActualData) {
        ButtonGroup g = new ButtonGroup();
        result.add(new BottomUpShowReplanMenuItem(g));
        result.add(new BottomUpShowPlanMenuItem(g));
    }
    if (isMode(MODE_PLAIN)) {
        result.add(new SubteamBalancingMenu(teamProject.getTeamMemberList(), teamTimePanel, dirtyListener, showTeamTimePanelMenuItem, guiPrefs));
        result.add(new BottomUpShowBalancedTeamBar());
        result.add(new BottomUpShowHoursPerWeekMenuItem());
        result.add(new BottomUpIncludeUnassignedMenuItem());
    }
    return result;
}
Also used : SubteamBalancingMenu(teamdash.team.SubteamBalancingMenu) TeamMember(teamdash.team.TeamMember) ButtonGroup(javax.swing.ButtonGroup) JMenu(javax.swing.JMenu)

Example 2 with TeamMember

use of teamdash.team.TeamMember in project processdash by dtuma.

the class WBSSynchronizer method run.

public void run() {
    effectiveDate = new Date(0);
    createdNewTasks = foundActualData = needsWbsEvent = false;
    foundActualSizeData = sizeDataIncomplete = false;
    Element directDumpData = getDirectDumpData();
    Map<String, File> exportFiles = getExportFiles();
    nodeMap = teamProject.getWBS().getNodeMap();
    clientIdMap = buildClientIdMap(teamProject.getWBS());
    WBSNode wbsRoot = teamProject.getWBS().getRoot();
    wbsRoot.setAttribute(SYNC_IN_PROGRESS_ATTR, Boolean.TRUE);
    maxPastClientIDs = buildMaxClientIdMap(wbsRoot);
    Map<String, String> datasetIDMap = new HashMap<String, String>();
    for (Iterator i = teamProject.getTeamMemberList().getTeamMembers().iterator(); i.hasNext(); ) {
        TeamMember m = (TeamMember) i.next();
        Element dump = getUserDumpData(m, exportFiles, directDumpData);
        addDatasetIdMapping(datasetIDMap, dump);
        syncTeamMember(m, dump);
        if (dump == directDumpData)
            reloadedMemberNames.remove(m.getName());
    }
    if (createMissingTeamMembers)
        addMissingTeamMembers(exportFiles, datasetIDMap);
    UserGroupManagerWBS.getInstance().addDatasetIDMappings(finalizeDatasetIdMappings(datasetIDMap));
    wbsRoot.setAttribute(EFFECTIVE_DATE_ATTR, effectiveDate);
    wbsRoot.removeAttribute(SYNC_IN_PROGRESS_ATTR);
    int col = dataModel.findColumn(TeamActualTimeColumn.COLUMN_ID);
    dataModel.columnChanged(dataModel.getColumn(col));
    if (needsWbsEvent)
        teamProject.getWBS().fireTableRowsUpdated(0, 0);
    nodeMap = null;
    clientIdMap = null;
    maxPastClientIDs = null;
}
Also used : HashMap(java.util.HashMap) Element(org.w3c.dom.Element) Iterator(java.util.Iterator) File(java.io.File) Date(java.util.Date) TeamMember(teamdash.team.TeamMember)

Example 3 with TeamMember

use of teamdash.team.TeamMember in project processdash by dtuma.

the class TeamMemberColumnManager method createColumns.

/** Create or recreate TeamMemberTimeColumn objects for each team member
     */
private void createColumns() {
    List<TeamMemberTimeColumn> obsoletePlanTimeColumns = planTimeColumnList;
    List<TeamMemberActualTimeColumn> obsoleteActualTimeColumns = actualTimeColumnList;
    ArrayList newColumns = new ArrayList();
    planTimeColumnList = new ArrayList<TeamMemberTimeColumn>();
    actualTimeColumnList = new ArrayList<TeamMemberActualTimeColumn>();
    Iterator teamMembers = teamList.getTeamMembers().iterator();
    while (teamMembers.hasNext()) {
        // Loop through the list of team members.
        TeamMember m = (TeamMember) teamMembers.next();
        // try to find a preexisting planned time column for this team member.
        TeamMemberTimeColumn planTimeCol = getExistingValidTimeColumn(obsoletePlanTimeColumns, m);
        if (planTimeCol == null) {
            // create a new column for this team member.
            planTimeCol = new TeamMemberTimeColumn(dataModel, m);
            newColumns.add(planTimeCol);
        }
        // add the column to our master list.
        planTimeColumnList.add(planTimeCol);
        // try to find a preexisting actual time column for this team member.
        TeamMemberActualTimeColumn actualTimeCol = getExistingValidTimeColumn(obsoleteActualTimeColumns, m);
        if (actualTimeCol == null) {
            // create a new column for this team member.
            actualTimeCol = new TeamMemberActualTimeColumn(m);
            newColumns.add(actualTimeCol);
        }
        // add the column to our master list.
        actualTimeColumnList.add(actualTimeCol);
    }
    // make the changes to the columns in the data model.
    if (!newColumns.isEmpty() || !obsoletePlanTimeColumns.isEmpty() || !obsoleteActualTimeColumns.isEmpty()) {
        List obsoleteColumns = new ArrayList();
        obsoleteColumns.addAll(obsoletePlanTimeColumns);
        obsoleteColumns.addAll(obsoleteActualTimeColumns);
        dataModel.addRemoveDataColumns(newColumns, obsoleteColumns);
    }
    // alert any listeners that have registered interest
    ChangeEvent e = new ChangeEvent(this);
    for (ChangeListener l : listeners) l.stateChanged(e);
}
Also used : ChangeEvent(javax.swing.event.ChangeEvent) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) TeamMemberList(teamdash.team.TeamMemberList) ChangeListener(javax.swing.event.ChangeListener) TeamMember(teamdash.team.TeamMember)

Example 4 with TeamMember

use of teamdash.team.TeamMember in project processdash by dtuma.

the class TeamActualTimeColumn method refreshTeam.

private void refreshTeam() {
    List people = teamMembers.getTeamMembers();
    teamSize = people.size();
    initials = new String[teamSize];
    nodeTimeAttrs = new String[teamSize];
    actTimeAttrs = new String[teamSize];
    completionDateAttrs = new String[teamSize];
    subtaskDataAttrs = new String[teamSize];
    planTimeAttrs = new String[teamSize];
    assignedWithZeroAttrs = new String[teamSize];
    matchesTeamFilter = new boolean[teamSize];
    for (int i = 0; i < initials.length; i++) {
        TeamMember m = (TeamMember) people.get(i);
        initials[i] = m.getInitials();
        nodeTimeAttrs[i] = TeamMemberActualTimeColumn.getNodeDataAttrName(m);
        actTimeAttrs[i] = TeamMemberActualTimeColumn.getResultDataAttrName(m);
        completionDateAttrs[i] = TeamCompletionDateColumn.getMemberNodeDataAttrName(m);
        subtaskDataAttrs[i] = TeamMemberActualTimeColumn.getSubtaskDataAttrName(m);
        planTimeAttrs[i] = TopDownBottomUpColumn.getTopDownAttrName(TeamMemberTimeColumn.getColumnID(m));
        assignedWithZeroAttrs[i] = TeamTimeColumn.getMemberAssignedZeroAttrName(m);
        matchesTeamFilter[i] = teamFilter == null || teamFilter.include(m);
    }
}
Also used : ArrayList(java.util.ArrayList) List(java.util.List) TeamMemberList(teamdash.team.TeamMemberList) TeamMember(teamdash.team.TeamMember)

Example 5 with TeamMember

use of teamdash.team.TeamMember in project processdash by dtuma.

the class TeamProjectBottomUp method getTeamMemberInitials.

private List getTeamMemberInitials(TeamProject proj) {
    List result = new LinkedList();
    List teamMembers = proj.getTeamMemberList().getTeamMembers();
    for (Iterator i = teamMembers.iterator(); i.hasNext(); ) {
        TeamMember t = (TeamMember) i.next();
        result.add(t.getInitials());
    }
    return result;
}
Also used : Iterator(java.util.Iterator) NodeList(org.w3c.dom.NodeList) List(java.util.List) LinkedList(java.util.LinkedList) TeamMemberList(teamdash.team.TeamMemberList) LinkedList(java.util.LinkedList) TeamMember(teamdash.team.TeamMember)

Aggregations

TeamMember (teamdash.team.TeamMember)11 TeamMemberList (teamdash.team.TeamMemberList)6 Iterator (java.util.Iterator)4 List (java.util.List)4 ArrayList (java.util.ArrayList)3 Date (java.util.Date)3 HashMap (java.util.HashMap)3 Element (org.w3c.dom.Element)2 Dimension (java.awt.Dimension)1 GradientPaint (java.awt.GradientPaint)1 GridBagConstraints (java.awt.GridBagConstraints)1 Paint (java.awt.Paint)1 File (java.io.File)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1 LinkedList (java.util.LinkedList)1 Map (java.util.Map)1 ButtonGroup (javax.swing.ButtonGroup)1 JLabel (javax.swing.JLabel)1 JMenu (javax.swing.JMenu)1