Ontimize 5.2072EN

com.ontimize.gui.field
Class ImageDataField

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.field.DataField
                      extended bycom.ontimize.gui.field.ImageDataField
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, ApplicationPreferencesListener, DataComponent, java.util.EventListener, FormComponent, Freeable, HasHelpIdComponent, HasPreferenceComponent, IdentifiedElement, java.awt.image.ImageObserver, Internationalization, ITemplateField, java.awt.MenuContainer, OpenDialog, SecureElement, java.io.Serializable, ValueChangeDataComponent
Direct Known Subclasses:
ImageCellRenderer

public class ImageDataField
extends DataField
implements DataComponent, OpenDialog, Freeable, ITemplateField

The main class to visualize a .gif, .jpeg or .png images.

Author:
Imatia Innovation
See Also:
BytesBlock, Serialized Form

Nested Class Summary
protected  class ImageDataField.ExtensionFileFilter
          Class to filter files by extension.
protected  class ImageDataField.ZoomWindow
          The main class to create a zoom window in a new dialog.
 
Nested classes inherited from class com.ontimize.gui.field.DataField
DataField.AuxPanel, DataField.CopyActionListener, DataField.ELabel, DataField.FieldButton, DataField.FieldFocusListener, DataField.InfoMouseListener, DataField.ToggleButton
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  boolean allowZoom
           
protected  byte[] bytesImage
          The reference for the bytes of image.
protected static java.lang.String CLIPBOARD_ERROR_MESSAGE
          The clipboard error message.
protected static java.lang.String CLIPBOARD_PASTE_BUTTON_TIP
          The tip message over paste from clipboard button.
protected static java.awt.Cursor cursorZoom
          The reference to a cursor.
protected static java.lang.String DELETE_DATA_FIELD_BUTTON_TIP
          The tip message over delete data field button.
protected  javax.swing.JButton deleteBt
          An instance of a delete button.
protected  java.awt.event.ActionListener deleteBtListener
          A reference for a delete button listener.
protected static java.lang.String DOUBLE_CLICK_TO_VIEW_TIP
          The tip message showed over image.
protected  javax.swing.ImageIcon emptyImage
          A reference for an empty image icon.
protected  int iHigh
          The image high.
protected  javax.swing.ImageIcon image
          The reference to image icon.
protected  int imageWidth
          The image width.
protected  boolean keepAspectRatio
           
protected  java.io.File lastPath
          The last path for file.
protected  java.awt.event.ActionListener loadBtListener
          A reference for a load button listener.
protected  javax.swing.JButton loadButton
          An instance of a load button.
protected  int locationButtons
          The location buttons.
static int MAX_SIZE
          The max size value.
protected static java.lang.String OPEN_IMAGE_BUTTON_TIP
          The tip message shows over open image button.
protected  java.awt.Frame parentFrame
          The parent frame.
protected  javax.swing.JButton pasteBt
          An instance of a paste button.
protected  javax.swing.JButton previewTwainBt
          A reference for a preview twain button.
protected static int RIGHT
          The right value.
protected static int TOP
          The top value.
protected static java.lang.String TWAIN_PREVIEW_BUTTON_TIP
          The tip message over preview button.
protected static java.lang.String TWAIN_SCAN_BUTTON_TIP
          The tip message over scan button.
protected  javax.swing.JButton twainBt
          A reference for a twain button.
protected  boolean zoomListenerEnabled
          The zoom listener enabled condition.
 
Fields inherited from class com.ontimize.gui.field.DataField
advancedQueryMode, ALIGN, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, alignment, ASTERISK_REQUIRED_STYLE, ATTR, attribute, backgroundColor, BGCOLOR, bold, BOLD, BORDER, BORDER_REQUIRED_STYLE, borderText, BOTTOM, CENTER, CLIPBOARD_COPY, CLIPBOARD_COPY_es_ES, CLIPBOARD_CUT, CLIPBOARD_CUT_es_ES, CLIPBOARD_PASTE, CLIPBOARD_PASTE_es_ES, conditions, dataField, DEFAULT_BORDER, DEFAULT_BOTTOM_MARGIN, DEFAULT_FIELD_LEFT_MARGIN, DEFAULT_FIELD_RIGHT_MARGIN, DEFAULT_LABEL_LEFT_MARGIN, DEFAULT_LABEL_RIGHT_MARGIN, DEFAULT_PARENT_MARGIN, DEFAULT_PARENT_MARGIN_FOR_SCROLL, DEFAULT_TOP_MARGIN, defaultAsteriskColor, DEFAULTBORDER, defaultDisableBackgroundColor, defaultFieldButtonHigh, defaultPreferenceTextNotRetrievedFromPreferences, DEFINE_HELP_FIELD_PREFERENCE, dim, DIM, disabledbgcolor, DISABLEDBGCOLOR, empty, enabled, ENABLED, FIELD_HELP_TIP, fieldlistenerFocus, fieldSize, fireValueEvents, FOCUS_BACKGROUNDCOLOR, FONT, fontColor, FONTCOLOR, fontSize, FONTSIZE, height, HEIGHT, incrementalFont, initPreferenceHelpText, isEnabled, LABELALIGN, labelComponent, LABELFONT, LABELFONTCOLOR, labelPosition, LABELPOSITION, LABELSIZE, labelText, LABELVISIBLE, LEFT, locale, LOWERED, menuCopy, menuCut, menuDefineHelpPreference, menuHelpPreferences, menuPaste, modifiable, NO_STR, NONE, noRequiredBorder, OPAQUE, originalSize, OUTBORDER, panel, parentForm, permissionActivate, permissionVisible, popupMenu, RAISED, redimensionPanel, redimensJTextField, required, REQUIRED, requiredBorder, REQUIREDBORDER, requiredFieldBackgroundColor, resources, restricted, show, showLabel, SIZE, TEXT_STR, TEXTALIGN, textAlignment, textHelpPreference, TIP, tipKey, validData, VALIGN, Valignment, valueListener, valueSave, VISIBLE, VISUALIZE_HELP_FIELD_PREFERENCE, weightDataFieldH, weightPanelH, width, WIDTH, x, X, y, Y, YES_STR
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface com.ontimize.gui.field.DataComponent
COMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2
 
Fields inherited from interface com.ontimize.gui.field.FormComponent
DEBUG
 
Fields inherited from interface com.ontimize.gui.i18n.Internationalization
DEBUG_LANGUAGE
 
Fields inherited from interface com.ontimize.gui.SecureElement
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP
 
Fields inherited from interface com.ontimize.util.templates.ITemplateField
DATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS
 
Constructor Summary
ImageDataField(java.util.Hashtable param)
          The class constructor.
 
Method Summary
static void debugImage(java.awt.Image im, java.lang.String title)
           
 void deleteData()
          The method to delete data for component.
protected  void finalize()
           
 void free()
          Makes the object to release the resources.
 javax.swing.JButton getDeleteButton()
          Gets the delete button listener.
 javax.swing.ImageIcon getEmptyImage()
          Gets the empty image.
 javax.swing.ImageIcon getImage()
          Gets the image for icon.
static java.awt.Image getImage(byte[] imageData, int width, int height, boolean allowZoom)
           
 javax.swing.JButton getLoadButton()
          Gets the load button listener.
 int getSQLDataType()
          Returns the sql data type according to java.sql.Types
 int getTemplateDataType()
          Returns the data type.
 java.lang.Object getTemplateDataValue()
          Gets the value to show in the template
 java.lang.Object getValue()
          Gets the value of a component.
 void init(java.util.Hashtable parameters)
          Initializes parameters.
 boolean isEmpty()
          Checks the data existence in component.
 boolean isModifiable()
          Returns always true.
 boolean isRequired()
          Indicates the required condition for a component.
protected  void setButtonTips()
          Sets tips for all buttons.
 void setEnabled(boolean enabled)
          Description method to set enabled or not the component according the boolean condition in parameter.
 void setParentForm(Form f)
          Method declaration to set the form that contains the component.
 void setParentFrame(java.awt.Frame frame)
          This method is called from Form for each component that implements this interface.
 void setResourceBundle(java.util.ResourceBundle res)
          Sets the language resource bundle.
 void setValue(java.lang.Object value)
          Sets the value for component.
 void setVisibleButtons(boolean visible)
          Sets visible buttons according to the condition.
 void setZoomListenerEnabled(boolean enabled)
          Sets a zoom listener enabled.
 void uninstallDeleteButtonListener()
          Uninstalls the delete button listener.
 void uninstallLoadButtonListener()
          Uninstalls the load button listener.
protected  void update()
           
 
Methods inherited from class com.ontimize.gui.field.DataField
addFocusListener, addHelpMenuPopup, addValueChangeListener, changeButton, changeOpacity, checkDefineHelpPermission, checkEnabledPermission, checkVisiblePermission, configurePopupMenuHelp, createFocusListener, createInstanceConditionCombo, createPopupMenu, defineHelpField, fireValueChanged, getAttribute, getBorder, getConstraints, getDataField, getDisabledbgcolor, getFontColor, getHelpIdString, getHelpPreferenceKey, getLabelComponent, getLabelComponentText, getLabelFontColor, getLabelText, getParentForm, getPreferenceHelpText, getText, getTextsToTranslate, getValueChangeListeners, hasHelpInPreferences, initPermissions, initPreferences, installFocusListener, installHelpId, installPopupMenuListener, installPreferenceHelpListener, isAdvancedQueryMode, isEnabled, isHidden, isLabelVisible, isModified, isRestricted, parseBoolean, preferenceChanged, removeFocusListener, removeValueChangeListener, requestFocus, seeHelpField, setBold, setComponentLocale, setDisabledbgcolor, setFont, setFontColor, setFontSize, setLabelFontColor, setModifiable, setRequired, setRequiredFieldBackground, setVisible, showPopupMenu, updateBackgroundColor, updateBackgroundColor, updateFont, updateTip, updateUI, validateComponentPositions
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.gui.field.DataComponent
getLabelComponentText, isHidden, isModified, setModifiable, setRequired
 
Methods inherited from interface com.ontimize.gui.field.FormComponent
getConstraints, isEnabled, setVisible
 
Methods inherited from interface com.ontimize.gui.i18n.Internationalization
getTextsToTranslate, setComponentLocale
 
Methods inherited from interface com.ontimize.gui.field.IdentifiedElement
getAttribute
 
Methods inherited from interface com.ontimize.gui.SecureElement
initPermissions, isRestricted
 

Field Detail

TOP

protected static final int TOP
The top value.

See Also:
Constant Field Values

RIGHT

protected static final int RIGHT
The right value.

See Also:
Constant Field Values

MAX_SIZE

public static final int MAX_SIZE
The max size value.

See Also:
Constant Field Values

locationButtons

protected int locationButtons
The location buttons. By default, top.


cursorZoom

protected static java.awt.Cursor cursorZoom
The reference to a cursor. By default, null.


DOUBLE_CLICK_TO_VIEW_TIP

protected static java.lang.String DOUBLE_CLICK_TO_VIEW_TIP
The tip message showed over image.


OPEN_IMAGE_BUTTON_TIP

protected static java.lang.String OPEN_IMAGE_BUTTON_TIP
The tip message shows over open image button.


DELETE_DATA_FIELD_BUTTON_TIP

protected static java.lang.String DELETE_DATA_FIELD_BUTTON_TIP
The tip message over delete data field button.


TWAIN_SCAN_BUTTON_TIP

protected static java.lang.String TWAIN_SCAN_BUTTON_TIP
The tip message over scan button.


TWAIN_PREVIEW_BUTTON_TIP

protected static java.lang.String TWAIN_PREVIEW_BUTTON_TIP
The tip message over preview button.


CLIPBOARD_PASTE_BUTTON_TIP

protected static java.lang.String CLIPBOARD_PASTE_BUTTON_TIP
The tip message over paste from clipboard button.


CLIPBOARD_ERROR_MESSAGE

protected static java.lang.String CLIPBOARD_ERROR_MESSAGE
The clipboard error message.


parentFrame

protected java.awt.Frame parentFrame
The parent frame. By default, null.


image

protected javax.swing.ImageIcon image
The reference to image icon. By default, null.


loadButton

protected javax.swing.JButton loadButton
An instance of a load button.


deleteBt

protected javax.swing.JButton deleteBt
An instance of a delete button.


twainBt

protected javax.swing.JButton twainBt
A reference for a twain button. By default, null.


pasteBt

protected javax.swing.JButton pasteBt
An instance of a paste button.


previewTwainBt

protected javax.swing.JButton previewTwainBt
A reference for a preview twain button. By default, null.


lastPath

protected java.io.File lastPath
The last path for file. By default, null.


bytesImage

protected byte[] bytesImage
The reference for the bytes of image.


iHigh

protected int iHigh
The image high. By default, 0.


imageWidth

protected int imageWidth
The image width. By default, 0.


keepAspectRatio

protected boolean keepAspectRatio

allowZoom

protected boolean allowZoom

emptyImage

protected javax.swing.ImageIcon emptyImage
A reference for an empty image icon. By default, null.


deleteBtListener

protected java.awt.event.ActionListener deleteBtListener
A reference for a delete button listener. By default, null.


loadBtListener

protected java.awt.event.ActionListener loadBtListener
A reference for a load button listener. By default, null.


zoomListenerEnabled

protected boolean zoomListenerEnabled
The zoom listener enabled condition. By default, true.

Constructor Detail

ImageDataField

public ImageDataField(java.util.Hashtable param)
The class constructor. Sets border, adds listeners and inits parameters.

Parameters:
param - the Hashtable parameters
Method Detail

setButtonTips

protected void setButtonTips()
Sets tips for all buttons.


setResourceBundle

public void setResourceBundle(java.util.ResourceBundle res)
Description copied from interface: Internationalization
Sets the language resource bundle. When the application changes the configured language, for all the objects that implement this interface this method must be called with the new file.
The method must translate all the elements that have texts in the GUI

Specified by:
setResourceBundle in interface Internationalization
Overrides:
setResourceBundle in class DataField

init

public void init(java.util.Hashtable parameters)
Initializes parameters.

Specified by:
init in interface FormComponent
Overrides:
init in class DataField
Parameters:
parameters - the Hashtable with parameters. Adds the next parameters:

attribute values default required meaning
height no The preferred field height in pixels. Useful for specifying empty columns.
width no The preferred column width in pixels. Useful for specifying empty columns.
buttons top/right/no top no The position of buttons. With 'no' buttons will not be showed.
emptyimage no The relative path from classpath to load the empty image.

getValue

public java.lang.Object getValue()
Description copied from interface: DataComponent
Gets the value of a component.

Specified by:
getValue in interface DataComponent
Returns:
a BytesBlock instance

setValue

public void setValue(java.lang.Object value)
Description copied from interface: DataComponent
Sets the value for component.

Specified by:
setValue in interface DataComponent
Parameters:
value - the object with value to set

update

protected void update()

isEmpty

public boolean isEmpty()
Description copied from interface: DataComponent
Checks the data existence in component.

Specified by:
isEmpty in interface DataComponent
Returns:
true when component is empty

isModifiable

public boolean isModifiable()
Returns always true.

Specified by:
isModifiable in interface DataComponent
Overrides:
isModifiable in class DataField

isRequired

public boolean isRequired()
Description copied from interface: DataComponent
Indicates the required condition for a component.

Specified by:
isRequired in interface DataComponent
Overrides:
isRequired in class DataField

setParentFrame

public void setParentFrame(java.awt.Frame frame)
Description copied from interface: OpenDialog
This method is called from Form for each component that implements this interface. It fixes the parent frame for element. This frame is needed to open the modal dialog.

Specified by:
setParentFrame in interface OpenDialog
Parameters:
frame - the frame

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: FormComponent
Description method to set enabled or not the component according the boolean condition in parameter.

Specified by:
setEnabled in interface FormComponent
Overrides:
setEnabled in class DataField
Parameters:
enabled - the condition to set enable

deleteData

public void deleteData()
Description copied from interface: DataComponent
The method to delete data for component.

Specified by:
deleteData in interface DataComponent

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class DataField
Throws:
java.lang.Throwable

free

public void free()
Description copied from interface: Freeable
Makes the object to release the resources.

Specified by:
free in interface Freeable

getSQLDataType

public int getSQLDataType()
Description copied from interface: DataComponent
Returns the sql data type according to java.sql.Types

Specified by:
getSQLDataType in interface DataComponent
Returns:
the Integer type

getImage

public javax.swing.ImageIcon getImage()
Gets the image for icon.

Returns:
the image

getEmptyImage

public javax.swing.ImageIcon getEmptyImage()
Gets the empty image.

Returns:
the empty image

setZoomListenerEnabled

public void setZoomListenerEnabled(boolean enabled)
Sets a zoom listener enabled.

Parameters:
enabled - the enabled condition

uninstallDeleteButtonListener

public void uninstallDeleteButtonListener()
Uninstalls the delete button listener.


uninstallLoadButtonListener

public void uninstallLoadButtonListener()
Uninstalls the load button listener.


getDeleteButton

public javax.swing.JButton getDeleteButton()
Gets the delete button listener.

Returns:
the delete button

getLoadButton

public javax.swing.JButton getLoadButton()
Gets the load button listener.

Returns:
the load button

setParentForm

public void setParentForm(Form f)
Description copied from interface: AccessForm
Method declaration to set the form that contains the component. This method must be called automatically during the form building.

Specified by:
setParentForm in interface AccessForm
Overrides:
setParentForm in class DataField

setVisibleButtons

public void setVisibleButtons(boolean visible)
Sets visible buttons according to the condition.

Parameters:
visible - the visibility condition

getImage

public static java.awt.Image getImage(byte[] imageData,
                                      int width,
                                      int height,
                                      boolean allowZoom)
                               throws java.io.IOException
Throws:
java.io.IOException

debugImage

public static void debugImage(java.awt.Image im,
                              java.lang.String title)

getTemplateDataType

public int getTemplateDataType()
Description copied from interface: ITemplateField
Returns the data type. The values that can return are: ITemplateField.DATA_TYPE_FIELD ITemplateField.DATA_TYPE_IMAGE ITemplateField.DATA_TYPE_TABLE

Specified by:
getTemplateDataType in interface ITemplateField
Returns:
a int with the data type.

getTemplateDataValue

public java.lang.Object getTemplateDataValue()
Description copied from interface: ITemplateField
Gets the value to show in the template

Specified by:
getTemplateDataValue in interface ITemplateField
Returns:

Ontimize