Search in sources :

Example 1 with MeasureOverlay

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);
}
Also used : EditRecordGeometryOverlay(com.revolsys.swing.map.overlay.record.EditRecordGeometryOverlay) MouseOverlay(com.revolsys.swing.map.overlay.MouseOverlay) MeasureOverlay(com.revolsys.swing.map.overlay.MeasureOverlay) EditGeoreferencedImageOverlay(com.revolsys.swing.map.overlay.EditGeoreferencedImageOverlay) SelectRecordsOverlay(com.revolsys.swing.map.overlay.record.SelectRecordsOverlay) ZoomOverlay(com.revolsys.swing.map.overlay.ZoomOverlay) ToolTipOverlay(com.revolsys.swing.map.overlay.ToolTipOverlay)

Example 2 with MeasureOverlay

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;
}
Also used : ObjectPropertyEnableCheck(com.revolsys.swing.action.enablecheck.ObjectPropertyEnableCheck) MeasureOverlay(com.revolsys.swing.map.overlay.MeasureOverlay) MenuFactory(com.revolsys.swing.menu.MenuFactory) RunnableAction(com.revolsys.swing.action.RunnableAction)

Aggregations

MeasureOverlay (com.revolsys.swing.map.overlay.MeasureOverlay)2 RunnableAction (com.revolsys.swing.action.RunnableAction)1 ObjectPropertyEnableCheck (com.revolsys.swing.action.enablecheck.ObjectPropertyEnableCheck)1 EditGeoreferencedImageOverlay (com.revolsys.swing.map.overlay.EditGeoreferencedImageOverlay)1 MouseOverlay (com.revolsys.swing.map.overlay.MouseOverlay)1 ToolTipOverlay (com.revolsys.swing.map.overlay.ToolTipOverlay)1 ZoomOverlay (com.revolsys.swing.map.overlay.ZoomOverlay)1 EditRecordGeometryOverlay (com.revolsys.swing.map.overlay.record.EditRecordGeometryOverlay)1 SelectRecordsOverlay (com.revolsys.swing.map.overlay.record.SelectRecordsOverlay)1 MenuFactory (com.revolsys.swing.menu.MenuFactory)1