Package wprover

Class Cedmark


  • public class Cedmark
    extends CClass
    Represents a Cedmark object, which is a type of equality mark in a geometric drawing. It extends the CClass class and provides methods for drawing and saving the equality mark.
    • Constructor Detail

      • Cedmark

        public Cedmark()
        Default constructor for Cedmark.
      • Cedmark

        public Cedmark​(CPoint pp1,
                       CPoint pp2)
        Constructs a Cedmark object with the specified points.
        Parameters:
        pp1 - the first point
        pp2 - the second point
      • Cedmark

        public Cedmark​(CPoint pp1,
                       CPoint pp2,
                       int d)
        Constructs a Cedmark object with the specified points and number of marks.
        Parameters:
        pp1 - the first point
        pp2 - the second point
        d - the number of marks
    • Method Detail

      • getLength

        public int getLength()
        Gets the length of the equality mark.
        Returns:
        the length of the equality mark
      • setLength

        public void setLength​(int n)
        Sets the length of the equality mark.
        Parameters:
        n - the length to set
      • getNum

        public int getNum()
        Gets the number of equality marks.
        Returns:
        the number of equality marks
      • setNum

        public void setNum​(int n)
        Sets the number of equality marks.
        Parameters:
        n - the number to set
      • setdnum

        public void setdnum​(int d)
        Sets the number of equality marks.
        Parameters:
        d - the number of marks to set
      • TypeString

        public java.lang.String TypeString()
        Gets the type string of the equality mark.
        Specified by:
        TypeString in class CClass
        Returns:
        the type string of the equality mark
      • getDescription

        public java.lang.String getDescription()
        Gets the description of the equality mark.
        Specified by:
        getDescription in class CClass
        Returns:
        the description of the equality mark
      • draw

        public void draw​(java.awt.Graphics2D g2)
        Draws the equality mark using the given Graphics2D object.
        Overrides:
        draw in class CClass
        Parameters:
        g2 - the Graphics2D object
      • drawALine

        public void drawALine​(double x,
                              double y,
                              double dx,
                              double dy,
                              java.awt.Graphics2D g2)
        Draws a line for the equality mark.
        Parameters:
        x - the x-coordinate of the start point
        y - the y-coordinate of the start point
        dx - the x-direction
        dy - the y-direction
        g2 - the Graphics2D object
      • savePsLine

        public void savePsLine​(double x,
                               double y,
                               double dx,
                               double dy,
                               java.io.FileOutputStream fp)
                        throws java.io.IOException
        Saves the equality mark line to a PostScript file.
        Parameters:
        x - the x-coordinate of the start point
        y - the y-coordinate of the start point
        dx - the x-direction
        dy - the y-direction
        fp - the file output stream
        Throws:
        java.io.IOException - if an I/O error occurs
      • SavePS

        public void SavePS​(java.io.FileOutputStream fp,
                           int stype)
                    throws java.io.IOException
        Saves the equality mark to a PostScript file.
        Specified by:
        SavePS in class CClass
        Parameters:
        fp - the file output stream
        stype - the show type
        Throws:
        java.io.IOException - if an I/O error occurs
      • Save

        public void Save​(java.io.DataOutputStream out)
                  throws java.io.IOException
        Saves the equality mark data to an output stream.
        Overrides:
        Save in class CClass
        Parameters:
        out - the data output stream
        Throws:
        java.io.IOException - if an I/O error occurs
      • Load

        public void Load​(java.io.DataInputStream in,
                         DrawProcess dp)
                  throws java.io.IOException
        Loads the equality mark data from an input stream.
        Overrides:
        Load in class CClass
        Parameters:
        in - the data input stream
        dp - the draw process
        Throws:
        java.io.IOException - if an I/O error occurs