Methods | Fields | This Package | All Packages

CoordinateSystem Class

Defines the constants that identify the coordinate systems that you can associate with a Graphics object.

Enum
  |
  +--CoordinateSystem

package com.ms.wfc.ui

public class CoordinateSystem
extends
Enum

Remarks

The term coordinate system identifies how the coordinates that you pass to a Graphics object's drawing methods map to the display or a device.

Suppose, for example, that you call the Graphics object's drawString method to draw text at coordinates 100,100:

Graphics g = this.createGraphics();

g.drawString("Hello, WFC", new Point(100, 100));

The Point object in this example specifies the x and y coordinates at which to draw the string. However, the actual result of this operation depends on the coordinate system with which the Graphics object is associated.

The coordinate systems with which you can associate a Graphics object are defined in the CoordinateSystem class. The default coordinate system for a Graphics object is CoordinateSystem.TEXT, which means that as the x and y values in a Point increase, the text (or bitmap or control) proceeds to the right horizontally and down vertically.

To associate a coordinate system with a Graphics object, use the Graphics object's setCoordinateSystem method.