• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.clients
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 5577

Show
Ignore:
Timestamp:
08/22/08 13:59:18 (3 months ago)
Author:
jburel
Message:

Modified text and fixed bug related to comments' display (cf. ticket #629)

Location:
trunk/SRC/org/openmicroscopy/shoola/agents
Files:
4 modified

  • metadata/editor/EditorModel.java (modified) (1 diff)
  • metadata/editor/TextualAnnotationsUI.java (modified) (1 diff)
  • metadata/editor/UserProfile.java (modified) (5 diffs)
  • util/EditorUtil.java (modified) (1 diff)

Legend:

Unmodified
Added
Removed
  • trunk/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorModel.java

    r5564 r5577  
    610610        Map<Long, List> getTextualAnnotationByOwner() 
    611611        { 
    612                 if (textualAnnotationsByUsers != null) 
     612                if (textualAnnotationsByUsers != null  
     613                        && textualAnnotationsByUsers.size() > 0) 
    613614                        return textualAnnotationsByUsers; 
    614615                textualAnnotationsByUsers = new HashMap<Long, List>(); 
  • trunk/SRC/org/openmicroscopy/shoola/agents/metadata/editor/TextualAnnotationsUI.java

    r5472 r5577  
    401401                removeAll(); 
    402402                setAreaText(""); 
     403                originalText = null; 
    403404                setComponentTitle(); 
    404405                add(buildAreaPane()); 
  • trunk/SRC/org/openmicroscopy/shoola/agents/metadata/editor/UserProfile.java

    r5382 r5577  
    117117    /** The user's details. */ 
    118118    private Map                                         details; 
     119     
     120    private GroupData[]                         groupData; 
    119121     
    120122    /** Modifies the existing password. */ 
    … …  
    179181                                validGroups.add(g); 
    180182                } 
    181                 GroupData[] objects = new GroupData[validGroups.size()]; 
     183                groupData = new GroupData[validGroups.size()]; 
    182184                int selectedIndex = 0; 
    183185                int index = 0; 
    … …  
    185187                while (i.hasNext()) { 
    186188                        g = (GroupData) i.next(); 
    187                         objects[index] = g; 
     189                        groupData[index] = g; 
    188190                        if (g.getId() == groupID) originalIndex = index; 
    189191                        index++; 
    … …  
    191193                selectedIndex = originalIndex; 
    192194                //sort by name 
    193                 groups = new JComboBox(objects); 
     195                groups = new JComboBox(groupData); 
    194196                groups.setRenderer(new GroupsRenderer()); 
    195                 if (objects.length != 0) 
     197                if (groupData.length != 0) 
    196198                        groups.setSelectedIndex(selectedIndex); 
    197199                if (isOwner) { 
    … …  
    407409        newOne.setFirstName(v.trim()); 
    408410        newOne.setId(original.getId()); 
     411        //set the groups 
     412        if (selectedIndex != originalIndex) { 
     413                GroupData g = groupData[selectedIndex]; 
     414                ExperimenterData user = (ExperimenterData) model.getRefObject(); 
     415                List userGroups = user.getGroups(); 
     416                List<GroupData> newGroups = new ArrayList<GroupData>(); 
     417                newGroups.add(g); 
     418                Iterator i = userGroups.iterator(); 
     419                GroupData group; 
     420                while (i.hasNext()) { 
     421                                group = (GroupData) i.next(); 
     422                                if (group.getId() != g.getId()) 
     423                                        newGroups.add(group); 
     424                        } 
     425                newOne.setGroups(newGroups); 
     426        } 
    409427                return newOne; 
    410428        } 
  • trunk/SRC/org/openmicroscopy/shoola/agents/util/EditorUtil.java

    r5538 r5577  
    7474         
    7575    /** Identifies the <code>Default group</code>. */ 
    76         public static final String      DEFAULT_GROUP = "Default Group"; 
     76        public static final String      DEFAULT_GROUP = "Main Group"; 
    7777         
    7878        /** Symbols indicating the mandatory values. */ 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/