|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel triptracker.client.map.ui.SuperPanel triptracker.client.map.ui.Map
public class Map
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class triptracker.client.map.ui.SuperPanel |
---|
coordList, map, realtime, route, user |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
Map(MapSocket model,
MapViewPanel view)
|
Method Summary | |
---|---|
void |
addCoordinate(Coordinate coord)
For adding coordinate while route is beeing plotted realtime. |
void |
addMapListener(MouseListener listener)
|
double |
calcX(double x)
Calculates x coordinate for plotting |
double |
calcY(double y)
Calculates y coordinate for plotting |
void |
checkLimits(int x,
int y)
Checking if coordinate is outside of window |
void |
drawBezierRoute(List<Coordinate> coordList)
Drawing route in bezier splines |
void |
drawStraightRoute(List<Coordinate> coordList)
Draw route. |
double[] |
getLimits(List<Coordinate> coordList)
Return edge limits for the given set of coordinates. |
double |
getRatio(double[] limits)
Sets the ratio between route bounds and actual window size. |
void |
go(double mvX,
double mvY)
Moves window specified pixel length, from center. |
void |
mouseClick(double x,
double y,
int button)
Handles action for mouseclick. |
double[] |
moveMatrix(double[] matrix,
double mvX,
double mvY)
|
protected void |
paintComponent(Graphics g)
|
void |
reset()
Resets map to initial size |
double[] |
setBorders(double[] limits)
Returns borders of what to show |
void |
setCenter(double x,
double y)
Sets position x,y to center of view |
void |
setCoordList(List<Coordinate> coordList)
Sets route to plot |
void |
setFollow(int follow)
If selected, will follow coordinates under realtime plotting |
void |
setMove()
Sets mouseklick to move to position |
void |
setRealtime(boolean realtime)
Sets realtime if route is plotted realtime |
void |
setView(boolean nr,
boolean dot,
boolean map,
int thick)
|
void |
setZoom()
Sets mouseklick to zoom to position |
void |
zoomIn()
Magnifies route with specified zoomRatio |
double[] |
zoomInMatrix(double[] x)
|
void |
zoomOut()
Zooms out route with specified zoomRatio |
double[] |
zoomOutMatrix(double[] x)
|
Methods inherited from class triptracker.client.map.ui.SuperPanel |
---|
getMap, getRoute, getUser, setRoute, setUser |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Map(MapSocket model, MapViewPanel view)
Method Detail |
---|
public void addMapListener(MouseListener listener)
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
public void setCoordList(List<Coordinate> coordList)
setCoordList
in class SuperPanel
public void reset()
public void setRealtime(boolean realtime)
public void setView(boolean nr, boolean dot, boolean map, int thick)
public void setZoom()
public void setMove()
public void setFollow(int follow)
public double[] getLimits(List<Coordinate> coordList)
coordList
- list of coordinates
public double[] setBorders(double[] limits)
public double getRatio(double[] limits)
limits
- = limits of route
public void drawStraightRoute(List<Coordinate> coordList)
coordList
- list of coordinates for routepublic void drawBezierRoute(List<Coordinate> coordList)
public void addCoordinate(Coordinate coord)
public void checkLimits(int x, int y)
public double calcX(double x)
public double calcY(double y)
public void zoomIn()
public void zoomOut()
public void mouseClick(double x, double y, int button)
public void setCenter(double x, double y) throws NullPointerException
NullPointerException
public void go(double mvX, double mvY)
public double[] zoomInMatrix(double[] x)
public double[] zoomOutMatrix(double[] x)
public double[] moveMatrix(double[] matrix, double mvX, double mvY)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |