Class DXFLinetype

  • All Implemented Interfaces:
    DXFObject

    public class DXFLinetype
    extends DXFTableRecord
    Class representing a linetype for use in LTYPE table.
    Author:
    jsevy
    • Field Detail

      • LINETYPENAME_BYBLOCK

        public static final java.lang.String LINETYPENAME_BYBLOCK
        See Also:
        Constant Field Values
      • LINETYPENAME_BYLAYER

        public static final java.lang.String LINETYPENAME_BYLAYER
        See Also:
        Constant Field Values
    • Constructor Detail

      • DXFLinetype

        public DXFLinetype​(java.lang.String name,
                           java.awt.Graphics2D graphics)
        Create a new linetype with specified name and dash pattern
        Parameters:
        name - Name of this line type table record
        graphics - Graphics instance, used to get BasicStroke indicating pattern and sizes of spaces, dots and dashes
    • Method Detail

      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String newName)
      • equals

        public boolean equals​(java.lang.Object otherLinetype)
        Equals method for use in determining if a Linetype is already present; overrides Object equals method
        Overrides:
        equals in class java.lang.Object
        Parameters:
        otherLinetype - Another linetype
        Returns:
        True if the associated linetype dash arrays are equal
      • toDXFString

        public java.lang.String toDXFString()
        Implementation of DXFObject interface method; creates DXF text representing the object.
        Specified by:
        toDXFString in interface DXFObject
        Overrides:
        toDXFString in class DXFTableRecord
      • getNextName

        public static java.lang.String getNextName()