added util/Dimension.java and used it in several classes instead of java.awt.Dimension.java so it works with the Headless package
git-svn-id: https://svn.libreccm.org/ccm/trunk@3713 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1c9a304ff9
commit
a4bb0eb959
|
|
@ -43,7 +43,7 @@ import com.arsdigita.mimetypes.MimeType;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.util.LockableImpl;
|
import com.arsdigita.util.LockableImpl;
|
||||||
import com.arsdigita.web.URL;
|
import com.arsdigita.web.URL;
|
||||||
import java.awt.Dimension;
|
import com.arsdigita.util.Dimension;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.mimetypes.image;
|
package com.arsdigita.mimetypes.image;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import com.arsdigita.util.Dimension;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.mimetypes.image;
|
package com.arsdigita.mimetypes.image;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import com.arsdigita.util.Dimension;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package com.arsdigita.mimetypes.image;
|
package com.arsdigita.mimetypes.image;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import com.arsdigita.util.Dimension;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.mimetypes.image;
|
package com.arsdigita.mimetypes.image;
|
||||||
|
|
||||||
import java.awt.Dimension;
|
import com.arsdigita.util.Dimension;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ package com.arsdigita.mimetypes.image;
|
||||||
|
|
||||||
|
|
||||||
import com.arsdigita.mimetypes.util.GlobalizationUtil;
|
import com.arsdigita.mimetypes.util.GlobalizationUtil;
|
||||||
import java.awt.Dimension;
|
import com.arsdigita.util.Dimension;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.arsdigita.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Almost the same as java.awt.Dimension
|
||||||
|
*
|
||||||
|
* @author Koalamann (konerman@tzi.de)
|
||||||
|
* @version $Date: 2015/10/28 $
|
||||||
|
*/
|
||||||
|
public class Dimension {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The width dimension; negative values can be used.
|
||||||
|
*/
|
||||||
|
public int width;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The height dimension; negative values can be used.
|
||||||
|
*/
|
||||||
|
public int height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an instance of <code>Dimension</code> with a width of zero and a
|
||||||
|
* height of zero.
|
||||||
|
*/
|
||||||
|
public Dimension() {
|
||||||
|
this(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs a <code>Dimension</code> and initializes it to the specified
|
||||||
|
* width and specified height.
|
||||||
|
*
|
||||||
|
* @param width the specified width
|
||||||
|
* @param height the specified height
|
||||||
|
*/
|
||||||
|
public Dimension(int width, int height) {
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue