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-94f89814c4df
master
konermann 2015-10-28 10:36:08 +00:00
parent 1c9a304ff9
commit a4bb0eb959
7 changed files with 72 additions and 6 deletions

View File

@ -43,7 +43,7 @@ import com.arsdigita.mimetypes.MimeType;
import com.arsdigita.persistence.OID;
import com.arsdigita.util.LockableImpl;
import com.arsdigita.web.URL;
import java.awt.Dimension;
import com.arsdigita.util.Dimension;
import java.math.BigDecimal;
import org.apache.log4j.Logger;

View File

@ -18,7 +18,7 @@
*/
package com.arsdigita.mimetypes.image;
import java.awt.Dimension;
import com.arsdigita.util.Dimension;
import java.io.DataInputStream;
import java.io.IOException;

View File

@ -18,7 +18,7 @@
*/
package com.arsdigita.mimetypes.image;
import java.awt.Dimension;
import com.arsdigita.util.Dimension;
import java.io.DataInputStream;
import java.io.IOException;

View File

@ -1,6 +1,6 @@
package com.arsdigita.mimetypes.image;
import java.awt.Dimension;
import com.arsdigita.util.Dimension;
import java.awt.image.BufferedImage;
import java.io.DataInputStream;
import java.io.IOException;

View File

@ -18,7 +18,7 @@
*/
package com.arsdigita.mimetypes.image;
import java.awt.Dimension;
import com.arsdigita.util.Dimension;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;

View File

@ -20,7 +20,7 @@ package com.arsdigita.mimetypes.image;
import com.arsdigita.mimetypes.util.GlobalizationUtil;
import java.awt.Dimension;
import com.arsdigita.util.Dimension;
import java.io.DataInputStream;
import java.io.IOException;
import org.apache.log4j.Logger;

View File

@ -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;
}
}