physicon.graphLib
Class LinearScaleDrawer

java.lang.Object
  |
  +--physicon.graphLib.DrawerBase
        |
        +--physicon.graphLib.ScaleDrawerBase
              |
              +--physicon.graphLib.LinearScaleDrawer
Direct Known Subclasses:
LabeledLinearScaleDrawer, MetaTeXLinearScaleDrawer

public class LinearScaleDrawer
extends ScaleDrawerBase

Represents the drawer object for the linear scale draws dash set with default color


Field Summary
 int arrowShiftX
           
 int arrowShiftY
           
 java.awt.Point beginPoint
           
 int dashesPerBlock
           
 java.awt.Point endPoint
           
 int initSmallDashes
           
 double norm
           
 double paramStep
           
 int textHeight
           
 int textWidth
           
 
Fields inherited from class physicon.graphLib.ScaleDrawerBase
maxParam, minParam
 
Constructor Summary
LinearScaleDrawer()
          Constructor
LinearScaleDrawer(java.awt.Color _c)
           
LinearScaleDrawer(java.awt.Color _c, int _fontSize)
           
 
Method Summary
 void drawLocal(java.awt.Graphics g)
          Draws scale with default color.
 java.awt.Font getFont()
          Gets the current font.
 java.awt.Rectangle getLocalRoughRect()
          Returns local rectanngle
 void invertText()
          Inverts the position of text labels; From left -> right, from right -> left ...
 void reset()
          Resets the current object
 void setAdjustment(int _i)
          Sets the adjastment of the text labels on the scale.
 void setFont(java.awt.Font _fnt)
          Sets the font to the drawer
 void setLabelsOnlyStyle(boolean _flag)
          Sets the mode without dashes but with labels
 void setOneSideStyle(boolean _flag)
          Sets the one side dashes style
 void showDashes(boolean _show)
           
 void showZero(boolean _b)
          Shows or hides the zero label on the scale;
 
Methods inherited from class physicon.graphLib.ScaleDrawerBase
addDash, dashesNumber, getColor, getDash
 
Methods inherited from class physicon.graphLib.DrawerBase
contains, getGlobalLevel, getGlobalRefPoint, setGlobalLevel, setGlobalRefPoint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beginPoint

public java.awt.Point beginPoint

endPoint

public java.awt.Point endPoint

paramStep

public double paramStep

norm

public double norm

dashesPerBlock

public int dashesPerBlock

initSmallDashes

public int initSmallDashes

textHeight

public int textHeight

textWidth

public int textWidth

arrowShiftX

public int arrowShiftX

arrowShiftY

public int arrowShiftY
Constructor Detail

LinearScaleDrawer

public LinearScaleDrawer()
Constructor

LinearScaleDrawer

public LinearScaleDrawer(java.awt.Color _c)

LinearScaleDrawer

public LinearScaleDrawer(java.awt.Color _c,
                         int _fontSize)
Method Detail

setOneSideStyle

public void setOneSideStyle(boolean _flag)
Sets the one side dashes style

setLabelsOnlyStyle

public void setLabelsOnlyStyle(boolean _flag)
Sets the mode without dashes but with labels

invertText

public void invertText()
Inverts the position of text labels; From left -> right, from right -> left ...

setAdjustment

public void setAdjustment(int _i)
Sets the adjastment of the text labels on the scale. Sometimes it is needed to correct the placement of the text labels (if you have changed the scale text font

showZero

public void showZero(boolean _b)
Shows or hides the zero label on the scale;
Parameters:
_b. - Set this param to true to show the zero label, or to false to hide it.

setFont

public void setFont(java.awt.Font _fnt)
Sets the font to the drawer

getFont

public final java.awt.Font getFont()
Gets the current font. If the default font is used null is returned.

showDashes

public final void showDashes(boolean _show)

drawLocal

public void drawLocal(java.awt.Graphics g)
Draws scale with default color. Direction (horizontal or vertical) is automatically choosen
Parameters:
g - - the given Graphics object
Overrides:
drawLocal in class DrawerBase

getLocalRoughRect

public java.awt.Rectangle getLocalRoughRect()
Returns local rectanngle
Overrides:
getLocalRoughRect in class DrawerBase

reset

public void reset()
Resets the current object
Overrides:
reset in class ScaleDrawerBase