|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJLogView_.widgets.LGAxis
public class LGAxis
LGAxis is a widget represeting one axis. It can either be a vertical or an horizontal axis depending on the constructor.
Constructor Summary | |
---|---|
LGAxis(boolean vertical)
This is the constructor to be used, do no try a constructor without parameters as it would lead to loads of uninitialized varaibles |
Method Summary | |
---|---|
void |
draw(java.awt.Graphics2D g,
int w,
int h)
This is the drawing methods, we use Graphics2D here for the antialiasing option and also for drawing the label vertically for a vertical axis. |
int |
getAxisSize()
This methods returns the size of the the axis in pixels, i.e the width is the axis is a vertical axis and the height if it is a horizontal axis. |
float |
getMax()
This is methods returns the current (as oppposed to original) maximum value of this axis. |
float |
getMin()
This is methods returns the current (as oppposed to original) minimum value of this axis. |
boolean |
isResolutionAxis()
This methods inquires if the object is to treated as a resolution axis. |
void |
resetAxisRange()
This resets the display values (current values) to the original values. |
void |
setLabel(javax.swing.JLabel lab)
This sets the label to be used as the Axis display label |
void |
setMax(float newmax)
This is methods sets the current (as oppposed to original) maximum value of this axis. |
void |
setMin(float newmin)
This is methods sets the current (as oppposed to original) minimum value of this axis. |
void |
setOriginalMax(float newmax)
This is methods sets the original maximum value of this axis. |
void |
setOriginalMin(float newmin)
This is methods sets the original minimum value of this axis. |
void |
setOtherAxisSize(int size)
This methods tells the object what is the size of the other axis in pixels, the only size are intersted in is the width if the axis is vertical and the height if the axis is horizontal, the other dimension does not affect the drawing of the axis. |
void |
setResolutionAxis(boolean res)
This methods tells the object if it is to be treated as a resolution axis. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LGAxis(boolean vertical)
vertical
- a boolean to tell whether to treat this axis as a vertical axis or notMethod Detail |
---|
public void setResolutionAxis(boolean res)
res
- a boolean to tell whether to treat this axis as a resolution axis or notpublic boolean isResolutionAxis()
public void setLabel(javax.swing.JLabel lab)
lab
- a JLabel object containing the text, font and colour of the labelJLabel
public void setOtherAxisSize(int size)
size
- the size in pixels of the other axispublic int getAxisSize()
public void draw(java.awt.Graphics2D g, int w, int h)
g
- the graphic context on which to draw this axisw
- the overall width of the canvash
- the overall height of the canvaspublic float getMax()
public float getMin()
public void setMax(float newmax)
newmax
- the new maximum value as a floatpublic void setMin(float newmin)
newmin
- the new minimum value as a floatpublic void setOriginalMax(float newmax)
newmax
- the new maximum value as a floatpublic void setOriginalMin(float newmin)
newmin
- the new minimum value as a floatpublic void resetAxisRange()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |