Package wprover

Class CClass

    • Constructor Summary

      Constructors 
      Constructor Description
      CClass​(int type)
      Constructs a CClass object with the specified type.
      CClass​(CClass c)
      Constructs a CClass object by copying another CClass object.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void copy​(CClass c)
      Copies attributes from another CClass object.
      void draw​(java.awt.Graphics2D g2)
      Draws the geometry item using the given Graphics2D object.
      int get_type()
      Gets the type of the geometry item.
      java.awt.Color getColor()
      Gets the color of the geometry item.
      int getColorIndex()
      Gets the color index of the geometry item.
      abstract java.lang.String getDescription()
      Gets the description of the geometry item.
      java.lang.String getname()
      Gets the name of the geometry item.
      java.lang.String getPSLineString​(int x1, int y1, int x2, int y2)
      Gets the PostScript line string representation of the geometry item.
      boolean hasNameSet()
      Checks if the geometry item has a name set.
      boolean isdraw()
      Determines if the geometry item should be drawn.
      void Load​(java.io.DataInputStream in, DrawProcess dp)
      Loads the geometry item from a data input stream.
      void Save​(java.io.DataOutputStream out)
      Saves the geometry item to a data output stream.
      abstract void SavePS​(java.io.FileOutputStream fp, int stype)
      Saves the geometry item to a PostScript file.
      void saveSuper​(java.io.FileOutputStream fp)
      Saves the geometry item to a PostScript file.
      void saveSuperColor​(java.io.FileOutputStream fp)
      Saves the color of the geometry item to a PostScript file.
      void setAttr​(CClass c)
      Sets attributes for the geometry item by copying another CClass object.
      void setAttrAux()
      Sets auxiliary attributes for the geometry item.
      void setColor​(int c)
      Sets the color for the geometry item.
      void setDash​(int d)
      Sets the dash style for the geometry item.
      void setInFlashing​(boolean flash)
      Sets the flashing mode for the geometry item.
      void setWidth​(int index)
      Sets the width for the geometry item.
      void stopFlash()
      Stops the flashing mode for the geometry item.
      java.lang.String toString()
      Returns the string representation of the geometry item.
      abstract java.lang.String TypeString()
      Gets the type string of the geometry item.
      boolean visible()
      Determines if the geometry item is visible.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CClass

        public CClass​(CClass c)
        Constructs a CClass object by copying another CClass object.
        Parameters:
        c - the CClass object to copy
      • CClass

        public CClass​(int type)
        Constructs a CClass object with the specified type.
        Parameters:
        type - the type of the geometry item
    • Method Detail

      • get_type

        public int get_type()
        Gets the type of the geometry item.
        Returns:
        the type of the geometry item
      • setInFlashing

        public void setInFlashing​(boolean flash)
        Sets the flashing mode for the geometry item.
        Parameters:
        flash - true to enable flashing, false to disable
      • stopFlash

        public void stopFlash()
        Stops the flashing mode for the geometry item.
      • isdraw

        public boolean isdraw()
        Determines if the geometry item should be drawn.
        Returns:
        true if the item should be drawn, false otherwise
      • visible

        public boolean visible()
        Determines if the geometry item is visible.
        Returns:
        true if the item is visible, false otherwise
      • setAttrAux

        public void setAttrAux()
        Sets auxiliary attributes for the geometry item.
      • setAttr

        public void setAttr​(CClass c)
        Sets attributes for the geometry item by copying another CClass object.
        Parameters:
        c - the CClass object to copy attributes from
      • copy

        public void copy​(CClass c)
        Copies attributes from another CClass object.
        Parameters:
        c - the CClass object to copy attributes from
      • setDash

        public void setDash​(int d)
        Sets the dash style for the geometry item.
        Parameters:
        d - the dash style index
      • setWidth

        public void setWidth​(int index)
        Sets the width for the geometry item.
        Parameters:
        index - the width index
      • getname

        public java.lang.String getname()
        Gets the name of the geometry item.
        Returns:
        the name of the geometry item
      • hasNameSet

        public boolean hasNameSet()
        Checks if the geometry item has a name set.
        Returns:
        true if the item has a name set, false otherwise
      • getColor

        public java.awt.Color getColor()
        Gets the color of the geometry item.
        Returns:
        the color of the geometry item
      • getColorIndex

        public int getColorIndex()
        Gets the color index of the geometry item.
        Returns:
        the color index of the geometry item
      • draw

        public void draw​(java.awt.Graphics2D g2)
        Draws the geometry item using the given Graphics2D object.
        Parameters:
        g2 - the Graphics2D object
      • setColor

        public void setColor​(int c)
        Sets the color for the geometry item.
        Parameters:
        c - the color index
      • TypeString

        public abstract java.lang.String TypeString()
        Gets the type string of the geometry item.
        Returns:
        the type string of the geometry item
      • getDescription

        public abstract java.lang.String getDescription()
        Gets the description of the geometry item.
        Returns:
        the description of the geometry item
      • toString

        public java.lang.String toString()
        Returns the string representation of the geometry item.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the string representation of the geometry item
      • SavePS

        public abstract void SavePS​(java.io.FileOutputStream fp,
                                    int stype)
                             throws java.io.IOException
        Saves the geometry item to a PostScript file.
        Parameters:
        fp - the file output stream
        stype - the show type
        Throws:
        java.io.IOException - if an I/O error occurs
      • saveSuperColor

        public void saveSuperColor​(java.io.FileOutputStream fp)
                            throws java.io.IOException
        Saves the color of the geometry item to a PostScript file.
        Parameters:
        fp - the file output stream
        Throws:
        java.io.IOException - if an I/O error occurs
      • saveSuper

        public void saveSuper​(java.io.FileOutputStream fp)
                       throws java.io.IOException
        Saves the geometry item to a PostScript file.
        Parameters:
        fp - the file output stream
        Throws:
        java.io.IOException - if an I/O error occurs
      • getPSLineString

        public java.lang.String getPSLineString​(int x1,
                                                int y1,
                                                int x2,
                                                int y2)
        Gets the PostScript line string representation of the geometry item.
        Parameters:
        x1 - the x-coordinate of the starting point
        y1 - the y-coordinate of the starting point
        x2 - the x-coordinate of the ending point
        y2 - the y-coordinate of the ending point
        Returns:
        the PostScript line string representation
      • Save

        public void Save​(java.io.DataOutputStream out)
                  throws java.io.IOException
        Saves the geometry item to a data output stream.
        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 geometry item from a data input stream.
        Parameters:
        in - the data input stream
        dp - the draw process
        Throws:
        java.io.IOException - if an I/O error occurs