Enum HitPointType
- All Implemented Interfaces:
Serializable,Comparable<HitPointType>,java.lang.constant.Constable
Extracted from static in constants in LayoutEditor
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionprotected intFind 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 booleanprotected static booleanisSlipHitType(HitPointType hitType) protected static booleanisTurnoutHitType(HitPointType hitType) protected static booleanisTurntableRayHitType(HitPointType hitType) protected intFind 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[]Return an array of the valid SHAPE_POINT enum values.protected intFind 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[]Return an array of the valid TURNTABLE_RAY enum values.static HitPointTypeReturns 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 Details
-
NONE
-
POS_POINT
-
TURNOUT_A
-
TURNOUT_B
-
TURNOUT_C
-
TURNOUT_D
-
LEVEL_XING_A
-
LEVEL_XING_B
-
LEVEL_XING_C
-
LEVEL_XING_D
-
TRACK
-
TURNOUT_CENTER
-
LEVEL_XING_CENTER
-
TURNTABLE_CENTER
-
LAYOUT_POS_LABEL
-
LAYOUT_POS_JCOMP
-
MULTI_SENSOR
-
MARKER
-
TRACK_CIRCLE_CENTRE
-
UNUSED_19
-
SLIP_CENTER
-
SLIP_A
-
SLIP_B
-
SLIP_C
-
SLIP_D
-
SLIP_LEFT
-
SLIP_RIGHT
-
UNUSED_27
-
UNUSED_28
-
UNUSED_29
-
BEZIER_CONTROL_POINT_0
-
BEZIER_CONTROL_POINT_1
-
BEZIER_CONTROL_POINT_2
-
BEZIER_CONTROL_POINT_3
-
BEZIER_CONTROL_POINT_4
-
BEZIER_CONTROL_POINT_5
-
BEZIER_CONTROL_POINT_6
-
BEZIER_CONTROL_POINT_7
-
BEZIER_CONTROL_POINT_8
-
SHAPE_CENTER
-
SHAPE_POINT_0
-
SHAPE_POINT_1
-
SHAPE_POINT_2
-
SHAPE_POINT_3
-
SHAPE_POINT_4
-
SHAPE_POINT_5
-
SHAPE_POINT_6
-
SHAPE_POINT_7
-
SHAPE_POINT_8
-
SHAPE_POINT_9
-
TURNTABLE_RAY_0
-
TURNTABLE_RAY_1
-
TURNTABLE_RAY_2
-
TURNTABLE_RAY_3
-
TURNTABLE_RAY_4
-
TURNTABLE_RAY_5
-
TURNTABLE_RAY_6
-
TURNTABLE_RAY_7
-
TURNTABLE_RAY_8
-
TURNTABLE_RAY_9
-
TURNTABLE_RAY_10
-
TURNTABLE_RAY_11
-
TURNTABLE_RAY_12
-
TURNTABLE_RAY_13
-
TURNTABLE_RAY_14
-
TURNTABLE_RAY_15
-
TURNTABLE_RAY_16
-
TURNTABLE_RAY_17
-
TURNTABLE_RAY_18
-
TURNTABLE_RAY_19
-
TURNTABLE_RAY_20
-
TURNTABLE_RAY_21
-
TURNTABLE_RAY_22
-
TURNTABLE_RAY_23
-
TURNTABLE_RAY_24
-
TURNTABLE_RAY_25
-
TURNTABLE_RAY_26
-
TURNTABLE_RAY_27
-
TURNTABLE_RAY_28
-
TURNTABLE_RAY_29
-
TURNTABLE_RAY_30
-
TURNTABLE_RAY_31
-
TURNTABLE_RAY_32
-
TURNTABLE_RAY_33
-
TURNTABLE_RAY_34
-
TURNTABLE_RAY_35
-
TURNTABLE_RAY_36
-
TURNTABLE_RAY_37
-
TURNTABLE_RAY_38
-
TURNTABLE_RAY_39
-
TURNTABLE_RAY_40
-
TURNTABLE_RAY_41
-
TURNTABLE_RAY_42
-
TURNTABLE_RAY_43
-
TURNTABLE_RAY_44
-
TURNTABLE_RAY_45
-
TURNTABLE_RAY_46
-
TURNTABLE_RAY_47
-
TURNTABLE_RAY_48
-
TURNTABLE_RAY_49
-
TURNTABLE_RAY_50
-
TURNTABLE_RAY_51
-
TURNTABLE_RAY_52
-
TURNTABLE_RAY_53
-
TURNTABLE_RAY_54
-
TURNTABLE_RAY_55
-
TURNTABLE_RAY_56
-
TURNTABLE_RAY_57
-
TURNTABLE_RAY_58
-
TURNTABLE_RAY_59
-
TURNTABLE_RAY_60
-
TURNTABLE_RAY_61
-
TURNTABLE_RAY_62
-
TURNTABLE_RAY_63
-
-
Field Details
-
NUM_SHAPE_POINTS
- See Also:
-
NUM_BEZIER_CONTROL_POINTS
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isConnectionHitType
- Parameters:
hitType- the hit point type- Returns:
- true if this is for a connection to a LayoutTrack
-
isControlHitType
- Parameters:
hitType- the hit point type- Returns:
- true if this hit type is for a layout control
-
isTurnoutHitType
-
isSlipHitType
-
isBezierHitType
-
isLevelXingHitType
-
isTurntableRayHitType
-
isPopupHitType
- Parameters:
hitType- the hit point type- Returns:
- true if this is for a popup menu
-
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
-
turntableTrackIndexedValue
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
-
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
-
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
-
shapePointIndexedValue
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
-
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
-
isShapePointOffsetHitPointType
-
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
-
bezierPointIndexedValue
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
-