org.devaki.nextobjects.util
Class NOGraphicsUtil

java.lang.Object
  extended byorg.devaki.nextobjects.util.NOGraphicsUtil

public abstract class NOGraphicsUtil
extends java.lang.Object

This class contains usefull graphics functions

Author:
eflorent

Constructor Summary
NOGraphicsUtil()
           
 
Method Summary
static java.lang.String color2HexString(java.awt.Color couleur)
          Give a string hexadecimal representation of a Color
static int distance(java.awt.Point p1, java.awt.Point p2)
          Calcultate distance
static java.awt.Point getMiddle(java.awt.Point pA, java.awt.Point pB)
          Calculate middle
static java.awt.Color hexString2Color(java.lang.String strColor)
          Give a Color from a hexadecimal representation within a string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NOGraphicsUtil

public NOGraphicsUtil()
Method Detail

distance

public static int distance(java.awt.Point p1,
                           java.awt.Point p2)
Calcultate distance

Parameters:
p1 - the A point
p2 - the B point
Returns:
the distance

getMiddle

public static java.awt.Point getMiddle(java.awt.Point pA,
                                       java.awt.Point pB)
Calculate middle

Parameters:
pA - the A point
pB - the B point
Returns:
the point at the middle

hexString2Color

public static java.awt.Color hexString2Color(java.lang.String strColor)
Give a Color from a hexadecimal representation within a string

Parameters:
strColor - the string to convert
Returns:
the Color

color2HexString

public static java.lang.String color2HexString(java.awt.Color couleur)
Give a string hexadecimal representation of a Color

Parameters:
couleur - the color to convert
Returns:
the String


Copyright © 2002-2004 devaki.org. All Rights Reserved.