|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.gui.PlotProperty
The PlotProperty
represents a set of GUI properties to
plot a star and the method to plot.
In the case the size is determined depending on the magnitude, the radius to plot a star circle is calculated while three parameters plot_ratio, limiting_mag and plot_radius are considered. The radius is calculated as:
radius = plot_ratio * ( limiting_mag - magnitude ) + 1; if (radius < plot_radius) radius = plot_radius;
Field Summary | |
protected java.awt.Color |
color
The color. |
protected boolean |
enabled
True if the stars can be plotted. |
protected boolean |
fill_flag
True if the mark is filled. |
protected double |
limiting_mag
The parameter to calculate a radius of circle to plot. |
protected int |
line_width
The line width. |
int |
mark
The mark. |
static int |
PLOT_CIRCLE
The number of mark which represents to plot a circle. |
protected int |
plot_radius
The radius. |
protected double |
plot_ratio
The parameter to calculate a radius of circle to plot. |
static int |
PLOT_RECTANGLE
The number of mark which represents to plot a rectangle. |
static int |
PLOT_TRIANGLE
The number of mark which represents to plot a triangle. |
protected boolean |
radius_mag_dependent
True if the size is determined depending on the magnitude. |
protected MagnitudeSystem |
system
The magnitude system. |
Constructor Summary | |
PlotProperty()
Constructs a PlotProperty . |
Method Summary | |
void |
disable()
Disables to plot the stars. |
void |
enable()
Enables to plot the stars. |
java.awt.Color |
getColor()
Gets the color. |
int |
getFixedRadius()
Gets the fixed radius. |
double |
getLimitingMag()
Gets the limiting magnitude. |
int |
getLineWidth()
Gets the line width. |
double |
getMagnitude(Star star)
Gets the converted magnitude of the specified star. |
MagnitudeSystem |
getMagnitudeSystem()
Gets the magnitude system definition. |
int |
getMark()
Gets the mark. |
int |
getRadius(double mag)
Gets the radius depending on the specified magnitude. |
boolean |
isEnabled()
Checks if the star can be plotted. |
boolean |
isFilled()
Returns true if the mark is filled. |
boolean |
isSizeFixed()
Returns true if the size is not determined depending on the magnitude |
void |
plot(java.awt.Graphics g,
int x,
int y,
StarPosition star)
Plots a star at the specified position. |
void |
setColor(java.awt.Color color)
Sets the color. |
void |
setDependentSizeParameters(double new_ratio,
double new_mag,
int new_radius)
Sets the parameters to calculate a radius of circle to plot. |
void |
setFilled(boolean flag)
Sets a flag to fill the mark or not. |
void |
setFixedRadius(int radius)
Sets the fixed radius. |
void |
setLimitingMag(double limiting_mag)
Sets the limiting magnitude. |
void |
setLineWidth(int width)
Sets the line width. |
void |
setMagnitudeSystem(MagnitudeSystem system)
Sets the magnitude system definition. |
void |
setMark(int mark)
Sets the mark. |
void |
useStarObjectColor()
Sets to use the color that the star object represents. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected boolean enabled
protected java.awt.Color color
protected boolean fill_flag
protected int line_width
protected int plot_radius
protected boolean radius_mag_dependent
protected double plot_ratio
protected double limiting_mag
protected MagnitudeSystem system
public int mark
public static final int PLOT_CIRCLE
public static final int PLOT_TRIANGLE
public static final int PLOT_RECTANGLE
Constructor Detail |
public PlotProperty()
PlotProperty
.Method Detail |
public boolean isEnabled()
public void enable()
public void disable()
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
color
- the color.public void useStarObjectColor()
public boolean isFilled()
public void setFilled(boolean flag)
flag
- true if the mark is filled.public int getLineWidth()
public void setLineWidth(int width)
width
- the line width.public int getFixedRadius()
public MagnitudeSystem getMagnitudeSystem()
public void setMagnitudeSystem(MagnitudeSystem system)
system
- the magnitude system.public double getMagnitude(Star star)
star
- the star.public int getRadius(double mag)
mag
- the magnitude.public boolean isSizeFixed()
public void setFixedRadius(int radius)
radius
- the radius.public void setDependentSizeParameters(double new_ratio, double new_mag, int new_radius)
new_ratio
- the new parameter for plot_ratio.new_mag
- the new parameter for limiting_mag.new_radius
- the new parameter for plot_radius.public double getLimitingMag()
public void setLimitingMag(double limiting_mag)
limiting_mag
- the limiting magnitude.public int getMark()
public void setMark(int mark)
number
- the number of mark.public void plot(java.awt.Graphics g, int x, int y, StarPosition star)
g
- the Graphics
to draw.x
- the x positon.y
- the y positon.star
- the star position object to plot.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |