T - the "Modify" Link control used to upload a new image picture.java.beans.PropertyChangeListener, java.util.EventListenerFormPictureControl, PictureControlpublic abstract class AbstractPictureControl<T extends org.eclipse.swt.widgets.Control>
extends org.eclipse.swt.widgets.Composite
implements java.beans.PropertyChangeListener
Label, SWT
Composite and Link according if you use only SWT (see
PictureControl) or SWT Form Toolkit (see FormPictureControl.| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
BUNDLE_NAME |
Bundle name constant
|
static java.lang.String |
IMAGE_BYTEARRAY_PROPERTY |
| Constructor | Description |
|---|---|
AbstractPictureControl(org.eclipse.swt.widgets.Composite parent) |
Constructor for
AbstractPictureControl with default SWT styles. |
AbstractPictureControl(org.eclipse.swt.widgets.Composite parent,
int compositeStyle,
int labelStyle,
int linkStyle) |
Constructor for
AbstractPictureControl with given SWT style . |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener) |
|
void |
dispose() |
|
T |
getDeleteImageLink() |
Returns the "Delete" Link control used to open Explorer files to change
image.
|
byte[] |
getImageByteArray() |
Returns the byte array of the image picture and null if none picture was
setted.
|
java.io.InputStream |
getImageStream() |
Returns the
InputStream of the image picture and null if none
picture was setted. |
java.lang.Integer |
getMaxImageHeight() |
Returns the maximum height of the image.
|
java.lang.Integer |
getMaxImageWidth() |
Returns the maximum width of the image.
|
T |
getModifyImageLink() |
Returns the "Modify" Link control used to open Explorer files to change
image.
|
org.eclipse.swt.widgets.Label |
getPictureLabel() |
Returns the picture label which hosts the picture image.
|
void |
propertyChange(java.beans.PropertyChangeEvent arg0) |
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener) |
|
void |
setDefaultImage(org.eclipse.swt.graphics.Image defaultImage) |
Set the default image for the picture.
|
void |
setDeleteImageLinkText(java.lang.String text) |
Set the text of the "Modify" Link.
|
void |
setFilterExtensions(java.lang.String[] extensions) |
Set the file extensions which the dialog will use to filter the files it
shows to the argument, which may be null.
|
void |
setImageByteArray(byte[] imageByteArray) |
Set the current byte array of the image picture.
|
void |
setImageStream(java.io.InputStream stream) |
Set the current
InputStream of the image picture. |
void |
setLocale(java.util.Locale locale) |
Sets a new locale to use for picture controle.
|
void |
setMaxImageHeight(java.lang.Integer maxImageHeight) |
Set the maximum height of the image.
|
void |
setMaxImageWidth(java.lang.Integer maxImageWidth) |
Set the maximum width of the image.
|
void |
setModifyImageLinkText(java.lang.String text) |
Set the text of the "Modify" Link.
|
changed, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabListaddControlListener, 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, 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, updateequals, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final java.lang.String BUNDLE_NAME
public static final java.lang.String IMAGE_BYTEARRAY_PROPERTY
public AbstractPictureControl(org.eclipse.swt.widgets.Composite parent)
AbstractPictureControl with default SWT styles.parent - a composite control which will be the parent of the new
instance (cannot be null)public AbstractPictureControl(org.eclipse.swt.widgets.Composite parent,
int compositeStyle,
int labelStyle,
int linkStyle)
AbstractPictureControl with given SWT style .parent - a composite control which will be the parent of the new
instance (cannot be null)compositeStyle - SWT style of the SWT Composite which host Label+Link controls.labelStyle - SWT style of the Label control.linkStyle - SWT style of the Link control.public void setModifyImageLinkText(java.lang.String text)
text - public void setDeleteImageLinkText(java.lang.String text)
text - public void setFilterExtensions(java.lang.String[] extensions)
The strings are platform specific. For example, on some platforms, an extension filter string is typically of the form "*.extension", where "*.*" matches all files. For filters with multiple extensions, use semicolon as a separator, e.g. "*.jpg;*.png".
extensions - the file extension filterto specify the user-friendly names corresponding to
the extensionspublic org.eclipse.swt.widgets.Label getPictureLabel()
public T getModifyImageLink()
public T getDeleteImageLink()
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
public void propertyChange(java.beans.PropertyChangeEvent arg0)
propertyChange in interface java.beans.PropertyChangeListenerpublic void setImageStream(java.io.InputStream stream)
throws java.io.IOException
InputStream of the image picture. null is
accepted to delete the image.stream - java.io.IOExceptionpublic java.io.InputStream getImageStream()
InputStream of the image picture and null if none
picture was setted.public void setImageByteArray(byte[] imageByteArray)
imageByteArray - public byte[] getImageByteArray()
public void setLocale(java.util.Locale locale)
locale - new locale (must not be null)public void setMaxImageHeight(java.lang.Integer maxImageHeight)
maxImageHeight - public java.lang.Integer getMaxImageHeight()
maxImageHeight - public void setMaxImageWidth(java.lang.Integer maxImageWidth)
maxImageWidth - public java.lang.Integer getMaxImageWidth()
maxImageWidth - public void setDefaultImage(org.eclipse.swt.graphics.Image defaultImage)
defaultImage - public void dispose()
dispose in class org.eclipse.swt.widgets.Widget