|
Ontimize 5.2072EN | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.ontimize.gui.field.DataField
com.ontimize.gui.field.ImageDataField
The main class to visualize a .gif, .jpeg or .png images.
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 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 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 |
protected static final int TOP
protected static final int RIGHT
public static final int MAX_SIZE
protected int locationButtons
protected static java.awt.Cursor cursorZoom
protected static java.lang.String DOUBLE_CLICK_TO_VIEW_TIP
protected static java.lang.String OPEN_IMAGE_BUTTON_TIP
protected static java.lang.String DELETE_DATA_FIELD_BUTTON_TIP
protected static java.lang.String TWAIN_SCAN_BUTTON_TIP
protected static java.lang.String TWAIN_PREVIEW_BUTTON_TIP
protected static java.lang.String CLIPBOARD_PASTE_BUTTON_TIP
protected static java.lang.String CLIPBOARD_ERROR_MESSAGE
protected java.awt.Frame parentFrame
protected javax.swing.ImageIcon image
protected javax.swing.JButton loadButton
protected javax.swing.JButton deleteBt
protected javax.swing.JButton twainBt
protected javax.swing.JButton pasteBt
protected javax.swing.JButton previewTwainBt
protected java.io.File lastPath
protected byte[] bytesImage
protected int iHigh
protected int imageWidth
protected boolean keepAspectRatio
protected boolean allowZoom
protected javax.swing.ImageIcon emptyImage
protected java.awt.event.ActionListener deleteBtListener
protected java.awt.event.ActionListener loadBtListener
protected boolean zoomListenerEnabled
| Constructor Detail |
public ImageDataField(java.util.Hashtable param)
param - the Hashtable parameters| Method Detail |
protected void setButtonTips()
public void setResourceBundle(java.util.ResourceBundle res)
Internationalization
setResourceBundle in interface InternationalizationsetResourceBundle in class DataFieldpublic void init(java.util.Hashtable parameters)
init in interface FormComponentinit in class DataFieldparameters - 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. |
public java.lang.Object getValue()
DataComponent
getValue in interface DataComponentBytesBlock instancepublic void setValue(java.lang.Object value)
DataComponent
setValue in interface DataComponentvalue - the object with value to setprotected void update()
public boolean isEmpty()
DataComponent
isEmpty in interface DataComponenttrue when component is emptypublic boolean isModifiable()
isModifiable in interface DataComponentisModifiable in class DataFieldpublic boolean isRequired()
DataComponent
isRequired in interface DataComponentisRequired in class DataFieldpublic void setParentFrame(java.awt.Frame frame)
OpenDialog
setParentFrame in interface OpenDialogframe - the framepublic void setEnabled(boolean enabled)
FormComponent
setEnabled in interface FormComponentsetEnabled in class DataFieldenabled - the condition to set enablepublic void deleteData()
DataComponent
deleteData in interface DataComponent
protected void finalize()
throws java.lang.Throwable
finalize in class DataFieldjava.lang.Throwablepublic void free()
Freeable
free in interface Freeablepublic int getSQLDataType()
DataComponentsql data type according to java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic javax.swing.ImageIcon getImage()
public javax.swing.ImageIcon getEmptyImage()
public void setZoomListenerEnabled(boolean enabled)
enabled - the enabled conditionpublic void uninstallDeleteButtonListener()
public void uninstallLoadButtonListener()
public javax.swing.JButton getDeleteButton()
public javax.swing.JButton getLoadButton()
public void setParentForm(Form f)
AccessForm
setParentForm in interface AccessFormsetParentForm in class DataFieldpublic void setVisibleButtons(boolean visible)
visible - the visibility condition
public static java.awt.Image getImage(byte[] imageData,
int width,
int height,
boolean allowZoom)
throws java.io.IOException
java.io.IOException
public static void debugImage(java.awt.Image im,
java.lang.String title)
public int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD
ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLE
getTemplateDataType in interface ITemplateFieldint with the data type.public java.lang.Object getTemplateDataValue()
ITemplateField
getTemplateDataValue in interface ITemplateField
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||