001    package swingui;
002    
003    import physics3d.Angle;
004    
005    
006    public class AngleSelect {
007            Angle a;
008            String name;
009            /** ZERO degrees **/
010            public static final AngleSelect zero = new AngleSelect(Angle.ZERO, "0 degrees");
011            /** NINETY degrees **/
012            public static final AngleSelect ninety = new AngleSelect(Angle.DEG_90, "90 degrees");
013            /** 180 degrees **/
014            public static final AngleSelect one_eighty = new AngleSelect(Angle.DEG_180, "180 degrees");
015            /** 270 degrees **/
016            public static final AngleSelect two_seventy = new AngleSelect(Angle.DEG_270, "270 degrees");
017            public static final AngleSelect[] DEFAULT_ANGLES= {zero, ninety, one_eighty, two_seventy};
018            
019            
020            /** greate a new angle **/
021            public AngleSelect(Angle a, String name) {
022                    this.a = a;
023                    this.name = name;
024            }
025            
026            /** get the angle **/
027            public Angle getAngle() {
028                    return a;
029            }
030            
031            /** get the name of this selection **/
032            public String getName() {
033                    return name;
034            }
035            
036            // while they're all dancing around likefoxrs
037            public String toString() {
038                    return name;
039            }
040    }