Search in sources :

Example 6 with MarkerStyle

use of com.revolsys.swing.map.layer.record.style.MarkerStyle in project com.revolsys.open by revolsys.

the class VertexStyleRenderer method paintSelected.

public void paintSelected(final Viewport2D viewport, final Graphics2D graphics, final GeometryFactory viewportGeometryFactory, final Vertex vertex) {
    if (Property.hasValue(vertex)) {
        MarkerStyle style;
        if (vertex.isFrom()) {
            style = this.fromVertexStyle;
        } else if (vertex.isTo()) {
            style = this.toVertexStyle;
        } else {
            style = this.vertexStyle;
        }
        final double orientation = vertex.getOrientaton();
        MarkerStyleRenderer.renderMarker(viewport, graphics, vertex, style, orientation);
    }
}
Also used : MarkerStyle(com.revolsys.swing.map.layer.record.style.MarkerStyle)

Example 7 with MarkerStyle

use of com.revolsys.swing.map.layer.record.style.MarkerStyle in project com.revolsys.open by revolsys.

the class AbstractSymbol method getIcon.

@Override
public Icon getIcon() {
    if (this.icon == null) {
        final Marker marker = newMarker();
        this.icon = marker.newIcon(new MarkerStyle());
    }
    return this.icon;
}
Also used : Marker(com.revolsys.swing.map.layer.record.style.marker.Marker) MarkerStyle(com.revolsys.swing.map.layer.record.style.MarkerStyle)

Aggregations

MarkerStyle (com.revolsys.swing.map.layer.record.style.MarkerStyle)7 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)4 MarkerStyleRenderer (com.revolsys.swing.map.layer.record.renderer.MarkerStyleRenderer)4 Vertex (com.revolsys.geometry.model.vertex.Vertex)2 BoundingBoxRecordLayer (com.revolsys.swing.map.layer.record.BoundingBoxRecordLayer)2 ImageMarker (com.revolsys.swing.map.layer.record.style.marker.ImageMarker)2 WebColors (com.revolsys.awt.WebColors)1 MapEx (com.revolsys.collection.map.MapEx)1 Maps (com.revolsys.collection.map.Maps)1 DataType (com.revolsys.datatype.DataType)1 DataTypes (com.revolsys.datatype.DataTypes)1 BoundingBox (com.revolsys.geometry.model.BoundingBox)1 Geometry (com.revolsys.geometry.model.Geometry)1 GeometryDataType (com.revolsys.geometry.model.GeometryDataType)1 LineString (com.revolsys.geometry.model.LineString)1 Point (com.revolsys.geometry.model.Point)1 GeometryEditor (com.revolsys.geometry.model.editor.GeometryEditor)1 LineSegment (com.revolsys.geometry.model.segment.LineSegment)1 BaseCloseable (com.revolsys.io.BaseCloseable)1 Logs (com.revolsys.logging.Logs)1