|
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.util.swing.JCalculatedExpression
com.ontimize.gui.field.CalculatedExpressionDataField
| 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 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 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 |
public static java.lang.String AVAILABLEFIELDS_ATTR
public static java.lang.String REQUIREDFIELDS_ATTR
protected boolean show
protected java.lang.Object attribute
protected java.lang.Object valueSave
setValue() is
called.
protected boolean enabled
protected boolean isEnabled
protected boolean modifiable
protected boolean restricted
protected java.lang.String borderText
protected java.awt.Color backgroundColor
protected java.util.List availableFields
protected java.util.Vector valueListener
protected boolean fireValueEvents
protected CalculatedExpressionDataField.InnerDocumentListener innerListener
protected CalculatedExpressionDataField.FieldFocusListener fieldlistenerFocus
protected Form parentForm
protected FormPermission permissionVisible
protected FormPermission permissionActivate
protected java.util.ResourceBundle resources
protected SelectableItemListCellRenderer selItemRenderer
| Constructor Detail |
public CalculatedExpressionDataField(java.util.Hashtable parameters)
| Method Detail |
public java.lang.Object getAttribute()
IdentifiedElement
getAttribute in interface IdentifiedElementpublic java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
FormComponentconstraints component to
place correctly in parent container.
getConstraints in interface FormComponentparentLayout - the parent container reference
public void init(java.util.Hashtable parameters)
throws java.lang.Exception
init in interface FormComponentparameters - 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. |
java.lang.Exception - when Exception occursprotected javax.swing.JList createList(java.util.List values)
protected java.lang.String getFieldTranslation(java.lang.String field)
getFieldTranslation in class JCalculatedExpressionprotected void installInnerListener()
protected CalculatedExpressionDataField.FieldFocusListener createFocusListener()
protected void installFocusListener()
public void setEnabled(boolean enabled)
setEnabled in interface FormComponentsetEnabled in class JCalculatedExpressionenabled - the condition to set enablepublic void setVisible(boolean visible)
FormComponent
setVisible in interface FormComponentpublic void deleteData()
deleteData in interface DataComponentpublic java.lang.Object getValue()
getValue in interface DataComponentobject with value.public void setValue(java.lang.Object value)
setValue in interface DataComponentvalue - the object with value to setpublic java.util.List getAvailableFields()
JCalculatedExpression
getAvailableFields in class JCalculatedExpressionList of elements.public void setAvailableFields(java.lang.String value)
value - public void setAvailableFields(java.util.List values)
JCalculatedExpression
setAvailableFields in class JCalculatedExpressionvalues - A list with the values.protected java.util.List getSelectableItemList(java.util.List fields)
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.
fields - List of available fields names.
SelectableItem objects.public java.util.Vector getSourceFields()
List with the source fields.public java.util.Vector getRequiredFields()
List with the required values.public void setRequiredFields(java.util.List requiredFields)
requiredFields - List with the fields to set required.public boolean isCorrectExpression()
public java.lang.String getLabelComponentText()
DataComponentLocale.
getLabelComponentText in interface DataComponentpublic int getSQLDataType()
DataComponentsql data type according to java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic boolean isEmpty()
DataComponent
isEmpty in interface DataComponenttrue when component is emptypublic boolean isHidden()
DataComponent
isHidden in interface DataComponentpublic boolean isModifiable()
DataComponent
isModifiable in interface DataComponenttrue when component is modifiablepublic boolean isModified()
DataComponenttrue when data have been modified. The method
setValue() should be change this condition.
isModified in interface DataComponentpublic boolean isEnabled()
isEnabled in interface FormComponentpublic boolean isRequired()
DataComponent
isRequired in interface DataComponentpublic void setModifiable(boolean modifiable)
DataComponentDeleteFields call.
setModifiable in interface DataComponentmodifiable - the boolean conditionpublic void setRequired(boolean required)
DataComponent
setRequired in interface DataComponentrequired - the required conditionpublic java.util.Vector getTextsToTranslate()
Internationalization
getTextsToTranslate in interface Internationalizationpublic void setComponentLocale(java.util.Locale l)
setComponentLocale in interface Internationalizationpublic void setResourceBundle(java.util.ResourceBundle resourceBundle)
Internationalization
setResourceBundle in interface InternationalizationresourceBundle - the new language bundle.public void setParentForm(Form form)
AccessForm
setParentForm in interface AccessFormform - the form referencepublic Form getParentForm()
public void initPermissions()
initPermissions in interface SecureElementprotected boolean checkVisiblePermission()
protected boolean checkEnabledPermission()
public boolean isRestricted()
isRestricted in interface SecureElementpublic void addValueChangeListener(ValueChangeListener l)
addValueChangeListener in interface ValueChangeDataComponentpublic void removeValueChangeListener(ValueChangeListener l)
removeValueChangeListener in interface ValueChangeDataComponent
protected void fireValueChanged(java.lang.Object newValue,
java.lang.Object oldValue,
int type)
newValue - the new valueoldValue - the previous valuetype - the type of value eventprotected void enableInnerListener(boolean enable)
enable - the condition to enable/disable the inner listener.
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||