Class LiveStreamPlottable
java.lang.Object
uk.ac.gda.client.live.stream.handlers.LiveStreamPlottable
- All Implemented Interfaces:
LiveStreamMapObject,MapObject,PlottableMapObject
A class that wraps a
LiveStreamConnection and implements LiveStreamMapObject
so that a live stream can be plotted in the map view.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.dawnsci.mapping.ui.datamodel.LiveStreamMapObject
LiveStreamMapObject.IAxisMoveListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconnect()voidList<org.eclipse.january.dataset.IDataset> getAxes()Object[]double[]Get the color rangeorg.eclipse.january.dataset.IDynamicShapeGets the (unique) long name for the objectorg.eclipse.january.dataset.IDatasetgetMap()Gets the plottable datagetPath()Get the path to the filedouble[]getRange()org.eclipse.january.dataset.IDatasetgetSpectrum(double x, double y) Get the slice of the parent data that corresponds to the specified x,y positionintGet the transparency value for the mapbooleanbooleanisLive()Returns whether this data is from a live scanbooleanReturn true if the object is plottedvoidvoidsetColorRange(double[] range) Set the color range for the mapvoidsetPlotted(boolean plotted) Set whether the object should be plotted or notvoidsetTransparency(int transparency) Set the transparency value for the mapvoidupdate()Call to update the internal data from file.
-
Constructor Details
-
LiveStreamPlottable
-
-
Method Details
-
hasChildren
public boolean hasChildren()- Specified by:
hasChildrenin interfaceMapObject
-
getChildren
- Specified by:
getChildrenin interfaceMapObject
-
getRange
public double[] getRange() -
getLongName
Description copied from interface:PlottableMapObjectGets the (unique) long name for the object- Specified by:
getLongNamein interfacePlottableMapObject- Returns:
- longName
-
getMap
public org.eclipse.january.dataset.IDataset getMap()Description copied from interface:PlottableMapObjectGets the plottable data- Specified by:
getMapin interfacePlottableMapObject- Returns:
- map
-
isLive
public boolean isLive()Description copied from interface:PlottableMapObjectReturns whether this data is from a live scan- Specified by:
isLivein interfacePlottableMapObject- Returns:
-
update
public void update()Description copied from interface:PlottableMapObjectCall to update the internal data from file.For live files when the map size is increasing
- Specified by:
updatein interfacePlottableMapObject
-
getTransparency
public int getTransparency()Description copied from interface:PlottableMapObjectGet the transparency value for the map- Specified by:
getTransparencyin interfacePlottableMapObject- Returns:
-
getSpectrum
public org.eclipse.january.dataset.IDataset getSpectrum(double x, double y) Description copied from interface:PlottableMapObjectGet the slice of the parent data that corresponds to the specified x,y position- Specified by:
getSpectrumin interfacePlottableMapObject- Parameters:
x-y-- Returns:
- data
-
getPath
Description copied from interface:PlottableMapObjectGet the path to the file- Specified by:
getPathin interfacePlottableMapObject- Returns:
-
isPlotted
public boolean isPlotted()Description copied from interface:PlottableMapObjectReturn true if the object is plotted- Specified by:
isPlottedin interfacePlottableMapObject- Returns:
-
setPlotted
public void setPlotted(boolean plotted) Description copied from interface:PlottableMapObjectSet whether the object should be plotted or not- Specified by:
setPlottedin interfacePlottableMapObject- Parameters:
plotted-
-
getAxes
- Specified by:
getAxesin interfaceLiveStreamMapObject
-
connect
- Specified by:
connectin interfaceLiveStreamMapObject- Throws:
LiveStreamException
-
disconnect
- Specified by:
disconnectin interfaceLiveStreamMapObject- Throws:
LiveStreamException
-
addAxisListener
- Specified by:
addAxisListenerin interfaceLiveStreamMapObject
-
removeAxisListener
- Specified by:
removeAxisListenerin interfaceLiveStreamMapObject
-
setColorRange
public void setColorRange(double[] range) Description copied from interface:PlottableMapObjectSet the color range for the map- Specified by:
setColorRangein interfacePlottableMapObject- Parameters:
range-
-
getColorRange
public double[] getColorRange()Description copied from interface:PlottableMapObjectGet the color range- Specified by:
getColorRangein interfacePlottableMapObject- Returns:
- range
-
getDynamicDataset
public org.eclipse.january.dataset.IDynamicShape getDynamicDataset()- Specified by:
getDynamicDatasetin interfaceLiveStreamMapObject
-
setTransparency
public void setTransparency(int transparency) Description copied from interface:PlottableMapObjectSet the transparency value for the map- Specified by:
setTransparencyin interfacePlottableMapObject
-