public class DisplayObjectManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
DisplayObjectManager.PointWithAngle
Diese Klasse kapselt ein Paar bestehend aus einem Punkt und einem Winkel.
|
Modifier and Type | Field and Description |
---|---|
private AttributeGroup |
_areaCoordinatesAttributeGroup |
private AttributeGroup |
_complexCoordinatesAttributeGroup |
private AttributeGroup |
_composedOfLinesAttributeGroup |
private DataModel |
_configuration |
private static Object |
_configurationAccess |
private ClientDavInterface |
_connection |
private static Debug |
_debug |
(package private) static double |
_ignoreDistance |
private SystemObjectType |
_lineComposedOfLinesType |
private AttributeGroup |
_lineCoordinatesAttributeGroup |
private SystemObjectType |
_lineWithCoordinatesType |
private MapPane |
_mapPane |
private AttributeGroup |
_pointCoordinateAttributeGroup |
private AttributeGroup |
_pointOnLineAttributeGroup |
private SystemObjectType |
_pointOnLineType |
private SystemObjectType |
_pointWithCoordinatesType |
private Deque<MapPane.MapScaleListener> |
_unaddedMapScaleListeners |
private Deque<DisplayObject> |
_unsubscribedDisplayObjects |
private double |
_xMax |
private double |
_xMin |
private double |
_yMax |
private double |
_yMin |
Constructor and Description |
---|
DisplayObjectManager(ClientDavInterface connection,
MapPane mapPane)
Der Konstruktor der DisplayObject-Verwaltung.
|
Modifier and Type | Method and Description |
---|---|
void |
addMapScaleListeners()
Mit dieser Methode werden alle DisplayObjects, die als MapScaleListener
zu registrieren sind, beim MapPane registriert.
|
private void |
appendCoordinates(SystemObject systemObject,
List<Path2D.Double> polylines) |
private static void |
customiseUTM(UTMCoordinate utm) |
private DisplayObjectManager.PointWithAngle |
determinePointCoordinate(List<Object> lineCoordinates,
double offset) |
private void |
dumpPolylines(List<Object> polylines) |
private List<Object> |
getAreaCoordinates(SystemObject systemObject) |
private List<Object> |
getComplexCoordinates(SystemObject systemObject) |
List<DisplayObject> |
getDisplayObjects(ViewEntry entry,
JProgressBar progressBar)
Der DisplayObjectManager initialisiert beim Aufruf dieser Methode alle DisplayObjects
zu dem in dem ViewEntry enthaltenen Layer.
|
private Rectangle |
getDisplayRectangle() |
Rectangle |
getDisplayRectangle(List<SystemObject> systemObjects)
Gibt das die SystemObjects umgebende Rechteck zurück.
|
private double |
getMeterDistance(double x1,
double y1,
double x2,
double y2) |
private Collection<SystemObject> |
getObjects(Collection<Long> ids) |
private List<Object> |
getPointCoordinates(SystemObject systemObject) |
private List<Object> |
getPolylines(SystemObject systemObject) |
private Map<DisplayObjectType,List<PrimitiveFormPropertyPair>> |
getPrimitiveFormPropertyPairs(DOTCollection dotCollection) |
double |
getxMax()
Gibt die größte bisher gefundene x-Koordinate zurück.
|
double |
getxMin()
Gibt die kleinste bisher gefundene x-Koordinate zurück.
|
double |
getyMax()
Gibt die größte bisher gefundene y-Koordinate zurück.
|
double |
getyMin()
Gibt die kleinste bisher gefundene y-Koordinate zurück.
|
private Rectangle |
increaseRectangle(Rectangle rectangle) |
private void |
initializeAreas(ViewEntry entry,
List<SystemObject> systemObjects,
List<DisplayObject> returnList,
JProgressBar progressBar) |
private void |
initializeComplexes(ViewEntry entry,
List<SystemObject> systemObjects,
List<DisplayObject> returnList,
JProgressBar progressBar) |
private void |
initializeLines(ViewEntry entry,
List<SystemObject> systemObjects,
List<DisplayObject> returnList,
JProgressBar progressBar) |
private void |
initializePoints(ViewEntry entry,
List<SystemObject> systemObjects,
List<DisplayObject> returnList,
JProgressBar progressBar) |
private Double |
orientedAngleWithXAxis(double x,
double y) |
private void |
preloadLines(Collection<SystemObject> objectCollection) |
private void |
printExtremeCoordinates() |
private void |
simplifyCoordinates(List<Path2D.Double> rawPolylines,
List<Object> polylines) |
void |
subscribeDisplayObjects()
Mit dieser Methode werden alle Anmeldungen beim Datenverteiler vorgenommen,
die sich auf seit dem letzten Aufruf dieser Methode durch Initialisierungen
neuer DisplayObjects ergeben haben.
|
void |
unsubscribeDisplayObjects(Collection<DisplayObject> displayObjects)
Mit dieser Methode werden alle Anmeldungen beim Datenverteiler zurückgenommen,
die sich vom DisplayObjectManager in der Methode subscribeDisplayObjects() für
die übergebenen DisplayObjects gemacht wurden.
|
private void |
updateExtremeCoordinates(UTMCoordinate utm) |
private ClientDavInterface _connection
private DataModel _configuration
private MapPane _mapPane
private Deque<DisplayObject> _unsubscribedDisplayObjects
private Deque<MapPane.MapScaleListener> _unaddedMapScaleListeners
private SystemObjectType _lineComposedOfLinesType
private SystemObjectType _lineWithCoordinatesType
private AttributeGroup _composedOfLinesAttributeGroup
private AttributeGroup _lineCoordinatesAttributeGroup
private SystemObjectType _pointOnLineType
private SystemObjectType _pointWithCoordinatesType
private AttributeGroup _pointOnLineAttributeGroup
private AttributeGroup _pointCoordinateAttributeGroup
private AttributeGroup _areaCoordinatesAttributeGroup
private AttributeGroup _complexCoordinatesAttributeGroup
private double _xMin
private double _yMin
private double _xMax
private double _yMax
static double _ignoreDistance
private static final Object _configurationAccess
private static final Debug _debug
public DisplayObjectManager(ClientDavInterface connection, MapPane mapPane)
connection
- die Datenverteiler-VerbindungmapPane
- die Kartenansichtpublic List<DisplayObject> getDisplayObjects(ViewEntry entry, JProgressBar progressBar)
entry
- ein ViewEntryprogressBar
- private Rectangle getDisplayRectangle()
public Rectangle getDisplayRectangle(List<SystemObject> systemObjects)
systemObjects
- eine Liste von Systemobjekten oder null
private Map<DisplayObjectType,List<PrimitiveFormPropertyPair>> getPrimitiveFormPropertyPairs(DOTCollection dotCollection)
private void initializePoints(ViewEntry entry, List<SystemObject> systemObjects, List<DisplayObject> returnList, JProgressBar progressBar)
private Collection<SystemObject> getObjects(Collection<Long> ids)
private void initializeLines(ViewEntry entry, List<SystemObject> systemObjects, List<DisplayObject> returnList, JProgressBar progressBar)
private void preloadLines(Collection<SystemObject> objectCollection)
private List<Object> getPointCoordinates(SystemObject systemObject)
private DisplayObjectManager.PointWithAngle determinePointCoordinate(List<Object> lineCoordinates, double offset)
private Double orientedAngleWithXAxis(double x, double y)
private double getMeterDistance(double x1, double y1, double x2, double y2)
private List<Object> getPolylines(SystemObject systemObject)
private void appendCoordinates(SystemObject systemObject, List<Path2D.Double> polylines)
public double getxMin()
public double getyMin()
public double getxMax()
public double getyMax()
private void printExtremeCoordinates()
private void updateExtremeCoordinates(UTMCoordinate utm)
private void simplifyCoordinates(List<Path2D.Double> rawPolylines, List<Object> polylines)
public void subscribeDisplayObjects()
public void unsubscribeDisplayObjects(Collection<DisplayObject> displayObjects)
displayObjects
- eine Menge von DisplayObjectspublic void addMapScaleListeners()
private void initializeComplexes(ViewEntry entry, List<SystemObject> systemObjects, List<DisplayObject> returnList, JProgressBar progressBar)
private List<Object> getComplexCoordinates(SystemObject systemObject)
private void initializeAreas(ViewEntry entry, List<SystemObject> systemObjects, List<DisplayObject> returnList, JProgressBar progressBar)
private List<Object> getAreaCoordinates(SystemObject systemObject)
private static void customiseUTM(UTMCoordinate utm)