Documentation of 'edu.rit.draw.item.Group' Java class
Group
edu.rit.draw.item

Class Group

  • All Implemented Interfaces:
    java.io.Externalizable, java.io.Serializable


    public class Group
    extends DrawingItem
    implements java.io.Externalizable
    Class Group provides a DrawingItem that consists of a group of other DrawingItems. To add drawing items to a group, call the group's append() and prepend() methods.

    The group can be scaled as a unit by calling the xScale() and yScale() methods. The group can be sheared as a unit by calling the xShear() and yShear() methods. The group can be rotated as a unit by calling the rotationAngle() method; the group is always rotated around its center point. The order in which these transforms are applied is first scaling, then shearing, then rotation.

    The group's "bounding box" is the smallest rectangle that encloses all the contained drawing items' bounding boxes, after applying the scale, shear, and rotation transforms if any. The nw(), n(), ne(), w(), c(), e(), sw(), s(), and se() methods refer to points on the group's bounding box. The setter versions of these methods translate the group so the designated point on the group's bounding box coincides with the point specified as the argument. The getter versions of these methods return the designated point on the group's bounding box.

    The group's "original bounding box" is the smallest rectangle that encloses all the contained drawing items' bounding boxes, before applying the scale, shear, and rotation transforms if any. The orig_nw(), orig_n(), orig_ne(), orig_w(), orig_c(), orig_e(), orig_sw(), orig_s(), and orig_se() methods refer to points on the group's original bounding box. The setter versions of these methods translate the group so the designated point on the group's original bounding box coincides with the point specified as the argument. The getter versions of these methods return the designated point on the group's original bounding box.

    The transform() method takes a point, applies the group's scaling, shearing, rotation, and translation transforms to the point, and returns the transformed point. You can use this method, for example, to find out where a point defined before applying transforms to the group would end up after applying transforms to the group.

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      Group()
      Construct a new empty group.
      Group(Group theGroup)
      Construct a new group that contains the same drawing items, has the same transforms, and is at the same location, as the given group.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Group add()
      Add this group to the end of the default drawing's sequence of drawing items.
      Group add(Drawing theDrawing)
      Add this group to the end of the given drawing's sequence of drawing items.
      Group addFirst()
      Add this group to the beginning of the default drawing's sequence of drawing items.
      Group addFirst(Drawing theDrawing)
      Add this group to the beginning of the given drawing's sequence of drawing items.
      Group append(DrawingItem theItem)
      Add the given drawing item to the end of this group's list of drawing items.
      Group c(double x, double y)
      Set the center point of this group's bounding box.
      Group c(Point thePoint)
      Set the center point of this group's bounding box.
      Group clear()
      Clear this group.
      Point content_c()
      Returns the center point of this group's original bounding box, without applying the group's transformations if any.
      Point content_e()
      Returns the east center point of this group's original bounding box, without applying the group's transformations if any.
      Point content_n()
      Returns the north center point of this group's original bounding box, without applying the group's transformations if any.
      Point content_ne()
      Returns the northeast corner point of this group's original bounding box, without applying the group's transformations if any.
      Point content_nw()
      Returns the northwest corner point of this group's original bounding box, without applying the group's transformations if any.
      Point content_s()
      Returns the south center point of this group's original bounding box, without applying the group's transformations if any.
      Point content_se()
      Returns the southeast corner point of this group's original bounding box, without applying the group's transformations if any.
      Point content_sw()
      Returns the southwest corner point of this group's original bounding box, without applying the group's transformations if any.
      Point content_w()
      Returns the west center point of this group's original bounding box, without applying the group's transformations if any.
      static double defaultRotationAngle()
      Returns the default rotation angle.
      static void defaultRotationAngle(double theAngle)
      Set the default rotation angle.
      static double defaultXScale()
      Returns the default X scale factor.
      static void defaultXScale(double theXScale)
      Set the default X scale factor.
      static double defaultXShear()
      Returns the default X shear factor.
      static void defaultXShear(double theXShear)
      Set the default X shear factor.
      static double defaultYScale()
      Returns the default Y scale factor.
      static void defaultYScale(double theYScale)
      Set the default Y scale factor.
      static double defaultYShear()
      Returns the default Y shear factor.
      static void defaultYShear(double theYShear)
      Set the default Y shear factor.
      void draw(java.awt.Graphics2D g2d)
      Draw this drawing item in the given graphics context.
      Group e(double x, double y)
      Set the east middle point of this group's bounding box.
      Group e(Point thePoint)
      Set the east middle point of this group's bounding box.
      double height()
      Returns the height of this group's bounding box.
      Group n(double x, double y)
      Set the north middle point of this group's bounding box.
      Group n(Point thePoint)
      Set the north middle point of this group's bounding box.
      Group ne(double x, double y)
      Set the northeast corner point of this group's bounding box.
      Group ne(Point thePoint)
      Set the northeast corner point of this group's bounding box.
      Point nw()
      Returns the northwest corner point of this group's bounding box.
      Group nw(double x, double y)
      Set the northwest corner point of this group's bounding box.
      Group nw(Point thePoint)
      Set the northwest corner point of this group's bounding box.
      Point orig_c()
      Returns the center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_c(double x, double y)
      Set the center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_c(Point thePoint)
      Set the center point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_e()
      Returns the east center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_e(double x, double y)
      Set the east center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_e(Point thePoint)
      Set the east center point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_n()
      Returns the north center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_n(double x, double y)
      Set the north center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_n(Point thePoint)
      Set the north center point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_ne()
      Returns the northeast corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_ne(double x, double y)
      Set the northeast corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_ne(Point thePoint)
      Set the northeast corner point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_nw()
      Returns the northwest corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_nw(double x, double y)
      Set the northwest corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_nw(Point thePoint)
      Set the northwest corner point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_s()
      Returns the south center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_s(double x, double y)
      Set the south center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_s(Point thePoint)
      Set the south center point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_se()
      Returns the southeast corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_se(double x, double y)
      Set the southeast corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_se(Point thePoint)
      Set the southeast corner point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_sw()
      Returns the southwest corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_sw(double x, double y)
      Set the southwest corner point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_sw(Point thePoint)
      Set the southwest corner point of this group's original bounding box, after applying the group's transformations if any.
      Point orig_w()
      Returns the west center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_w(double x, double y)
      Set the west center point of this group's original bounding box, after applying the group's transformations if any.
      Group orig_w(Point thePoint)
      Set the west center point of this group's original bounding box, after applying the group's transformations if any.
      Group prepend(DrawingItem theItem)
      Add the given drawing item to the beginning of this group's list of drawing items.
      void readExternal(java.io.ObjectInput in)
      Read this group from the given object input stream.
      double rotationAngle()
      Returns this group's rotation angle.
      Group rotationAngle(double theAngle)
      Set this group's rotation angle.
      Group s(double x, double y)
      Set the south middle point of this group's bounding box.
      Group s(Point thePoint)
      Set the south middle point of this group's bounding box.
      Group se(double x, double y)
      Set the southeast corner point of this group's bounding box.
      Group se(Point thePoint)
      Set the southeast corner point of this group's bounding box.
      Size size()
      Returns the size of this group's bounding box.
      Group sw(double x, double y)
      Set the southwest corner point of this group's bounding box.
      Group sw(Point thePoint)
      Set the southwest corner point of this group's bounding box.
      Point transform(Point thePoint)
      Transform the given point by applying this group's scaling, shearing, rotation, and translation transforms.
      Group w(double x, double y)
      Set the west middle point of this group's bounding box.
      Group w(Point thePoint)
      Set the west middle point of this group's bounding box.
      double width()
      Returns the width of this group's bounding box.
      void writeExternal(java.io.ObjectOutput out)
      Write this group to the given object output stream.
      double xScale()
      Returns this group's X scale factor.
      Group xScale(double theXScale)
      Set this group's X scale factor.
      double xShear()
      Returns this group's X shear factor.
      Group xShear(double theXShear)
      Set this group's X shear factor.
      double yScale()
      Returns this group's Y scale factor.
      Group yScale(double theYScale)
      Set this group's Y scale factor.
      double yShear()
      Returns this group's Y shear factor.
      Group yShear(double theYShear)
      Set this group's Y shear factor.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NORMAL_X_SCALE

        public static final double NORMAL_X_SCALE
        The normal X scale factor (1).
        See Also:
        Constant Field Values
      • NORMAL_Y_SCALE

        public static final double NORMAL_Y_SCALE
        The normal Y scale factor (1).
        See Also:
        Constant Field Values
      • NORMAL_X_SHEAR

        public static final double NORMAL_X_SHEAR
        The normal X shear factor (0).
        See Also:
        Constant Field Values
      • NORMAL_Y_SHEAR

        public static final double NORMAL_Y_SHEAR
        The normal Y shear factor (0).
        See Also:
        Constant Field Values
      • NORMAL_ROTATION_ANGLE

        public static final double NORMAL_ROTATION_ANGLE
        The normal rotation angle (0).
        See Also:
        Constant Field Values
    • Constructor Detail

      • Group

        public Group()
        Construct a new empty group. The group's northwest corner is located at (0,0).
      • Group

        public Group(Group theGroup)
        Construct a new group that contains the same drawing items, has the same transforms, and is at the same location, as the given group.
        Parameters:
        theGroup - Group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theGroup is null.
    • Method Detail

      • defaultXScale

        public static double defaultXScale()
        Returns the default X scale factor.
        Returns:
        Default X scale factor.
      • defaultXScale

        public static void defaultXScale(double theXScale)
        Set the default X scale factor. Before calling this method the first time, the default X scale factor is 1.
        Parameters:
        theXScale - Default X scale factor.
      • defaultYScale

        public static double defaultYScale()
        Returns the default Y scale factor.
        Returns:
        Default Y scale factor.
      • defaultYScale

        public static void defaultYScale(double theYScale)
        Set the default Y scale factor. Before calling this method the first time, the default Y scale factor is 1.
        Parameters:
        theYScale - Default Y scale factor.
      • defaultXShear

        public static double defaultXShear()
        Returns the default X shear factor.
        Returns:
        Default X shear factor.
      • defaultXShear

        public static void defaultXShear(double theXShear)
        Set the default X shear factor. Before calling this method the first time, the default X shear factor is 0.
        Parameters:
        theXShear - Default X shear factor.
      • defaultYShear

        public static double defaultYShear()
        Returns the default Y shear factor.
        Returns:
        Default Y shear factor.
      • defaultYShear

        public static void defaultYShear(double theYShear)
        Set the default Y shear factor. Before calling this method the first time, the default Y shear factor is 0.
        Parameters:
        theYShear - Default Y shear factor.
      • defaultRotationAngle

        public static double defaultRotationAngle()
        Returns the default rotation angle.
        Returns:
        Default rotation angle.
      • defaultRotationAngle

        public static void defaultRotationAngle(double theAngle)
        Set the default rotation angle. Before calling this method the first time, the default rotation angle is 0.
        Parameters:
        theAngle - Default rotation angle.
      • xScale

        public double xScale()
        Returns this group's X scale factor.
        Returns:
        X scale factor.
      • xScale

        public Group xScale(double theXScale)
        Set this group's X scale factor.
        Parameters:
        theXScale - X scale factor.
        Returns:
        This group.
      • yScale

        public double yScale()
        Returns this group's Y scale factor.
        Returns:
        Y scale factor.
      • yScale

        public Group yScale(double theYScale)
        Set this group's Y scale factor.
        Parameters:
        theYScale - Y scale factor.
        Returns:
        This group.
      • xShear

        public double xShear()
        Returns this group's X shear factor.
        Returns:
        X shear factor.
      • xShear

        public Group xShear(double theXShear)
        Set this group's X shear factor.
        Parameters:
        theXShear - X shear factor.
        Returns:
        This group.
      • yShear

        public double yShear()
        Returns this group's Y shear factor.
        Returns:
        Y shear factor.
      • yShear

        public Group yShear(double theYShear)
        Set this group's Y shear factor.
        Parameters:
        theYShear - Y shear factor.
        Returns:
        This group.
      • rotationAngle

        public double rotationAngle()
        Returns this group's rotation angle.
        Returns:
        Rotation angle.
      • rotationAngle

        public Group rotationAngle(double theAngle)
        Set this group's rotation angle.
        Parameters:
        theAngle - Rotation angle.
        Returns:
        This group.
      • clear

        public Group clear()
        Clear this group. All drawing items in this group are removed.
        Returns:
        This group.
      • append

        public Group append(DrawingItem theItem)
        Add the given drawing item to the end of this group's list of drawing items.
        Parameters:
        theItem - Drawing item.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theItem is null.
      • prepend

        public Group prepend(DrawingItem theItem)
        Add the given drawing item to the beginning of this group's list of drawing items.
        Parameters:
        theItem - Drawing item.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theItem is null.
      • size

        public Size size()
        Returns the size of this group's bounding box.
        Overrides:
        size in class DrawingItem
        Returns:
        Size.
      • width

        public double width()
        Returns the width of this group's bounding box.
        Specified by:
        width in class DrawingItem
        Returns:
        Width.
      • height

        public double height()
        Returns the height of this group's bounding box.
        Specified by:
        height in class DrawingItem
        Returns:
        Height.
      • nw

        public Point nw()
        Returns the northwest corner point of this group's bounding box.
        Specified by:
        nw in class DrawingItem
        Returns:
        Northwest corner point.
      • nw

        public Group nw(double x,
                        double y)
        Set the northwest corner point of this group's bounding box.
        Parameters:
        x - X coordinate of northwest corner point.
        y - Y coordinate of northwest corner point.
        Returns:
        This group.
      • nw

        public Group nw(Point thePoint)
        Set the northwest corner point of this group's bounding box.
        Parameters:
        thePoint - Northwest corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • n

        public Group n(double x,
                       double y)
        Set the north middle point of this group's bounding box.
        Parameters:
        x - X coordinate of north middle point.
        y - Y coordinate of north middle point.
        Returns:
        This group.
      • n

        public Group n(Point thePoint)
        Set the north middle point of this group's bounding box.
        Parameters:
        thePoint - North middle point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • ne

        public Group ne(double x,
                        double y)
        Set the northeast corner point of this group's bounding box.
        Parameters:
        x - X coordinate of northeast corner point.
        y - Y coordinate of northeast corner point.
        Returns:
        This group.
      • ne

        public Group ne(Point thePoint)
        Set the northeast corner point of this group's bounding box.
        Parameters:
        thePoint - Northeast corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • w

        public Group w(double x,
                       double y)
        Set the west middle point of this group's bounding box.
        Parameters:
        x - X coordinate of west middle point.
        y - Y coordinate of west middle point.
        Returns:
        This group.
      • w

        public Group w(Point thePoint)
        Set the west middle point of this group's bounding box.
        Parameters:
        thePoint - West middle point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • c

        public Group c(double x,
                       double y)
        Set the center point of this group's bounding box.
        Parameters:
        x - X coordinate of center point.
        y - Y coordinate of center point.
        Returns:
        This group.
      • c

        public Group c(Point thePoint)
        Set the center point of this group's bounding box.
        Parameters:
        thePoint - Center point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • e

        public Group e(double x,
                       double y)
        Set the east middle point of this group's bounding box.
        Parameters:
        x - X coordinate of east middle point.
        y - Y coordinate of east middle point.
        Returns:
        This group.
      • e

        public Group e(Point thePoint)
        Set the east middle point of this group's bounding box.
        Parameters:
        thePoint - East middle point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • sw

        public Group sw(double x,
                        double y)
        Set the southwest corner point of this group's bounding box.
        Parameters:
        x - X coordinate of southwest corner point.
        y - Y coordinate of southwest corner point.
        Returns:
        This group.
      • sw

        public Group sw(Point thePoint)
        Set the southwest corner point of this group's bounding box.
        Parameters:
        thePoint - Southwest corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • s

        public Group s(double x,
                       double y)
        Set the south middle point of this group's bounding box.
        Parameters:
        x - X coordinate of south middle point.
        y - Y coordinate of south middle point.
        Returns:
        This group.
      • s

        public Group s(Point thePoint)
        Set the south middle point of this group's bounding box.
        Parameters:
        thePoint - South middle point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • se

        public Group se(double x,
                        double y)
        Set the southeast corner point of this group's bounding box.
        Parameters:
        x - X coordinate of southeast corner point.
        y - Y coordinate of southeast corner point.
        Returns:
        This group.
      • se

        public Group se(Point thePoint)
        Set the southeast corner point of this group's bounding box.
        Parameters:
        thePoint - Southeast corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_nw

        public Point orig_nw()
        Returns the northwest corner point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        Northwest corner point.
      • orig_nw

        public Group orig_nw(double x,
                             double y)
        Set the northwest corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of northwest corner point.
        y - Y coordinate of northwest corner point.
        Returns:
        This group.
      • orig_nw

        public Group orig_nw(Point thePoint)
        Set the northwest corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - Northwest corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_n

        public Point orig_n()
        Returns the north center point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        North center point.
      • orig_n

        public Group orig_n(double x,
                            double y)
        Set the north center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of north center point.
        y - Y coordinate of north center point.
        Returns:
        This group.
      • orig_n

        public Group orig_n(Point thePoint)
        Set the north center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - North center point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_ne

        public Point orig_ne()
        Returns the northeast corner point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        Northeast corner point.
      • orig_ne

        public Group orig_ne(double x,
                             double y)
        Set the northeast corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of northeast corner point.
        y - Y coordinate of northeast corner point.
        Returns:
        This group.
      • orig_ne

        public Group orig_ne(Point thePoint)
        Set the northeast corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - Northeast corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_w

        public Point orig_w()
        Returns the west center point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        West center point.
      • orig_w

        public Group orig_w(double x,
                            double y)
        Set the west center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of west center point.
        y - Y coordinate of west center point.
        Returns:
        This group.
      • orig_w

        public Group orig_w(Point thePoint)
        Set the west center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - West center point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_c

        public Point orig_c()
        Returns the center point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        Center point.
      • orig_c

        public Group orig_c(double x,
                            double y)
        Set the center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of center point.
        y - Y coordinate of center point.
        Returns:
        This group.
      • orig_c

        public Group orig_c(Point thePoint)
        Set the center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - Center point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_e

        public Point orig_e()
        Returns the east center point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        East center point.
      • orig_e

        public Group orig_e(double x,
                            double y)
        Set the east center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of east center point.
        y - Y coordinate of east center point.
        Returns:
        This group.
      • orig_e

        public Group orig_e(Point thePoint)
        Set the east center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - East center point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_sw

        public Point orig_sw()
        Returns the southwest corner point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        Southwest corner point.
      • orig_sw

        public Group orig_sw(double x,
                             double y)
        Set the southwest corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of southwest corner point.
        y - Y coordinate of southwest corner point.
        Returns:
        This group.
      • orig_sw

        public Group orig_sw(Point thePoint)
        Set the southwest corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - Southwest corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_s

        public Point orig_s()
        Returns the south center point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        South center point.
      • orig_s

        public Group orig_s(double x,
                            double y)
        Set the south center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of south center point.
        y - Y coordinate of south center point.
        Returns:
        This group.
      • orig_s

        public Group orig_s(Point thePoint)
        Set the south center point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - South center point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • orig_se

        public Point orig_se()
        Returns the southeast corner point of this group's original bounding box, after applying the group's transformations if any.
        Returns:
        Southeast corner point.
      • orig_se

        public Group orig_se(double x,
                             double y)
        Set the southeast corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        x - X coordinate of southeast corner point.
        y - Y coordinate of southeast corner point.
        Returns:
        This group.
      • orig_se

        public Group orig_se(Point thePoint)
        Set the southeast corner point of this group's original bounding box, after applying the group's transformations if any.
        Parameters:
        thePoint - Southeast corner point.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if thePoint is null.
      • content_nw

        public Point content_nw()
        Returns the northwest corner point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        Northwest corner point.
      • content_n

        public Point content_n()
        Returns the north center point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        North center point.
      • content_ne

        public Point content_ne()
        Returns the northeast corner point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        Northeast corner point.
      • content_w

        public Point content_w()
        Returns the west center point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        West center point.
      • content_c

        public Point content_c()
        Returns the center point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        Center point.
      • content_e

        public Point content_e()
        Returns the east center point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        East center point.
      • content_sw

        public Point content_sw()
        Returns the southwest corner point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        Southwest corner point.
      • content_s

        public Point content_s()
        Returns the south center point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        South center point.
      • content_se

        public Point content_se()
        Returns the southeast corner point of this group's original bounding box, without applying the group's transformations if any.
        Returns:
        Southeast corner point.
      • add

        public Group add()
        Add this group to the end of the default drawing's sequence of drawing items.
        Overrides:
        add in class DrawingItem
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if there is no default drawing.
        See Also:
        Drawing.defaultDrawing()
      • add

        public Group add(Drawing theDrawing)
        Add this group to the end of the given drawing's sequence of drawing items.
        Overrides:
        add in class DrawingItem
        Parameters:
        theDrawing - Drawing.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theDrawing is null.
      • addFirst

        public Group addFirst()
        Add this group to the beginning of the default drawing's sequence of drawing items.
        Overrides:
        addFirst in class DrawingItem
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if there is no default drawing.
        See Also:
        Drawing.defaultDrawing()
      • addFirst

        public Group addFirst(Drawing theDrawing)
        Add this group to the beginning of the given drawing's sequence of drawing items.
        Overrides:
        addFirst in class DrawingItem
        Parameters:
        theDrawing - Drawing.
        Returns:
        This group.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theDrawing is null.
      • writeExternal

        public void writeExternal(java.io.ObjectOutput out)
                           throws java.io.IOException
        Write this group to the given object output stream.
        Specified by:
        writeExternal in interface java.io.Externalizable
        Overrides:
        writeExternal in class DrawingItem
        Parameters:
        out - Object output stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
      • readExternal

        public void readExternal(java.io.ObjectInput in)
                          throws java.io.IOException,
                                 java.lang.ClassNotFoundException
        Read this group from the given object input stream.
        Specified by:
        readExternal in interface java.io.Externalizable
        Overrides:
        readExternal in class DrawingItem
        Parameters:
        in - Object input stream.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.
        java.lang.ClassNotFoundException - Thrown if any class needed to deserialize this group cannot be found.
      • draw

        public void draw(java.awt.Graphics2D g2d)
        Draw this drawing item in the given graphics context. This method is allowed to change the graphics context's paint, stroke, and transform, and it doesn't have to change them back.
        Overrides:
        draw in class DrawingItem
        Parameters:
        g2d - 2-D graphics context.
      • transform

        public Point transform(Point thePoint)
        Transform the given point by applying this group's scaling, shearing, rotation, and translation transforms.
        Parameters:
        thePoint - Point before applying transforms.
        Returns:
        Point after applying transforms.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.