|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcivquest.swing.quadmap.Painter
This class provides some painting-functions for use with QuadMap. They paint into the viewport-view of the QuadMap-object assigned to this Painter-instance. If nothing else is mentioned, they get absolute paint-coords (definition see abstract class Properties). They then paint all necessary objects (multiple are possible because some absolute paint coords exist multiple times in the viewport-view) into the viewport-view.
Constructor Summary | |
Painter(QuadMap quadMap)
|
Method Summary | |
void |
drawDashedLine(Coordinate c1,
Coordinate c2,
java.awt.Graphics g,
int dashLength)
Draws a line from c1 to c2 using the given Graphics g. |
void |
drawFullCircle(java.awt.Graphics g,
Coordinate m,
int radius,
boolean filled)
|
void |
drawGeoPrimitive(java.awt.Graphics g,
civquest.util.swing.geoprim.GeoPrimitive geoPrim)
|
void |
drawLine(Coordinate c1,
Coordinate c2,
java.awt.Graphics g)
Draws a line from c1 to c2 using the given Graphics g. |
void |
drawShortestLine(Coordinate c1,
Coordinate c2,
java.awt.Graphics g)
Wrapper-function for drawing a non-dashed line using drawShortestLine. |
void |
drawShortestLine(Coordinate c1,
Coordinate c2,
java.awt.Graphics g,
boolean dashed,
int dashLength)
Draws a line from c1 to c2 using the given Graphics g. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Painter(QuadMap quadMap)
Method Detail |
public void drawGeoPrimitive(java.awt.Graphics g, civquest.util.swing.geoprim.GeoPrimitive geoPrim)
public void drawLine(Coordinate c1, Coordinate c2, java.awt.Graphics g)
c1
- any abs. paint-coordc2
- any abs. paint-coordg
- graphics that paints on the JComponent quadMappublic void drawDashedLine(Coordinate c1, Coordinate c2, java.awt.Graphics g, int dashLength)
c1
- any abs. paint-coordc2
- any abs. paint-coordg
- graphics that paints on the JComponent quadMapdashLength
- length of one dashpublic void drawFullCircle(java.awt.Graphics g, Coordinate m, int radius, boolean filled)
public void drawShortestLine(Coordinate c1, Coordinate c2, java.awt.Graphics g)
drawShortestLine(Coordinate, Coordinate, Graphics, boolean, int)
.
c1
- any abs. paint-coordc2
- any abs. paint-coordg
- graphics painting on quadMappublic void drawShortestLine(Coordinate c1, Coordinate c2, java.awt.Graphics g, boolean dashed, int dashLength)
c1
- any abs. paint-coordc2
- any abs. paint-coordg
- graphics painting on quadMapdashed
- should the line be dashed?dashLength
- if dashed == true, length of the dashes (approximately,
for more information see
DashedLine
);
if dashed == false, this will be ignored.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |