Class RegionUtils
java.lang.Object
org.eclipse.dawnsci.plotting.api.region.RegionUtils
Class containing utility methods for regions to avoid duplication
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]getRegionNames(IPlottingSystem<?> system) static String[]getRegionNames(IPlottingSystem<?> system, IRegion.RegionType type) static org.eclipse.swt.graphics.ColorgetUniqueColor(IRegion.RegionType type, IRegionSystem plotter, Collection<org.eclipse.swt.graphics.Color> colours) static StringgetUniqueName(String nameStub, IRegionSystem system, String... usedNames) Call to get a unique region namestatic final IRegionreplaceCreateRegion(IRegionSystem system, String name, IRegion.RegionType type) Creates a region (first deleting it if one with that name exists)
-
Constructor Details
-
RegionUtils
public RegionUtils()
-
-
Method Details
-
getUniqueName
Call to get a unique region name- Parameters:
nameStub-system-- Returns:
-
getUniqueColor
public static org.eclipse.swt.graphics.Color getUniqueColor(IRegion.RegionType type, IRegionSystem plotter, Collection<org.eclipse.swt.graphics.Color> colours) - Parameters:
plotter-- Returns:
-
replaceCreateRegion
public static final IRegion replaceCreateRegion(IRegionSystem system, String name, IRegion.RegionType type) throws Exception Creates a region (first deleting it if one with that name exists)- Parameters:
string-xaxis-- Returns:
- Throws:
Exception
-
getRegionNames
-
getRegionNames
-