Interface IRegionSystem
- All Known Subinterfaces:
IPlottingSystem<T>,IPlottingSystemViewer<T>
- All Known Implementing Classes:
AbstractHyperPlotViewer,AbstractPlottingSystem,ArpesSlicePlotViewer,DatasetTablePlotViewer,HyperPlotViewer,IPlottingSystemViewer.Stub,JRealityPlotViewer,LightWeightPlotViewer,PlottingSystemImpl,ThreadSafePlottingSystem
public interface IRegionSystem
No methods in this interface are thread safe.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a selection region to the graph.booleanvoidRemove all regions.voidIf there is a current region tool clear this.createRegion(String name, IRegion.RegionType regionType) Creates a selection region by type.Get a region by name.Current regions in the plotting system.getRegions(IRegion.RegionType type) Get all the regions for a given region type, null if there are no regions, empty list if there are regions but not of this type.voidremoveRegion(IRegion region) Remove a selection region to the graph.booleanvoidrenameRegion(IRegion region, String name) Renames the region, better than calling setName on the IRegion as the collection of regions is updated properly.
-
Method Details
-
createRegion
Creates a selection region by type. This does not create any user interface for the region. You can then call methods on the region to set colour and position for the selection. Use addRegion(...) and removeRegion(...) to control if the selection is active on the graph. Usually thread safe.- Parameters:
name-regionType-- Returns:
- Throws:
Exception- if name exists already.
-
addRegion
Add a selection region to the graph. Not thread safe, call from UI thread.- Parameters:
region-
-
removeRegion
Remove a selection region to the graph. Not thread safe, call from UI thread.- Parameters:
region-
-
getRegion
Get a region by name.- Parameters:
name-- Returns:
-
getRegions
Get all the regions for a given region type, null if there are no regions, empty list if there are regions but not of this type.- Parameters:
type-- Returns:
-
addRegionListener
- Parameters:
l-
-
removeRegionListener
- Parameters:
l-
-
clearRegions
void clearRegions()Remove all regions. Not thread safe, call from UI thread. -
clearRegionTool
void clearRegionTool()If there is a current region tool clear this. -
getRegions
Collection<IRegion> getRegions()Current regions in the plotting system.- Returns:
-
renameRegion
Renames the region, better than calling setName on the IRegion as the collection of regions is updated properly. No event will be fired.
-