Changeset 843 for trunk/src/org/expeditee/items
- Timestamp:
- 02/05/14 15:30:07 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/items/Picture.java
r793 r843 26 26 27 27 import org.expeditee.gui.FrameGraphics; 28 import org.expeditee.gui.FrameIO; 28 29 import org.expeditee.gui.FrameMouseActions; 30 import org.expeditee.gui.FrameUtils; 29 31 import org.expeditee.stats.Logger; 30 32 … … 740 742 return _fileName; 741 743 } 744 745 public String getPath() { 746 return _path; 747 } 748 749 /** 750 * Copies the image to the default images folder and updates the reference to it in Expeditee 751 * Used for correcting image references for FrameShare 752 */ 753 public void moveToImagesFolder() { 754 File f = new File(getPath()); 755 // if the file is not in the default images folder, copy it there 756 if(! f.getParentFile().equals(new File(FrameIO.IMAGES_PATH))) { 757 try { 758 File f2 = new File(FrameIO.IMAGES_PATH + f.getName()); 759 FrameUtils.copyFile(f, f2, false); 760 f = f2; 761 } catch (IOException e) { 762 e.printStackTrace(); 763 f = null; 764 } 765 } 766 _path = f.getPath(); 767 _fileName = f.getName(); 768 updateSource(); 769 } 742 770 743 771 protected String getTagText() {
Note:
See TracChangeset
for help on using the changeset viewer.