View Javadoc
1 /* 2 * Created on 2003-5-23 15:38:38 by joel guo 3 * 4 * vTradEx Information Technology Inc. 5 */ 6 package com.cyclops.albumbuilder; 7 import java.awt.Dimension; 8 import java.io.File; 9 /*** 10 * Add description for this class <font color="red">HERE</font>! 11 * <big><font face="黑体">惩前毖后,治病救人</font></big> 12 * 13 * @author <a href="mailto:joeblack.guo@vtradex.com">joel guo</a> 14 * @company <a href="http://www.vtradex.com">vTradEx</a> 15 * @since 2003-5-23 15:38:38 16 */ 17 public class SourceResource { 18 private String relativePath; 19 private String rootDirectory; 20 private Dimension size; 21 /*** Constructor method for class SourceResource 22 * @param root 根目录 23 * @param path 相对根目录的路径 24 */ 25 public SourceResource(String root, String path) { 26 rootDirectory = root; 27 relativePath = path; 28 } 29 /*** Get full path of this resource 30 * @return Full path of resource 31 */ 32 public String getPath() { 33 return rootDirectory + File.separator + relativePath; 34 } 35 /*** Method getRelativePath() 36 * @return Relative path of this source image 37 */ 38 public String getRelativePath() { 39 return relativePath; 40 } 41 /*** Method getRootDirectory() 42 * @return Root directory of this source image 43 */ 44 public String getRootDirectory() { 45 return rootDirectory; 46 } 47 /*** Method getSize() in class SourceResource 48 * @return Original size of this image 49 */ 50 public Dimension getSize() { 51 return size; 52 } 53 /*** Method getSourceFile() 54 * @return File object of this source image 55 */ 56 public File getSourceFile() { 57 return new File(getPath()); 58 } 59 /*** Method setSize() in class SourceResource 60 * @param dimension Original size of this image 61 */ 62 public void setSize(Dimension dimension) { 63 size = dimension; 64 } 65 /*** Override method toString() of super class 66 * @see java.lang.Object#toString() 67 */ 68 public String toString() { 69 return relativePath + "@" + rootDirectory; 70 } 71 }

This page was automatically generated by Maven