jv.thirdParty.ruler

## Class PgRuler

- java.lang.Object
- - jv.object.PsObject
  - - jv.project.PgGeometry
    - - jv.project.PgJvxSrc
      - - jv.thirdParty.ruler.PgRuler

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf, PgGeometryIf

      public final class PgRuler
      extends PgJvxSrc

  A ruler is 2d or higher dimensional space is determined by an origin, a direction of its axis and a normal for drawing hashings. The spacing and labeling of hashings may be controlled or automatically computed by a ruler.

  Rulers are used as components of PgAxes but additionally may be used individually to measure distances.

  See Also:
    `PgAxes`, Serialized Form
  Author:
    Steve Dugaro, Konrad Polthier
  Version:
    04.05.14, 4.01 revised (kp) Geometry type mentioned in constructor.
    20.03.04, 4.00 revised (kp) Full revision of API interface and internal algorithms.
    14.08.03, 3.50 revised (kp) Remove internal vector allocations.
    19.07.03, 3.40 revised (kp) Correct assignment of brighter colors for minor hashings.
    13.03.03, 3.30 revised (kp) Hashing color is now adjusted when global polygon color is changed.
    16.11.02, 3.20 revised (kp) Only enable showing of vertex labels instead of all indices.
    26.09.02, 3.10 revised (kp) Allow more fractional digits if axis is small.
    16.05.01, 3.00 revised (kp) Superclass changed to PgJvxSrc.
    31.03.01, 2.00 revised (kp) Major revision to increase update speed.
    27.09.00, 1.01 revised (spd) Measure was added to make the ruler act as a measuring tape. Set the origin for the anchor point with setInitPoint then pass this the endpoint.
    07.07.00, 1.00 created (spd)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `HASH_FIXED` Fixed spacing of hashings at automatically or assigned ticks.
    `static int` | `HASH_PARTITIONED` Dynamic spacing of hashings at equal distances from a reference tick.
    `static int` | `MODE_FIXED` Deprecated. since JavaView 3.13, use HASH_FIXED
    `static int` | `MODE_PARTITIONED` Deprecated. since JavaView 3.13, use HASH_PARTITIONED
    `static int` | `NORMAL_DIRECTION`
    `static int` | `RULER_NAME_ALIGN_CENTER`
    `static int` | `RULER_NAME_ALIGN_LEFT`
    `static int` | `RULER_NAME_ALIGN_RIGHT`
    `static int` | `UP_VECTOR_DIRECTION`

    - ### Fields inherited from class jv.object.PsObject

      `HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS`

    - ### Fields inherited from interface jv.project.PgGeometryIf

      `AMBIENT_H2_HYPERBOLIC, AMBIENT_H3_HYPERBOLIC, AMBIENT_H4_HYPERBOLIC, AMBIENT_PROJECTIONS, AMBIENT_R1_EUCLIDEAN, AMBIENT_R2_EUCLIDEAN, AMBIENT_R3_EUCLIDEAN, AMBIENT_R4_EUCLIDEAN, AMBIENT_R5_EUCLIDEAN, AMBIENT_S1_SPHERE, AMBIENT_S2_SPHERE, AMBIENT_S3_SPHERE, AMBIENT_S4_SPHERE, AMBIENT_SPACES, BLEND_ALPHA, BLEND_MATERIAL, BLEND_REPLACE, FILTER_DIRECT, FILTER_LINEAR, FILTER_QUADRATIC, HAS_METHOD_MENU, INSPECTOR_CONTROL, INSPECTOR_CONTROL_EXT, INSPECTOR_MATERIAL, INSPECTOR_MATERIAL_EXT, INSPECTOR_TEXTURE, INSPECTOR_TEXTURE_EXT, LABEL_BASE, LABEL_CENTER, LABEL_HEAD, LABEL_MIDDLE, LABEL_TAIL, LABEL_TOP, m_numLabelTypes, METHOD_EXT, PERIODIC_BOTH, PERIODIC_HEIGHT, PERIODIC_NONE, PERIODIC_WIDTH, PROJ_KLEIN_BALL, PROJ_PARALLEL, PROJ_POINCARE_BALL, PROJ_STEREOGRAPHIC, PROJ_UPPER_HALFSPACE, SIDE_BACK, SIDE_BOTH, SIDE_FRONT, SIDE_NONE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PgRuler()` Create a ruler in 3D space.
    `PgRuler(int dim)` Create a ruler in given space dimension which is by default oriented along the x-axis.
    `PgRuler(PdVector rulerDir, PdVector rulerNormal)` Deprecated. since JavaView 3.12.002, use setDirection and setNormal

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getHashMode()` Get hashing mode of a ruler is either partitioned or fixed, see HASH_FIXED or HASH_PARTITIONED.
    `double` | `getMajorUnit()`
    `double` | `getMaxParameter()`
    `double` | `getMinorUnit()`
    `double` | `getMinParameter()`
    `int` | `getMode()` Deprecated. since JavaView 3.12.002, use getHashMode()
    `int` | `getNumMajorPartitions()`
    `int` | `getNumMinorPartitions()`
    `java.lang.String` | `getRulerName()` Get name of ruler as it appears at an axis, for example.
    `void` | `init()` Initialization method.
    `boolean` | `isEnabledAutoBounds()` Check if automatic adjustment of size of axes to varying bounding box is enabled.
    `boolean` | `isEnabledAutoHashing()` Check if axes is automatically adjusted to varying size of the shown shape.
    `boolean` | `isShowingArrow()`
    `boolean` | `isShowingFixedMode()` Deprecated. use getHashMode() which returns HASH_FIXED or HASH_PARTITIONED
    `boolean` | `isShowingHashingsInNormalDir()`
    `boolean` | `isShowingHashingsInUpDir()`
    `boolean` | `isShowingLabels()`
    `boolean` | `isShowingMajorHashings()` Determines whether the ruler should be partitioned as fixed or dynamic and then sets m_tiMajor accordingly.
    `boolean` | `isShowingMinorHashings()`
    `boolean` | `isShowingRulerName()` Check whether showing of name of ruler is switched on.
    `void` | `setDefaultHashSizes(int orthoType)` Reset minor and major hash extents to default values.
    `void` | `setDirection(double x, double y, double z)` Set direction of the baseline of the ruler.
    `void` | `setDirection(PdVector dir)` Set direction of the baseline of the ruler.
    `void` | `setEnabledAutoBounds(boolean flag)` Enable automatic adjustment of size of axes to varying bounding box.
    `void` | `setEnabledAutoHashing(boolean flag)` Flag is axes in "absolute unit mode" will automatically adjust to a 'good' viewing scale based on the bounding box passed into configure().
    `void` | `setEndPoint(PdVector endPnt, PdVector viewDir)` Measure, is a way of using the ruler as a Tape measure.
    `void` | `setFixedHashing(double major, double minor)`
    `void` | `setGlobalPolygonColor(java.awt.Color color)` This method assigns the global polygon color of superclass and sets the default color for hashings.
    `void` | `setGlobalPolygonSize(double size)` This method assigns the global polygon color of superclass and sets the default color for hashings.
    `void` | `setHashLabel(int xoff, int yoff, int labelhSide, int labelvSide)` Customizes the positioning of the label at hashings.
    `void` | `setHashMode(int mode)` Set hashing mode of a ruler which is either partitioned or fixed, see HASH_FIXED or HASH_PARTITIONED.
    `void` | `setHashOffsetInNormalDir(double xoff, double yoff, double zoff)`
    `void` | `setHashOffsetInUpDir(double xoff, double yoff, double zoff)`
    `void` | `setMajorColor(java.awt.Color color)`
    `void` | `setMajorHashSize(double pt1, double pt2, int orthoType)` Set the extent size of major hashings along the up or normal vectors
    `void` | `setMinMax(double min, double max)` Set maximum and minimum value of this ruler.
    `void` | `setMinorColor(java.awt.Color color)`
    `void` | `setMinorHashSize(double pt1, double pt2, int orthoType)` Set the extent size of minor hashings along the up or normal vectors
    `void` | `setMode(int mode)` Deprecated. since JavaView 3.12.002, use setHashMode(int)
    `void` | `setNameAlignment(int align, int labelhSide, int xoff, int yoff)` Customizes the positioning of the name of the ruler.
    `void` | `setNormal(double x, double y, double z)` Set direction of the normal vector along which the hashings will be drawn.
    `void` | `setNormal(PdVector nor)` Set direction of the normal vector along which the hashings will be drawn.
    `void` | `setOrigin(double x, double y, double z)` Set the origin of the ruler to the specific point in space.
    `void` | `setOrigin(PdVector orig)` Set the origin of the ruler to the specific point in space.
    `void` | `setPartitionedHashing(int major, int minor)`
    `void` | `setRulerName(java.lang.String name)` Set the name of ruler as it appears at an axis, for example.
    `void` | `setRulerName(java.lang.String name, boolean show)` Set the name of ruler as it appears at an axis, for example.
    `void` | `setRulerName(java.lang.String name, int pos)` Set the name of ruler as it appears at an axis, for example.
    `void` | `setRulerName(java.lang.String name, int pos, boolean show)` Set the name of ruler as it appears at an axis, for example.
    `void` | `setUpVector(PdVector up)` Deprecated. since JavaView 3.12.002, upVector is automatically computed when dir or normal is assigned.
    `void` | `showArrow(boolean flag)`
    `void` | `showFixedMode(boolean flag)` Deprecated. use setHashMode(int) with HASH_FIXED or HASH_PARTITIONED
    `void` | `showHashingsInNormalDir(boolean flag)`
    `void` | `showHashingsInUpDir(boolean flag)`
    `void` | `showLabels(boolean flag)`
    `void` | `showMajorHashings(boolean flag)`
    `void` | `showMinorHashings(boolean flag)`
    `void` | `showRulerName(boolean flag)` Enable and disable showing of name of ruler in display.
    `boolean` | `update(java.lang.Object event)` Update method of geometry updates registered panels, update listeners, and invokes a repaint in the registered displays.

    - ### Methods inherited from class jv.project.PgJvxSrc

      `addElement, addPolygon, addVertex, assureEdgeColors, assureEdgeSizes, assureElementBackColors, assureElementColors, assureElementEdges, assureElementNormals, assureElementTextures, assureNeighbours, assurePolygonColors, assurePolygonNormals, assurePolygonSizes, assureVectorColors, assureVertexColors, assureVertexNormals, assureVertexSizes, assureVertexTextures, clearTagVertex, clone, copy, getAmbientBounds, getBlendingMode, getBndColor, getBndElementInd, getBndName, getBndNeighbourLocInd, getBndNumVertices, getBndSize, getBndVertexInd, getBndVertices, getBounds, getCreaseAngle, getDimOfElements, getDimOfPolygons, getDimOfTextures, getDimOfVectors, getEdgeColors, getEdges, getEdgeSizes, getElement, getElementBackColors, getElementColors, getElementEdges, getElementNormals, getElements, getElementTextures, getFilterType, getGlobalBndColor, getGlobalBndSize, getGlobalBndTagColor, getGlobalEdgeColor, getGlobalEdgeNormalColor, getGlobalEdgeNormalLength, getGlobalEdgeNormalSize, getGlobalEdgeSize, getGlobalEdgeTagColor, getGlobalElementBackColor, getGlobalElementColor, getGlobalElementNormalColor, getGlobalElementNormalLength, getGlobalElementNormalSize, getGlobalElementTagColor, getGlobalPolygonColor, getGlobalPolygonNormalColor, getGlobalPolygonNormalLength, getGlobalPolygonNormalSize, getGlobalPolygonSize, getGlobalPolygonTagColor, getGlobalVectorColor, getGlobalVectorLength, getGlobalVectorSize, getGlobalVertexColor, getGlobalVertexNormalColor, getGlobalVertexNormalLength, getGlobalVertexNormalSize, getGlobalVertexSize, getGlobalVertexTagColor, getJvx, getNeighbours, getNumBndPolygons, getNumEdges, getNumElements, getNumPolygons, getNumVectorFields, getNumVectors, getNumVertices, getPolygon, getPolygonColors, getPolygonNormals, getPolygons, getPolygonSizes, getShininess, getSpecularColor, getTextureImage, getTextureImageBnd, getTextureImageName, getTexturePeriodic, getTextureSide, getTextureTiling, getTransparency, getVectorFieldColors, getVectorFieldName, getVectors, getVertex, getVertexColors, getVertexFunctions, getVertexNormals, getVertexSizes, getVertexTextures, getVertices, hasEdgeColors, hasElementBackColors, hasElementColors, hasElementNormals, hasElementTextures, hasPolygonColors, hasPolygonNormals, hasTagVertex, hasVertexColors, hasVertexNormals, hasVertexSizes, hasVertexTextures, isDefaultLabelEnabled, isEnabledIndexLabels, isShowingBackface, isShowingBnd, isShowingBndMaterials, isShowingBoundaries, isShowingEdgeColorFromElements, isShowingEdgeColorFromVertices, isShowingEdgeColors, isShowingEdgeLabels, isShowingEdges, isShowingEdgeSizes, isShowingElementBackColor, isShowingElementBackColors, isShowingElementColorFromVertices, isShowingElementColors, isShowingElementFromVertexColors, isShowingElementLabels, isShowingElementNormalArrow, isShowingElementNormals, isShowingElements, isShowingElementTexture, isShowingIndices, isShowingIndividualMaterial, isShowingPolygonColors, isShowingPolygonEndArrow, isShowingPolygonLabels, isShowingPolygonNormalArrow, isShowingPolygonNormals, isShowingPolygons, isShowingPolygonSizes, isShowingPolygonStartArrow, isShowingSilhouette, isShowingSmoothEdgeColors, isShowingSmoothElementColors, isShowingSmoothLighting, isShowingTaggedElements, isShowingTaggedPolygons, isShowingTaggedVertices, isShowingTransparency, isShowingVectorArrows, isShowingVectorColors, isShowingVectorField, isShowingVectorFieldMaterials, isShowingVectorFields, isShowingVertexColors, isShowingVertexLabels, isShowingVertexNormalArrow, isShowingVertexNormals, isShowingVertexOutline, isShowingVertexSizes, isShowingVertexTexture, isShowingVertices, isVectorElementBased, makeElementColorsFromXYZ, makeElementFromVertexColors, makeElementNormals, makeQuadrConn, makeVertexNormals, paint, reflect, removePolygonSizes, setBlendingMode, setBndColor, setBndElementInd, setBndName, setBndNeighbourLocInd, setBndNumVertices, setBndSize, setBndVertexInd, setBndVertices, setCreaseAngle, setDefaultLabelEnabled, setDimOfElements, setDimOfPolygons, setDimOfTextures, setDimOfVertices, setEdgeColors, setEdges, setEdgeSizes, setElement, setElementBackColors, setElementColors, setElementEdges, setElementNormals, setElements, setElementTextures, setEnabledIndexLabels, setFilterType, setGlobalBndColor, setGlobalBndSize, setGlobalBndTagColor, setGlobalEdgeColor, setGlobalEdgeNormalColor, setGlobalEdgeNormalLength, setGlobalEdgeNormalSize, setGlobalEdgeSize, setGlobalEdgeTagColor, setGlobalElementBackColor, setGlobalElementColor, setGlobalElementNormalColor, setGlobalElementNormalLength, setGlobalElementNormalSize, setGlobalElementTagColor, setGlobalPolygonNormalColor, setGlobalPolygonNormalLength, setGlobalPolygonNormalSize, setGlobalPolygonTagColor, setGlobalVectorColor, setGlobalVectorLength, setGlobalVectorSize, setGlobalVertexColor, setGlobalVertexNormalColor, setGlobalVertexNormalLength, setGlobalVertexNormalSize, setGlobalVertexSize, setGlobalVertexTagColor, setJvx, setNeighbours, setNumBndPolygons, setNumEdges, setNumElements, setNumPolygons, setNumVectorFields, setNumVectors, setNumVertices, setPolygon, setPolygonColors, setPolygonNormals, setPolygons, setPolygonSizes, setShininess, setSpecularColor, setState, setTagVertex, setTextureImage, setTextureImageBnd, setTextureImageName, setTexturePeriodic, setTextureSide, setTextureTiling, setTransparency, setVectorColors, setVectorElementBased, setVectorFieldName, setVectors, setVertex, setVertexColors, setVertexFunctions, setVertexNormals, setVertexSizes, setVertexTextures, setVertices, showBackface, showBnd, showBndMaterials, showBoundaries, showEdgeColorFromElements, showEdgeColorFromVertices, showEdgeColors, showEdgeLabels, showEdges, showEdgeSizes, showElementBackColor, showElementBackColors, showElementColorFromVertices, showElementColors, showElementFromVertexColors, showElementLabels, showElementNormalArrow, showElementNormals, showElements, showElementTexture, showIndices, showIndividualMaterial, showPolygonColors, showPolygonEndArrow, showPolygonLabels, showPolygonNormalArrow, showPolygonNormals, showPolygons, showPolygonSizes, showPolygonStartArrow, showSilhouette, showSmoothEdgeColors, showSmoothElementColors, showSmoothLighting, showTaggedElements, showTaggedPolygons, showTaggedVertices, showTransparency, showVectorArrows, showVectorColors, showVectorField, showVectorFieldMaterials, showVectorFields, showVertexColors, showVertexLabels, showVertexNormalArrow, showVertexNormals, showVertexOutline, showVertexSizes, showVertexTexture, showVertices`

    - ### Methods inherited from class jv.project.PgGeometry

      `addDisplay, applyAmbientMatrix, applyModelingMatrix, blend, clearTagElement, clearTagPolygon, convertWorldToModel, copy, fillMethodMenu, fillMethodMenu, getAmbientInvMatrix, getAmbientMatrix, getAmbientProjection, getAmbientSpace, getAuthorInfo, getAuthors, getCenter, getCenterOfElement, getControlPanel, getDiameter, getDimOfSimplex, getDimOfVertices, getDisplayList, getDisplays, getGeometryInfo, getLabelAttribute, getLabelColor, getLabelFont, getLabelSize, getLabelStyle, getMaterialPanel, getModelMatrix, getState, getTitle, getType, getVersion, getVersionType, hasAmbientMatrix, hasDisplay, hasModelMatrix, hasTagElement, hasTagPolygon, intersectionWithLine, isConfigurable, isEnabledInstanceSharing, isShowingBndBox, isShowingCenter, isShowingName, isShowingTitle, isVisible, merge, projectFromAmbientSpace, removeDisplay, removeElement, removeMethodMenus, removePolygon, removeVertex, setAmbientMatrix, setAmbientProjection, setAmbientSpace, setAuthorInfo, setAuthors, setCenter, setDimOfSimplex, setEnabledInstanceSharing, setGeometryInfo, setLabelAttribute, setLabelAttribute, setLabelColor, setLabelFont, setLabelSize, setLabelStyle, setModelMatrix, setTagElement, setTagPolygon, setTitle, setType, setVersion, setVersionType, setVisible, showBndBox, showCenter, showName, showTitle, toString`

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jv.project.PgGeometryIf

      `assureInspector, getInfoPanel, getName, hasTag, setName`

    - ### Methods inherited from interface jv.object.PsUpdateIf

      `getFather, setParent`

- - ### Field Detail

    - #### HASH_FIXED

          public static final int HASH_FIXED

      Fixed spacing of hashings at automatically or assigned ticks.
      See Also:
        Constant Field Values

    - #### MODE_FIXED

          public static final int MODE_FIXED

      Deprecated. since JavaView 3.13, use HASH_FIXED
      Fixed spacing of hashings at automatically or assigned ticks.
      See Also:
        Constant Field Values

    - #### HASH_PARTITIONED

          public static final int HASH_PARTITIONED

      Dynamic spacing of hashings at equal distances from a reference tick.
      See Also:
        Constant Field Values

    - #### MODE_PARTITIONED

          public static final int MODE_PARTITIONED

      Deprecated. since JavaView 3.13, use HASH_PARTITIONED
      Dynamic spacing of hashings at equal distances from a reference tick.
      See Also:
        Constant Field Values

    - #### NORMAL_DIRECTION

          public static final int NORMAL_DIRECTION

      See Also:
        Constant Field Values

    - #### UP_VECTOR_DIRECTION

          public static final int UP_VECTOR_DIRECTION

      See Also:
        Constant Field Values

    - #### RULER_NAME_ALIGN_LEFT

          public static final int RULER_NAME_ALIGN_LEFT

      See Also:
        Constant Field Values

    - #### RULER_NAME_ALIGN_RIGHT

          public static final int RULER_NAME_ALIGN_RIGHT

      See Also:
        Constant Field Values

    - #### RULER_NAME_ALIGN_CENTER

          public static final int RULER_NAME_ALIGN_CENTER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PgRuler

          public PgRuler()

      Create a ruler in 3D space.

    - #### PgRuler

          public PgRuler(int dim)

      Create a ruler in given space dimension which is by default oriented along the x-axis.

    - #### PgRuler

          public PgRuler(PdVector rulerDir,
                         PdVector rulerNormal)

      Deprecated. since JavaView 3.12.002, use setDirection and setNormal
      Create a new ruler with given direction and normal direction for hashings. Both vectors must be orthogonal but need not be normalized.
      Parameters:
        `rulerDir` - direction of baseline of ruler
        `rulerNormal` - vector orthogonal to direction of baseline

  - ### Method Detail

    - #### init

          public void init()

      Initialization method.
      Overrides:
        `init` in class `PgJvxSrc`
      Version:
        26.10.04, 1.10 revised added a call to computeHashings() at the end. (kh)

    - #### setGlobalPolygonColor

          public void setGlobalPolygonColor(java.awt.Color color)

      This method assigns the global polygon color of superclass and sets the default color for hashings.
      Overrides:
        `setGlobalPolygonColor` in class `PgJvxSrc`
      Since:
        JavaView 2.60.002
      Version:
        13.03.03, 1.00 created (kp)

    - #### setGlobalPolygonSize

          public void setGlobalPolygonSize(double size)

      This method assigns the global polygon color of superclass and sets the default color for hashings.
      Overrides:
        `setGlobalPolygonSize` in class `PgJvxSrc`
      Since:
        JavaView 3.62.013
      Version:
        28.11.04, 1.00 created (kp)

    - #### update

          public boolean update(java.lang.Object event)

      Description copied from class: `PgGeometry`
      Update method of geometry updates registered panels, update listeners, and invokes a repaint in the registered displays.

      Usage:

      1. 1. event == this : geometry has changed, all panels will be updated.
      2. 2. event == null : geometry has changed, no need to update a panel.
      3. 3. event == a panel : geometry has changed, all panels except 'panel' will be updated.
      4. 4. event == else : unhandled event, error.
      Panels are not updated if they have not been created yet, or if they are not visible.

      Any update is forwarded to the parent of the geometry with the geometry as event.

      Any update is forwarded to each registered display with the geometry as event which leads to a repaint of the display.

      Specified by:
        `update` in interface `PsUpdateIf`
      Overrides:
        `update` in class `PgGeometry`
      Parameters:
        `event` - carries a lot of information
      Returns:
        true if event has been handled, otherwise false
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### isShowingMajorHashings

          public boolean isShowingMajorHashings()

      Determines whether the ruler should be partitioned as fixed or dynamic and then sets m_tiMajor accordingly. Also if the ruler does not have a positive length FAIL is returned meaning m_tiMajor has not been changed thus the hashing computations can be avoided alltogether.

    - #### isShowingMinorHashings

          public boolean isShowingMinorHashings()

    - #### isShowingHashingsInNormalDir

          public boolean isShowingHashingsInNormalDir()

    - #### isShowingHashingsInUpDir

          public boolean isShowingHashingsInUpDir()

    - #### isShowingLabels

          public boolean isShowingLabels()

    - #### getMaxParameter

          public double getMaxParameter()

    - #### getMinParameter

          public double getMinParameter()

    - #### getNumMajorPartitions

          public int getNumMajorPartitions()

    - #### getNumMinorPartitions

          public int getNumMinorPartitions()

    - #### getMajorUnit

          public double getMajorUnit()

    - #### getMinorUnit

          public double getMinorUnit()

    - #### showLabels

          public void showLabels(boolean flag)

    - #### isShowingArrow

          public boolean isShowingArrow()

    - #### showArrow

          public void showArrow(boolean flag)

    - #### isShowingFixedMode

          public boolean isShowingFixedMode()

      Deprecated. use getHashMode() which returns HASH_FIXED or HASH_PARTITIONED
      Mode of a ruler is either partitioned or fixed.

    - #### showFixedMode

          public void showFixedMode(boolean flag)

      Deprecated. use setHashMode(int) with HASH_FIXED or HASH_PARTITIONED
      Mode of a ruler is either partitioned or fixed.

    - #### getHashMode

          public int getHashMode()

      Get hashing mode of a ruler is either partitioned or fixed, see HASH_FIXED or HASH_PARTITIONED.
      Since:
        JavaView 2.47
      Version:
        05.12.02, 1.00 created (kp)

    - #### setHashMode

          public void setHashMode(int mode)

      Set hashing mode of a ruler which is either partitioned or fixed, see HASH_FIXED or HASH_PARTITIONED.
      Since:
        JavaView 2.47
      Version:
        05.12.02, 1.00 created (kp)

    - #### getMode

          public int getMode()

      Deprecated. since JavaView 3.12.002, use getHashMode()
      Get hashing mode of a ruler is either partitioned or fixed, see PgRuler#HASH_FIXED or PgRuler#HASH_PARTITIONED.

    - #### setMode

          public void setMode(int mode)

      Deprecated. since JavaView 3.12.002, use setHashMode(int)
      Set hashing mode of a ruler which is either partitioned or fixed, see PgRuler#HASH_FIXED or PgRuler#HASH_PARTITIONED.

    - #### showMajorHashings

          public void showMajorHashings(boolean flag)

    - #### showMinorHashings

          public void showMinorHashings(boolean flag)

    - #### showHashingsInNormalDir

          public void showHashingsInNormalDir(boolean flag)

    - #### showHashingsInUpDir

          public void showHashingsInUpDir(boolean flag)

    - #### isShowingRulerName

          public boolean isShowingRulerName()

      Check whether showing of name of ruler is switched on. On default, showing of name is disabled.

      In contrast to the usual name of an object, the ruler name is shown in the center of an axis with some fake trick.

      Since:
        JavaView 2.47
      See Also:
        `PgGeometry.showTitle(boolean)`, `PsObject.setName(String)`
      Version:
        26.11.02, 1.00 created (kp)

    - #### showRulerName

          public void showRulerName(boolean flag)

      Enable and disable showing of name of ruler in display. On default, showing of title is disabled.

      In contrast to the usual name of an object, the ruler name is shown in the center of an axis with some fake trick.

      Since:
        JavaView 2.47
      See Also:
        `PgGeometry.showTitle(boolean)`, `PsObject.setName(String)`
      Version:
        26.11.02, 1.00 created (kp)

    - #### setEndPoint

          public void setEndPoint(PdVector endPnt,
                                  PdVector viewDir)

      Measure, is a way of using the ruler as a Tape measure. To use this method you simply need to pass it an endpoint from which a measurement is made from the currently defined ruler origin set via #setOrigin(). Hashings will only be automatically visible if measurements are made in the xy,yz, or xz perspectives. For the arbitrary perspective case you must explicity give a direction in which to draw the hash, else results may be unpredictable.

    - #### setOrigin

          public void setOrigin(double x,
                                double y,
                                double z)

      Set the origin of the ruler to the specific point in space.
      Parameters:
        `x` - new x-component of origin of ruler
        `y` - new y-component of origin of ruler
        `z` - new z-component of origin of ruler

    - #### setOrigin

          public void setOrigin(PdVector orig)

      Set the origin of the ruler to the specific point in space.
      Parameters:
        `orig` - new origin of ruler

    - #### setDirection

          public void setDirection(double x,
                                   double y,
                                   double z)

      Set direction of the baseline of the ruler. Normalization will be done within this method.
      Parameters:
        `x` - new x-component of direction vector of the baseline of the ruler
        `y` - new y-component of direction vector of the baseline of the ruler
        `z` - new z-component of direction vector of the baseline of the ruler

    - #### setDirection

          public void setDirection(PdVector dir)

      Set direction of the baseline of the ruler. Normalization will be done within this method.
      Parameters:
        `dir` - direction vector of the baseline of the ruler

    - #### setNormal

          public void setNormal(double x,
                                double y,
                                double z)

      Set direction of the normal vector along which the hashings will be drawn. Normalization will be done within this method.
      Parameters:
        `x` - new x-component of a 3d vector (based at the origin) specifying the direction in which to draw the hashings
        `y` - new y-component of a 3d vector (based at the origin) specifying the direction in which to draw the hashings
        `z` - new z-component of a 3d vector (based at the origin) specifying the direction in which to draw the hashings

    - #### setNormal

          public void setNormal(PdVector nor)

      Set direction of the normal vector along which the hashings will be drawn. Normalization will be done within this method.
      Parameters:
        `nor` - a 3d vector (based at the origin) specifying the direction in which to draw the hashings

    - #### setUpVector

          public void setUpVector(PdVector up)

      Deprecated. since JavaView 3.12.002, upVector is automatically computed when dir or normal is assigned.
      For rulers in 3D space, set direction of the up vector along which a secondary set of hashings will be drawn. Normalization will be done within this method.
      Parameters:
        `up` - a 3d vector (based at the origin) specifying the direction in which to draw the hashings

    - #### setDefaultHashSizes

          public void setDefaultHashSizes(int orthoType)

      Reset minor and major hash extents to default values.
      Parameters:
        `orthoType` - specify which of 2 perpendicular directions (PgRuler#NORMAL_DIRECTION or PgRuler#UP_VECTOR_DIRECTION) that hashing occurs.

    - #### setMajorHashSize

          public void setMajorHashSize(double pt1,
                                       double pt2,
                                       int orthoType)

      Set the extent size of major hashings along the up or normal vectors
      Parameters:
        `pt1` - a scalar multiple of the hash vector representing one endpoint of the hash line
        `pt2` - a scalar multiple of the hash vector representing the other endpoint of the hash line
        `orthoType` - specify which of 2 perpendicular directions (PgRuler#NORMAL_DIRECTION or PgRuler#UP_VECTOR_DIRECTION) that hashing occurs.

    - #### setMinorHashSize

          public void setMinorHashSize(double pt1,
                                       double pt2,
                                       int orthoType)

      Set the extent size of minor hashings along the up or normal vectors
      Parameters:
        `pt1` - a scalar multiple of the hash vector representing one endpoint of the hash line
        `pt2` - a scalar multiple of the hash vector representing the other endpoint of the hash line
        `orthoType` - specify which of 2 perpendicular directions that hashing occurs.

    - #### setFixedHashing

          public void setFixedHashing(double major,
                                      double minor)

    - #### setPartitionedHashing

          public void setPartitionedHashing(int major,
                                            int minor)

    - #### setMinMax

          public void setMinMax(double min,
                                double max)

      Set maximum and minimum value of this ruler.

    - #### setMajorColor

          public void setMajorColor(java.awt.Color color)

    - #### setMinorColor

          public void setMinorColor(java.awt.Color color)

    - #### getRulerName

          public java.lang.String getRulerName()

      Get name of ruler as it appears at an axis, for example. Note, the name is identical to the name of the underlying geometry.
      Returns:
        name of ruler

    - #### setRulerName

          public void setRulerName(java.lang.String name)

      Set the name of ruler as it appears at an axis, for example.
      Parameters:
        `name` - the title to be shown for the ruler
      See Also:
        `setRulerName(String,int,boolean)`

    - #### setRulerName

          public void setRulerName(java.lang.String name,
                                   int pos)

      Set the name of ruler as it appears at an axis, for example.
      Parameters:
        `name` - the title to be shown for the ruler
        `pos` - the positioning of the label with respect to the ruler baseline :={RULER_NAME_ALIGN_LEFT,RULER_NAME_ALIGN_RIGHT,RULER_NAME_ALIGN_CENTER}
      See Also:
        `setRulerName(String,int,boolean)`

    - #### setRulerName

          public void setRulerName(java.lang.String name,
                                   boolean show)

      Set the name of ruler as it appears at an axis, for example.
      Parameters:
        `name` - the title to be shown for the ruler
        `show` - whether or not to show the ruler name/title
      See Also:
        `setRulerName(String,int,boolean)`

    - #### setRulerName

          public void setRulerName(java.lang.String name,
                                   int pos,
                                   boolean show)

      Set the name of ruler as it appears at an axis, for example.
      Parameters:
        `name` - the title to be shown for the ruler
        `pos` - the positioning of the label with respect to the ruler baseline :={RULER_NAME_ALIGN_LEFT,RULER_NAME_ALIGN_RIGHT,RULER_NAME_ALIGN_CENTER}
        `show` - whether or not to show the ruler name/title

    - #### setHashLabel

          public void setHashLabel(int xoff,
                                   int yoff,
                                   int labelhSide,
                                   int labelvSide)

      Customizes the positioning of the label at hashings.
      Parameters:
        `xoff` - how much to offset the label from the label origin in the x direction
        `yoff` - how much to offset the label from the label origin in the y direction
        `labelhSide` - horizontal position at label to align with, {PgGeometryIf.LABEL_HEAD, PgGeometryIf.LABEL_CENTER, PgGeometryIf.LABEL_TAIL}
        `labelvSide` - vertical position at label to align with, {PgGeometryIf.LABEL_BASE, PgGeometryIf.LABEL_MIDDLE, PgGeometryIf.LABEL_TOP}

    - #### setNameAlignment

          public void setNameAlignment(int align,
                                       int labelhSide,
                                       int xoff,
                                       int yoff)

      Customizes the positioning of the name of the ruler.
      Parameters:
        `align` - {RULER_NAME_ALIGN_LEFT,RULER_NAME_ALIGN_RIGHT,RULER_NAME_ALIGN_CENTER} with base, center or tip of ruler's baseline.
        `labelhSide` - the side of the label to bound to given point, {PgGeometryIf.LABEL_HEAD, PgGeometryIf.LABEL_CENTER, PgGeometryIf.LABEL_TAIL}
        `xoff` - how much to offset the label from the label origin in the x direction.
        `yoff` - how much to offset the label from the label origin in the y direction.

    - #### setHashOffsetInNormalDir

          public void setHashOffsetInNormalDir(double xoff,
                                               double yoff,
                                               double zoff)

    - #### setHashOffsetInUpDir

          public void setHashOffsetInUpDir(double xoff,
                                           double yoff,
                                           double zoff)

    - #### isEnabledAutoHashing

          public boolean isEnabledAutoHashing()

      Check if axes is automatically adjusted to varying size of the shown shape.
      Since:
        JavaView 3.62.013
      Version:
        28.11.04, 1.00 created (kp)

    - #### setEnabledAutoHashing

          public void setEnabledAutoHashing(boolean flag)

      Flag is axes in "absolute unit mode" will automatically adjust to a 'good' viewing scale based on the bounding box passed into configure(). Essentially the scale jumps up or down by a factor of 10 if any length of the bounding box is streched to 10*currentscale + 10*currentscale/2 or squashed to currentscale/10-currentscale/10*2. In other words, an attempt is made to maintain approximately 10 hashings over each ruler. This need not apply to the "partitioned ruler mode" as the ruler is already subdivided. This is true by default-set to false if many more hashings are needed. Note that in this mode a single minor hashing will be placed between each major hashings whenever a reconfiguration is needed.
      Since:
        JavaView 3.62.013
      Version:
        28.11.04, 1.00 created (kp)

    - #### isEnabledAutoBounds

          public boolean isEnabledAutoBounds()

      Check if automatic adjustment of size of axes to varying bounding box is enabled.
      Since:
        JavaView 3.62.013
      Version:
        28.11.04, 1.00 created (kp)

    - #### setEnabledAutoBounds

          public void setEnabledAutoBounds(boolean flag)

      Enable automatic adjustment of size of axes to varying bounding box.
      Since:
        JavaView 3.62.013
      Version:
        28.11.04, 1.00 created (kp)

"

The software JavaView? is copyright protected. All Rights Reserved.
"