Skip to content

Instantly share code, notes, and snippets.

@ailabs-software
Created June 6, 2017 01:12
Show Gist options
  • Save ailabs-software/9801b449bdfe01f2fb977eaf0a47ee6a to your computer and use it in GitHub Desktop.
Save ailabs-software/9801b449bdfe01f2fb977eaf0a47ee6a to your computer and use it in GitHub Desktop.
Use getters
public enum CardinalDirectionType
{
North ("n-resize", new Coordinate(100, 0) ),
NorthEast ("ne-resize", new Coordinate(100, 0) ),
East ("e-resize", new Coordinate(100, 50) ),
SouthEast ("se-resize", new Coordinate(100, 100) ),
South ("s-resize", new Coordinate(50, 100) ),
SouthWest ("sw-resize", new Coordinate(0, 100) ),
West ("w-resize", new Coordinate(0, 50) ),
NorthWest ("nw-resize", new Coordinate(0, 0) );
/** Mouse cursor id */
private final String styleName;
/** Coordinate point where this appears, typically in resize UIs */
private final Coordinate point;
private CardinalDirectionType(String styleName, Coordinate point)
{
this.styleName = styleName;
this.point = point;
}
public final String getStyleName()
{
return styleName;
}
public final Coordinate getPoint()
{
return point;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment