All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Enclosing class:
Ruler

public static class Ruler.XAxis extends Ruler
See Also:
  • Constructor Details

  • Method Details

    • initMarker

      protected void initMarker(GeneralPath markerShape)
      Description copied from class: Ruler
      Create a shape to indicate the curser position (a.k.a. the "marker")
      Specified by:
      initMarker in class Ruler
    • updateMarker

      protected void updateMarker(MouseEvent event)
      Specified by:
      updateMarker in class Ruler
    • translateMarker

      protected void translateMarker(Graphics g, int marker)
      Description copied from class: Ruler
      Given the distance marker in pixels, translate the graphics context so that drawing the shape created by #getMarkerPosition(MouseEvent) will be at the correct position.
      Specified by:
      translateMarker in class Ruler
    • offset

      protected int offset(Rectangle r)
      Description copied from class: Ruler
      Whats the offset position for the given rectangle in this ruler's dimension? (i.e. for a horizontal ruler it would be r.x)
      Specified by:
      offset in class Ruler
      Parameters:
      r - The rectangle in question.
    • extent

      protected int extent(Rectangle r)
      Description copied from class: Ruler
      Whats the extent of the given rectangle in this ruler's dimension? (i.e. for a horizontal ruler it would be r.width)
      Specified by:
      extent in class Ruler
      Parameters:
      r - The rectangle in question.
    • paintTick

      protected void paintTick(Graphics2D g, int value, int len, Rectangle r)
      Description copied from class: Ruler
      Paint the tick mark line.
      Specified by:
      paintTick in class Ruler
    • paintLabel

      protected void paintLabel(Graphics2D g, int pos, int value, Rectangle area)
      Description copied from class: Ruler
      Paint the label (a string representing the ruler value.
      Specified by:
      paintLabel in class Ruler
      pos - The position in Java2D space at which to paint the label
      value - The value of the label itself.
    • getGuideType

      public int getGuideType()
      Description copied from class: Ruler
      What kind of guide type should be created when dragging from this ruler? Should be one of SwingConstants.HORIZONTAL or SwingConstants.VERTICAL
      Specified by:
      getGuideType in class Ruler
    • getGuidePosition

      public int getGuidePosition(Point p)
      Specified by:
      getGuidePosition in class Ruler