Class AbstractSegment

  • All Implemented Interfaces:
    Segment
    Direct Known Subclasses:
    TextSegment

    public abstract class AbstractSegment
    extends java.lang.Object
    implements Segment
    Abstract base class for Segment implementations.
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractSegment()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getWidth()
      Returns the width to display the segment.
      protected int getX()
      Returns the x-coordinate to display the segment.
      protected int getY()
      Returns the y-coordinate to display the segment.
      void setWidth​(int width)
      Sets the width to display the segment.
      void setX​(int x)
      Sets the x-coordinate to display the segment.
      void setY​(int y)
      Sets the y-coordinate to display the segment.
      • Methods inherited from class java.lang.Object

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

      • AbstractSegment

        public AbstractSegment()
    • Method Detail

      • setX

        public void setX​(int x)
        Description copied from interface: Segment
        Sets the x-coordinate to display the segment.
        Specified by:
        setX in interface Segment
        Parameters:
        x - the x-coordinate
      • getX

        protected int getX()
        Returns the x-coordinate to display the segment.
        Returns:
        the x-coordinate
      • setY

        public void setY​(int y)
        Description copied from interface: Segment
        Sets the y-coordinate to display the segment.
        Specified by:
        setY in interface Segment
        Parameters:
        y - the y-coordinate
      • getY

        protected int getY()
        Returns the y-coordinate to display the segment.
        Returns:
        the y-coordinate
      • setWidth

        public void setWidth​(int width)
        Description copied from interface: Segment
        Sets the width to display the segment.
        Specified by:
        setWidth in interface Segment
        Parameters:
        width - the width
      • getWidth

        protected int getWidth()
        Returns the width to display the segment.
        Returns:
        the width