org.fraid.graphics.utils
Class GraphicsUtils

java.lang.Object
  extended by org.fraid.graphics.utils.GraphicsUtils

public class GraphicsUtils
extends java.lang.Object

Variuos utilities used in the graphics system.


Nested Class Summary
static class GraphicsUtils.SettingsFieldType
           
 
Constructor Summary
GraphicsUtils()
           
 
Method Summary
static double dateToPlane(java.util.Date beginDate, java.util.Date endDate, double beginX, double endX, java.util.Date dateToConvert)
          dateToPlane
static java.lang.reflect.Field getField(java.lang.String aFieldName, java.lang.Object aObject)
           
static java.lang.String getFieldsAndTypesInString(java.lang.Object aObject)
           
static GraphicsUtils.SettingsFieldType getFieldType(java.lang.reflect.Field aField)
           
static java.util.Date planeToDate(java.util.Date beginDate, java.util.Date endDate, double beginX, double endX, double pointToConvert)
          planeToDate.
static void planeToScreen(java.awt.Dimension aScreenSize, DoublePoint aUpperLeft, DoublePoint aBottomRight, DoublePoint aPointToConvert, java.awt.Point aConvertedPoint)
          Converts plane to screen coordinates.
static void screenToPlane(java.awt.Dimension aScreenSize, DoublePoint aUpperLeft, DoublePoint aBottomRight, java.awt.Point aPointToConvert, DoublePoint aConvertedPoint)
          Converts screen to plane coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicsUtils

public GraphicsUtils()
Method Detail

getFieldType

public static GraphicsUtils.SettingsFieldType getFieldType(java.lang.reflect.Field aField)

getField

public static java.lang.reflect.Field getField(java.lang.String aFieldName,
                                               java.lang.Object aObject)
                                        throws ComplexFunctionException
Throws:
ComplexFunctionException

getFieldsAndTypesInString

public static java.lang.String getFieldsAndTypesInString(java.lang.Object aObject)
                                                  throws java.lang.SecurityException
Throws:
java.lang.SecurityException

planeToScreen

public static void planeToScreen(java.awt.Dimension aScreenSize,
                                 DoublePoint aUpperLeft,
                                 DoublePoint aBottomRight,
                                 DoublePoint aPointToConvert,
                                 java.awt.Point aConvertedPoint)
Converts plane to screen coordinates.

Parameters:
aScreenSize - a Dimension value
aUpperLeft - a DoublePoint value
aBottomRight - a DoublePoint value
aPointToConvert - a DoublePoint value
aConvertedPoint - a DoublePoint value
See Also:
GraphicsPanel

screenToPlane

public static void screenToPlane(java.awt.Dimension aScreenSize,
                                 DoublePoint aUpperLeft,
                                 DoublePoint aBottomRight,
                                 java.awt.Point aPointToConvert,
                                 DoublePoint aConvertedPoint)
Converts screen to plane coordinates.

Parameters:
aScreenSize - a Dimension value
aUpperLeft - a DoublePoint value
aBottomRight - a DoublePoint value
aPointToConvert - a Point value
aConvertedPoint - a DoublePoint value
See Also:
GraphicsPanel

planeToDate

public static java.util.Date planeToDate(java.util.Date beginDate,
                                         java.util.Date endDate,
                                         double beginX,
                                         double endX,
                                         double pointToConvert)
planeToDate.

Parameters:
beginDate - a Date value
endDate - a Date value
beginX - a double value
endX - a double value
pointToConvert - a double value
Returns:
a Date value

dateToPlane

public static double dateToPlane(java.util.Date beginDate,
                                 java.util.Date endDate,
                                 double beginX,
                                 double endX,
                                 java.util.Date dateToConvert)
dateToPlane

Parameters:
beginDate - a Date value
endDate - a Date value
beginX - a double value
endX - a double value
dateToConvert - a Date value
Returns:
a double value


Fraid (system and language). (C) 2003-2007 Ivaylo Iliev
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.