|
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.TextFieldDataField
com.ontimize.gui.field.FileDataField
This class implements a specific text data field for files.
This data field permits insert files into database table,
but the Entity must have established the TableEntity.FILE_COLUMNS property.
{@link TableEntity#readProperties()},
Serialized Form| Nested Class Summary | |
protected static class |
FileDataField.OpenAppThread
This class implements a Thread to manage the file operations (open, priority).
|
| Nested classes inherited from class com.ontimize.gui.field.TextFieldDataField |
TextFieldDataField.EJTextField, TextFieldDataField.InnerDocumentListener |
| 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 javax.swing.JFileChooser |
chooser
A reference for chooser element. |
protected javax.swing.JFileChooser |
chooserSave
A reference for chooser save element. |
protected DataFile |
file
The reference for a file. |
protected int |
limitSizeBytes
The limitation in bytes. |
protected DataField.FieldButton |
openButton
The instance of open button. |
protected FileDataField.OpenAppThread |
openThread
The reference for open thread. |
protected java.awt.Frame |
parentFrame
A reference for a frame. |
protected DataField.FieldButton |
saveButton
The save button. |
protected DataField.FieldButton |
selectionButton
The instance of selection button. |
| Fields inherited from class com.ontimize.gui.field.TextFieldDataField |
disabledTextColor, innerListener |
| 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 java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, PROPERTIES, SOMEBITS |
| Constructor Summary | |
FileDataField(java.util.Hashtable parameters)
The class constructor. |
|
| Method Summary | |
void |
deleteData()
The method to delete data for component. |
javax.swing.JFileChooser |
getChooser()
|
javax.swing.JFileChooser |
getChooserSave()
|
DataFile |
getFile()
Provides access to file. |
int |
getSQLDataType()
Returns the sql data type according to java.sql.Types
|
java.lang.Object |
getValue()
Gets the value of a component. |
void |
init(java.util.Hashtable parameters)
Inits parameters and installs field buttons. |
protected void |
installButtons()
Gets icons, sets tooltip and margins and adds listeners for field buttons. |
boolean |
isEmpty()
Checks the data existence in component. |
void |
openFile()
Opens the file specified in file |
static void |
openFile(DataFile file)
Opens the file. |
void |
saveFile()
Implements the saving operation for file. |
void |
selectionFile()
Implements the selection field operation, checking the size limit of file. |
void |
setEnabled(boolean enabled)
Enables the field to insert data. |
void |
setParentFrame(java.awt.Frame frame)
This method is called from Form for each component that implements this interface. |
void |
setResourceBundle(java.util.ResourceBundle resource)
Sets the language resource bundle. |
void |
setValue(java.lang.Object o)
Sets the value for component. |
| Methods inherited from class com.ontimize.gui.field.TextFieldDataField |
createDataField, getAttribute, getInnerListenerEnabled, getInnerValue, getLabelComponentText, getText, installInnerListener, isInnerValueEqual, isModifiable, isRequired, setInnerListenerEnabled, setInnerValue |
| 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 |
| Field Detail |
protected DataField.FieldButton selectionButton
protected DataField.FieldButton openButton
protected DataField.FieldButton saveButton
protected java.awt.Frame parentFrame
protected DataFile file
protected javax.swing.JFileChooser chooser
protected javax.swing.JFileChooser chooserSave
protected int limitSizeBytes
Integer.MAX_VALUE.
protected FileDataField.OpenAppThread openThread
| Constructor Detail |
public FileDataField(java.util.Hashtable parameters)
super() and inits parameters.
parameters - the Hashtable with parameters| Method Detail |
public void init(java.util.Hashtable parameters)
init in interface FormComponentinit in class TextFieldDataFieldparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| savebutton | yes/no | no | The save button presence. | |
| sizelimit | Integer.MAX_VALUE |
no | The size limit for file. |
protected void installButtons()
public void selectionFile()
public javax.swing.JFileChooser getChooser()
public javax.swing.JFileChooser getChooserSave()
public static void openFile(DataFile file)
throws java.lang.Exception
file - the file
java.lang.Exception - when a Thread Exception occurspublic void openFile()
file
public void setEnabled(boolean enabled)
DataField
setEnabled in interface FormComponentsetEnabled in class DataFieldenabled - the condition to set enablepublic java.lang.Object getValue()
DataComponent
getValue in interface DataComponentobject with value.public boolean isEmpty()
DataComponent
isEmpty in interface DataComponentisEmpty in class TextFieldDataFieldpublic void deleteData()
DataComponent
deleteData in interface DataComponentdeleteData in class TextFieldDataFieldpublic void setValue(java.lang.Object o)
DataComponent
setValue in interface DataComponento - the object with value to setpublic int getSQLDataType()
DataComponentsql data type according to java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic void setParentFrame(java.awt.Frame frame)
OpenDialog
setParentFrame in interface OpenDialogframe - the framepublic void setResourceBundle(java.util.ResourceBundle resource)
Internationalization
setResourceBundle in interface InternationalizationsetResourceBundle in class DataFieldpublic void saveFile()
public DataFile getFile()
DataFile instance.
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||