Changeset 26737 for other-projects/GlamED/trunk
- Timestamp:
- 2013-01-16T20:12:03+13:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/GlamED/trunk/src/org/honours/gui/Interfaces.java
r26734 r26737 1 1 package org.honours.gui; 2 2 3 import java.awt.Color; 3 4 import java.awt.Dimension; 4 5 import java.util.List; … … 45 46 46 47 //used to determine positioning of the various @ao:3/4 text items. 47 private static int _mainOverAoX = 1 272;48 private static int _mainOverAoX = 1859; 48 49 private static int _mainOverAoY = 130; 49 50 50 private static int _toolbarAoX = 1 272;51 private static int _toolbarAoX = 1859; 51 52 private static int _toolbarAoY = 130; 52 53 53 private static int _toggleAoX = 1 272;54 private static int _toggleAoX = 1859; 54 55 private static int _toggleAoY = 94; 55 56 56 private static int _notesAoX = 1 272;57 private static int _notesAoX = 1859; 57 58 private static int _notesAoY = 58; 58 59 … … 211 212 212 213 boolean found = false; 214 String notesFrameFoundName = null; 213 215 int i = 0; 214 216 217 215 218 while(i < list.size() && !found){ 216 219 … … 223 226 if(t.getLink().startsWith("notes")){ 224 227 found = true; 228 notesFrameFoundName = t.getLink(); 225 229 } 226 230 … … 233 237 234 238 if(!found){ 235 236 237 239 238 240 //check for an overlay frame in notes frameset associated with this collection item. 239 241 NoteLayer getNoteLayer = cItem.getNoteLayer(); … … 253 255 cItem.setNoteLayer(getNoteLayer); 254 256 255 //Add collectionItem back into collection 256 //Add collection back into collections list 257 //Add collectionItem back into collection and add collection back into collections list 257 258 Collection matchingCollection = Collection.findCollection(cItem.getFrame()); 258 259 int collectionIndex = Collection.getCollectionPosition(matchingCollection); … … 264 265 Main._collections.remove(collectionIndex); 265 266 Main._collections.add(collectionIndex, matchingCollection); 267 266 268 }else{ 267 269 getNotesOverlayFrame = getNoteLayer.getFrame(); … … 271 273 newText.setData("overlayNotes"); 272 274 newText.setLink(getNotesOverlayFrame.getName()); 275 273 276 }else{ 274 277 275 278 //Obtain link to toolbar and change it. 276 Item getToolbarLinkItem = Misc.getItemContainingData(OVERLAY_TOOLBAR_DATA, ciFrame); 277 278 if(getToolbarLinkItem.getLink().equals(NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE)) 279 getToolbarLinkItem.setLink(NAVIGATION_OVERLAY_VIEW_NOTES_CLICKABLE); 279 Item toolbarLinkItem = Misc.getItemContainingData(OVERLAY_TOOLBAR_DATA, ciFrame); 280 String toolbarOverlayLink = toolbarLinkItem.getLink(); 281 282 if(toolbarOverlayLink.equals(NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE)){ 283 toolbarLinkItem.setLink(NAVIGATION_OVERLAY_VIEW_NOTES_CLICKABLE); 284 } 285 else if(toolbarOverlayLink.equals(NAVIGATION_OVERLAY_VIEW_NOTES_CLICKABLE)){ 286 //Check for actual text items on the notes frame. 287 Frame checkOverlayFrame = FrameIO.LoadFrame(notesFrameFoundName); 288 289 if(checkOverlayFrame.getTextItems().size() == 0){ 290 toolbarLinkItem.setLink(NAVIGATION_OVERLAY_VIEW_NOTES_UNCLICKABLE); 291 System.err.println("NO NOTES for collection item: " + ciFrame.getName()); 292 }else{ 293 System.err.println(ciFrame.getName() + " " + checkOverlayFrame.getTextItems().size() + " ********"); 294 } 295 296 } 280 297 281 298 }
Note:
See TracChangeset
for help on using the changeset viewer.