Ignore:
Timestamp:
2013-01-08T19:45:38+13:00 (11 years ago)
Author:
davidb
Message:

An "Import Collections" action text item is automatically generated for the Manage Collections frameset, so the user doesn't have to add this item themselves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/GlamED/trunk/src/org/honours/Main.java

    r26598 r26599  
    294294                try{
    295295                    FrameIO.CreateNewFrameset(s);
     296                   
     297                    if(s.equals("CollectionsMain")){
     298                        frame = FrameIO.LoadFrame(s + "1");
     299                        frame.addText(329,37,"Import Collections into GlamED", "ImportCollections");
     300                    }
     301                   
    296302                }catch(Exception e){
    297303                    e.printStackTrace();
    298304                }
     305            }else{
     306               
     307                if(s.equals("CollectionsMain")){
     308                    //Check frame for an "Import Collections" action text item.
     309                    boolean hit = false;
     310                    int iter = 0;
     311                   
     312                    while(iter < frame.getItems().size() && !hit){
     313                       
     314                        Item currItem = frame.getItems().get(iter);
     315                        if(currItem instanceof Text){
     316                            Text t = (Text)currItem;
     317                           
     318                            if(t.getAction() != null){
     319                                for(String actionString: t.getAction()){
     320                                    if(actionString.equals("ImportCollections"))
     321                                        hit = true;
     322                                }
     323                            }
     324                        }
     325                       
     326                        iter++;
     327                    }
     328                   
     329                    if(!hit){
     330                        frame.addText(329,37,"Import Collections into GlamED","ImportCollections");
     331                    }
     332                   
     333                }
     334           
    299335            }
    300336        }
Note: See TracChangeset for help on using the changeset viewer.