|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.noaa.pmel.sgt.Ruler
public class Ruler
Description of Class Ruler
Field Summary | |
---|---|
static int |
BOTH_SIDES
Draw the tics on both sides of the axes. |
static int |
HORIZONTAL
Orient Key horizontally. |
protected java.awt.Color |
labelColor_
|
protected java.awt.Font |
labelFont_
|
protected double |
labelHeight_
|
protected int |
labelInterval_
|
protected int |
labelPosition_
|
protected double |
largeTicHeight_
|
protected java.awt.Color |
lineColor_
|
static int |
NEGATIVE_SIDE
Place the label and/or tic on the negative side of the axis. |
static int |
NO_LABEL
Do not draw a label and/or tic. |
protected int |
numSmallTics_
|
protected Rectangle2D.Double |
pBounds_
|
static int |
POSITIVE_SIDE
Place the label and/or tic on the positive side of the axis. |
protected int |
sigDigits_
|
protected double |
smallTicHeight_
|
protected int |
ticPosition_
|
protected Range2D |
uRange_
|
static int |
VERTICAL
Orient Key vertically. |
Constructor Summary | |
---|---|
Ruler()
Default constructor for Ruler. |
|
Ruler(java.lang.String ident)
Constructor for Ruler. |
Method Summary | |
---|---|
LayerChild |
copy()
Create a copy of the LayerChild . |
void |
draw(java.awt.Graphics g)
Draw the LayerChild . |
protected void |
drawSmallXTics(java.awt.Graphics g,
double xu,
double xtest,
double del,
double yp)
|
protected void |
drawSmallYTics(java.awt.Graphics g,
double xp,
double yu,
double ytest,
double del)
|
protected void |
drawXTic(java.awt.Graphics g,
double xp,
double yp,
double ticHeight)
|
protected void |
drawYTic(java.awt.Graphics g,
double xp,
double yp,
double ticHeight)
|
java.awt.Rectangle |
getBounds()
Get the bounding box for the axis in device units. |
Rectangle2D.Double |
getBoundsP()
Get the bounding box for the axis in physical units. |
java.lang.String |
getId()
Set the axis identifier. |
java.awt.Color |
getLabelColor()
|
java.awt.Font |
getLabelFont()
Get the label font. |
java.lang.String |
getLabelFormat()
|
double |
getLabelHeightP()
Get the label height. |
int |
getLabelInterval()
|
int |
getLabelPosition()
Get the label position. |
double |
getLargeTicHeightP()
Get the large tic height. |
Layer |
getLayer()
Get the associated Layer . |
java.awt.Color |
getLineColor()
|
int |
getNumberSmallTics()
Get the number of small tics between large tics. |
int |
getOrientation()
Get axis orientation |
AbstractPane |
getPane()
Get AbstractPane of the LayerChild . |
Range2D |
getRangeU()
|
int |
getSignificantDigits()
|
double |
getSmallTicHeightP()
Get the small tic height. |
int |
getTicPosition()
Get the tic position. |
SGLabel |
getTitle()
Get the axis title. |
boolean |
isSelectable()
Returns true if the current state is selectable. |
boolean |
isSelected()
Returns true if the object's selected property is set. |
boolean |
isVisible()
Check if LayerChild is visible. |
void |
modified(java.lang.String mess)
Used by sgt internally. |
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setBounds(java.awt.Rectangle r)
|
void |
setBoundsP(Rectangle2D.Double bounds)
Set the bounding box for the axis in physical units. |
void |
setId(java.lang.String id)
Set the axis identifier. |
void |
setLabelColor(java.awt.Color labelColor)
|
void |
setLabelFont(java.awt.Font fnt)
Set the label font. |
void |
setLabelFormat(java.lang.String labelFormat)
|
void |
setLabelHeightP(double lhgt)
Set the label height in physical units. |
void |
setLabelInterval(int labelInterval)
|
void |
setLabelPosition(int labp)
Set the label position. |
void |
setLargeTicHeightP(double lthgt)
Set the large tic height in physical units. |
void |
setLayer(Layer l)
Associate a Layer with the LayerChild . |
void |
setLineColor(java.awt.Color lineColor)
|
void |
setNumberSmallTics(int nstic)
Set the number of small tics between large tics. |
void |
setOrientation(int orient)
Set ruler orientation. |
void |
setRangeU(Range2D range)
Change the user unit range of Ruler |
void |
setSelectable(boolean select)
Set the Selectable property. |
void |
setSelected(boolean sel)
Sets the selected property. |
void |
setSignificantDigits(int sigDigits)
|
void |
setSmallTicHeightP(double sthgt)
Set the small tic height in physical units. |
void |
setTicPosition(int tpos)
Set the tic position. |
void |
setTitle(SGLabel title)
Set the axis title. |
void |
setVisible(boolean visible)
Set visibility for a LayerChild . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.noaa.pmel.sgt.LayerChild |
---|
toString |
Field Detail |
---|
protected Range2D uRange_
protected Rectangle2D.Double pBounds_
protected int numSmallTics_
protected double largeTicHeight_
protected double smallTicHeight_
protected int ticPosition_
protected int labelPosition_
protected int labelInterval_
protected java.awt.Font labelFont_
protected java.awt.Color labelColor_
protected java.awt.Color lineColor_
protected double labelHeight_
protected int sigDigits_
public static final int HORIZONTAL
public static final int VERTICAL
public static final int POSITIVE_SIDE
public static final int NEGATIVE_SIDE
public static final int NO_LABEL
public static final int BOTH_SIDES
Constructor Detail |
---|
public Ruler()
public Ruler(java.lang.String ident)
numberSmallTics = 0 largeTicHeightP = 0.1 smallTicHeightP = 0.05 ticPosition = NEGATIVE_SIDE labelPosition = NEGATIVE_SIDE labelInterval = 2 labelFont = Font("Helvetica", Font.ITALIC, 10); labelHeightP = 0.15 significantDigits = 2; labelFormat = "" title = null orientation = HORIZONTAL Id = ""
id
- axis identificationMethod Detail |
---|
protected void drawXTic(java.awt.Graphics g, double xp, double yp, double ticHeight)
protected void drawYTic(java.awt.Graphics g, double xp, double yp, double ticHeight)
protected void drawSmallXTics(java.awt.Graphics g, double xu, double xtest, double del, double yp)
protected void drawSmallYTics(java.awt.Graphics g, double xp, double yu, double ytest, double del)
public LayerChild copy()
LayerChild
LayerChild
.
copy
in interface LayerChild
LayerChild
.public void setSelected(boolean sel)
Selectable
setSelected
in interface Selectable
sel
- true if selected, false if not.public boolean isSelected()
Selectable
isSelected
in interface Selectable
public void setSelectable(boolean select)
Selectable
setSelectable
in interface Selectable
select
- if true object is selectablepublic boolean isSelectable()
Selectable
isSelectable
in interface Selectable
public void setLargeTicHeightP(double lthgt)
lthgt
- large tic height.public double getLargeTicHeightP()
public void setNumberSmallTics(int nstic)
nstic
- number of small tics.public int getNumberSmallTics()
public void setSmallTicHeightP(double sthgt)
sthgt
- small tic height.public double getSmallTicHeightP()
public void setTicPosition(int tpos)
tpos
- tic positionpublic int getTicPosition()
public void setLabelPosition(int labp)
lapb
- label position.public int getLabelPosition()
public void setLabelFont(java.awt.Font fnt)
fnt
- label fontpublic java.awt.Font getLabelFont()
public void setLabelHeightP(double lhgt)
lhgt
- label height.public double getLabelHeightP()
public void setId(java.lang.String id)
setId
in interface LayerChild
id
- identifierpublic java.lang.String getId()
getId
in interface LayerChild
id
- identifier
LayerChild
identification.public void setLayer(Layer l)
LayerChild
Layer
with the LayerChild
.
setLayer
in interface LayerChild
l
- Parent layer.public Layer getLayer()
LayerChild
Layer
.
getLayer
in interface LayerChild
public AbstractPane getPane()
LayerChild
AbstractPane
of the LayerChild
.
getPane
in interface LayerChild
public void modified(java.lang.String mess)
LayerChild
modified
in interface LayerChild
public void setRangeU(Range2D range)
Ruler
public Range2D getRangeU()
public void setBoundsP(Rectangle2D.Double bounds)
public Rectangle2D.Double getBoundsP()
public void setOrientation(int orient)
or
- orientationpublic int getOrientation()
public void setTitle(SGLabel title)
title
- axis titlepublic SGLabel getTitle()
public java.awt.Rectangle getBounds()
getBounds
in interface Selectable
public void setBounds(java.awt.Rectangle r)
public void setBounds(int x, int y, int width, int height)
public void draw(java.awt.Graphics g)
LayerChild
LayerChild
.
draw
in interface LayerChild
g
- Graphics contextpublic boolean isVisible()
LayerChild
LayerChild
is visible.
isVisible
in interface LayerChild
public void setVisible(boolean visible)
LayerChild
LayerChild
.
setVisible
in interface LayerChild
visible
- visible if truepublic int getLabelInterval()
public void setLabelInterval(int labelInterval)
public int getSignificantDigits()
public void setSignificantDigits(int sigDigits)
public java.lang.String getLabelFormat()
public void setLabelFormat(java.lang.String labelFormat)
public java.awt.Color getLabelColor()
public void setLabelColor(java.awt.Color labelColor)
public java.awt.Color getLineColor()
public void setLineColor(java.awt.Color lineColor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |