Package org.csstudio.ui.util.widgets
Class ImageStackWidget
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.csstudio.ui.util.widgets.ImageStackWidget
- All Implemented Interfaces:
Drawable
A widget to display a set of Images
-
Field Summary
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addImage
(String name, InputStream imageInputStream) Add a single Image to the stackvoid
Adds a listener, notified a porperty has been changed.Return an InputStream for the Image identified by nameget a set of all the image Names associated with the Images being displayed by this widgetget the name of the current Image in focusboolean
void
removeImage
(String name) Remove the Image identified by namevoid
Removes a listener.void
setEditable
(boolean editable) void
setImageInputStreamsMap
(Map<String, InputStream> imageInputStreamsMap) Set multiple Images to the widget, this will remove all existing images.void
setSelectedImageName
(String selectedImageName) set the Image to be brought into focus using its imageNameMethods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar, setScrollbarsMode
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, addTypedListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, getTypedListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, removeTypedListener, reskin, setData, setData
-
Field Details
-
changeSupport
-
-
Constructor Details
-
ImageStackWidget
-
-
Method Details
-
addPropertyChangeListener
Adds a listener, notified a porperty has been changed.- Parameters:
listener
- a new listener
-
removePropertyChangeListener
Removes a listener.- Parameters:
listener
- listener to be removed
-
isEditable
public boolean isEditable() -
setEditable
public void setEditable(boolean editable) -
setImageInputStreamsMap
public void setImageInputStreamsMap(Map<String, InputStream> imageInputStreamsMap) throws IOExceptionSet multiple Images to the widget, this will remove all existing images. In the imageInputStreamMap - the key defines the imageName and the value is an inputStream to the Image- Parameters:
imageInputStreamsMap
- - a map of image names and image input streams- Throws:
IOException
-
addImage
Add a single Image to the stack- Parameters:
name
- - the name to Identify the Image.imageInputStream
- - an inputStream for the Image to be added.- Throws:
IOException
-
removeImage
Remove the Image identified by name- Parameters:
name
- - the name of the Image to be removed- Throws:
IOException
-
getImage
Return an InputStream for the Image identified by name- Parameters:
name
- - name of the Image- Returns:
- InputStream - to the Image identified by name
-
getImageNames
get a set of all the image Names associated with the Images being displayed by this widget- Returns:
- Set of strings containing the names of all Images
-
getSelectedImageName
get the name of the current Image in focus- Returns:
- String imageName of the Image in focus
-
setSelectedImageName
set the Image to be brought into focus using its imageName- Parameters:
selectedImageName
-
-