Ontimize 5.2072EN

com.ontimize.gui.field
Class CalculatedExpressionDataField

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.util.swing.JCalculatedExpression
                      extended bycom.ontimize.gui.field.CalculatedExpressionDataField
All Implemented Interfaces:
AccessForm, javax.accessibility.Accessible, DataComponent, FormComponent, IdentifiedElement, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, SecureElement, java.io.Serializable, ValueChangeDataComponent

public class CalculatedExpressionDataField
extends JCalculatedExpression
implements FormComponent, AccessForm, IdentifiedElement, DataComponent, ValueChangeDataComponent

Author:
Imatia Innovation
See Also:
Serialized Form

Nested Class Summary
protected  class CalculatedExpressionDataField.FieldFocusListener
          This class implements a field focus listener.
protected  class CalculatedExpressionDataField.InnerDocumentListener
          This class implements a inner listener for document.
 
Nested classes inherited from class com.ontimize.util.swing.JCalculatedExpression
JCalculatedExpression.ColumnPosition, JCalculatedExpression.CustomListModel, JCalculatedExpression.Expression, JCalculatedExpression.InsertSymbolListener
 
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  java.lang.Object attribute
          The reference to attribute.
protected  java.util.List availableFields
          List that contains the name of the available fields to use into the editor of expressions.
static java.lang.String AVAILABLEFIELDS_ATTR
          Attribute key to assign the available fields of the component.
protected  java.awt.Color backgroundColor
          The default background color.
protected  java.lang.String borderText
          The reference for border text.
protected  boolean enabled
          The condition to indicate when field is active.
protected  CalculatedExpressionDataField.FieldFocusListener fieldlistenerFocus
          The reference for field focus listener.
protected  boolean fireValueEvents
          The condition to activate field events.
protected  CalculatedExpressionDataField.InnerDocumentListener innerListener
          The reference to inner listener.
protected  boolean isEnabled
           
protected  boolean modifiable
          The condition to indicate when field is modifiable.
protected  Form parentForm
          The reference to parent form.
protected  FormPermission permissionActivate
          The reference to activate permission.
protected  FormPermission permissionVisible
          The reference to visible permission in form.
static java.lang.String REQUIREDFIELDS_ATTR
          Attribute key to assign the required fields of the component.
protected  java.util.ResourceBundle resources
          The reference for resources file.
protected  boolean restricted
          The restricted condition.
protected  SelectableItemListCellRenderer selItemRenderer
          The renderer for elements of the list available fields.
protected  boolean show
          The condition to indicate whether must be shown.
protected  java.util.Vector valueListener
          The vector instance for a value listener.
protected  java.lang.Object valueSave
          The variable to store the field value when setValue() is called.
 
Fields inherited from class com.ontimize.util.swing.JCalculatedExpression
addButton, availableFieldsList, buttonPanel, closeParenthesisButton, componentList, divideButton, expressionPane, multiplyButton, openParenthesisButton, splitPane, substractButton, undoManager
 
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.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.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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
CalculatedExpressionDataField(java.util.Hashtable parameters)
           
 
Method Summary
 void addValueChangeListener(ValueChangeListener l)
           
protected  boolean checkEnabledPermission()
          Check enabled permission.
protected  boolean checkVisiblePermission()
          Return the visible permission condition.
protected  CalculatedExpressionDataField.FieldFocusListener createFocusListener()
          Creates a field focus listener.
protected  javax.swing.JList createList(java.util.List values)
          In addition to super method, this method adds renderers and listeners to JList component.
 void deleteData()
          The method to delete data for component.
protected  void enableInnerListener(boolean enable)
          This method allows to enable/disable the ValueEvent events notifier.
protected  void fireValueChanged(java.lang.Object newValue, java.lang.Object oldValue, int type)
          Detects fire value events.
 java.lang.Object getAttribute()
          Gets the object attribute.
 java.util.List getAvailableFields()
          Recovers the list of available fields to use into the mathematical expression.
 java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
          Description method to return the constraints component to place correctly in parent container.
protected  java.lang.String getFieldTranslation(java.lang.String field)
          This method obtains the translation of the element passed as parameter if it exists, if not, it returns the same value.
 java.lang.String getLabelComponentText()
          Returns the label text component.
 Form getParentForm()
          Gets the parent form.
 java.util.Vector getRequiredFields()
          This method returns a list of fields that are required into the configuration of the 'expression'.
protected  java.util.List getSelectableItemList(java.util.List fields)
          This method returns a list of SelectableItem objects from a specified list of field names.
 java.util.Vector getSourceFields()
          This method returns the fields(source fields) that are used into the 'mathematical expression' of the editor.
 int getSQLDataType()
          Returns the sql data type according to java.sql.Types
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
 java.lang.Object getValue()
          Gets the value of the component
 void init(java.util.Hashtable parameters)
          Inits parameters.
 void initPermissions()
           
protected  void installFocusListener()
          Adds the focus listener to the data field.
protected  void installInnerListener()
          Adds a inner listener for document.
 boolean isCorrectExpression()
          This method check if the current expression of the editor is well defined.
 boolean isEmpty()
          Checks the data existence in component.
 boolean isEnabled()
          Returns true when field is enabled.
 boolean isHidden()
          Indicates to check the visibility condition for a component.
 boolean isModifiable()
          Checks the modifiable condition for a component.
 boolean isModified()
          This method should be return true when data have been modified.
 boolean isRequired()
          Indicates the required condition for a component.
 boolean isRestricted()
           
 void removeValueChangeListener(ValueChangeListener l)
           
 void setAvailableFields(java.util.List values)
          Sets the list of fields that are going to be allowed to introduce into the mathematical expression of the editor.
 void setAvailableFields(java.lang.String value)
          Sets the list of fields that are going to be allowed to introduce into the mathematical expression of the editor from a String separated by semicolon.
 void setComponentLocale(java.util.Locale l)
           
 void setEnabled(boolean enabled)
          Enables the field to insert data.
 void setModifiable(boolean modifiable)
          Establishes the modifiable condition for a component.
 void setParentForm(Form form)
          Method declaration to set the form that contains the component.
 void setRequired(boolean required)
          Sets required a component according to condition.
 void setRequiredFields(java.util.List requiredFields)
          This method sets which fields are required into the available fields list.
 void setResourceBundle(java.util.ResourceBundle resourceBundle)
          Sets the language resource bundle.
 void setValue(java.lang.Object value)
          Sets the value of the component.
 void setVisible(boolean visible)
          Description method to set visible or not the component according the boolean condition in parameter.
 
Methods inherited from class com.ontimize.util.swing.JCalculatedExpression
addAvailableFields, addColumnToExpression, checkExpression, createButton, createExpressionEditor, createList, createParser, getAvailableFields, getExpression, getExpressionIndexColName, init, installHighlight, registerUndoableListener, registerUndoRedoActions, removeAllAvailableFields, removeAvailableFields, removeAvailableFields, setBorder, setExpression, setExpressionText, updateSelectedCalculatedColumnExpression
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
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, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, 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, addFocusListener, 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, removeFocusListener, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AVAILABLEFIELDS_ATTR

public static java.lang.String AVAILABLEFIELDS_ATTR
Attribute key to assign the available fields of the component.


REQUIREDFIELDS_ATTR

public static java.lang.String REQUIREDFIELDS_ATTR
Attribute key to assign the required fields of the component.


show

protected boolean show
The condition to indicate whether must be shown. By default, true.


attribute

protected java.lang.Object attribute
The reference to attribute. By default, null.


valueSave

protected java.lang.Object valueSave
The variable to store the field value when setValue() is called.


enabled

protected boolean enabled
The condition to indicate when field is active. By default, true.


isEnabled

protected boolean isEnabled

modifiable

protected boolean modifiable
The condition to indicate when field is modifiable. By default, true.


restricted

protected boolean restricted
The restricted condition. By default, false.


borderText

protected java.lang.String borderText
The reference for border text. By default, null.


backgroundColor

protected java.awt.Color backgroundColor
The default background color. By default, white.


availableFields

protected java.util.List availableFields
List that contains the name of the available fields to use into the editor of expressions.


valueListener

protected java.util.Vector valueListener
The vector instance for a value listener.


fireValueEvents

protected boolean fireValueEvents
The condition to activate field events. By default, yes.


innerListener

protected CalculatedExpressionDataField.InnerDocumentListener innerListener
The reference to inner listener. By default, null.


fieldlistenerFocus

protected CalculatedExpressionDataField.FieldFocusListener fieldlistenerFocus
The reference for field focus listener. By default, null.


parentForm

protected Form parentForm
The reference to parent form. By default, null.


permissionVisible

protected FormPermission permissionVisible
The reference to visible permission in form. By default, null.


permissionActivate

protected FormPermission permissionActivate
The reference to activate permission. By default, null.


resources

protected java.util.ResourceBundle resources
The reference for resources file. By default, null.


selItemRenderer

protected SelectableItemListCellRenderer selItemRenderer
The renderer for elements of the list available fields.

Constructor Detail

CalculatedExpressionDataField

public CalculatedExpressionDataField(java.util.Hashtable parameters)
Method Detail

getAttribute

public java.lang.Object getAttribute()
Description copied from interface: IdentifiedElement
Gets the object attribute. This attribute allows to identify the object

Specified by:
getAttribute in interface IdentifiedElement

getConstraints

public java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
Description copied from interface: FormComponent
Description method to return the constraints component to place correctly in parent container.

Specified by:
getConstraints in interface FormComponent
Parameters:
parentLayout - the parent container reference
Returns:
the constraints for the component

init

public void init(java.util.Hashtable parameters)
          throws java.lang.Exception
Inits parameters.

Specified by:
init in interface FormComponent
Parameters:
parameters - the Hashtable with parameters

attribute values default required meaning
attr yes The attribute to manage the field.
visible yes/no yes no The visibility condition.
required yes/no no no The required condition.
bgcolor no The background color.
border default/none/raised/lowered or a color defined in ColorConstants. Moreover, it is also allowed a border defined in #BorderManager no The border for datafield
enabled yes/no yes no The field activation.
availablefields field1;field2;...;fieldn no no The list of available fields to the mathematical expression.
requiredfields field1;field2;...;fieldn no no The list of required fields to the mathematical expression.
Throws:
java.lang.Exception - when Exception occurs

createList

protected javax.swing.JList createList(java.util.List values)
In addition to super method, this method adds renderers and listeners to JList component.


getFieldTranslation

protected java.lang.String getFieldTranslation(java.lang.String field)
This method obtains the translation of the element passed as parameter if it exists, if not, it returns the same value.

Overrides:
getFieldTranslation in class JCalculatedExpression

installInnerListener

protected void installInnerListener()
Adds a inner listener for document.


createFocusListener

protected CalculatedExpressionDataField.FieldFocusListener createFocusListener()
Creates a field focus listener.

Returns:
the field focus listener

installFocusListener

protected void installFocusListener()
Adds the focus listener to the data field.


setEnabled

public void setEnabled(boolean enabled)
Enables the field to insert data.

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

setVisible

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

Specified by:
setVisible in interface FormComponent

deleteData

public void deleteData()
The method to delete data for component.

Specified by:
deleteData in interface DataComponent

getValue

public java.lang.Object getValue()
Gets the value of the component

Specified by:
getValue in interface DataComponent
Returns:
the object with value.

setValue

public void setValue(java.lang.Object value)
Sets the value of the component.

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

getAvailableFields

public java.util.List getAvailableFields()
Description copied from class: JCalculatedExpression
Recovers the list of available fields to use into the mathematical expression.

Overrides:
getAvailableFields in class JCalculatedExpression
Returns:
a List of elements.

setAvailableFields

public void setAvailableFields(java.lang.String value)
Sets the list of fields that are going to be allowed to introduce into the mathematical expression of the editor from a String separated by semicolon.

Parameters:
value -

setAvailableFields

public void setAvailableFields(java.util.List values)
Description copied from class: JCalculatedExpression
Sets the list of fields that are going to be allowed to introduce into the mathematical expression of the editor.

Overrides:
setAvailableFields in class JCalculatedExpression
Parameters:
values - A list with the values.

getSelectableItemList

protected java.util.List getSelectableItemList(java.util.List fields)
This method returns a list of SelectableItem objects from a specified list of field names. Each SelectableItem includes the name of the available field and a check field used to configure the component.

Parameters:
fields - List of available fields names.
Returns:
a list of SelectableItem objects.

getSourceFields

public java.util.Vector getSourceFields()
This method returns the fields(source fields) that are used into the 'mathematical expression' of the editor.

Returns:
a List with the source fields.

getRequiredFields

public java.util.Vector getRequiredFields()
This method returns a list of fields that are required into the configuration of the 'expression'.

Returns:
a List with the required values.

setRequiredFields

public void setRequiredFields(java.util.List requiredFields)
This method sets which fields are required into the available fields list. The list of required fields is used into the configuration of the 'expression'.

Parameters:
requiredFields - List with the fields to set required.

isCorrectExpression

public boolean isCorrectExpression()
This method check if the current expression of the editor is well defined. If it is well defined the method returns true, if not, the method returns false.

Returns:

getLabelComponentText

public java.lang.String getLabelComponentText()
Description copied from interface: DataComponent
Returns the label text component. This label will change according to the Locale.

Specified by:
getLabelComponentText in interface DataComponent
Returns:
the label text

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

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

isHidden

public boolean isHidden()
Description copied from interface: DataComponent
Indicates to check the visibility condition for a component.

Specified by:
isHidden in interface DataComponent
Returns:
the visibility condition

isModifiable

public boolean isModifiable()
Description copied from interface: DataComponent
Checks the modifiable condition for a component. It is useful when it is not desired form deletes a component value.

Specified by:
isModifiable in interface DataComponent
Returns:
true when component is modifiable

isModified

public boolean isModified()
Description copied from interface: DataComponent
This method should be return true when data have been modified. The method setValue() should be change this condition.

Specified by:
isModified in interface DataComponent
Returns:
the modified condition

isEnabled

public boolean isEnabled()
Returns true when field is enabled. False in other case.

Specified by:
isEnabled in interface FormComponent

isRequired

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

Specified by:
isRequired in interface DataComponent
Returns:
the required condition

setModifiable

public void setModifiable(boolean modifiable)
Description copied from interface: DataComponent
Establishes the modifiable condition for a component. When component is not modifiable, data will not be deleted automatically in DeleteFields call.

Specified by:
setModifiable in interface DataComponent
Parameters:
modifiable - the boolean condition

setRequired

public void setRequired(boolean required)
Description copied from interface: DataComponent
Sets required a component according to condition.

Specified by:
setRequired in interface DataComponent
Parameters:
required - the required condition

getTextsToTranslate

public java.util.Vector getTextsToTranslate()
Description copied from interface: Internationalization
Returns all the texts in the element suitable for being translated.

Specified by:
getTextsToTranslate in interface Internationalization
Returns:
all the texts in the element suitable for being translated.

setComponentLocale

public void setComponentLocale(java.util.Locale l)
Specified by:
setComponentLocale in interface Internationalization

setResourceBundle

public void setResourceBundle(java.util.ResourceBundle resourceBundle)
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
Parameters:
resourceBundle - the new language bundle.

setParentForm

public void setParentForm(Form form)
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
Parameters:
form - the form reference

getParentForm

public Form getParentForm()
Gets the parent form.

Returns:
the parent form

initPermissions

public void initPermissions()
Specified by:
initPermissions in interface SecureElement

checkVisiblePermission

protected boolean checkVisiblePermission()
Return the visible permission condition.

Returns:
the visible condition

checkEnabledPermission

protected boolean checkEnabledPermission()
Check enabled permission.

Returns:
the enabled permission

isRestricted

public boolean isRestricted()
Specified by:
isRestricted in interface SecureElement

addValueChangeListener

public void addValueChangeListener(ValueChangeListener l)
Specified by:
addValueChangeListener in interface ValueChangeDataComponent

removeValueChangeListener

public void removeValueChangeListener(ValueChangeListener l)
Specified by:
removeValueChangeListener in interface ValueChangeDataComponent

fireValueChanged

protected void fireValueChanged(java.lang.Object newValue,
                                java.lang.Object oldValue,
                                int type)
Detects fire value events.

Parameters:
newValue - the new value
oldValue - the previous value
type - the type of value event

enableInnerListener

protected void enableInnerListener(boolean enable)
This method allows to enable/disable the ValueEvent events notifier. So, inner events will be not triggered when inner listener is disabled. It is advisable disabling the listener only when content is inserted by program.

Parameters:
enable - the condition to enable/disable the inner listener.

Ontimize