Ontimize 5.2072EN

com.ontimize.gui
Class Form

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.ontimize.gui.Form
All Implemented Interfaces:
javax.accessibility.Accessible, CreateForms, FontAndEncodingSelector, FormComponent, Freeable, HasHelpIdComponent, HasPreferenceComponent, java.awt.image.ImageObserver, Internationalization, java.awt.MenuContainer, OpenDialog, java.awt.print.Printable, SecureElement, SelectCurrencyValues, java.io.Serializable
Direct Known Subclasses:
FormExt

public class Form
extends javax.swing.JPanel
implements FormComponent, CreateForms, OpenDialog, Freeable, SelectCurrencyValues, FontAndEncodingSelector, SecureElement, HasPreferenceComponent, java.awt.print.Printable, HasHelpIdComponent

The base class that is used for show a form that contains any set of components, data components, reference components. The base component where any component is displayed.

The Form can be added to form xml definition by using the default XML label Form. The structure is as follows:

<Form {attribute=value} />

The attributes allowed can be found in the method init(Hashtable params) where parameters contains the attributes information.

See Also:
Serialized Form

Nested Class Summary
protected  class Form.Act
           
protected static class Form.ComponentConstraints
           
static class Form.FocusComparableComponent
           
static class Form.FormButton
           
protected  class Form.FormTitleLabel
           
protected  class Form.HelpPopup
           
protected  class Form.PermissionAction
           
protected  class Form.SelColumnsDialog
           
 class Form.StatusBar
           
 class Form.TableButton
           
protected static class Form.TableButtonIcon
           
 
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
static java.lang.String acceptButtonKey
          GUI text
protected  java.util.Vector accessFormComponentList
          Component list that implement AccessForm interface.
protected  java.util.Vector additionalTableViewColumns
          Column list that are added to default column list from table view.
protected  OTreeNode associatedNode
          TreeNode associates with this form
protected  javax.swing.tree.TreePath associatedPath
          Path associates with this form
protected  boolean attachment
           
static java.lang.String ATTACHMENT
          Attribute name allowed in the XML.
static java.lang.String ATTACHMENT_COLUMNS_KEYS
          Constants used to form attachment
static java.lang.String ATTACHMENT_DATE
          Constants used to form attachment
static java.lang.String ATTACHMENT_ENTITY_NAME
          Constants used to form attachment
static java.lang.String ATTACHMENT_ID
          Constants used to form attachment
static java.lang.String ATTACHMENT_KEYS
          Constants used to form attachment
static java.lang.String ATTACHMENT_SOURCE_TABLE
          Constants used to form attachment
 ButtonSelectionInternationalization attachmentButton
          Button that manage the attachment file
protected  Entity attachmentEntity
          Deprecated. Use ((UtilReferenceLocator) locator).getAttachmentEntity(locator.getSessionId())
 javax.swing.ImageIcon attachmentIcon
           
protected  javax.swing.JPanel bodyPanel
          Main panel where the form is contained in
protected  boolean borderbuttons
           
protected  java.util.Hashtable buttonList
          Button list that implement Button that are contained in the form.
 javax.swing.JPanel buttonPanel
          Panel where the buttons are contained in
protected  java.util.Hashtable buttonPanelObjects
           
protected  boolean buttons
          Establishes if the buttons are displayed in the form.
static java.lang.String BUTTONS
          Attribute name allowed in the XML.
static java.lang.String cancelButtonKey
          GUI text
protected  java.util.Vector checkModifiedFieldList
          Modified field list
 javax.swing.JButton clearDataFieldButton
          Button that clear all data field values
protected static java.lang.String COLLAPSIBLE_KEY
           
static java.lang.String COLUMNS
          Attribute name allowed in the XML.
protected  java.util.Vector componentList
          Component list that are contained in the form.
static int CONFIRMATION
           
static int CORRECT
          Value returned in setCurrentDate(java.lang.String) when the operation was successful.
protected static java.awt.Color cTitleForeground
          Color user to draw the title
protected  java.util.Vector currencyComponentsList
          Component list that implement SelectCurrencyValues interface.
protected  int currentIndex
          Index of current record
protected  java.lang.String currentTitle
           
static java.lang.String CUSTOMFOCUS
          Attribute name allowed in the XML.
static java.lang.String DATABASE_BUNDLE
          Attribute name allowed in the XML to configure or not the database bundle configuration button.
protected  boolean databaseBundle
           
protected  javax.swing.JButton databaseBundleButton
           
 javax.swing.ImageIcon databaseBundleIcon
           
protected  java.util.Hashtable dataComponentList
          Hashtable where the components that implement DataComponent are stored in.
protected  java.util.Vector dataNavigationListeners
          List where the navigation listeners are stored in
protected  java.util.ArrayList dataRecordListeners
          List where the record listeners are stored in
static boolean DEFAULT_ATTACHMENT
          Establishes the default value for the attachment button in all application.
static boolean DEFAULT_DATABASE_BUNDLE
           
static java.awt.Insets DEFAULT_FORM_MARGIN
          Establishes the default margin value for all application forms.
static boolean DEFAULT_SCRIPT_ENABLED
           
static boolean DEFAULT_TABLEVIEW_MULTIPLEDATA
          Established the default value for the behavior when a query with multiple results is done in each application form.
static boolean DEFAULT_TEMPLATES
          Established the default value for the template button in all application.
static boolean defaultBorderButtons
           
protected static java.lang.String[] defaultButtonPanelPosition
          The default order for Form buttons and StatusBar showed (from left to right): "help", "helpId", "controls", "table", "start", "previous", "print", "next", "end", "countlabel", "refresh", "clear", "status".
static java.lang.String defaultButtonPosition
           
static int defaultFormButtonSize
          llt size for status bar buttons (navigation, delete fields, ...).
static boolean defaultOpaqueButtons
           
static boolean defaultPermissionButton
           
static java.lang.String defaultScriptButtonTip
           
static int defaultTableViewMinRowHeight
           
 java.lang.String deleteButtonText
           
static java.lang.String descendentOrderKey
          GUI text
static java.lang.String DESCRIPTION_FILE
          Constants used to form attachment
protected  DetailForm detailForm
          reference where the form is contained in.
protected  javax.swing.JDialog dialog
          Dialog window where the form is contained in. see putInModalDialog()
protected  DynamicFormManager dynamicFormManager
           
protected  FormPermission enabledPermission
          Enabled form permission
 javax.swing.JButton endButton
          Navigation button
 java.awt.event.ActionListener endButtonListener
          Navigation listener
 javax.swing.ImageIcon endIcon
           
static java.lang.String ENTITY
          Attribute name allowed in the XML.
protected  java.lang.String entityName
          Variable where the entity name is stored in.
protected  Entity ePrintingTemplate
          Deprecated. Use ((UtilReferenceLocator) locator).getPrintingTemplateEntity(locator.getSessionId())
static int ERROR_MESSAGE
          Used for error messages.
protected  java.lang.String f11Button
          Key of the update button
protected  java.lang.String f12Button
          Key of the delete button
protected  java.lang.String f7Button
          Key of the query button
protected  java.lang.String f9Button
          Key of the insert button
static int FIELD_NOT_FOUND
          Value returned in setCurrentDate(java.lang.String) method when the data field hasn't been found.
static java.lang.String FILE_NAME
          Constants used to form attachment
protected  java.lang.String fileName
          Form file name
static java.lang.String FORM
          The name of class.
protected static java.lang.String FORM_DATA
           
static java.lang.String FORMBODYPANEL
          The name of class.
protected  FormBuilder formBuilder
          FormBuilder reference that will be used by all components that implement CreateForms interface.
static java.lang.String FORMBUTTONPANEL
          The name of class.
protected  FormManager formManager
          Form manager reference where the form is contained in.
protected  Form.FormTitleLabel formTitleLabel
           
protected  java.util.Hashtable groupDataComponentList
          List where the group data component is stored in.
static java.lang.String headButtonKey
          GUI text
static java.lang.String HELP_ID
          Attribute name allowed in the XML.
 javax.swing.JButton helpButton
           
protected  java.lang.String helpId
           
 javax.swing.JButton helpIdButton
           
protected  java.lang.String helpKey
           
static java.lang.String HELPKEY
          Attribute name allowed in the XML.
protected  Form.HelpPopup helpPopup
           
static int INFORMATION_MESSAGE
          Used for information messages.
static int INPUT
           
protected  InteractionManager interactionManager
          InteractionManager class that this form has registered.
protected  java.util.Vector internationalizeList
          Component list that implement Internationalization.
protected  java.util.Vector keys
           
static java.lang.String KEYS
          Attribute name allowed in the XML.
protected  java.awt.event.MouseListener listenerHighlightButtons
           
protected  java.util.Locale locale
           
protected static java.lang.String M_RELOAD_FORM
           
static int MESSAGE
           
static java.lang.String messageAddTemplate
          GUI text
static java.lang.String messageCreateOpenOfficeTemplate
          GUI text
static java.lang.String messageCreateWordTemplate
          GUI text
static java.lang.String messageDeletedTemplate
          GUI text
static java.lang.String messageEmptyTemplate
          GUI text
static java.lang.String messageErrorGeneratePDF
          GUI text
static java.lang.String messageErrorInsert
          GUI text
static java.lang.String messageHelpTemplate
          GUI text
static java.lang.String messageInfoTemplate
          GUI text
static java.lang.String messageInsertionSucessful
          GUI text
static java.lang.String messageNameFieldTemplate
          GUI text
static java.lang.String messageQueryDeleted
          GUI text
protected  javax.swing.JDialog messageWindow
           
protected  java.lang.String modalDialogTitleKey
           
static java.lang.String MULTIPLE_DATA
          Attribute name allowed in the XML.
protected  boolean multipleData
           
protected  javax.swing.JPanel newButtonPanel
          Panel where the new buttons are contained in
 javax.swing.JButton nextButton
          Navigation button
 java.awt.event.ActionListener nextButtonListener
          Navigation listener
 javax.swing.ImageIcon nextIcon
           
static int NO
           
static int NOT_DATEDATAFIELD
          Value returned in setCurrentDate(java.lang.String) when the data field isn't a DateDataField.
protected  boolean opaquebuttons
           
static java.lang.String orderAscendingKey
          GUI text
 javax.swing.ImageIcon orderIcon
           
static java.lang.String orderWindowTitleKey
          GUI text
static java.lang.String ORIGINAL_FILE_NAME
          Constants used to form attachment
static java.lang.String originalButtonPosition
           
protected  java.lang.String originalTitle
           
static java.lang.String PARENT_KEYS
          Attribute name allowed in the XML.
protected  java.awt.Frame parentFrame
          Variable where the Frame of this Form is stored in
protected  java.util.Vector parentKeys
           
protected  java.lang.Object parentKeyValue
           
static java.lang.String PERMISSION_BUTTON
           
protected  javax.swing.JButton permissionButton
          Button that show the permission component
protected  ApplicationPermission permissionButtonApplicationPermission
          ApplicationPermission reference used to check the permission of permissionButton
protected  boolean permissionButtonEnabled
           
 javax.swing.JButton previousButton
          Navigation button
 java.awt.event.ActionListener previousButtonListener
          Navigation listener
 javax.swing.ImageIcon previousIcon
           
static java.lang.String PRINTABLE
          Attribute name allowed in the XML.
 javax.swing.JButton printButton
          Button that print used the default printing xml template
 javax.swing.ImageIcon printIcon
           
protected  java.lang.String printingTemplateName
          Variable where the printing template name is stored in
protected  java.awt.event.ActionListener printListener
          Listener of the printButton
 ButtonSelectionInternationalization printTemplateButton
          Button that manage the printing template
static java.lang.String PRIVATE_ATTACHMENT
          Constants used to form attachment
static int QUESTION_MESSAGE
          Used for questions.
 javax.swing.JButton refreshButton
           
 com.ontimize.gui.Form.FormAction refreshButtonListener
          Refresh button listener
 javax.swing.ImageIcon refreshIcon
           
static boolean RELOAD_BUTTON_VISIBLE
          Establishes if the reload button is created when the form is built.
protected  javax.swing.JButton reloadButton
           
static java.lang.String RESOURCES
          Attribute name allowed in the XML.
protected  java.util.ResourceBundle resourcesFile
           
protected  java.lang.String resourcesFileName
           
protected  boolean restricted
           
 javax.swing.JLabel resultCountLabel
          Label where the total record number is drawn in
static java.lang.String SCRIPT_ENABLED
           
protected  javax.swing.JButton scriptButton
           
protected  boolean scriptEnabled
           
 javax.swing.ImageIcon scriptIcon
           
static java.lang.String SCROLL
          Attribute name allowed in the XML.
protected  javax.swing.JScrollPane scrollPanel
          Scroll Panel where the form is contained in. see init(java.util.Hashtable)
protected  Form.SelColumnsDialog selColumnsDialog
          The dialog where the visible columns are selected in
static java.lang.String SET_VALUE_ORDER
          Attribute name allowed in the XML.
protected  java.util.Vector setValuesOrder
          Component list that provides the order in which the field values are filled.
static java.lang.String SIZE
          Constants used to form attachment
 javax.swing.JButton startButton
          Navigation button
 java.awt.event.ActionListener startButtonListener
          Navigation listener
 javax.swing.ImageIcon startIcon
           
static java.lang.String STATUS
          Attribute name allowed in the XML.
protected static java.lang.String STATUS_KEY
           
protected  Form.StatusBar statusBar
           
protected  SubForm subForm
          The SubForm where the form is contained in
protected  Table table
           
static java.lang.String TABLE_VIEW_SCROLL_H
          Attribute name allowed in the XML.
 Form.TableButton tableButton
          Table view button
 java.awt.event.ActionListener tableButtonListener
          Table view button listener
protected  java.util.Vector tableViewColumns
          Default column list that is shown in table view.
protected  int tableViewMinRowHeight
           
protected  javax.swing.JDialog tableWindow
           
static java.lang.String tableWindowKey
          GUI text
protected  javax.swing.JTabbedPane tabPane
          Deprecated.  
static java.lang.String TEMPLATE
          Attribute name allowed in the XML.
static java.lang.String TEMPLATE_DEFAULT
          Variable used to printing templates
static java.lang.String TEMPLATE_FORM
          Variable used to printing templates
static java.lang.String TEMPLATE_ID
          Variable used to printing templates
static java.lang.String TEMPLATE_NAME
          Variable used to printing templates
static java.lang.String TEMPLATE_PRIVATE
          Variable used to printing templates
static java.lang.String TEMPLATE_USER
          Variable used to printing templates
static java.lang.String TEMPLATE_WAREHOUSE
          Variable used to printing templates
protected  PopupPrintingTemplateList templateList
          Popup component where the printing template list is shown in
protected  boolean templates
           
static java.lang.String TEMPLATES
          Attribute name allowed in the XML.
static java.lang.String TIP_TABLEVIEW_SAVEPREFERENCE
          GUI text
static java.lang.String TITLE
          Attribute name allowed in the XML.
static boolean TITLE_ON_TOP
          Establishes where the title is situated in.
protected static java.awt.Paint titleBackgroundPaint
          Paint used to draw the title background
protected  java.util.Hashtable totalDataList
          Total data list from this form
static boolean toUppercaseTitle
           
protected  boolean useModifiedFocusOrder
           
static boolean useOriginalButtonPosition
           
static java.lang.String USER
          Constants used to form attachment
protected  int vectorSize
          Total data list size
protected  FormPermission visiblePermission
          Visible form permission
static int WARNING_MESSAGE
          Used for warning messages.
static int WORD_TEMPLATES
          Identifies the filling type will be used to fill the word templates.
protected  java.lang.String xmlEntityName
          Variable where the entity name is stored in.
static int YES
           
 
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.SelectCurrencyValues
EURO, PST
 
Fields inherited from interface com.ontimize.gui.SecureElement
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Form(java.util.Hashtable params)
          Creates a Form instance with the parameters establishes in Hastable
 
Method Summary
 void add(java.awt.Component component, java.lang.Object constraints)
          Appends the specified component to the end of this form.
 void addColumnsToTableView(java.util.Vector cols)
          Appends the specified column list to the default column list of the table view.
protected  void addComponentsToButtonPanel(java.lang.String configuration)
           
 void addComponentsToInternationalizeList(java.awt.Component component, boolean setBundle)
          Adds the component to the internationalizeList if the component implements Internationalization.
 void addControls(javax.swing.JComponent c)
          Appends the specified component to the control panel.
 void addDataNavigationListener(DataNavigationListener listener)
          Registers listener so that it will receive DataNavigationEvent when there are multiple records and the current record is changed using the navigation buttons.
 void addDataRecordListener(DataRecordListener listener)
          Registers listener so that it will receive DataRecordEvent when a record has been modified correctly.
protected  boolean checkAccessPermission(java.lang.String attribute)
          Checks if the attribute has any restriction by permissions.
protected  boolean checkApplicationBundleButton()
           
protected  boolean checkApplicationPermissionButton()
          Checks if the the permission button is restricted by application permissions.
protected  boolean checkApplicationScriptButton()
           
 boolean checkModifiedData()
          Checks if any fields have modified data.
 void clearNotQueriedTabs()
           
protected  void configureButton(javax.swing.JButton button, java.lang.String iconPath, boolean border, boolean opaque, java.awt.event.MouseListener highlightListener)
           
 void createLists()
          Creates and updates the component list contains in this form.
protected  void createTableViewTable()
          Creates the component used to show the table view.
 void deleteDataComponentList()
           
 void deleteDataField(java.lang.String attribute)
          Deletes data from form data component with this attribute
 void deleteDataFields()
          Deletes data from all form data components.
 void deleteDataFields(boolean includeNonModif)
          If parameter is true, data from all form data component will delete if not, only the modifiable components will delete.
 void deleteRecordFromFormCache(int index)
          Deletes the record with this index from form cache
 void disableButton(java.lang.String key)
          Disables the button with this key
 void disableButtons()
          Disables all buttons from the form
 void disableDataField(java.lang.Object attr)
          Disables the data field with this attribute
 void disableDataField(java.lang.String attribute)
          Disables the data field with this attribute
 void disableDataFields()
          Disables all data components from form
 void disableDataFields(java.lang.String except)
          Disables all data components from form except the data component with this attribute
 void disableHyperlinkComponents()
          Disables all hiperlink components
 void disableSubForms()
          Disables all subforms from this form
 void disableTables()
          Disables all tables from this form
 void enableButton(java.lang.String key)
          Enables the button with this key
 void enableButtons()
          Enables all buttons from this form.
 void enableDataField(java.lang.String attribute)
          Enables the data component from this form with this attribute.
 void enableDataField(java.lang.String attribute, boolean requestFocus)
          Enables the data component from this form with this attribute and if the requestfocus is true the enabled data component requests the focus
 void enableDataFields()
          Enables all data components from this form.
 void enableDataFields(boolean modifiable)
          Enables all data components from this form.
 void enableHyperlinkComponents()
          Enables all hiperlink components
 void enableTables()
          Enables all tables from this form
 boolean existEmptyRequiredDataField()
          Returns true if any required field is empty or false if all required fields have data.
protected  void fillDocComb(java.io.File file)
          Fills a WORD Document using the form data.
 void fillDocSust(java.io.File file)
          Fills a WORD Document using the form data.
 void fillODT(java.io.File inputFile)
           
 void fillPDF(java.io.File inputFile, java.io.File outputFile)
          Fills a PDF Document using the form data.
protected  void finalize()
           
protected  void findComponentInContainer(java.awt.Container container, java.util.List result)
          Finds all components into this Container and filles the List with this components.
protected  boolean findComponentInTab(java.awt.Container container, java.awt.Component component)
          Checks whether this component is contained in this container.
protected  void findVisibleComponentInContainer(java.awt.Container container, java.util.List result)
          Finds visible components into this Container and filles the List with this components.
protected  void fireDataChanged(DataNavigationEvent e)
          Notifies all listeners that the current record may be changed due to a DataNavigationEvent is forwarded.
 void fireDataRecordChange(DataRecordEvent e)
          Notifies all listeners that a record may have modified correctly.
protected  boolean fireDataWillChange(DataNavigationEvent e)
          Notifies all listeners that the current record will be changed due to a DataNavigationEvent is forwarded.
 void free()
          Makes the object to release the resources.
 java.lang.String getArchiveName()
          Returns the form archive name
 OTreeNode getAssociatedNode()
          Returns the tree node associated a this form.
 javax.swing.tree.TreePath getAssociatedTreePath()
          Returns the tree path associated a this form
protected  java.lang.String getAttributeName(java.lang.Object attribute)
          Get the string that identify an attribute.
 javax.swing.JPanel getBodyPanel()
           
 Button getButton(java.lang.String key)
          Returns a button reference that has the entry parameter as key
 javax.swing.JPanel getButtonPanel()
           
 Button[] getButtons()
          Returns a array of buttons with all buttons from the form.
 java.util.List getComponentList()
          Returns the list of component references that contains the form.
protected  java.util.Vector getComponentsAndLabelsListInOrderTopDown()
          Returns the list of component and label references that is contained in the form.
 java.util.List getComponentsInOrderFocus()
          Returns the list of focusable component references that are contained in the form.
protected  java.util.List getComponentsInOrderFocusInBody()
          Returns the list of focusable component references that are contained in the form body.
 java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
          Description method to return the constraints component to place correctly in parent container.
 int getCurrentIndex()
          Returns the record current index from form cache data
 javax.swing.JButton getDatabaseBundleButton()
           
 java.util.Hashtable getDataComponentList()
           
 java.util.Vector getDataComponents()
          Returns the list of data component references that are contained in the form.
 java.util.Vector getDataFieldAttributeList()
          Returns a list of data field attributes that are contained in the form
 DataComponent getDataFieldReference(java.lang.String attribute)
          Returns the reference of the data component which has the entry parameter as attribute
protected  java.util.Hashtable getDataFieldTemplateValues()
          Returns all form data field values in text format for being used in template filling.
 java.util.Hashtable getDataFieldText()
          Return the text contained in every form data field.
 java.lang.String getDataFieldText(java.lang.String attribute)
          Returns the data field text which has the entry parameter as attribute.
 java.util.Hashtable getDataFieldText(java.util.Vector attributeList)
          Returns a text list from the data fields that are requested in the entry parameter
 java.lang.Object getDataFieldValue(java.lang.String attribute)
          Returns the value of data component which has the entry parameter as attribute.
 java.lang.Object getDataFieldValueFromFormCache(java.lang.String attribute)
          Returns the data component value which has the entry parameter as attribute.
 java.util.Hashtable getDataFieldValues(boolean tables)
          Returns a Hashtable with the data field values from the form that aren't empty.
 java.util.Hashtable getDataFieldValues(boolean tables, boolean empty)
          Returns a Hashtable with the data field values from the form that aren't empty.
 java.util.Hashtable getDataList()
          Returns the whole data list from the form
static java.awt.Color getDefaultColorTitle()
           
static java.awt.Paint getDefaultTitlePaint()
           
 java.lang.StringBuffer getDefaultXMLTemplate()
          Returns the xml of the default template.
 java.lang.String getDeleteButtonKey()
          Returns the key of the delete button.
 DetailForm getDetailComponent()
          Returns a DetailForm if the form is contained in one of them.
 DynamicFormManager getDynamicFormManager()
          Returns the DynamicFormManager object that is assigned to this form.
 FormComponent getElementReference(java.lang.String attribute)
          Returns a FormComponent reference.
 java.util.Vector getEmptyRequiredDataField()
          Get the names (String) of all the empty required fields in the form
 java.lang.String getEntityName()
          Returns the string with the entity name is associated with the form
 int getFormCacheSize()
          Returns the size of the form data cache.
 FormManager getFormManager()
          Returns a FormManager object that manages this form.
 java.lang.String getFormTitle()
           
 DataComponentGroup getGroupReference(java.lang.String attribute)
          Returns DataComponentGroup reference
 java.lang.String getHelpIdString()
           
 int getIndex(java.util.Hashtable keyValues)
          Returns the index of the record that has the entry parameter as key values
 java.lang.String getInsertButtonKey()
          Returns the key of the insert button.
 InteractionManager getInteractionManager()
          Returns the InteractionManager object that this form has registered
 javax.swing.JDialog getJDialog()
          Returns the JDialog object reference that has been created in the call to method putInModalDialog().
 java.util.Vector getKeys()
          Returns the key list of this form
 java.awt.LayoutManager getLayout()
          Gets the layout manager for the form body
protected  java.awt.Point getLocationInForm(java.awt.Component component)
          Gets the location of this component in this form of a point specifying the component's top-left corner in the form's coordinate space.
 java.util.Vector getNotQueriedDataFieldAttributes()
          Checks whether exist data fields that haven't been queried
 java.awt.Frame getParentFrame()
          Gets the parent Frame object reference.
 java.util.Vector getParentKeys()
          Returns a vector containing the parent key names, this is, the names set in the XML to the attributes 'parentkey' and 'otherkeys'.
 java.lang.Object getParentKeyValue()
          Deprecated.  
 java.util.Hashtable getParentKeyValues()
          Returns the parent keys values
 javax.swing.JButton getPermissionButton()
          Gets the permission button if exists
 java.lang.String getPrintingTemplateName()
          Returns the printing template name.
 java.lang.String getQueryButtonKey()
          Returns the key of the query button.
 java.util.ResourceBundle getResourceBundle()
          Gets the resource bundle that contain locale-specific objects.
 java.lang.String getResourceFileName()
           
 javax.swing.JButton getScriptButton()
           
 javax.swing.JScrollPane getScrollPane()
          Gets the JScrollPane object when the body form is contained in.
 java.lang.String getSizeDialogPreferenceKey()
          Returns the string used as key to store the dialog size in the preferences
 Form.StatusBar getStatusBar()
           
 SubForm getSubForm()
          Returns the SubForm component if this form is contained in one of them
 Table getTableFromTableView()
          Returns the table used to show the query result.
protected  java.lang.String getTableViewPreferenceKey()
          Returns the string used as key to store the table view columns in the preferences
 java.util.Vector getTextsToTranslate()
          Returns all the texts in the element suitable for being translated.
protected  java.util.Hashtable getTranslatedDataFieldLabel()
          Returns a Hashtable where the attribute list and translated text are stored in.
 java.lang.String getUpdateButtonKey()
          Returns the key of the update button.
protected  java.util.ArrayList getVisibleDataComponentAttributes()
          Returns a list of all visible components that are displayed in this form.
 boolean hasDataAllFields()
          Returns true if all fields have data.
 void hideButton(java.lang.String key)
          Hides the button which attribute is the entry parameter.
 void hideDataField(java.lang.Object attr)
          Hides the data field which attribute is the entry parameter.
 void hideElement(java.lang.String attr)
          Hides the element which attribute is the entry parameter.
 void init(java.util.Hashtable parameters)
          Method that configures the component.
 void initPermissions()
           
 void initPreferences(ApplicationPreferences ap, java.lang.String user)
           
protected  void installAttachmentButton()
          Installs the attachment button for this form.
protected  void installDatabaseBundleButton()
           
 void installHelpId()
           
protected  void installPermissionButton()
          Installs the permission button for this form.
protected  void installPrintingTemplatesButton()
          Installs the printing template button for this form.
protected  void installScriptButton()
           
protected  void isCreatedCheckModifiedFieldList()
          Returns true if the modified data field list has been created.
 boolean isCustomFocusEnabled()
          Returns whether is this Form should use a modified focus order.
 boolean isEmpty(java.lang.String attribute)
          Returns whether the data field which attribute is the entry parameter hasn't data.
 boolean isFocusCycleRoot()
           
 boolean isFocusTraversable()
           
 boolean isRestricted()
           
protected  java.util.Vector loadTableViewPreference(ApplicationPreferences prefs)
          Loads the table view preferences.In this preference the column list that will be showed in the table view is stored.
 int message(java.awt.Dialog owner, java.lang.String message, int messageType)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Dialog owner, java.lang.String message, int messageType, java.lang.String detail)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Dialog owner, java.lang.String message, int messageType, java.lang.String detail, java.lang.Object[] args)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Frame owner, java.lang.String message, int messageType)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Frame owner, java.lang.String message, int messageType, java.lang.String detail)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Frame f, java.lang.String message, int messageType, java.lang.String detail, java.lang.Object[] args)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.lang.String message, int messageType)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.lang.String message, int messageType, java.lang.String detail)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.lang.String message, int messageType, java.lang.String detail, java.lang.Object[] args)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.lang.String message, java.lang.Object[] args, int messageType)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Window owner, java.lang.String message, int messageType)
          Brings up a dialog that displays a message using a default icon determined by the messageType parameter.
 int message(java.awt.Window owner, java.lang.String message, int messageType, java.lang.Object[] args)
          Shows a MessageDialog with the information collects from entry parameters
 int message(java.awt.Window owner, java.lang.String message, int messageType, java.lang.String detail, java.lang.Object[] args)
          Shows a MessageDialog with the information collects from entry parameters
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int page)
           
 void printingFormWithDefaultTemplate()
          Prints the default template with the data from the form data components.
 void printTemplate(java.lang.String templateURI, java.lang.String entity, java.lang.String title)
          Prints the template which location is defined in templateURI parameter.
 void printTemplate(java.lang.String templateURI, java.lang.String entity, java.lang.String title, boolean texts)
          Prints the template which location is defined in templateURI parameter.
protected  void processCollapsibleButton(java.lang.String components, boolean status, int gridx)
           
 javax.swing.JDialog putInModalDialog()
          Deprecated. Uses putInModalDialog(Component parentComponent)
 javax.swing.JDialog putInModalDialog(java.awt.Component parentComponent)
          Puts the form in a modal JDialog if it doesn't contain in any window.
 javax.swing.JDialog putInModalDialog(java.awt.Dialog owner)
          Puts the form in a modal JDialog if it doesn't contain in any window.
 javax.swing.JDialog putInModalDialog(java.awt.Frame owner)
          Puts the form in a modal JDialog if it doesn't contain in any window.
 javax.swing.JDialog putInModalDialog(java.lang.String title)
          Deprecated. uses putInModalDialog(String, Component)
 javax.swing.JDialog putInModalDialog(java.lang.String title, java.awt.Component parent)
          Puts the form in a modal JDialog if it doesn't contain in any window.
 javax.swing.JDialog putInModalDialog(java.awt.Window window)
          Puts the form in a modal JDialog if it doesn't contain in any window.
 EntityResult query(java.util.Hashtable keysValues, java.util.Vector attributes)
          Performs a query operation that return the set of data that matches the conditions specified by the keysValues parameter.
protected  EntityResult query(int index)
          Performs a query for a record of the total data cache which index is the entry parameter.
 EntityResult query(int index, java.util.Vector attributes)
          Performs a query operation that return the set of data that matches the conditions specified by record index of total data cache.
 boolean question(java.awt.Dialog owner, java.lang.String message)
          Shows a MessageDialog where the message type is established with QUESTION_MESSAGE in.
 boolean question(java.lang.String message)
          Shows a MessageDialog where the message type is established with QUESTION_MESSAGE in.
 void refreshCurrentDataRecord()
          Refreshes the current data record that is displayed in the form, both the record of the total data cache and all values that are displayed in each data field.
 void registerApplicationPreferencesListener()
          Registers all components that implement ApplicationPreferencesListener so that they will receive PreferenceEvent when some preference change in the application.
protected  void registerKeyBindings()
          Registers a keyboard action for default buttons.
 void remove(java.awt.Component component)
           
 void removeDataRecordListener(DataRecordListener listener)
          Unregisters listener so that it will no longer receive DataRecordEvent.
 boolean requestDefaultFocus()
           
 boolean requestFocusForFirstComponent()
          Dispatch the focus to first enabled data component starting by the top-left corner of the form.
 void resetEntityName()
           
 void resetFocusOrder()
           
 void resetTableViewColumns()
          Delete all column that aren't default column from colum list of the table view
protected  void saveTableViewPreferenceForm(java.util.Vector columns)
          Saves the table view preference.In this preference the column list that will be showed in the table view is stored.
protected  void scanComponents(java.awt.Container container, boolean onlyReferenceDataFields)
          Move across the tree with the form components
 void selectTableViewColumns()
          Shows a dialog in where the user can select the visible columns from TableViewTable
 boolean setAdvancedQueryMode(java.lang.String attr, boolean enable)
          Enables/Disables the advanced query mode for the component which has the entry parameter as attribute.
 void setAdvancedQueryModeAll(boolean enable)
          Enables/Disables the advanced query mode for all form component.
 void setAllModificable(boolean modif)
          Establishes whether all data components are modifiable.
 void setAssociatedNode(OTreeNode node)
          Set the node associated with the form.
 void setCheckModifiedData(boolean check)
           
 void setCheckModifiedDataField(java.lang.String attr, boolean enable)
          Established if a data field, which attribute is the entry parameter, has enabled the data modified checking.
 void setComponentLocale(java.util.Locale l)
           
 int setCurrentDate(java.lang.String attribute)
          Method to set the current date in a DateDataField.
 void setCurrentIndex(int index)
           
 void setDataFieldValue(java.lang.Object attribute, java.lang.Object value)
          Set the value to the form component with the attribute specified in attribute parameter.
 void setDataFieldValues(java.util.Hashtable values)
          Established the values in each form data field that is passed in the entry parameter.
 void setDataFieldValueToFormCache(java.lang.Object attr, java.lang.Object value)
           
static void setDefaultColorTitle(java.awt.Color c)
          Sets the color of the title text
static void setDefaultTitlePaint(java.awt.Paint paint)
          Sets the Paint attribute for the Graphics2D context of the Title component
 void setDetailForm(DetailForm detailForm)
          Sets the DetailForm for this form
 void setDynamicFormManager(DynamicFormManager dynamicfm)
          Sets the DynamicFormManager object for this form.
 void setEntityName(java.lang.String name)
          Sets the entity name associated with this form
 void setFileName(java.lang.String archiveName)
          Sets the file name which is stored the form xml description
 void setFormBuilder(FormBuilder builder)
          Establishes the FormBuilder that will be used by the components of this Form that implement CreateForms interface
 void setFormManager(FormManager formManager)
          Sets the form manager for this form
 void setFormTitle(java.lang.String title)
           
protected  void setFormValues(java.util.Hashtable data)
          Establishes the values in each form data field that are obtained from entry parameter.
 void setInteractionManager(InteractionManager formInteractionManager)
           
 void setLinkedTreePath(javax.swing.tree.TreePath path)
          Set the tree path associated with the form
 void setModifiable(java.lang.String attribute, boolean modifiable)
          Sets a data component as modifiable or not modifiable
protected  void setNormalConfiguration()
           
 void setParentFrame(java.awt.Frame parentFrame)
          This method is called from Form for each component that implements this interface.
 void setParentKeyValue(java.lang.String attribute, java.lang.Object value)
          Deprecated.  
 void setParentKeyValues(java.util.Hashtable values)
          Establishes the values in the data field that theirs attributes is into the parent key list Sets to parent keys values
 void setRequired(java.lang.Object attributes, boolean required)
          Establishes whether data field which attributes is the entry parameter is required.
 void setResourceBundle(java.util.ResourceBundle resources)
          Sets the language resource bundle.
 void setStatusBarText(java.lang.String text, int timeMillis)
          Set the text of the status bar.
 void setStatusBarText(java.lang.String text, int timeMillis, boolean translate)
           
 void setTabEnabled(int index, boolean enabled)
          Deprecated.  
 void setTabEnabled(java.lang.String title, boolean enabled)
          Deprecated.  
 void setTabVisible(int index)
          Deprecated.  
 void setTabVisible(java.lang.String title)
          Deprecated.  
 java.awt.Font showAvaliableFonts(boolean supportingEuro)
          Shows the available fonts in the system.
 void showButton(java.lang.String key)
          Shows the button which key is the entry parameter.
 void showCurrencyValue(int idCurrency)
           
 void showDataField(java.lang.Object attr)
          Shows the data field which attribute is the entry parameter.
 void showElement(java.lang.String attr)
          Shows the element which attribute is the entry parameter.
 void showMe(java.awt.Component c)
          Deprecated.  
 void showTableView()
          Shows the table view.
static boolean supportsEuroSymbol(java.awt.Font font)
          Check if the Font support the Euro character
protected  void unregisterKeyBindings()
           
protected  void updateDataFieldNavegationButton(int index)
           
protected  void updateDataFields_Internal(int index)
          Updates the form data field using the values stored in total data cache.
 void updateDataFields(java.util.Hashtable data)
          Updates the values of each form data field and the values of the total data cache with the entry parameter.
 void updateDataFields(java.util.Hashtable data, int currentIndex)
          Updates the values of each form data field and the values of the total data cache with the data entry parameter.
 void updateDataFields(int index)
          Updates the form data field using the values stored in total data cache.
protected  void updateDataFieldsEDTh(java.util.Hashtable data)
           
 void updateDataListDataCurrentRecord(java.util.Hashtable attributesValues)
           
 void updateDataListDataCurrentRecord(java.util.Hashtable attributesValues, boolean dataFieldRefresh)
           
 void updateReferencesLocator()
          Update the reference locator for all the reference data fields
 void useFont(java.awt.Font font)
          Set the font to use by the object
 
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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, 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, isEnabled, isFocusable, isFocusOwner, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.gui.field.FormComponent
isEnabled, setEnabled, setVisible
 

Field Detail

FORM

public static final java.lang.String FORM
The name of class. Used by L&F to put UI properties.

Since:
5.2062EN
See Also:
Constant Field Values

FORMBODYPANEL

public static final java.lang.String FORMBODYPANEL
The name of class. Used by L&F to put UI properties.

Since:
5.2062EN
See Also:
Constant Field Values

FORMBUTTONPANEL

public static final java.lang.String FORMBUTTONPANEL
The name of class. Used by L&F to put UI properties.

Since:
5.2062EN
See Also:
Constant Field Values

defaultTableViewMinRowHeight

public static int defaultTableViewMinRowHeight

defaultFormButtonSize

public static int defaultFormButtonSize
llt size for status bar buttons (navigation, delete fields, ...).

Since:
5.2060EN-0.6

tableViewMinRowHeight

protected int tableViewMinRowHeight

listenerHighlightButtons

protected java.awt.event.MouseListener listenerHighlightButtons

defaultBorderButtons

public static boolean defaultBorderButtons

borderbuttons

protected boolean borderbuttons

defaultOpaqueButtons

public static boolean defaultOpaqueButtons

opaquebuttons

protected boolean opaquebuttons

MULTIPLE_DATA

public static final java.lang.String MULTIPLE_DATA
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

TEMPLATES

public static final java.lang.String TEMPLATES
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

ATTACHMENT

public static final java.lang.String ATTACHMENT
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

DATABASE_BUNDLE

public static final java.lang.String DATABASE_BUNDLE
Attribute name allowed in the XML to configure or not the database bundle configuration button.

See Also:
init(java.util.Hashtable), Constant Field Values

SCRIPT_ENABLED

public static final java.lang.String SCRIPT_ENABLED
See Also:
Constant Field Values

PERMISSION_BUTTON

public static final java.lang.String PERMISSION_BUTTON
See Also:
Constant Field Values

defaultScriptButtonTip

public static java.lang.String defaultScriptButtonTip

TITLE

public static final java.lang.String TITLE
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

TEMPLATE

public static final java.lang.String TEMPLATE
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

PRINTABLE

public static final java.lang.String PRINTABLE
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

ENTITY

public static final java.lang.String ENTITY
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

SET_VALUE_ORDER

public static final java.lang.String SET_VALUE_ORDER
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

SCROLL

public static final java.lang.String SCROLL
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

CUSTOMFOCUS

public static final java.lang.String CUSTOMFOCUS
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

HELPKEY

public static final java.lang.String HELPKEY
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

STATUS

public static final java.lang.String STATUS
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

BUTTONS

public static final java.lang.String BUTTONS
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

RESOURCES

public static final java.lang.String RESOURCES
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

PARENT_KEYS

public static final java.lang.String PARENT_KEYS
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

KEYS

public static final java.lang.String KEYS
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

HELP_ID

public static final java.lang.String HELP_ID
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

TABLE_VIEW_SCROLL_H

public static final java.lang.String TABLE_VIEW_SCROLL_H
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

COLUMNS

public static final java.lang.String COLUMNS
Attribute name allowed in the XML.

See Also:
init(java.util.Hashtable), Constant Field Values

M_RELOAD_FORM

protected static final java.lang.String M_RELOAD_FORM
See Also:
Constant Field Values

WORD_TEMPLATES

public static int WORD_TEMPLATES
Identifies the filling type will be used to fill the word templates.


FORM_DATA

protected static final java.lang.String FORM_DATA
See Also:
Constant Field Values

TITLE_ON_TOP

public static boolean TITLE_ON_TOP
Establishes where the title is situated in. If the values is true, the form title is situated on top the navigation buttons.


DEFAULT_FORM_MARGIN

public static java.awt.Insets DEFAULT_FORM_MARGIN
Establishes the default margin value for all application forms.


RELOAD_BUTTON_VISIBLE

public static boolean RELOAD_BUTTON_VISIBLE
Establishes if the reload button is created when the form is built.


DEFAULT_ATTACHMENT

public static boolean DEFAULT_ATTACHMENT
Establishes the default value for the attachment button in all application. If the value is true the attachment button will be shown in the form whether the default attachments are configured.


DEFAULT_DATABASE_BUNDLE

public static boolean DEFAULT_DATABASE_BUNDLE

defaultPermissionButton

public static boolean defaultPermissionButton

DEFAULT_SCRIPT_ENABLED

public static boolean DEFAULT_SCRIPT_ENABLED

DEFAULT_TEMPLATES

public static boolean DEFAULT_TEMPLATES
Established the default value for the template button in all application. If the value is true the template button will be shown in the form whether the default templates are configured.


DEFAULT_TABLEVIEW_MULTIPLEDATA

public static boolean DEFAULT_TABLEVIEW_MULTIPLEDATA
Established the default value for the behavior when a query with multiple results is done in each application form. If the value is true the table view with all results is showed


TEMPLATE_ID

public static java.lang.String TEMPLATE_ID
Variable used to printing templates


TEMPLATE_WAREHOUSE

public static java.lang.String TEMPLATE_WAREHOUSE
Variable used to printing templates


TEMPLATE_FORM

public static java.lang.String TEMPLATE_FORM
Variable used to printing templates


TEMPLATE_DEFAULT

public static java.lang.String TEMPLATE_DEFAULT
Variable used to printing templates


TEMPLATE_USER

public static java.lang.String TEMPLATE_USER
Variable used to printing templates


TEMPLATE_PRIVATE

public static java.lang.String TEMPLATE_PRIVATE
Variable used to printing templates


TEMPLATE_NAME

public static java.lang.String TEMPLATE_NAME
Variable used to printing templates


ATTACHMENT_ID

public static final java.lang.String ATTACHMENT_ID
Constants used to form attachment

See Also:
Constant Field Values

ATTACHMENT_KEYS

public static final java.lang.String ATTACHMENT_KEYS
Constants used to form attachment

See Also:
Constant Field Values

ATTACHMENT_COLUMNS_KEYS

public static final java.lang.String ATTACHMENT_COLUMNS_KEYS
Constants used to form attachment

See Also:
Constant Field Values

ATTACHMENT_SOURCE_TABLE

public static final java.lang.String ATTACHMENT_SOURCE_TABLE
Constants used to form attachment

See Also:
Constant Field Values

ATTACHMENT_DATE

public static final java.lang.String ATTACHMENT_DATE
Constants used to form attachment

See Also:
Constant Field Values

PRIVATE_ATTACHMENT

public static final java.lang.String PRIVATE_ATTACHMENT
Constants used to form attachment

See Also:
Constant Field Values

USER

public static final java.lang.String USER
Constants used to form attachment

See Also:
Constant Field Values

DESCRIPTION_FILE

public static final java.lang.String DESCRIPTION_FILE
Constants used to form attachment

See Also:
Constant Field Values

SIZE

public static final java.lang.String SIZE
Constants used to form attachment

See Also:
Constant Field Values

ORIGINAL_FILE_NAME

public static final java.lang.String ORIGINAL_FILE_NAME
Constants used to form attachment

See Also:
Constant Field Values

FILE_NAME

public static final java.lang.String FILE_NAME
Constants used to form attachment

See Also:
Constant Field Values

ATTACHMENT_ENTITY_NAME

public static final java.lang.String ATTACHMENT_ENTITY_NAME
Constants used to form attachment

See Also:
Constant Field Values

messageAddTemplate

public static java.lang.String messageAddTemplate
GUI text


messageCreateWordTemplate

public static java.lang.String messageCreateWordTemplate
GUI text


messageCreateOpenOfficeTemplate

public static java.lang.String messageCreateOpenOfficeTemplate
GUI text


messageHelpTemplate

public static java.lang.String messageHelpTemplate
GUI text


messageNameFieldTemplate

public static java.lang.String messageNameFieldTemplate
GUI text


messageEmptyTemplate

public static java.lang.String messageEmptyTemplate
GUI text


messageInfoTemplate

public static java.lang.String messageInfoTemplate
GUI text


messageDeletedTemplate

public static java.lang.String messageDeletedTemplate
GUI text


messageQueryDeleted

public static java.lang.String messageQueryDeleted
GUI text


messageInsertionSucessful

public static java.lang.String messageInsertionSucessful
GUI text


messageErrorInsert

public static java.lang.String messageErrorInsert
GUI text


messageErrorGeneratePDF

public static java.lang.String messageErrorGeneratePDF
GUI text


CONFIRMATION

public static final int CONFIRMATION
See Also:
Constant Field Values

INPUT

public static final int INPUT
See Also:
Constant Field Values

MESSAGE

public static final int MESSAGE
See Also:
Constant Field Values

YES

public static final int YES
See Also:
Constant Field Values

NO

public static final int NO
See Also:
Constant Field Values

INFORMATION_MESSAGE

public static final int INFORMATION_MESSAGE
Used for information messages.

See Also:
Constant Field Values

ERROR_MESSAGE

public static final int ERROR_MESSAGE
Used for error messages.

See Also:
Constant Field Values

WARNING_MESSAGE

public static final int WARNING_MESSAGE
Used for warning messages.

See Also:
Constant Field Values

QUESTION_MESSAGE

public static final int QUESTION_MESSAGE
Used for questions.

See Also:
Constant Field Values

FIELD_NOT_FOUND

public static final int FIELD_NOT_FOUND
Value returned in setCurrentDate(java.lang.String) method when the data field hasn't been found.

See Also:
Constant Field Values

NOT_DATEDATAFIELD

public static final int NOT_DATEDATAFIELD
Value returned in setCurrentDate(java.lang.String) when the data field isn't a DateDataField.

See Also:
Constant Field Values

CORRECT

public static final int CORRECT
Value returned in setCurrentDate(java.lang.String) when the operation was successful.

See Also:
Constant Field Values

f7Button

protected java.lang.String f7Button
Key of the query button


f9Button

protected java.lang.String f9Button
Key of the insert button


f11Button

protected java.lang.String f11Button
Key of the update button


f12Button

protected java.lang.String f12Button
Key of the delete button


orderWindowTitleKey

public static java.lang.String orderWindowTitleKey
GUI text


orderAscendingKey

public static java.lang.String orderAscendingKey
GUI text


descendentOrderKey

public static java.lang.String descendentOrderKey
GUI text


acceptButtonKey

public static java.lang.String acceptButtonKey
GUI text


cancelButtonKey

public static java.lang.String cancelButtonKey
GUI text


headButtonKey

public static java.lang.String headButtonKey
GUI text


tableWindowKey

public static java.lang.String tableWindowKey
GUI text


TIP_TABLEVIEW_SAVEPREFERENCE

public static final java.lang.String TIP_TABLEVIEW_SAVEPREFERENCE
GUI text

See Also:
Constant Field Values

helpId

protected java.lang.String helpId

locale

protected java.util.Locale locale

dataNavigationListeners

protected java.util.Vector dataNavigationListeners
List where the navigation listeners are stored in


dataRecordListeners

protected java.util.ArrayList dataRecordListeners
List where the record listeners are stored in


visiblePermission

protected FormPermission visiblePermission
Visible form permission


enabledPermission

protected FormPermission enabledPermission
Enabled form permission


tableViewColumns

protected java.util.Vector tableViewColumns
Default column list that is shown in table view. This list is defined by 'columns' XML parameter See init(java.util.Hashtable)


additionalTableViewColumns

protected java.util.Vector additionalTableViewColumns
Column list that are added to default column list from table view.


dialog

protected javax.swing.JDialog dialog
Dialog window where the form is contained in. see putInModalDialog()


scrollPanel

protected javax.swing.JScrollPane scrollPanel
Scroll Panel where the form is contained in. see init(java.util.Hashtable)


bodyPanel

protected javax.swing.JPanel bodyPanel
Main panel where the form is contained in


tabPane

protected javax.swing.JTabbedPane tabPane
Deprecated.  


printingTemplateName

protected java.lang.String printingTemplateName
Variable where the printing template name is stored in


helpKey

protected java.lang.String helpKey

helpPopup

protected Form.HelpPopup helpPopup

fileName

protected java.lang.String fileName
Form file name


attachment

protected boolean attachment

databaseBundle

protected boolean databaseBundle

permissionButtonEnabled

protected boolean permissionButtonEnabled

scriptEnabled

protected boolean scriptEnabled

templates

protected boolean templates

templateList

protected PopupPrintingTemplateList templateList
Popup component where the printing template list is shown in


dynamicFormManager

protected DynamicFormManager dynamicFormManager

checkModifiedFieldList

protected java.util.Vector checkModifiedFieldList
Modified field list


useModifiedFocusOrder

protected boolean useModifiedFocusOrder

titleBackgroundPaint

protected static java.awt.Paint titleBackgroundPaint
Paint used to draw the title background


cTitleForeground

protected static java.awt.Color cTitleForeground
Color user to draw the title


toUppercaseTitle

public static boolean toUppercaseTitle

originalTitle

protected java.lang.String originalTitle

currentTitle

protected java.lang.String currentTitle

statusBar

protected Form.StatusBar statusBar

formTitleLabel

protected Form.FormTitleLabel formTitleLabel

dataComponentList

protected java.util.Hashtable dataComponentList
Hashtable where the components that implement DataComponent are stored in. This variable provides a reference of each DataComponent that is contained in the form. This variable is filled when the createLists() method is called and this method must only be called when all components have been added to the form.


entityName

protected java.lang.String entityName
Variable where the entity name is stored in.


xmlEntityName

protected java.lang.String xmlEntityName
Variable where the entity name is stored in.


groupDataComponentList

protected java.util.Hashtable groupDataComponentList
List where the group data component is stored in.


formManager

protected FormManager formManager
Form manager reference where the form is contained in. This reference must be assigned by the form manager when the form is loaded.

See Also:
{@link FormManager}

parentFrame

protected java.awt.Frame parentFrame
Variable where the Frame of this Form is stored in

See Also:
{@link FormManager}

interactionManager

protected InteractionManager interactionManager
InteractionManager class that this form has registered.


buttonList

protected java.util.Hashtable buttonList
Button list that implement Button that are contained in the form. This list is filled in the createLists() method.


internationalizeList

protected java.util.Vector internationalizeList
Component list that implement Internationalization.


messageWindow

protected javax.swing.JDialog messageWindow

componentList

protected java.util.Vector componentList
Component list that are contained in the form.


accessFormComponentList

protected java.util.Vector accessFormComponentList
Component list that implement AccessForm interface.


currencyComponentsList

protected java.util.Vector currencyComponentsList
Component list that implement SelectCurrencyValues interface.


formBuilder

protected FormBuilder formBuilder
FormBuilder reference that will be used by all components that implement CreateForms interface.


detailForm

protected DetailForm detailForm
reference where the form is contained in.


multipleData

protected boolean multipleData

buttons

protected boolean buttons
Establishes if the buttons are displayed in the form.

See Also:
{@link #init}

nextButton

public javax.swing.JButton nextButton
Navigation button


previousButton

public javax.swing.JButton previousButton
Navigation button


endButton

public javax.swing.JButton endButton
Navigation button


startButton

public javax.swing.JButton startButton
Navigation button


refreshButton

public javax.swing.JButton refreshButton

helpButton

public javax.swing.JButton helpButton

helpIdButton

public javax.swing.JButton helpIdButton

tableButton

public Form.TableButton tableButton
Table view button


clearDataFieldButton

public javax.swing.JButton clearDataFieldButton
Button that clear all data field values


reloadButton

protected javax.swing.JButton reloadButton

resultCountLabel

public javax.swing.JLabel resultCountLabel
Label where the total record number is drawn in


buttonPanel

public javax.swing.JPanel buttonPanel
Panel where the buttons are contained in


STATUS_KEY

protected static final java.lang.String STATUS_KEY
See Also:
Constant Field Values

COLLAPSIBLE_KEY

protected static final java.lang.String COLLAPSIBLE_KEY
See Also:
Constant Field Values

defaultButtonPanelPosition

protected static java.lang.String[] defaultButtonPanelPosition
The default order for Form buttons and StatusBar showed (from left to right): "help", "helpId", "controls", "table", "start", "previous", "print", "next", "end", "countlabel", "refresh", "clear", "status".


originalButtonPosition

public static java.lang.String originalButtonPosition

defaultButtonPosition

public static java.lang.String defaultButtonPosition

useOriginalButtonPosition

public static boolean useOriginalButtonPosition

buttonPanelObjects

protected java.util.Hashtable buttonPanelObjects

newButtonPanel

protected javax.swing.JPanel newButtonPanel
Panel where the new buttons are contained in

See Also:
{@link #addControls}

nextIcon

public javax.swing.ImageIcon nextIcon

previousIcon

public javax.swing.ImageIcon previousIcon

endIcon

public javax.swing.ImageIcon endIcon

startIcon

public javax.swing.ImageIcon startIcon

orderIcon

public javax.swing.ImageIcon orderIcon

printIcon

public javax.swing.ImageIcon printIcon

refreshIcon

public javax.swing.ImageIcon refreshIcon

attachmentIcon

public javax.swing.ImageIcon attachmentIcon

databaseBundleIcon

public javax.swing.ImageIcon databaseBundleIcon

scriptIcon

public javax.swing.ImageIcon scriptIcon

deleteButtonText

public java.lang.String deleteButtonText

printButton

public javax.swing.JButton printButton
Button that print used the default printing xml template


printTemplateButton

public ButtonSelectionInternationalization printTemplateButton
Button that manage the printing template


printListener

protected java.awt.event.ActionListener printListener
Listener of the printButton


attachmentButton

public ButtonSelectionInternationalization attachmentButton
Button that manage the attachment file


permissionButton

protected javax.swing.JButton permissionButton
Button that show the permission component


databaseBundleButton

protected javax.swing.JButton databaseBundleButton

scriptButton

protected javax.swing.JButton scriptButton

permissionButtonApplicationPermission

protected ApplicationPermission permissionButtonApplicationPermission
ApplicationPermission reference used to check the permission of permissionButton


attachmentEntity

protected Entity attachmentEntity
Deprecated. Use ((UtilReferenceLocator) locator).getAttachmentEntity(locator.getSessionId())

Entity reference used to attach files


ePrintingTemplate

protected Entity ePrintingTemplate
Deprecated. Use ((UtilReferenceLocator) locator).getPrintingTemplateEntity(locator.getSessionId())

Entity reference used to store printing template


totalDataList

protected java.util.Hashtable totalDataList
Total data list from this form


currentIndex

protected int currentIndex
Index of current record


parentKeyValue

protected java.lang.Object parentKeyValue

setValuesOrder

protected java.util.Vector setValuesOrder
Component list that provides the order in which the field values are filled.


vectorSize

protected int vectorSize
Total data list size


resourcesFileName

protected java.lang.String resourcesFileName

resourcesFile

protected java.util.ResourceBundle resourcesFile

previousButtonListener

public java.awt.event.ActionListener previousButtonListener
Navigation listener


nextButtonListener

public java.awt.event.ActionListener nextButtonListener
Navigation listener


startButtonListener

public java.awt.event.ActionListener startButtonListener
Navigation listener


endButtonListener

public java.awt.event.ActionListener endButtonListener
Navigation listener


refreshButtonListener

public com.ontimize.gui.Form.FormAction refreshButtonListener
Refresh button listener


tableButtonListener

public java.awt.event.ActionListener tableButtonListener
Table view button listener


associatedNode

protected OTreeNode associatedNode
TreeNode associates with this form


associatedPath

protected javax.swing.tree.TreePath associatedPath
Path associates with this form


table

protected Table table

tableWindow

protected javax.swing.JDialog tableWindow

keys

protected java.util.Vector keys

parentKeys

protected java.util.Vector parentKeys

modalDialogTitleKey

protected java.lang.String modalDialogTitleKey

restricted

protected boolean restricted

selColumnsDialog

protected Form.SelColumnsDialog selColumnsDialog
The dialog where the visible columns are selected in


subForm

protected SubForm subForm
The SubForm where the form is contained in

Constructor Detail

Form

public Form(java.util.Hashtable params)
Creates a Form instance with the parameters establishes in Hastable

Parameters:
params -
Method Detail

setDefaultTitlePaint

public static void setDefaultTitlePaint(java.awt.Paint paint)
Sets the Paint attribute for the Graphics2D context of the Title component

Parameters:
paint - the Paint object to be used to generate color during the rendering process, or null

getDefaultTitlePaint

public static java.awt.Paint getDefaultTitlePaint()

setDefaultColorTitle

public static void setDefaultColorTitle(java.awt.Color c)
Sets the color of the title text

Parameters:
c - the desired Color

getDefaultColorTitle

public static java.awt.Color getDefaultColorTitle()

setFormTitle

public void setFormTitle(java.lang.String title)

getFormTitle

public java.lang.String getFormTitle()

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)
Method that configures the component. The param Hashtable contains the values set in the XML in which the Form is placed.

attribute values default required meaning
attachment yes/no yes If form attachments are implemented in the application, this parameter allows to hide the attachment button
buttons yes/no yes Establishes if the data navigation buttons are visible.
columns attr1;attr2;..;attrN Establishes the list of attributes that are showed in the table view
customfocus yes/no/attr1;attr2;...;attrn/QUERY{attr1;attr2...}-INSERT{attr1;attr2...}-UPDATE{attr1;attr2...} yes Establishes the focus traversal policy used. The last option sets the order in which the focus moves down the components of the form for each action(QUERY,INSERT,UPDATE). For the other components of the form that aren't included into the brackets the focus order is from left to right and top to bottom. In this option only one mode can be parameterized(e.g. QUERY{attr1;attr2} if it is wished. Into other modes the behavior is the previously described. If it is wanted that this order is setted for all actions the name of the attributes are inserted into brackets.
entity Name of the entity related to the Form
helpid Establishes help key uses for identify the help section dedicates a this form
helpkey If this parameter exists the help button is displayed into the form. The parameter value is used as key for searching the resource text.
keys List of names of the entity primary key.
multipledata yes/no yes When a query with multiple results is done the table view with all results is showed if this parameter is established a true.
parentkeys colname1;colname2;..;colnameN List of foreign key column names.
permissionbutton yes/no yes no (since 5.2067EN) Allows to hide permission button for each form individually (By default, this button appears always when permissionComponent library is included in classpath)
printable true/false true Establishes if the form can be printed
resources Resources file name that this form going to use. Example:
If you have a specific bundle file for this form with path com/app/client/formA/resources/bundle_en_US.properties. You must specify the parameter: resources=com/app/client/formA/resources/bundle
scroll yes/no yes Establishes if the form body will show the scrollbars when the components don't have enough space
setvalueorder attr1;attr2;..attrN The form doesn't guarantee the order in which the fields will be filled. If a field value is required by another one (as a parentKey of a ReferenceDataField), an error could be produced. In principle, the default filler should be right in most cases, but with this parameter the filler order can be established. It isn't necessary to establish every field attribute. The attributes specified in this parameter are filled first.
status yes/no yes Establishes if the form has a status bar (Part that shows the title in the top of form)
tableviewscrollh yes/no no Establishes if the table view has a horizontal scroll
template Establishes the file name of template used to print the form data
templates yes/no yes If form templates are implemented in the application, this parameter allows to hide the template printing button
title Establishes the value of the form title (placed in status container) that is displayed in the top of the form
bgcolor A color name defined in the ColorConstants or a RGB value (like 0;0;0) The default look and feel background color no Sets the color to use in the form background
bgimage A image resource no The background image
nextbuttonicon no Path to this form icon
previousbuttonicon no Path to this form icon
endbuttonicon no Path to this form icon
startbuttonicon no Path to this form icon
printbuttonicon no Path to this form icon
refreshbuttonicon no Path to this form icon
attachbuttonicon no Path to this form icon
tablebuttonicon no Path to this form icon
cleardatafieldbuttonicon no Path to this form icon
borderbuttons default/none/raised/lowered or a color defined in ColorConstants. Moreover, it is also allowed a border defined in #BorderManager no The border for buttons in Form
highlightbuttons yes/no no no Sets the highlight in button property when mouse is entered. See AbstractButton#setContentAreaFilled(boolean)). This parameter requires opaque='no'.
opaquebuttons yes/no no no Data field opacity condition for Form buttons
resultcountfont A string like : 'Arial-BOLD-18' (See #Font.decode()) Font for result count label that show the number of records in Form
resultcountfg Color for foreground that shows the result count label.
statusborder Border for status (title of form).
buttonpanelcolor Color for button panel.
statusfont A string like : 'Arial-BOLD-18' (See #Font.decode()) Font for status bar (title of form)
buttonposition button1;button2;status;...;collapsible(button3;button4);...;buttonn Keys for buttons and status. Allow to define the both Form buttons and status(title) order.
tableviewminrowheight 8 no The minimum row height for each row in table that is showed when user presses twice to Query Button.
margin no Indicates the Form margin.

Specified by:
init in interface FormComponent
Parameters:
parameters - the hashtable with pairs (Key,Value). For example:

Key Value
align center
attr attribute
... ...

addComponentsToButtonPanel

protected void addComponentsToButtonPanel(java.lang.String configuration)

processCollapsibleButton

protected void processCollapsibleButton(java.lang.String components,
                                        boolean status,
                                        int gridx)

setNormalConfiguration

protected void setNormalConfiguration()

configureButton

protected void configureButton(javax.swing.JButton button,
                               java.lang.String iconPath,
                               boolean border,
                               boolean opaque,
                               java.awt.event.MouseListener highlightListener)

getPrintingTemplateName

public java.lang.String getPrintingTemplateName()
Returns the printing template name. This name is defined in xml form definition and if this parameter is not established this method returns null

Returns:
a String with the printing template name.

setFormBuilder

public void setFormBuilder(FormBuilder builder)
Establishes the FormBuilder that will be used by the components of this Form that implement CreateForms interface

Specified by:
setFormBuilder in interface CreateForms

add

public void add(java.awt.Component component,
                java.lang.Object constraints)
Appends the specified component to the end of this form. Also notifies the layout manager to add the component to this form's layout using the specified constraints object

Parameters:
component - the component to be added
constraints - an object expressing layout constraints for this component

remove

public void remove(java.awt.Component component)

getBodyPanel

public javax.swing.JPanel getBodyPanel()

getDataComponentList

public java.util.Hashtable getDataComponentList()

deleteDataComponentList

public void deleteDataComponentList()

createLists

public void createLists()
Creates and updates the component list contains in this form. This function must be called when the form is completely loaded.


scanComponents

protected void scanComponents(java.awt.Container container,
                              boolean onlyReferenceDataFields)
Move across the tree with the form components

Parameters:
container -
onlyReferenceDataFields -

updateReferencesLocator

public void updateReferencesLocator()
Update the reference locator for all the reference data fields


getButton

public Button getButton(java.lang.String key)
Returns a button reference that has the entry parameter as key

Parameters:
key - the key of the button requested
Returns:
a Button with this key

getDataFieldValue

public java.lang.Object getDataFieldValue(java.lang.String attribute)
Returns the value of data component which has the entry parameter as attribute. If the component attribute doesn't existe in the form, NULL will be returned.

Parameters:
attribute - the data field attribute to be obtained the value
Returns:
a Object with the data field value.

getDataFieldValueFromFormCache

public java.lang.Object getDataFieldValueFromFormCache(java.lang.String attribute)
Returns the data component value which has the entry parameter as attribute. But this value is not obtained from the data component. It is obtained from form data cache.

For example, in a form with data, if a user changes a data field the new value will be in form data field but the old value is stored in form data cache until the form is update with the call to method updateDataFields(java.util.Hashtable)

Parameters:
attribute - the data field attribute where the value is obtained from
Returns:
the Object with the data field value from the form data cache

getGroupReference

public DataComponentGroup getGroupReference(java.lang.String attribute)
Returns DataComponentGroup reference

Parameters:
attribute - DataComponentGroup attribute to be obtained the reference
Returns:
a DataComponentGroup reference

getElementReference

public FormComponent getElementReference(java.lang.String attribute)
Returns a FormComponent reference. To find a component in a form is necessary that the component implements IdentifiedElement

Parameters:
attribute - the data field attribute to be obtained the reference
Returns:
a reference

getDataFieldReference

public DataComponent getDataFieldReference(java.lang.String attribute)
Returns the reference of the data component which has the entry parameter as attribute

Parameters:
attribute -
Returns:
the DataComponent reference

getAttributeName

protected java.lang.String getAttributeName(java.lang.Object attribute)
Get the string that identify an attribute. The string is usually the name in the xml

Parameters:
attribute -
Returns:

updateDataFields

public void updateDataFields(java.util.Hashtable data)
Updates the values of each form data field and the values of the total data cache with the entry parameter. The entry parameter is a Hashtable whose keys are the data field attributes and the values are a Vector with the data for this attribute. If the Vector has more than one record the first record will be displayed.

Parameters:
data -

updateDataFieldsEDTh

protected void updateDataFieldsEDTh(java.util.Hashtable data)

updateDataFields

public void updateDataFields(java.util.Hashtable data,
                             int currentIndex)
Updates the values of each form data field and the values of the total data cache with the data entry parameter. The data entry parameter is a Hashtable of which keys are the data field attributes and the values are a Vector with the data for this attribute. If the Vector has more than one record the record with index as currentIndex will be displayed.

Parameters:
data -
currentIndex -

setFormValues

protected void setFormValues(java.util.Hashtable data)
Establishes the values in each form data field that are obtained from entry parameter.

Parameters:
data - a Hashtable with the values for establish.

updateDataFields

public void updateDataFields(int index)
Updates the form data field using the values stored in total data cache. Establishes the data field values from the record of the total data cache of which index is the entry parameter.

Parameters:
index - a index of the data record for update.

updateDataFields_Internal

protected void updateDataFields_Internal(int index)
Updates the form data field using the values stored in total data cache. Establishes the data field values from the record of the total data cache of which index is the entry parameter.

Parameters:
index - a index of the data record for update.

updateDataFieldNavegationButton

protected void updateDataFieldNavegationButton(int index)

deleteDataFields

public void deleteDataFields()
Deletes data from all form data components.


deleteDataFields

public void deleteDataFields(boolean includeNonModif)
If parameter is true, data from all form data component will delete if not, only the modifiable components will delete.

Parameters:
includeNonModif - false if only the modifiable components should be deleted

getParentKeyValue

public java.lang.Object getParentKeyValue()
Deprecated.  

Warning!!!

This method must only be used internally by the detail form when the form is opened from a table. This method considers that only a simple parent key can exist. If the parent key is formed by multiple columns, this method will only return one of theirs values.

See Also:
getParentKeyValues()

getParentKeyValues

public java.util.Hashtable getParentKeyValues()
Returns the parent keys values

Returns:

setParentKeyValue

public void setParentKeyValue(java.lang.String attribute,
                              java.lang.Object value)
Deprecated.  

Warning!!!

This method must only be used internally by the detail form when the form is opened from a table. This method considers that only a simple parent key can exist. If multiple parent keys values are established by this method, only the last call to this method will be stored internally and will be returned in the getParentKeyValue

See Also:
getParentKeyValues()

setParentKeyValues

public void setParentKeyValues(java.util.Hashtable values)
Establishes the values in the data field that theirs attributes is into the parent key list Sets to parent keys values

Parameters:
values - a Hashtable

enableDataField

public void enableDataField(java.lang.String attribute)
Enables the data component from this form with this attribute.

Parameters:
attribute - data component attribute to be enabled

enableDataField

public void enableDataField(java.lang.String attribute,
                            boolean requestFocus)
Enables the data component from this form with this attribute and if the requestfocus is true the enabled data component requests the focus

Parameters:
attribute - data component attribute to be enabled
requestFocus - true data component should request the focus

disableDataField

public void disableDataField(java.lang.String attribute)
Disables the data field with this attribute

Parameters:
attribute - attribute of data field to be disabled

setModifiable

public void setModifiable(java.lang.String attribute,
                          boolean modifiable)
Sets a data component as modifiable or not modifiable

Parameters:
attribute -
modifiable -

enableDataFields

public void enableDataFields()
Enables all data components from this form.


enableDataFields

public void enableDataFields(boolean modifiable)
Enables all data components from this form. If modifiable is true the modifiable components will enable

Parameters:
modifiable - false if the modifiable components should not be enabled

disableDataFields

public void disableDataFields()
Disables all data components from form


disableDataFields

public void disableDataFields(java.lang.String except)
Disables all data components from form except the data component with this attribute

Parameters:
except - the attribute of data component that isn't disabled

getDataFieldAttributeList

public java.util.Vector getDataFieldAttributeList()
Returns a list of data field attributes that are contained in the form

Returns:
a Vector with the data field attribute list from the form

getTranslatedDataFieldLabel

protected java.util.Hashtable getTranslatedDataFieldLabel()
Returns a Hashtable where the attribute list and translated text are stored in. The key of each record of the Hashtable is the data field attribute and the value is the translated text.

Returns:
the Hashtable

message

public int message(java.lang.String message,
                   int messageType)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.lang.String message,
                   java.lang.Object[] args,
                   int messageType)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
args - a extra information list is used to create the message text. The message text is created passing the message and the args through the resource bundle.
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Dialog owner,
                   java.lang.String message,
                   int messageType)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Dialog from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.lang.String message,
                   int messageType,
                   java.lang.String detail)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.lang.String message,
                   int messageType,
                   java.lang.String detail,
                   java.lang.Object[] args)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
args - a extra information list is used to create the message text. The message text is created passing the message and the args through the resource bundle.
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Dialog owner,
                   java.lang.String message,
                   int messageType,
                   java.lang.String detail)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Dialog from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Dialog owner,
                   java.lang.String message,
                   int messageType,
                   java.lang.String detail,
                   java.lang.Object[] args)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Dialog from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
args - a extra information list is used to create the message text. The message text is created passing the message and the args through the resource bundle.
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

question

public boolean question(java.lang.String message)
Shows a MessageDialog where the message type is established with QUESTION_MESSAGE in.

Parameters:
message - the text to be shown in the MessageDialog
Returns:

question

public boolean question(java.awt.Dialog owner,
                        java.lang.String message)
Shows a MessageDialog where the message type is established with QUESTION_MESSAGE in.

Parameters:
message - the text to be shown in the MessageDialog
owner - the non-null Dialog from which the MessageDialog is displayed
Returns:

setFormManager

public void setFormManager(FormManager formManager)
Sets the form manager for this form

Parameters:
formManager -

getFormManager

public FormManager getFormManager()
Returns a FormManager object that manages this form.

Returns:
a FormManager object

getEntityName

public java.lang.String getEntityName()
Returns the string with the entity name is associated with the form

Returns:
a String with the entity name

getParentFrame

public java.awt.Frame getParentFrame()
Gets the parent Frame object reference. If this form is displayed in the main frame else returns null

Returns:
a Frame object

setParentFrame

public void setParentFrame(java.awt.Frame parentFrame)
Description copied from interface: OpenDialog
This method is called from Form for each component that implements this interface. It fixes the parent frame for element. This frame is needed to open the modal dialog.

Specified by:
setParentFrame in interface OpenDialog
Parameters:
parentFrame - the frame

enableTables

public void enableTables()
Enables all tables from this form


enableButtons

public void enableButtons()
Enables all buttons from this form.


disableButtons

public void disableButtons()
Disables all buttons from the form


enableButton

public void enableButton(java.lang.String key)
Enables the button with this key

Parameters:
key - key of the button to be enabled

disableButton

public void disableButton(java.lang.String key)
Disables the button with this key

Parameters:
key - key of the button to be disabled

hasDataAllFields

public boolean hasDataAllFields()
Returns true if all fields have data. The tables too.

Returns:
true if all fields have data

existEmptyRequiredDataField

public boolean existEmptyRequiredDataField()
Returns true if any required field is empty or false if all required fields have data.


getEmptyRequiredDataField

public java.util.Vector getEmptyRequiredDataField()
Get the names (String) of all the empty required fields in the form

Returns:

getDataFieldValues

public java.util.Hashtable getDataFieldValues(boolean tables)
Returns a Hashtable with the data field values from the form that aren't empty. The keys of the Hashtable are the data field attributes. If the entry parameter is true, the table values will be returned too.

Parameters:
tables - true the table values are returned
Returns:
a Hashtable with the data field values

getDataFieldValues

public java.util.Hashtable getDataFieldValues(boolean tables,
                                              boolean empty)
Returns a Hashtable with the data field values from the form that aren't empty. The keys of the Hashtable are the data field attributes.

If the first entry parameter is true, the table values will be returned too. If the second entry parameter is true, the empty data field will be returned with a NullValue value

Parameters:
tables - true the table values are returned
empty - true the empty data field are returned with a NullValue value
Returns:
a Hashtable with all data field values

setDataFieldValue

public void setDataFieldValue(java.lang.Object attribute,
                              java.lang.Object value)
Set the value to the form component with the attribute specified in attribute parameter.

Parameters:
attribute -
value -

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.

setResourceBundle

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

getCurrentIndex

public int getCurrentIndex()
Returns the record current index from form cache data

Returns:
index of the current record

getDataList

public java.util.Hashtable getDataList()
Returns the whole data list from the form

Returns:
a Hashtable with the whole form data.

getIndex

public int getIndex(java.util.Hashtable keyValues)
Returns the index of the record that has the entry parameter as key values

Parameters:
keyValues - the key values of the record
Returns:
the index of the record

isEmpty

public boolean isEmpty(java.lang.String attribute)
Returns whether the data field which attribute is the entry parameter hasn't data.

Parameters:
attribute -
Returns:
true if the data field is empty, otherwise false

setInteractionManager

public void setInteractionManager(InteractionManager formInteractionManager)

getInteractionManager

public InteractionManager getInteractionManager()
Returns the InteractionManager object that this form has registered

Returns:
a InteractionManager registered in this form

setComponentLocale

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

getDataFieldText

public java.lang.String getDataFieldText(java.lang.String attribute)
Returns the data field text which has the entry parameter as attribute. If the data field doesn't be contained in the form, a empty string will be returned

Parameters:
attribute -
Returns:
a String with the text of the form data field

getDataFieldText

public java.util.Hashtable getDataFieldText()
Return the text contained in every form data field. If the data field text is null, the field value will be returned

Returns:
a Hashtable with the text of all data fields.

getDataFieldText

public java.util.Hashtable getDataFieldText(java.util.Vector attributeList)
Returns a text list from the data fields that are requested in the entry parameter

Parameters:
attributeList - attribute list of the requested data fields to obtain their text value
Returns:
a Hashtable with the values of all data fields. The keys are the attributes of the data fields and the values are the data field text values

setCurrentIndex

public void setCurrentIndex(int index)

setStatusBarText

public void setStatusBarText(java.lang.String text,
                             int timeMillis)
Set the text of the status bar. This text will show for the time specified in timeMillis parameter. If this time is 0 then the text will show until the next change.
If the text is in the bundle file this will be translated

Parameters:
text -
timeMillis -

setStatusBarText

public void setStatusBarText(java.lang.String text,
                             int timeMillis,
                             boolean translate)

getDetailComponent

public DetailForm getDetailComponent()
Returns a DetailForm if the form is contained in one of them. This happens if this form is a detail form from a . In other case this method returns null

Returns:
a DetailForm where the form is contained in

setDetailForm

public void setDetailForm(DetailForm detailForm)
Sets the DetailForm for this form

Parameters:
detailForm -

free

public void free()
          throws java.lang.Exception
Description copied from interface: Freeable
Makes the object to release the resources.

Specified by:
free in interface Freeable
Throws:
java.lang.Exception

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Gets the resource bundle that contain locale-specific objects.

Returns:
a ResourceBundle

getResourceFileName

public java.lang.String getResourceFileName()

setCurrentDate

public int setCurrentDate(java.lang.String attribute)
Method to set the current date in a DateDataField.
This method checks if a DateDataField with the specified name exists.

Parameters:
attribute -
Returns:
Numeric code with the result of the operation
  • Form.FIELD_NOT_FOUND if the form does not contain a field with this attribute
  • Form.CORRECT
  • Form.NOT_DATEDATAFIELD if the field is not a DateDataField

setCheckModifiedData

public void setCheckModifiedData(boolean check)

checkModifiedData

public boolean checkModifiedData()
Checks if any fields have modified data. This method checks every data field into the form has modified data calling the DataComponent.isModified() method.


deleteDataField

public void deleteDataField(java.lang.String attribute)
Deletes data from form data component with this attribute

Parameters:
attribute - data component attribute to be deleted

setTabVisible

public void setTabVisible(int index)
Deprecated.  


setTabEnabled

public void setTabEnabled(int index,
                          boolean enabled)
Deprecated.  


setTabEnabled

public void setTabEnabled(java.lang.String title,
                          boolean enabled)
Deprecated.  


setTabVisible

public void setTabVisible(java.lang.String title)
Deprecated.  


showCurrencyValue

public void showCurrencyValue(int idCurrency)
Specified by:
showCurrencyValue in interface SelectCurrencyValues

showAvaliableFonts

public java.awt.Font showAvaliableFonts(boolean supportingEuro)
Description copied from interface: FontAndEncodingSelector
Shows the available fonts in the system. The parameter specifies if only fonts with support for EURO character must be showed

Specified by:
showAvaliableFonts in interface FontAndEncodingSelector

supportsEuroSymbol

public static boolean supportsEuroSymbol(java.awt.Font font)
Check if the Font support the Euro character

Parameters:
font -
Returns:
true - if Euro characted is supported

useFont

public void useFont(java.awt.Font font)
Description copied from interface: FontAndEncodingSelector
Set the font to use by the object

Specified by:
useFont in interface FontAndEncodingSelector

showMe

public void showMe(java.awt.Component c)
Deprecated.  


findComponentInTab

protected boolean findComponentInTab(java.awt.Container container,
                                     java.awt.Component component)
Checks whether this component is contained in this container. This method not only searches the Container's immediate children;

Parameters:
container - the container in which the components are found
component - the component to find
Returns:
true if this the component is in this container

setAssociatedNode

public void setAssociatedNode(OTreeNode node)
Set the node associated with the form. The form manager calls this method when a new node associated with the form is selected.

Parameters:
node -

setLinkedTreePath

public void setLinkedTreePath(javax.swing.tree.TreePath path)
Set the tree path associated with the form

Parameters:
path -

getAssociatedNode

public OTreeNode getAssociatedNode()
Returns the tree node associated a this form.

Returns:
a tree node associates a this form or null if the tree don't exist

getAssociatedTreePath

public javax.swing.tree.TreePath getAssociatedTreePath()
Returns the tree path associated a this form

Returns:
a TreePath associates a this form or null if the tree don't exist

getDataComponents

public java.util.Vector getDataComponents()
Returns the list of data component references that are contained in the form.

Returns:
a Vector with a data component list

putInModalDialog

public javax.swing.JDialog putInModalDialog()
Deprecated. Uses putInModalDialog(Component parentComponent)

Puts the form in a modal JDialog if it doesn't contain in any window.

The dialog parent is the frame that has been established in the form manager for this form. A JDialog reference is stored in the form

Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

getSizeDialogPreferenceKey

public java.lang.String getSizeDialogPreferenceKey()
Returns the string used as key to store the dialog size in the preferences

Returns:
a preference key

putInModalDialog

public javax.swing.JDialog putInModalDialog(java.awt.Frame owner)
Puts the form in a modal JDialog if it doesn't contain in any window.

A JDialog reference is stored in the form

Parameters:
owner - the parent Frame for the dialog
Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

putInModalDialog

public javax.swing.JDialog putInModalDialog(java.awt.Window window)
Puts the form in a modal JDialog if it doesn't contain in any window.

A JDialog reference is stored in the form

Parameters:
window - the parent Window for the dialog
Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

putInModalDialog

public javax.swing.JDialog putInModalDialog(java.awt.Component parentComponent)
Puts the form in a modal JDialog if it doesn't contain in any window.

A JDialog reference is stored in the form

Parameters:
parentComponent - the parent Component for the dialog
Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

putInModalDialog

public javax.swing.JDialog putInModalDialog(java.awt.Dialog owner)
Puts the form in a modal JDialog if it doesn't contain in any window.

A JDialog reference is stored in the form

Parameters:
owner - the parent Dialog for the dialog
Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

putInModalDialog

public javax.swing.JDialog putInModalDialog(java.lang.String title)
Deprecated. uses putInModalDialog(String, Component)

Puts the form in a modal JDialog if it doesn't contain in any window.

The dialog parent is the frame that has been established in the form manager for this form. A JDialog reference is stored in the form

Parameters:
title - a String with the dialog title.
Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

putInModalDialog

public javax.swing.JDialog putInModalDialog(java.lang.String title,
                                            java.awt.Component parent)
Puts the form in a modal JDialog if it doesn't contain in any window.

A JDialog reference is stored in the form

Parameters:
title - a String with the dialog title.
parent - the parent Component for the dialog
Returns:
a JDialog where the form is contained in or null if the form is contained in a window.
See Also:
{@link #getJDialog}

getJDialog

public javax.swing.JDialog getJDialog()
Returns the JDialog object reference that has been created in the call to method putInModalDialog().

Returns:
a JDialog object reference

setAdvancedQueryMode

public boolean setAdvancedQueryMode(java.lang.String attr,
                                    boolean enable)
Enables/Disables the advanced query mode for the component which has the entry parameter as attribute.

Parameters:
attr - The component attribute to be change the advanced query mode
enable - true to make the advancedQuery mode enable ; false to make it disable
Returns:
true if the component has been found and change the advanced query mode

setAdvancedQueryModeAll

public void setAdvancedQueryModeAll(boolean enable)
Enables/Disables the advanced query mode for all form component.

Parameters:
enable - true to make the advancedQuery mode enable ; false to make it disable
Returns:
true if the component has been found and change the advanced query mode

createTableViewTable

protected void createTableViewTable()
Creates the component used to show the table view. This component is used to show all data returned by the query performed from the form.


addComponentsToInternationalizeList

public void addComponentsToInternationalizeList(java.awt.Component component,
                                                boolean setBundle)
Adds the component to the internationalizeList if the component implements Internationalization. If the component is a container then adds all the components inside it that implements Internationalization too

Parameters:
component - Component to add to the list
setBundle - When true set the bundle to the component

showTableView

public void showTableView()
Shows the table view. This component is used to show all data returned by the query performed from the form.


getTableFromTableView

public Table getTableFromTableView()
Returns the table used to show the query result. The columns that will be shown in this table are established by the 'columns' parameter in the Form xml description

Returns:
a Table where the result query are stored in
See Also:
init(java.util.Hashtable)

getLayout

public java.awt.LayoutManager getLayout()
Gets the layout manager for the form body


initPermissions

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

setFileName

public void setFileName(java.lang.String archiveName)
Sets the file name which is stored the form xml description

Parameters:
archiveName - the file name

getArchiveName

public java.lang.String getArchiveName()
Returns the form archive name

Returns:
a String with the form archive name

checkAccessPermission

protected boolean checkAccessPermission(java.lang.String attribute)
Checks if the attribute has any restriction by permissions.

Parameters:
attribute - the String of the attribute to be checked
Returns:
true if there aren't restrictions

getKeys

public java.util.Vector getKeys()
Returns the key list of this form

Returns:
a Vector with the list of keys

getParentKeys

public java.util.Vector getParentKeys()
Returns a vector containing the parent key names, this is, the names set in the XML to the attributes 'parentkey' and 'otherkeys'.

Returns:
the parent key names
See Also:
init(java.util.Hashtable)

registerKeyBindings

protected void registerKeyBindings()
Registers a keyboard action for default buttons.

In the form, the keyboard action that is registered by default is the refresh button action. The action is registered in 'F5' key.


unregisterKeyBindings

protected void unregisterKeyBindings()

disableTables

public void disableTables()
Disables all tables from this form


disableSubForms

public void disableSubForms()
Disables all subforms from this form


addDataRecordListener

public void addDataRecordListener(DataRecordListener listener)
Registers listener so that it will receive DataRecordEvent when a record has been modified correctly.

Parameters:
listener - the DataRecordListener to register

removeDataRecordListener

public void removeDataRecordListener(DataRecordListener listener)
Unregisters listener so that it will no longer receive DataRecordEvent.

Parameters:
listener - the DataRecordListener to be removed

fireDataRecordChange

public void fireDataRecordChange(DataRecordEvent e)
Notifies all listeners that a record may have modified correctly.

Parameters:
e - the event to be forwarded

addDataNavigationListener

public void addDataNavigationListener(DataNavigationListener listener)
Registers listener so that it will receive DataNavigationEvent when there are multiple records and the current record is changed using the navigation buttons.

Parameters:
listener - the DataNavigationListener to register

fireDataWillChange

protected boolean fireDataWillChange(DataNavigationEvent e)
Notifies all listeners that the current record will be changed due to a DataNavigationEvent is forwarded.

Parameters:
e - the event to be forwarded

fireDataChanged

protected void fireDataChanged(DataNavigationEvent e)
Notifies all listeners that the current record may be changed due to a DataNavigationEvent is forwarded.

Parameters:
e - the event to be forwarded

getFormCacheSize

public int getFormCacheSize()
Returns the size of the form data cache.

Returns:
a int with the size of the form data cache

deleteRecordFromFormCache

public void deleteRecordFromFormCache(int index)
Deletes the record with this index from form cache

Parameters:
index - index of the record to be deleted

requestFocusForFirstComponent

public boolean requestFocusForFirstComponent()
Dispatch the focus to first enabled data component starting by the top-left corner of the form.


getLocationInForm

protected java.awt.Point getLocationInForm(java.awt.Component component)
Gets the location of this component in this form of a point specifying the component's top-left corner in the form's coordinate space.

Parameters:
component - the Component
Returns:
a Point with the location of the component's top-left corner

isFocusTraversable

public boolean isFocusTraversable()

requestDefaultFocus

public boolean requestDefaultFocus()

query

protected EntityResult query(int index)
Performs a query for a record of the total data cache which index is the entry parameter.

Parameters:
index -
Returns:
a EntityResult resulting of the query.

message

public int message(java.awt.Window owner,
                   java.lang.String message,
                   int messageType)
Brings up a dialog that displays a message using a default icon determined by the messageType parameter.

Parameters:
owner - the non-null Window from which the MessageDialog is displayed
message - a String with the text to show
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog

message

public int message(java.awt.Window owner,
                   java.lang.String message,
                   int messageType,
                   java.lang.String detail,
                   java.lang.Object[] args)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Window from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
args - a extra information list is used to create the message text. The message text is created passing the message and the args through the resource bundle.
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Window owner,
                   java.lang.String message,
                   int messageType,
                   java.lang.Object[] args)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Window from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
args - a extra information list is used to create the message text. The message text is created passing the message and the args through the resource bundle.
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Frame owner,
                   java.lang.String message,
                   int messageType)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Frame from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Frame owner,
                   java.lang.String message,
                   int messageType,
                   java.lang.String detail)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
owner - the non-null Frame from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

message

public int message(java.awt.Frame f,
                   java.lang.String message,
                   int messageType,
                   java.lang.String detail,
                   java.lang.Object[] args)
Shows a MessageDialog with the information collects from entry parameters

Parameters:
f - the non-null Frame from which the MessageDialog is displayed
message - a String with the text to show in the MessageDialog
messageType - the type of message to be displayed: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
detail - a String with more detailed information that can be shown in the MessageDialog to press a detail button. If detail parameter is null, the detail button will not be shown
args - a extra information list is used to create the message text.
Returns:
an integer indicating the option chosen by the user, or CLOSED_OPTION if the user closed the dialog
See Also:
MessageDialog

query

public EntityResult query(java.util.Hashtable keysValues,
                          java.util.Vector attributes)
Performs a query operation that return the set of data that matches the conditions specified by the keysValues parameter. The attributes defines which attributes must be recovered, and keysValues specifies which set of records must be recovered.

Parameters:
keysValues - a Hashtable specifying conditions that must comply the set of records returned. Cannot be null.
attributes - a list of columns or attributes that must be recovered for each record returned. Cannot be null. If empty, all attributes should be returned.
Returns:
a EntityResult with the resulting set of data.

query

public EntityResult query(int index,
                          java.util.Vector attributes)
Performs a query operation that return the set of data that matches the conditions specified by record index of total data cache. The attributes defines which attributes must be recovered, and index specifies the record of the total data cache that will be used as query condition.

Parameters:
index - a int that specify the record of the total data cache.
attributes - a list of columns or attributes that must be recovered for each record returned. Cannot be null. If empty, all attributes should be returned.
Returns:
a EntityResult with the resulting set of data.

refreshCurrentDataRecord

public void refreshCurrentDataRecord()
Refreshes the current data record that is displayed in the form, both the record of the total data cache and all values that are displayed in each data field.


isCreatedCheckModifiedFieldList

protected void isCreatedCheckModifiedFieldList()
Returns true if the modified data field list has been created.


setCheckModifiedDataField

public void setCheckModifiedDataField(java.lang.String attr,
                                      boolean enable)
Established if a data field, which attribute is the entry parameter, has enabled the data modified checking.

Parameters:
attr - data component attribute to be established the data modified checking.
enable - true to make the checking enable; false to make it disable

setDataFieldValues

public void setDataFieldValues(java.util.Hashtable values)
Established the values in each form data field that is passed in the entry parameter. This method doesn't remove any data field, only established the values that has the entry parameter.

Parameters:
values - a Hashtable with the values to be established. The keys of the Hashtable are the attributes of each data field and the values of the Hashtable are the value of each data field.

getDynamicFormManager

public DynamicFormManager getDynamicFormManager()
Returns the DynamicFormManager object that is assigned to this form.

Returns:

setDynamicFormManager

public void setDynamicFormManager(DynamicFormManager dynamicfm)
Sets the DynamicFormManager object for this form.

Parameters:
dynamicfm -

registerApplicationPreferencesListener

public void registerApplicationPreferencesListener()
Registers all components that implement ApplicationPreferencesListener so that they will receive PreferenceEvent when some preference change in the application.


loadTableViewPreference

protected java.util.Vector loadTableViewPreference(ApplicationPreferences prefs)
Loads the table view preferences.In this preference the column list that will be showed in the table view is stored.

Parameters:
prefs - a ApplicationPreferences instance that manager the application preferences
Returns:
a Vector with the column list to table view table.

saveTableViewPreferenceForm

protected void saveTableViewPreferenceForm(java.util.Vector columns)
Saves the table view preference.In this preference the column list that will be showed in the table view is stored.

Parameters:
columns - a Vector with the column list to table view table.

getTableViewPreferenceKey

protected java.lang.String getTableViewPreferenceKey()
Returns the string used as key to store the table view columns in the preferences

Returns:
a preference key

initPreferences

public void initPreferences(ApplicationPreferences ap,
                            java.lang.String user)
Specified by:
initPreferences in interface HasPreferenceComponent

getDataFieldTemplateValues

protected java.util.Hashtable getDataFieldTemplateValues()
Returns all form data field values in text format for being used in template filling.

Returns:
a Hashtable with the values of all data fields. The keys are the attributes of the data fields and the values are the data in text format

fillODT

public void fillODT(java.io.File inputFile)
             throws java.lang.Exception
Throws:
java.lang.Exception

fillPDF

public void fillPDF(java.io.File inputFile,
                    java.io.File outputFile)
             throws java.lang.Exception
Fills a PDF Document using the form data.

Parameters:
inputFile - the PDF file to be filled
outputFile - the filled PDF file
Throws:
java.lang.Exception

fillDocComb

protected void fillDocComb(java.io.File file)
                    throws java.lang.Exception
Fills a WORD Document using the form data. The combination method is used to fill this WORD Document.

Parameters:
file - the WORD file to be filled
Throws:
java.lang.Exception

fillDocSust

public void fillDocSust(java.io.File file)
                 throws java.lang.Exception
Fills a WORD Document using the form data. The replacement method is used to fill this WORD Document.

Parameters:
file - the WORD file to be filled
Throws:
java.lang.Exception

installPrintingTemplatesButton

protected void installPrintingTemplatesButton()
Installs the printing template button for this form. If the standard printing templates are configured, then the printing template button will allow to store and print the printing templates.


installDatabaseBundleButton

protected void installDatabaseBundleButton()

checkApplicationBundleButton

protected boolean checkApplicationBundleButton()

checkApplicationPermissionButton

protected boolean checkApplicationPermissionButton()
Checks if the the permission button is restricted by application permissions.


installPermissionButton

protected void installPermissionButton()
Installs the permission button for this form. If the permission component is configured, then the permission button will be showed and will displayed the permission component to configure the client and server permissions.


installAttachmentButton

protected void installAttachmentButton()
Installs the attachment button for this form. If the standard attachments are configured, then the attachment button will allow to attach files to each one of the form records.


checkApplicationScriptButton

protected boolean checkApplicationScriptButton()

installScriptButton

protected void installScriptButton()

setDataFieldValueToFormCache

public void setDataFieldValueToFormCache(java.lang.Object attr,
                                         java.lang.Object value)

updateDataListDataCurrentRecord

public void updateDataListDataCurrentRecord(java.util.Hashtable attributesValues)

updateDataListDataCurrentRecord

public void updateDataListDataCurrentRecord(java.util.Hashtable attributesValues,
                                            boolean dataFieldRefresh)

disableDataField

public void disableDataField(java.lang.Object attr)
Disables the data field with this attribute

Parameters:
attr - attribute of data field to be disabled

hideDataField

public void hideDataField(java.lang.Object attr)
Hides the data field which attribute is the entry parameter.

Parameters:
attr - a Object with the data field attribute that will be hidden

showDataField

public void showDataField(java.lang.Object attr)
Shows the data field which attribute is the entry parameter.

Parameters:
attr - a Object with the data field attribute that will be shown

showButton

public void showButton(java.lang.String key)
Shows the button which key is the entry parameter.

Parameters:
key - a String with the button key that will be shown

hideButton

public void hideButton(java.lang.String key)
Hides the button which attribute is the entry parameter.

Parameters:
key - a String with the button key that will be hidden

hideElement

public void hideElement(java.lang.String attr)
Hides the element which attribute is the entry parameter.

Parameters:
attr - a String with the form component attribute that will be hidden

showElement

public void showElement(java.lang.String attr)
Shows the element which attribute is the entry parameter.

Parameters:
attr - a String with form component attribute that will be hidden

setRequired

public void setRequired(java.lang.Object attributes,
                        boolean required)
Establishes whether data field which attributes is the entry parameter is required.

Parameters:
attributes - a Object with the data field attribute
required - true if the data field is required.

setAllModificable

public void setAllModificable(boolean modif)
Establishes whether all data components are modifiable.

Parameters:
modif - true if all data components are modifiable.

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pf,
                 int page)
Specified by:
print in interface java.awt.print.Printable

getHelpIdString

public java.lang.String getHelpIdString()
Specified by:
getHelpIdString in interface HasHelpIdComponent

installHelpId

public void installHelpId()
Specified by:
installHelpId in interface HasHelpIdComponent

resetFocusOrder

public void resetFocusOrder()

findComponentInContainer

protected void findComponentInContainer(java.awt.Container container,
                                        java.util.List result)
Finds all components into this Container and filles the List with this components.

Parameters:
container - Container where the components are found
result - List in which the components are stored

findVisibleComponentInContainer

protected void findVisibleComponentInContainer(java.awt.Container container,
                                               java.util.List result)
Finds visible components into this Container and filles the List with this components.

Parameters:
container - Container where the components are found
result - List in which the components are stored

isFocusCycleRoot

public boolean isFocusCycleRoot()

getComponentsInOrderFocusInBody

protected java.util.List getComponentsInOrderFocusInBody()
Returns the list of focusable component references that are contained in the form body. This list is ordered depending on how the focus traverses components in the form body.

Returns:
a Vector with the focusable component references from the form body.

getComponentsInOrderFocus

public java.util.List getComponentsInOrderFocus()
Returns the list of focusable component references that are contained in the form. This list is ordered depending on how the focus traverses components in the form.

Returns:
a Vector with the focusable component references from the form.

getComponentsAndLabelsListInOrderTopDown

protected java.util.Vector getComponentsAndLabelsListInOrderTopDown()
Returns the list of component and label references that is contained in the form. This list is ordered depending on how the components and labels are displayed in the form starting by the form top

Returns:
a Vector with the component references from the form.

printingFormWithDefaultTemplate

public void printingFormWithDefaultTemplate()
                                     throws java.lang.Exception
Prints the default template with the data from the form data components.

Throws:
java.lang.Exception

getDefaultXMLTemplate

public java.lang.StringBuffer getDefaultXMLTemplate()
Returns the xml of the default template. This xml is created using the information obtains of the component list displayed in the form.

This method is used when the template parameter isn't defined and then the form needs create its xml template.

Returns:
a StringBuffer with the template xml

isRestricted

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

getQueryButtonKey

public java.lang.String getQueryButtonKey()
Returns the key of the query button.

Returns:
a String with the key of the query button

getInsertButtonKey

public java.lang.String getInsertButtonKey()
Returns the key of the insert button.

Returns:
a String with the key of the insert button

getUpdateButtonKey

public java.lang.String getUpdateButtonKey()
Returns the key of the update button.

Returns:
a String with the key of the update button

getDeleteButtonKey

public java.lang.String getDeleteButtonKey()
Returns the key of the delete button.

Returns:
a String with the key of the delete button

setEntityName

public void setEntityName(java.lang.String name)
Sets the entity name associated with this form

Parameters:
name - a String with the entity name

resetEntityName

public void resetEntityName()

addColumnsToTableView

public void addColumnsToTableView(java.util.Vector cols)
Appends the specified column list to the default column list of the table view. The default column list are established in the xml form definition with the 'column' parameter

Parameters:
cols - the column list to be added

resetTableViewColumns

public void resetTableViewColumns()
Delete all column that aren't default column from colum list of the table view


getButtons

public Button[] getButtons()
Returns a array of buttons with all buttons from the form.

Returns:
a array of buttons

disableHyperlinkComponents

public void disableHyperlinkComponents()
Disables all hiperlink components


enableHyperlinkComponents

public void enableHyperlinkComponents()
Enables all hiperlink components


addControls

public void addControls(javax.swing.JComponent c)
Appends the specified component to the control panel. The specified components are inserted before table view button in the control panel.

Parameters:
c - the component to be added

getComponentList

public java.util.List getComponentList()
Returns the list of component references that contains the form.

Returns:
a List with the component references from the form.

isCustomFocusEnabled

public boolean isCustomFocusEnabled()
Returns whether is this Form should use a modified focus order.

Returns:
true if this form use modified focus order, otherwise false

printTemplate

public void printTemplate(java.lang.String templateURI,
                          java.lang.String entity,
                          java.lang.String title)
                   throws java.lang.Exception
Prints the template which location is defined in templateURI parameter. The data for filling the template is obtained from the form data fields and one table if the entity parameter has been defined.

Parameters:
templateURI - URI in where the template is
entity - entity name of the table to print; null if there isn't table to print
title -
Throws:
java.lang.Exception

printTemplate

public void printTemplate(java.lang.String templateURI,
                          java.lang.String entity,
                          java.lang.String title,
                          boolean texts)
                   throws java.lang.Exception
Prints the template which location is defined in templateURI parameter. The data for filling the template is obtained from the form data fields and one table if the entity parameter has been defined.

Parameters:
templateURI - URI in where the template is
entity - entity name of the table to print; null if there isn't table to print
title -
texts - true use the getDataFieldText(java.lang.String) method for obtain the data; false use the getDataFieldValues(boolean) method.
Throws:
java.lang.Exception

getScrollPane

public javax.swing.JScrollPane getScrollPane()
Gets the JScrollPane object when the body form is contained in. If the 'scroll' parameter in the xml description is established to 'no' the scrollbars are never showed

Returns:
See Also:
init(java.util.Hashtable)

selectTableViewColumns

public void selectTableViewColumns()
Shows a dialog in where the user can select the visible columns from TableViewTable


getVisibleDataComponentAttributes

protected java.util.ArrayList getVisibleDataComponentAttributes()
Returns a list of all visible components that are displayed in this form.

Returns:
a ArrayList with all visible components

getSubForm

public SubForm getSubForm()
Returns the SubForm component if this form is contained in one of them

Returns:
a SubForm object

getPermissionButton

public javax.swing.JButton getPermissionButton()
Gets the permission button if exists

Returns:

getDatabaseBundleButton

public javax.swing.JButton getDatabaseBundleButton()

getScriptButton

public javax.swing.JButton getScriptButton()

getStatusBar

public Form.StatusBar getStatusBar()

getButtonPanel

public javax.swing.JPanel getButtonPanel()

getNotQueriedDataFieldAttributes

public java.util.Vector getNotQueriedDataFieldAttributes()
Checks whether exist data fields that haven't been queried

Returns:
true exist not queried data fields; false otherwise.

clearNotQueriedTabs

public void clearNotQueriedTabs()

Ontimize