Overview | Package | Class | Use | Tree | Help
| HEADER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ru.biosoft.graphics
Class Ruler

    ru.biosoft.graphics.View
      |
      +--ru.biosoft.graphics.CompositeView
            |
            +--ru.biosoft.graphics.Ruler

public class Ruler
extends CompositeView

Ruler.

Field Summary
`static int` | `GENE` Ruler type: GENE/ USUAL.
`static int` | `HORIZONTAL` Ruler type: HORIZONTAL/VERTICAL
`static int` | `LABELS_MAJOR_SHOW` Ruler type: LABELS_MAJOR_SHOW/ABSENT.
`static int` | `LABELS_MAJOR_UP` Ruler type: LABELS_MAJOR_UP/LABELS_MAJOR_DOWN.
`static int` | `LABELS_MINOR_SHOW` Ruler type: LABELS_MINOR_SHOW/ABSENT.
`static int` | `LABELS_MINOR_UP` Ruler type: LABELS_MINOR_UP/LABELS_MINOR_DOWN.
`static int` | `TICKS_MAJOR_DOWN` Ruler type: TICKS_MAJOR_DOWN/ABSENT.
`static int` | `TICKS_MAJOR_UP` Ruler type: TICKS_MAJOR_UP/ABSENT.
`static int` | `TICKS_MINOR_DOWN` Ruler type: TICKS_MINOR_DOWN/ABSENT.
`static int` | `TICKS_MINOR_UP` Ruler type: TICKS_MINOR_UP/ABSENT.

Fields inherited from class ru.biosoft.graphics.CompositeView
`REL, X_CC, X_LC, X_LL, X_LR, X_RC, X_RL, X_RR, X_UN, Y_BB, Y_BC, Y_BT, Y_CC, Y_TB, Y_TC, Y_TT, Y_UN`

Fields inherited from class ru.biosoft.graphics.View
`ACTIVE, BASELINE, BOTTOM, CENTER, HIDE, LEFT, RIGHT, TOP`

Constructor Summary
`Ruler(int type, Point anchor, float scale, int min, int max, RulerOptions rulerOptions, Graphics graphics)` (pens, brushes, Fonts, margins etc.) needed to ruler painting.

Method Summary
`void` | `move(Point p)` Moves the ruler (left/bottom axis end) to the specified point.
`void` | `offset(Dimension d)` Shifts the ruler image by the specified distance.
`void` | `paint(Graphics2D graphics)` Paint the ruler.

Methods inherited from class ru.biosoft.graphics.CompositeView
`add, add, add, elementAt, getBounds, getChildren, getDeepestActive, getDeepestActive, getLocation, insert, intersects, move, remove, scale, size, updateBounds`

Methods inherited from class ru.biosoft.graphics.View
`getModel, getShape, isActive, isVisible, setActive, setLocation, setLocation, setModel, setToScale, setVisible`

Field Detail

### GENE

    public static int GENE

  Ruler type: GENE/ USUAL. If GENE, the position zero absent.

### HORIZONTAL

    public static int HORIZONTAL

  Ruler type: HORIZONTAL/VERTICAL

### LABELS_MAJOR_SHOW

    public static int LABELS_MAJOR_SHOW

  Ruler type: LABELS_MAJOR_SHOW/ABSENT.

### LABELS_MAJOR_UP

    public static int LABELS_MAJOR_UP

  Ruler type: LABELS_MAJOR_UP/LABELS_MAJOR_DOWN. For vertical ruler this is mean: LABELS_MAJOR_LEFT/LABELS_MAJOR_RIGHT

### LABELS_MINOR_SHOW

    public static int LABELS_MINOR_SHOW

  Ruler type: LABELS_MINOR_SHOW/ABSENT.

### LABELS_MINOR_UP

    public static int LABELS_MINOR_UP

  Ruler type: LABELS_MINOR_UP/LABELS_MINOR_DOWN. For vertical ruler this is mean: LABELS_MINOR_LEFT/LABELS_MINOR_RIGHT

### TICKS_MAJOR_DOWN

    public static int TICKS_MAJOR_DOWN

  Ruler type: TICKS_MAJOR_DOWN/ABSENT. For vertical ruler this is mean: TICKS_MAJOR_RIGHT/ABSENT.

### TICKS_MAJOR_UP

    public static int TICKS_MAJOR_UP

  Ruler type: TICKS_MAJOR_UP/ABSENT. For vertical ruler this is mean: TICKS_MAJOR_LEFT/ABSENT.

### TICKS_MINOR_DOWN

    public static int TICKS_MINOR_DOWN

  Ruler type: TICKS_MINOR_DOWN/ABSENT. For vertical ruler this is mean: TICKS_MINOR_RIGHT/ABSENT.

### TICKS_MINOR_UP

    public static int TICKS_MINOR_UP

  Ruler type: TICKS_MINOR_UP/ABSENT. For vertical ruler this is mean: TICKS_MINOR_LEFT/ABSENT.

Constructor Detail

### Ruler

    public Ruler(int type, Point anchor, float scale, int min, int max, RulerOptions rulerOptions, Graphics graphics)

  (pens, brushes, Fonts, margins etc.) needed to ruler painting.

  Used GraphicContext attributes:

      Pen              Pen_Ruler_Axis
      Pen              Pen_Ruler_Ticks

      ColorFont            Font_Ruler_Labels_Major
      ColorFont            Font_Ruler_Labels_Minor

      Dimension        Margin_Ruler_Text

      Dimension        Size_Ruler_TickSize*
      Dimension        Size_Ruler_DecDig*

      * number of signs after comma
      width  - for major labels
      height - for minor labels

Method Detail

### move

    public void move(Point p)

  Moves the ruler (left/bottom axis end) to the specified point.
  Parameters:
    p - the specified point.

### offset

    public void offset(Dimension d)

  Shifts the ruler image by the specified distance.
  Parameters:
    d - the distance.

### paint

    public void paint(Graphics2D graphics)

  Paint the ruler.

Association Links

to Class java.awt.Point

  Point, that corresponds min value on the ruler axis.

to Class ru.biosoft.graphics.RulerOptions

  Options for painting.

Overview | Package | Class | Use | Tree | Help
| FOOTER
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

BOTTOM