use of com.revolsys.swing.map.overlay.MeasureOverlay in project com.revolsys.open by revolsys.
the class MapPanel method addMapOverlays.
protected void addMapOverlays() {
new SelectRecordsOverlay(this);
new ZoomOverlay(this);
new EditRecordGeometryOverlay(this);
this.mouseOverlay = new MouseOverlay(this, this.layeredPane);
new EditGeoreferencedImageOverlay(this);
new MeasureOverlay(this);
this.toolTipOverlay = new ToolTipOverlay(this);
}
use of com.revolsys.swing.map.overlay.MeasureOverlay in project com.revolsys.open by revolsys.
the class ProjectFrame method newMenuTools.
protected MenuFactory newMenuTools() {
final MenuFactory tools = new MenuFactory("Tools");
final MapPanel map = getMapPanel();
final MeasureOverlay measureOverlay = map.getMapOverlay(MeasureOverlay.class);
tools.addCheckboxMenuItem("map", new RunnableAction("Measure Length", Icons.getIcon("ruler_line"), () -> measureOverlay.toggleMeasureMode(DataTypes.LINE_STRING)), new ObjectPropertyEnableCheck(measureOverlay, "measureDataType", DataTypes.LINE_STRING));
tools.addCheckboxMenuItem("map", new RunnableAction("Measure Area", Icons.getIcon("ruler_polygon"), () -> measureOverlay.toggleMeasureMode(DataTypes.POLYGON)), new ObjectPropertyEnableCheck(measureOverlay, "measureDataType", DataTypes.POLYGON));
tools.addMenuItem("script", "Run Script...", "script_go", this::actionRunScript);
return tools;
}
Aggregations