|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--fundamentals.mouseInfo
The mouseInfo
contains information describing how a porion of
the real plane and the mathematical objects on it are displayed. This
informations is also used to convert the user's clicks to mathematical
positions.
Field Summary | |
static int |
AS_TARGET
Reference to the color used for objects given as targets. |
static int |
BACKGROUND
Reference to the background color. |
static int |
BY_PREMISE
Reference to the color used for objects given as premise. |
static int |
CONSTRUCTED
Reference to the color used for constructed objects. |
static int |
CONSTRUCTED_TARGET
Reference to the color used for self-constructed targets. |
static int |
DIVIDER
Reference to the color of dividers. |
static int |
EAST
|
static int |
ERROR
Reference to the color of dividers. |
double |
initialMinMax
Initial value, @see mouseInfo |
double |
maxSize
The longest side of the rectangle which is actually displayed |
double |
minSize
The side of the square which must be displayed |
static int |
NE
|
static int |
NORTH
|
static int |
NW
|
static int |
radiusCorner
The corner to use when drawing radii |
double |
scale
Object scaling; the lenght of a mathematical unit vector in pixels |
static int |
SE
|
static int |
SECONDARY
Reference to the color used for recycled objects. |
static int |
SELECT
Reference to the color used for selecting visible objects. |
static int |
SHADOW
Reference to the color of invisible objects. |
static int |
SOUTH
|
static int |
SW
|
static int |
WEST
|
int |
x0
Object offset; the first pixel coordinate of the (0,0) mathematical point |
int |
xAvailable
Number of pixels available on the x-axis |
double |
xCenter
The x-value of the center of the square which must be displayed |
int |
xCorner
Leftmost pixel column used to display the current lab |
double |
xSize
The width of the square being displayed |
int |
y0
Object offset; the second pixel coordinate of the (0,0) mathematical point |
int |
yAvailable
Number of pixels available on the y-axis |
double |
yCenter
The y-value of the center of the square which must be displayed |
int |
yCorner
Topmost pixel row used to display the current lab |
double |
ySize
The height of the rectangle which is actually displayed |
Constructor Summary | |
mouseInfo(int colorScheme)
Using the pixel size of the window, initializes all values to ensure that a square centered at (0,0) and with height 2*@see initialMinMax is visible. |
|
mouseInfo(int colorScheme,
int rows,
int columns,
int myrow,
int mycolumn)
Using the pixel size of the window, initializes all values to ensure that a square centered at (0,0) and with height 2*@see initialMinMax is visible. |
Method Summary | |
void |
abstractSize()
Initialize dimensions to a standard size |
fundamentals.mouseInfo |
cloneMe()
Return a clone of the present object |
void |
colorToPs(java.lang.StringBuffer work,
int colorCode)
|
double |
getIncoming(fundamentals.EuVector anchor,
fundamentals.EuReal radius,
int side)
Describe getIncoming method here. |
double |
getOutgoing(fundamentals.EuVector anchor,
fundamentals.EuReal radius,
int side)
Describe getOutgoing method here. |
int |
hashCode()
Degenerate a hash code associated to the current dimensions. |
boolean |
onCanvas(double x,
double y)
Finds out whether a given mathematical point is currently visible on the canvas |
boolean |
onCanvas(fundamentals.EuVector point)
Finds out whether a given mathematical point is currently visible on the canvas |
boolean |
pixelOnCanvas(int x,
int y)
Finds out whether a given pixel is inside the allotted canvas |
fundamentals.EuVector |
radiusAnchor()
The mathematical position of the center of the quartercircles used to indicate radii. |
void |
recompute(java.awt.Dimension size)
Using the existing pixel sizes, recalculates the values @see minSize, |
void |
resize()
Using the existing pixel sizes, recalculates the values @see scale, @see x0 and @see y0 to ensure that a square centered at (x,y) and with sides of lenght @see minSize is visible. |
void |
resize(java.awt.Dimension size)
Using the existing pixel sizes, recalculates the values @see scale, @see x0 and @see y0 to ensure that a square centered at (x,y) and with sides of lenght @see minSize is visible. |
boolean[] |
screenInside(fundamentals.EuVector anchor,
fundamentals.EuReal radius)
Generates a table determining whether or not the sides and cornes of the described screen are inside or outside the circle with passed center and radius. |
void |
setColor(java.awt.Graphics g,
int colorCode)
Returns color indicated by color code. |
java.lang.String |
toPs()
Return a description in PostScript format of what portion of the screen is visible. |
void |
translate(int x,
int y)
Translate the visible screen |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public double xCenter
public double yCenter
public double minSize
public double maxSize
public double xSize
public double ySize
public int xAvailable
public int yAvailable
public double scale
public int x0
public int xCorner
public int y0
public int yCorner
public final double initialMinMax
public static final int EAST
public static final int NE
public static final int NORTH
public static final int NW
public static final int WEST
public static final int SW
public static final int SOUTH
public static final int SE
public static final int BACKGROUND
public static final int BY_PREMISE
public static final int AS_TARGET
public static final int CONSTRUCTED
public static final int SECONDARY
public static final int CONSTRUCTED_TARGET
public static final int SELECT
public static final int SHADOW
public static final int ERROR
public static final int DIVIDER
public static int radiusCorner
Constructor Detail |
public mouseInfo(int colorScheme)
colorScheme
- an int
valuepublic mouseInfo(int colorScheme, int rows, int columns, int myrow, int mycolumn)
colorScheme
- an int
valuerows
- an int
valuecolumns
- an int
valuemyrow
- an int
valuemycolumn
- an int
valueMethod Detail |
public void resize(java.awt.Dimension size)
size
- a Dimension
valuepublic void resize()
public void abstractSize()
public void recompute(java.awt.Dimension size)
size
- a Dimension
valueand @see y0 to reflect a change in @see scale.
public fundamentals.EuVector radiusAnchor()
EuVector
valuepublic boolean pixelOnCanvas(int x, int y)
x
- first coordinate of the point in questiony
- second coordinate of the point in question
public boolean onCanvas(double x, double y)
x
- first coordinate of the point in questiony
- second coordinate of the point in question
public boolean onCanvas(fundamentals.EuVector point)
point
- the point in question
public boolean[] screenInside(fundamentals.EuVector anchor, fundamentals.EuReal radius)
anchor
- an EuVector
valueradius
- an EuReal
value
boolean[]
valuepublic double getIncoming(fundamentals.EuVector anchor, fundamentals.EuReal radius, int side) throws InternalException
getIncoming
method here.
anchor
- an EuVector
valueradius
- an EuReal
valueside
- a constant EAST, NORTH, SOUTH or WEST.
double
value
InternalException
- if an error occurspublic double getOutgoing(fundamentals.EuVector anchor, fundamentals.EuReal radius, int side) throws InternalException
getOutgoing
method here.
anchor
- an EuVector
valueradius
- an EuReal
valueside
- a constant EAST, NORTH, SOUTH or WEST.
double
value
InternalException
- if an error occurspublic fundamentals.mouseInfo cloneMe()
public void translate(int x, int y)
x
- an int
valuey
- an int
valuepublic void setColor(java.awt.Graphics g, int colorCode)
g
- an Object
valuecolorCode
- an int
valuepublic void colorToPs(java.lang.StringBuffer work, int colorCode)
public java.lang.String toPs()
String
valuepublic int hashCode()
hashCode
in class java.lang.Object
int
value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |