Q:

Create processing enum with existing variable

I'd like to create an enum with values which use existing variables.  I'm using Processing, therefore the width and height I specify are java globals and can be accessed from anywhere without context. 
Is what I'm doing possible?  Should I do something else? 
public enum WaterDirection {
  NORTH(width / 2, 0);
  SOUTH(width / 2, height);
  WEST(0, height / 2);
  EAST(width, height / 2);

  public int x;
  public int y;
  WaterDirections(int x, int y) {
    this.x = x;
    this.y = y;
  }
}

I get an error saying it can't find width. 
I could hardcode it, but I'd rather not. 
EDIT:
This enum works fine:
public enum TrinketTypes {
  COINS("coins", 0.50f);

  public String fileName;
  public float worth;
  TrinketTypes(String fileName, float worth) {
    this.fileName = fileName;
    this.worth = worth;
  }
}

A:

This is how you can do it, although it would make more sense to first define the parameters you're feeding into size(x,y) as static final ints and then construct your enum using these, rather than going through the static reference to your PApplet instance. 
static PApplet p;

public enum WaterDirection {
  NORTH(p.width / 2, 0), 
  SOUTH(p.width / 2, p.height), 
  WEST(0, p.height / 2), 
  EAST(p.width, p.height / 2);

  private final int x, y;

  private WaterDirection(int x, int y) {
    this.x = x;
    this.y = y;
  }
  public int getX() {
    return x;
  }
  public int getY() {
    return y;
  }
}

void setup() {
  p = this;
  size(500, 500);
  println(WaterDirection. NORTH.getX());
}

void draw() {
}

Prints 250.