public class SignDataField extends JPanel implements DataComponent, AccessForm, ValueChangeDataComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
SignDataField.SignLabel
Class to create the signature panel and paints the signature.
|
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR
The attribute key.
|
protected Object |
attribute
The reference to attribute.
|
static String |
BOTTOM
The key for bottom alignment.
|
protected Object |
bufferedSign
Object to save the bufferedSignImage
|
protected ResourceBundle |
bundle
The reference for resources file.
|
protected byte[] |
bytesImage
Object to save the signature bytes array
|
protected JButton |
dataClean
The reference to JButton "Clean" component.
|
protected SignDataField.SignLabel |
dataField
The reference to sign component.
|
protected JLabel |
dataLabel
The reference to label.
|
static int |
DEFAULT_PARENT_MARGIN
The default parent margin.
|
static String |
ENABLED
The enabled key.
|
protected boolean |
enabledXML
The reference for enabled the component (still visible).
|
protected boolean |
fireValueEvents
Notify the value change events.
|
protected String |
labelPosition
The label position.
|
static String |
LABELPOSITION
The key to specify the label position.
|
protected String |
labelText
The reference for text label.
|
protected boolean |
labelView
The label view.
|
static String |
LABELVISIBILITY
The key to specify the label visibility.
|
static String |
LEFT
The key for left alignment.
|
protected boolean |
modifiable
The condition to indicate when field is editable.
|
protected Form |
parentForm
The reference to parent form.
|
protected FormPermission |
permissionEnabled
The reference to enabled permission.
|
protected FormPermission |
permissionVisible
The reference to visible permission.
|
protected boolean |
required
The condition to indicate when field is required.
|
protected boolean |
restricted
The reference for restricted view
|
static String |
RIGHT
The key for right alignment.
|
static String |
TEXT_STR
The alternative text for attr.
|
static String |
TOP
The key for top alignment.
|
protected Vector |
valueListener
Vector for listeners.
|
protected Object |
valueSave
Object to save the signature
|
protected boolean |
visible
The reference for visualize the component
|
static String |
VISIBLE
The enabled key.
|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCOMP_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_2DEBUG_LANGUAGEDESACTIVATE_COMPONENT_BY_PERMISSION_TIPABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
SignDataField(Hashtable param)
Constructor of SignDatafield
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValueChangeListener(ValueChangeListener l)
Adds a value change listener
|
protected boolean |
checkEnabledPermission()
Check if the user has permissions to interact with the component
|
protected boolean |
checkVisiblePermission()
Check if the user has permission to view with the component
|
void |
createDataFields()
Creates the label, signature area and clean button
|
void |
deleteData()
Delete the SignLabel
|
protected void |
fireValueChanged(Object newValue,
Object oldValue,
int type)
Check if the signature field has changed
|
Object |
getAttribute()
Obtain the component's attributte
|
Object |
getConstraints(LayoutManager parentLayout)
Return a new GridBagConstraints
|
String |
getLabelComponentText()
Obtains the label of SignDataField
|
int |
getSQLDataType()
Obtain the SQL Data type for SignDataField
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
Object |
getValue()
Gets the value of SignLabel field
|
void |
init(Hashtable params)
Initialize the SignDataField component with the parameters in *.xml form
|
void |
initPermissions()
Initialize the component's permissions, setting the interaction and
visibility, checking with the users permission
|
boolean |
isEmpty()
Check if the SignLabel is empty
|
boolean |
isHidden()
Check the visibility of SignDataField
|
boolean |
isModifiable()
Check if the SignDataField is modifiable
|
boolean |
isModified()
Check if the SignLabel was modified
|
boolean |
isRequired()
Check if the component is required or optional
|
boolean |
isRestricted()
Check if the component is restricted
|
void |
removeValueChangeListener(ValueChangeListener l)
Remove the value change listener
|
void |
setComponentLocale(Locale l) |
void |
setEnabled(boolean enabled)
Set the enabled/disabled state of the component
|
void |
setModifiable(boolean modifiable)
Set the modifiable behavior
|
void |
setParentForm(Form f)
Sets the parent form of SignDataField
|
void |
setRequired(boolean required)
Set if component is required
|
void |
setResourceBundle(ResourceBundle res)
Sets the resources bundle
|
void |
setValue(Object value)
Set the value of SignDataField
|
void |
setVisible(boolean visible)
Set the visibility state of the component
|
protected void |
update()
Updates the SignLabel
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabledprotected JLabel dataLabel
protected SignDataField.SignLabel dataField
protected JButton dataClean
public static final String ATTR
protected Object attribute
public static final String TEXT_STR
public static final String ENABLED
public static final String VISIBLE
protected boolean enabledXML
protected boolean visible
protected ResourceBundle bundle
public static int DEFAULT_PARENT_MARGIN
public static final String LABELPOSITION
protected String labelPosition
public static final String LABELVISIBILITY
protected boolean labelView
protected String labelText
public static final String LEFT
public static final String RIGHT
public static final String TOP
public static final String BOTTOM
protected boolean restricted
protected FormPermission permissionEnabled
protected FormPermission permissionVisible
protected Form parentForm
protected boolean required
protected boolean modifiable
protected byte[] bytesImage
protected Object bufferedSign
protected Object valueSave
protected Vector valueListener
protected boolean fireValueEvents
public void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic void setResourceBundle(ResourceBundle res)
setResourceBundle in interface Internationalizationres - This resource bundle contains all application translationspublic Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface Internationalizationpublic void createDataFields()
public void init(Hashtable params) throws Exception
init in interface FormComponentparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| attr | null | yes | The reference to attribute. | |
| enabled | yes/no | yes | no | The reference for enabled the component (still visible). |
| labelposition | left/right/top/bottom | top | no | The label position. |
| labelvisible | true/false | true | no | The label view. |
| text | null | no | The alternative text for attr, and a reference for the text label. | |
| visible | yes/no | yes | no | The reference for visualize the component. |
Exception - when Exception occurspublic void initPermissions()
initPermissions in interface SecureElementprotected boolean checkEnabledPermission()
true The user has permission to interact with the
component false Otherwiseprotected boolean checkVisiblePermission()
true The user has permission to view the component
false Otherwisepublic void setEnabled(boolean enabled)
setEnabled in interface FormComponentsetEnabled in class JComponentenabled - the enabled conditionpublic void setVisible(boolean visible)
setVisible in interface FormComponentsetVisible in class JComponentvisible - the visibility conditionpublic Object getConstraints(LayoutManager parentLayout)
getConstraints in interface FormComponentparentLayout - The LayoutManager of the parentLayoutpublic boolean isRestricted()
isRestricted in interface SecureElementtrue The component is restricted false
The component is not restrictedpublic Object getAttribute()
getAttribute in interface IdentifiedElementpublic void setParentForm(Form f)
setParentForm in interface AccessFormf - The parent formpublic String getLabelComponentText()
getLabelComponentText in interface DataComponentpublic boolean isModifiable()
isModifiable in interface DataComponenttrue The field is modifiablepublic boolean isHidden()
isHidden in interface DataComponenttrue The field is not visible false The
field is visiblepublic int getSQLDataType()
getSQLDataType in interface DataComponentpublic boolean isRequired()
isRequired in interface DataComponentfalse The field is optionalpublic Object getValue()
getValue in interface DataComponentprotected void fireValueChanged(Object newValue, Object oldValue, int type)
newValue - the new value of SignLabeloldValue - the old value of SignLabeltype - Integer indicating who made the changes , if the user or
applicationpublic void setValue(Object value)
setValue in interface DataComponentvalue - The value to set.protected void update()
public void deleteData()
deleteData in interface DataComponentpublic boolean isEmpty()
isEmpty in interface DataComponenttrue The field is empty false The field
is not emptypublic void setModifiable(boolean modifiable)
setModifiable in interface DataComponentmodibiable - public boolean isModified()
isModified in interface DataComponenttrueThe component was modified falseThe
component was not modifiedpublic void setRequired(boolean required)
setRequired in interface DataComponentrequired - Booleanpublic void addValueChangeListener(ValueChangeListener l)
addValueChangeListener in interface ValueChangeDataComponentl - The ValueChangeLitenerpublic void removeValueChangeListener(ValueChangeListener l)
removeValueChangeListener in interface ValueChangeDataComponentl - The ValueChangeListenerCopyright © 2016 Imatia Innovation S.L.. All rights reserved.