Enum HitPointType
- java.lang.Object
- 
- java.lang.Enum<HitPointType>
- 
- jmri.jmrit.display.layoutEditor.HitPointType
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Comparable<HitPointType>
 
 public enum HitPointType extends java.lang.Enum<HitPointType> Enum denoting the different behaviors of different types of "HitPoints".Extracted from static in constants in LayoutEditor 
- 
- 
Enum Constant Summary
 - 
Field SummaryFields Modifier and Type Field Description static intNUM_BEZIER_CONTROL_POINTSstatic intNUM_SHAPE_POINTS
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intbezierPointIndex()Find the 0-8 index with respect to BEZIER_CONTROL_POINT_0 of this enum entry.protected static HitPointTypebezierPointIndexedValue(int i)Return a specific BEZIER_CONTROL_POINT from its 0-8 index.protected static booleanisBezierHitType(HitPointType hitType)protected static booleanisConnectionHitType(HitPointType hitType)protected static booleanisControlHitType(HitPointType hitType)protected static booleanisLevelXingHitType(HitPointType hitType)protected static booleanisPopupHitType(HitPointType hitType)protected static booleanisShapePointOffsetHitPointType(HitPointType t)protected static booleanisSlipHitType(HitPointType hitType)protected static booleanisTurnoutHitType(HitPointType hitType)protected static booleanisTurntableRayHitType(HitPointType hitType)protected intshapePointIndex()Find the 0-9 index with respect to SHAPE_POINT_0 of a given enum entry.protected static HitPointTypeshapePointIndexedValue(int i)Return a specific SHAPE_POINT from its 0-9 index.protected static HitPointType[]shapePointValues()Return an array of the valid SHAPE_POINT enum values.protected intturntableTrackIndex()Find the 0-63 index with respect to TURNTABLE_RAY_0 of a given enum entry.protected static HitPointTypeturntableTrackIndexedValue(int i)Return a specific TURNTABLE_RAY from its 0-63 index.protected static HitPointType[]turntableValues()Return an array of the valid TURNTABLE_RAY enum values.static HitPointTypevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static HitPointType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
NONEpublic static final HitPointType NONE 
 - 
POS_POINTpublic static final HitPointType POS_POINT 
 - 
TURNOUT_Apublic static final HitPointType TURNOUT_A 
 - 
TURNOUT_Bpublic static final HitPointType TURNOUT_B 
 - 
TURNOUT_Cpublic static final HitPointType TURNOUT_C 
 - 
TURNOUT_Dpublic static final HitPointType TURNOUT_D 
 - 
LEVEL_XING_Apublic static final HitPointType LEVEL_XING_A 
 - 
LEVEL_XING_Bpublic static final HitPointType LEVEL_XING_B 
 - 
LEVEL_XING_Cpublic static final HitPointType LEVEL_XING_C 
 - 
LEVEL_XING_Dpublic static final HitPointType LEVEL_XING_D 
 - 
TRACKpublic static final HitPointType TRACK 
 - 
TURNOUT_CENTERpublic static final HitPointType TURNOUT_CENTER 
 - 
LEVEL_XING_CENTERpublic static final HitPointType LEVEL_XING_CENTER 
 - 
TURNTABLE_CENTERpublic static final HitPointType TURNTABLE_CENTER 
 - 
LAYOUT_POS_LABELpublic static final HitPointType LAYOUT_POS_LABEL 
 - 
LAYOUT_POS_JCOMPpublic static final HitPointType LAYOUT_POS_JCOMP 
 - 
MULTI_SENSORpublic static final HitPointType MULTI_SENSOR 
 - 
MARKERpublic static final HitPointType MARKER 
 - 
TRACK_CIRCLE_CENTREpublic static final HitPointType TRACK_CIRCLE_CENTRE 
 - 
UNUSED_19public static final HitPointType UNUSED_19 
 - 
SLIP_CENTERpublic static final HitPointType SLIP_CENTER 
 - 
SLIP_Apublic static final HitPointType SLIP_A 
 - 
SLIP_Bpublic static final HitPointType SLIP_B 
 - 
SLIP_Cpublic static final HitPointType SLIP_C 
 - 
SLIP_Dpublic static final HitPointType SLIP_D 
 - 
SLIP_LEFTpublic static final HitPointType SLIP_LEFT 
 - 
SLIP_RIGHTpublic static final HitPointType SLIP_RIGHT 
 - 
UNUSED_27public static final HitPointType UNUSED_27 
 - 
UNUSED_28public static final HitPointType UNUSED_28 
 - 
UNUSED_29public static final HitPointType UNUSED_29 
 - 
BEZIER_CONTROL_POINT_0public static final HitPointType BEZIER_CONTROL_POINT_0 
 - 
BEZIER_CONTROL_POINT_1public static final HitPointType BEZIER_CONTROL_POINT_1 
 - 
BEZIER_CONTROL_POINT_2public static final HitPointType BEZIER_CONTROL_POINT_2 
 - 
BEZIER_CONTROL_POINT_3public static final HitPointType BEZIER_CONTROL_POINT_3 
 - 
BEZIER_CONTROL_POINT_4public static final HitPointType BEZIER_CONTROL_POINT_4 
 - 
BEZIER_CONTROL_POINT_5public static final HitPointType BEZIER_CONTROL_POINT_5 
 - 
BEZIER_CONTROL_POINT_6public static final HitPointType BEZIER_CONTROL_POINT_6 
 - 
BEZIER_CONTROL_POINT_7public static final HitPointType BEZIER_CONTROL_POINT_7 
 - 
BEZIER_CONTROL_POINT_8public static final HitPointType BEZIER_CONTROL_POINT_8 
 - 
SHAPE_CENTERpublic static final HitPointType SHAPE_CENTER 
 - 
SHAPE_POINT_0public static final HitPointType SHAPE_POINT_0 
 - 
SHAPE_POINT_1public static final HitPointType SHAPE_POINT_1 
 - 
SHAPE_POINT_2public static final HitPointType SHAPE_POINT_2 
 - 
SHAPE_POINT_3public static final HitPointType SHAPE_POINT_3 
 - 
SHAPE_POINT_4public static final HitPointType SHAPE_POINT_4 
 - 
SHAPE_POINT_5public static final HitPointType SHAPE_POINT_5 
 - 
SHAPE_POINT_6public static final HitPointType SHAPE_POINT_6 
 - 
SHAPE_POINT_7public static final HitPointType SHAPE_POINT_7 
 - 
SHAPE_POINT_8public static final HitPointType SHAPE_POINT_8 
 - 
SHAPE_POINT_9public static final HitPointType SHAPE_POINT_9 
 - 
TURNTABLE_RAY_0public static final HitPointType TURNTABLE_RAY_0 
 - 
TURNTABLE_RAY_1public static final HitPointType TURNTABLE_RAY_1 
 - 
TURNTABLE_RAY_2public static final HitPointType TURNTABLE_RAY_2 
 - 
TURNTABLE_RAY_3public static final HitPointType TURNTABLE_RAY_3 
 - 
TURNTABLE_RAY_4public static final HitPointType TURNTABLE_RAY_4 
 - 
TURNTABLE_RAY_5public static final HitPointType TURNTABLE_RAY_5 
 - 
TURNTABLE_RAY_6public static final HitPointType TURNTABLE_RAY_6 
 - 
TURNTABLE_RAY_7public static final HitPointType TURNTABLE_RAY_7 
 - 
TURNTABLE_RAY_8public static final HitPointType TURNTABLE_RAY_8 
 - 
TURNTABLE_RAY_9public static final HitPointType TURNTABLE_RAY_9 
 - 
TURNTABLE_RAY_10public static final HitPointType TURNTABLE_RAY_10 
 - 
TURNTABLE_RAY_11public static final HitPointType TURNTABLE_RAY_11 
 - 
TURNTABLE_RAY_12public static final HitPointType TURNTABLE_RAY_12 
 - 
TURNTABLE_RAY_13public static final HitPointType TURNTABLE_RAY_13 
 - 
TURNTABLE_RAY_14public static final HitPointType TURNTABLE_RAY_14 
 - 
TURNTABLE_RAY_15public static final HitPointType TURNTABLE_RAY_15 
 - 
TURNTABLE_RAY_16public static final HitPointType TURNTABLE_RAY_16 
 - 
TURNTABLE_RAY_17public static final HitPointType TURNTABLE_RAY_17 
 - 
TURNTABLE_RAY_18public static final HitPointType TURNTABLE_RAY_18 
 - 
TURNTABLE_RAY_19public static final HitPointType TURNTABLE_RAY_19 
 - 
TURNTABLE_RAY_20public static final HitPointType TURNTABLE_RAY_20 
 - 
TURNTABLE_RAY_21public static final HitPointType TURNTABLE_RAY_21 
 - 
TURNTABLE_RAY_22public static final HitPointType TURNTABLE_RAY_22 
 - 
TURNTABLE_RAY_23public static final HitPointType TURNTABLE_RAY_23 
 - 
TURNTABLE_RAY_24public static final HitPointType TURNTABLE_RAY_24 
 - 
TURNTABLE_RAY_25public static final HitPointType TURNTABLE_RAY_25 
 - 
TURNTABLE_RAY_26public static final HitPointType TURNTABLE_RAY_26 
 - 
TURNTABLE_RAY_27public static final HitPointType TURNTABLE_RAY_27 
 - 
TURNTABLE_RAY_28public static final HitPointType TURNTABLE_RAY_28 
 - 
TURNTABLE_RAY_29public static final HitPointType TURNTABLE_RAY_29 
 - 
TURNTABLE_RAY_30public static final HitPointType TURNTABLE_RAY_30 
 - 
TURNTABLE_RAY_31public static final HitPointType TURNTABLE_RAY_31 
 - 
TURNTABLE_RAY_32public static final HitPointType TURNTABLE_RAY_32 
 - 
TURNTABLE_RAY_33public static final HitPointType TURNTABLE_RAY_33 
 - 
TURNTABLE_RAY_34public static final HitPointType TURNTABLE_RAY_34 
 - 
TURNTABLE_RAY_35public static final HitPointType TURNTABLE_RAY_35 
 - 
TURNTABLE_RAY_36public static final HitPointType TURNTABLE_RAY_36 
 - 
TURNTABLE_RAY_37public static final HitPointType TURNTABLE_RAY_37 
 - 
TURNTABLE_RAY_38public static final HitPointType TURNTABLE_RAY_38 
 - 
TURNTABLE_RAY_39public static final HitPointType TURNTABLE_RAY_39 
 - 
TURNTABLE_RAY_40public static final HitPointType TURNTABLE_RAY_40 
 - 
TURNTABLE_RAY_41public static final HitPointType TURNTABLE_RAY_41 
 - 
TURNTABLE_RAY_42public static final HitPointType TURNTABLE_RAY_42 
 - 
TURNTABLE_RAY_43public static final HitPointType TURNTABLE_RAY_43 
 - 
TURNTABLE_RAY_44public static final HitPointType TURNTABLE_RAY_44 
 - 
TURNTABLE_RAY_45public static final HitPointType TURNTABLE_RAY_45 
 - 
TURNTABLE_RAY_46public static final HitPointType TURNTABLE_RAY_46 
 - 
TURNTABLE_RAY_47public static final HitPointType TURNTABLE_RAY_47 
 - 
TURNTABLE_RAY_48public static final HitPointType TURNTABLE_RAY_48 
 - 
TURNTABLE_RAY_49public static final HitPointType TURNTABLE_RAY_49 
 - 
TURNTABLE_RAY_50public static final HitPointType TURNTABLE_RAY_50 
 - 
TURNTABLE_RAY_51public static final HitPointType TURNTABLE_RAY_51 
 - 
TURNTABLE_RAY_52public static final HitPointType TURNTABLE_RAY_52 
 - 
TURNTABLE_RAY_53public static final HitPointType TURNTABLE_RAY_53 
 - 
TURNTABLE_RAY_54public static final HitPointType TURNTABLE_RAY_54 
 - 
TURNTABLE_RAY_55public static final HitPointType TURNTABLE_RAY_55 
 - 
TURNTABLE_RAY_56public static final HitPointType TURNTABLE_RAY_56 
 - 
TURNTABLE_RAY_57public static final HitPointType TURNTABLE_RAY_57 
 - 
TURNTABLE_RAY_58public static final HitPointType TURNTABLE_RAY_58 
 - 
TURNTABLE_RAY_59public static final HitPointType TURNTABLE_RAY_59 
 - 
TURNTABLE_RAY_60public static final HitPointType TURNTABLE_RAY_60 
 - 
TURNTABLE_RAY_61public static final HitPointType TURNTABLE_RAY_61 
 - 
TURNTABLE_RAY_62public static final HitPointType TURNTABLE_RAY_62 
 - 
TURNTABLE_RAY_63public static final HitPointType TURNTABLE_RAY_63 
 
- 
 - 
Field Detail- 
NUM_SHAPE_POINTSpublic static final int NUM_SHAPE_POINTS - See Also:
- Constant Field Values
 
 - 
NUM_BEZIER_CONTROL_POINTSpublic static final int NUM_BEZIER_CONTROL_POINTS - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
valuespublic static HitPointType[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HitPointType c : HitPointType.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static HitPointType valueOf(java.lang.String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- java.lang.IllegalArgumentException- if this enum type has no constant with the specified name
- java.lang.NullPointerException- if the argument is null
 
 - 
isConnectionHitTypeprotected static boolean isConnectionHitType(HitPointType hitType) - Parameters:
- hitType- the hit point type
- Returns:
- true if this is for a connection to a LayoutTrack
 
 - 
isControlHitTypeprotected static boolean isControlHitType(HitPointType hitType) - Parameters:
- hitType- the hit point type
- Returns:
- true if this hit type is for a layout control
 
 - 
isTurnoutHitTypeprotected static boolean isTurnoutHitType(HitPointType hitType) 
 - 
isSlipHitTypeprotected static boolean isSlipHitType(HitPointType hitType) 
 - 
isBezierHitTypeprotected static boolean isBezierHitType(HitPointType hitType) 
 - 
isLevelXingHitTypeprotected static boolean isLevelXingHitType(HitPointType hitType) 
 - 
isTurntableRayHitTypeprotected static boolean isTurntableRayHitType(HitPointType hitType) 
 - 
isPopupHitTypeprotected static boolean isPopupHitType(HitPointType hitType) - Parameters:
- hitType- the hit point type
- Returns:
- true if this is for a popup menu
 
 - 
turntableTrackIndexprotected int turntableTrackIndex() Find the 0-63 index with respect to TURNTABLE_RAY_0 of a given enum entry. ThrowsIllegalArgumentExceptionif the given enum value isn't one of the TURNTABLE_RAY_n entries.Ideally, this would be replaced by turntable code that works directly with the enum values as a step toward using objects to implement hit points. - Returns:
- (Temporary) 0-63 index of the enum element
 
 - 
turntableTrackIndexedValueprotected static HitPointType turntableTrackIndexedValue(int i) Return a specific TURNTABLE_RAY from its 0-63 index. ThrowsIllegalArgumentExceptionif the given index value isn't valid for the TURNTABLE_RAY entries.Ideally, this would be replaced by turntable code that works directly with the enum values as a step toward using objects to implement hit points. - Parameters:
- i- (Temporary) 0-63 index of the enum element
- Returns:
- Requested enum element
 
 - 
turntableValuesprotected static HitPointType[] turntableValues() Return an array of the valid TURNTABLE_RAY enum values. Meant for interations over the set of rays. Order is from 0 to 63.- Returns:
- (Temporary) Array containing TURNTABLE_RAY_0 through TURNTABLE_RAY_63
 
 - 
shapePointIndexprotected int shapePointIndex() Find the 0-9 index with respect to SHAPE_POINT_0 of a given enum entry. ThrowsIllegalArgumentExceptionif the given enum value isn't one of the SHAPE_POINT_n entries.Ideally, this would be replaced by shape code that works directly with the enum values as a step toward using objects to implement hit points. - Returns:
- (Temporary) 0-9 index of the enum element
 
 - 
shapePointIndexedValueprotected static HitPointType shapePointIndexedValue(int i) Return a specific SHAPE_POINT from its 0-9 index. ThrowsIllegalArgumentExceptionif the given index value isn't valid for the SHAPE_POINT entries.Ideally, this would be replaced by shape code that works directly with the enum values as a step toward using objects to implement hit points. - Parameters:
- i- (Temporary) 0-9 index of the enum element
- Returns:
- Requested enum element
 
 - 
shapePointValuesprotected static HitPointType[] shapePointValues() Return an array of the valid SHAPE_POINT enum values. Meant for interations over the set of points. Order is from 0 to 9.- Returns:
- (Temporary) Array containing SHAPE_POINT_0 through SHAPE_POINT_9
 
 - 
isShapePointOffsetHitPointTypeprotected static boolean isShapePointOffsetHitPointType(HitPointType t) 
 - 
bezierPointIndexprotected int bezierPointIndex() Find the 0-8 index with respect to BEZIER_CONTROL_POINT_0 of this enum entry. ThrowsIllegalArgumentExceptionif the enum value isn't one of the BEZIER_CONTROL_POINT_n entries.Ideally, this would be replaced by bezier code that works directly with the enum values as a step toward using objects to implement hit points. - Returns:
- (Temporary) 0-8 index of this enum
 
 - 
bezierPointIndexedValueprotected static HitPointType bezierPointIndexedValue(int i) Return a specific BEZIER_CONTROL_POINT from its 0-8 index. ThrowsIllegalArgumentExceptionif the given index value isn't valid for the SHAPE_POINT entries.Ideally, this would be replaced by shape code that works directly with the enum values as a step toward using objects to implement hit points. - Parameters:
- i- (Temporary) 0-8 index of the enum element
- Returns:
- Requested enum element
 
 
- 
 
-