Class PicGroup

    • Constructor Detail

      • PicGroup

        public PicGroup()
        construct a PicGroup with no parent and a default PicAttributeSet
      • PicGroup

        public PicGroup​(PicAttributeSet attributeSet)
        construct a PicGroup with no parent and the given PicAttributeSet
      • PicGroup

        public PicGroup​(BranchElement src)
        Cloning constructor. Simply call superclass's constructor.
      • PicGroup

        public PicGroup​(java.util.Collection c)
        Simply call superclass's constructor.
    • Method Detail

      • clone

        public java.lang.Object clone()
        Return a deep copy of this PicGroup
        Specified by:
        clone in interface Element
        Specified by:
        clone in class BranchElement
        Returns:
        a clone of this element
        Since:
        PicEdt 1.0
      • getName

        public java.lang.String getName()
        Description copied from interface: Element
        Return a non-localised string representing this element's name. This may be used by a UI to display some information related to this element, or by a localizer to fetch a i18n'd string.
        Specified by:
        getName in interface Element
        Returns:
        a localised string that represents this object's name
      • getFirstPointIndex

        public int getFirstPointIndex()
        Description copied from interface: Element
        Return the index of the first user-controlled point that can be retrieved by getPoint()
        Specified by:
        getFirstPointIndex in interface Element
        Overrides:
        getFirstPointIndex in class BranchElement
        Returns:
        the index of the first point that can be retrieved by getPoint This default implementation returns 0.
      • getLastPointIndex

        public int getLastPointIndex()
        Description copied from interface: Element
        Return the index of the last user-controlled point that can be retrieved by getPoint()
        Specified by:
        getLastPointIndex in interface Element
        Overrides:
        getLastPointIndex in class BranchElement
        Returns:
        the index of the last point that can be retrieved by getPoint This default implementation returns the greater index allowed in ptsX (or ptsY).
      • getPointX

        public double getPointX​(int numPoint)
        Description copied from interface: Element
        Same as getPoint(), yet return the x-coordinate only.
        Specified by:
        getPointX in interface Element
        Overrides:
        getPointX in class BranchElement
        Parameters:
        numPoint - the point index, should be greater or equal to the value returned by getFirstPointIndex, and lower or equal to getLastPointIndex.
        Returns:
        the X-coord of the point indexed by numPoint.
        Since:
        PicEdt 1.0
      • getPointY

        public double getPointY​(int numPoint)
        Description copied from class: BranchElement
        This default implementation returns ptsY[numPoint].This might be a valid implementation as long as subclasses don't have other control points.
        Specified by:
        getPointY in interface Element
        Overrides:
        getPointY in class BranchElement
        Parameters:
        numPoint - the point index, should be greater or equal to the value returned by getFirstPointIndex, and lower or equal to getLastPointIndex.
        Returns:
        the Y-coord of the point indexed by numPoint.
        Since:
        PicEdt 1.0
      • setPoint

        public void setPoint​(int numPoint,
                             PicPoint ptNew,
                             EditPointConstraint constraint)
        Set the point numbered by "numPoint" to the "pt" value, and scales inward object accordingly
        Specified by:
        setPoint in interface Element
        Overrides:
        setPoint in class BranchElement
        Parameters:
        constraint - not used here, may be safely set to null
        Since:
        PicEdt 1.0
      • anchorPointsIterator

        public PointIndexIterator anchorPointsIterator()
        Description copied from class: AbstractElement
        Create an Iterator over points that can serve as anchor points for grid alignment. This implementation returns a DefaultPointIndexIterator which simply iterates through all user-controlled points in ascending order.
        Specified by:
        anchorPointsIterator in interface Element
        Overrides:
        anchorPointsIterator in class AbstractElement
        Returns:
        an Iterator over points that can serve as anchor points for grid alignment. This implementation returns a default PointIterator which simply iterates through control points.
      • toString

        public java.lang.String toString()
        Returns a String representing the group for debugging use only.
        Overrides:
        toString in class BranchElement
      • createActions

        public PEAction[] createActions​(ActionDispatcher actionDispatcher,
                                        ActionLocalizer localizer,
                                        HitInfo hi)
        Creates an array of Action's related to this object
        Specified by:
        createActions in interface ActionFactory
        Parameters:
        actionDispatcher - dispatcher used to create a PEAction
        localizer - used to localizer action parameters
        hi - a HitInfo containing information related to the mouse-event which triggered the popup menu.