pt.moredata.widgets
Class Field

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended bypt.moredata.widgets.Field
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
CellField

public class Field
extends javax.swing.JComponent

Title: ield

Description:
Campo visual "universal" para edição/visualização de conteudo de colunas da base de dados em Swing.
Objecto visual para recolha de informação em forms Swing
Consoante o tipo de dados adapta as componentes de swing usadas para registar a informação.
Se necessario implementa a possibilidade de expansao dos dados.
A sua arquitectura não foi devidamente adaptada aos requisitos implementados que impuseram o objectivo de ser um campo universal.
Assim, um dia destes deverá ser objecto de uma restruturação e limpeza profunda (sem retirar funcionalidades nem métodos, nem propriedades). Company MoreData

Author:
aricardo, Sérgio Ferreira, Luis Medalhas
See Also:
Serialized Form

Nested Class Summary
 
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
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Field()
          Constructor for the DataField object
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Adds a feature to the ActionListener attribute of the DataField object
 void addAfterField(AfterFieldListener a)
          Adds a feature to the AfterField attribute of the DataField object
 void addCaretListener(javax.swing.event.CaretListener listener)
          Adds a feature to the CaretListener attribute of the DataField object
 void addComboElement(java.lang.Object code, java.lang.Object description)
          Adiciona um elemento a combobox.
 void addComponentListener(java.awt.event.ComponentListener l)
          Adds the specified component listener to receive component events from this component.
 void addContainerListener(java.awt.event.ContainerListener l)
          Adds the specified container listener to receive container events from this container.
 void addFieldListener(FieldListener l)
          Adiciona um listener para o evento FieldEvent
 void addFocListener(java.awt.event.FocusListener l)
           
 void addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
           
 void addHierarchyListener(java.awt.event.HierarchyListener l)
           
 void addInputMethodListener(java.awt.event.InputMethodListener l)
          Adds a feature to the InputMethodListener attribute of the DataField object
 void addKeyListener(java.awt.event.KeyListener l)
          Adds the specified key listener to receive key events from this component.
 void addMouseListener(java.awt.event.MouseListener l)
           
 void addMouseMotionListener(java.awt.event.MouseMotionListener l)
           
 void addMouseWheelListener(java.awt.event.MouseWheelListener l)
           
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void addPropertyChangeListener(java.lang.String nome, java.beans.PropertyChangeListener l)
           
 void addVetoableChangeListener(java.beans.VetoableChangeListener l)
           
 void clear()
          Limpa o conteudo do campo de ddaos e das descodificações se fôr caso disso.
 void copy()
          Description of the Method
 void cut()
          Description of the Method
 void foreignKeyLookup()
          Faz um lookup de acordo com a chave estrangeira preenchida Em geral preenche a descrição correspondente à chave estrangeira preenchida.
 javax.accessibility.AccessibleContext getAccessibleContext()
          Gets the accessibleContext attribute of the DataField object
 javax.swing.Action[] getActions()
          Gets the actions attribute of the DataField object
 java.lang.String getAllowedCharacters()
          Return a String with a set of characters that are allowed to be used in the widget.
 int getCaretPosition()
          Gets the caretPosition attribute of the DataField object
 java.lang.String getColumn()
          Column where the data is to be stored
 int getColumns()
          Gets the columns attribute of the DataField object
 int getComponentType()
          Devolve o tipo de componente usado para mostrar o campo
 int getDataFieldSize()
          Devolve a propriedade com tamanho do campo de dados
 DataSource getDataSource()
          Getter for property dataSource.
 java.lang.String getDbDataType()
          Devolve o valor da propriedade do text field
 int getDecimals()
          Devolve o numero de casas decimais que se permite digitar
 java.lang.String getDescriptionColumn()
          Column of foreign key description
 javax.swing.text.Document getDocument()
          Gets the document attribute of the DataField object
 double getDouble()
          Devolve o valor correspondente ao campo em double ???
 char getFocusAccelerator()
          Gets the focusAccelerator attribute of the DataField object
 java.awt.Font getFont()
          Gets the font attribute of the DataField object
 java.lang.String getFormat()
          Gets the format attribute of the DataField object
 java.lang.String getHelpContextId()
          Gets the helpContextId attribute of the DataField object
 int getHorizontalAlignment()
          Gets the horizontalAlignment attribute of the DataField object
 javax.swing.BoundedRangeModel getHorizontalVisibility()
          Gets the horizontalVisibility attribute of the DataField object
 long getLong()
          Devolve o valor correspondente ao campo em long ???
 int getMaxColumns()
          Devolve o numero maximo de linhas se o field for um EDITOR_PANE, caso contrario devolve -1.
 java.lang.String getMaxErrorMessage()
          Mensagem de validação do valor maximo
 int getMaxLength()
          Maximum length in characters for the field
 int getMaxLines()
          Devolve o numero maximo de linhas se o field for um EDITOR_PANE, caso contrario devolve -1.
 java.lang.Object getMaxObjValue()
          Gets the maxObjValue attribute of the DataField object
 long getMaxValue()
          Deprecated.  
 java.lang.String getMinErrorMessage()
          Mensagem de validação do valor maximo
 java.lang.Object getMinObjValue()
          Gets the minObjValue attribute of the DataField object
 long getMinValue()
          Deprecated.  
 java.lang.Object getObject()
          Devolve o valor que esta preenchido no campo ???
 java.awt.Dimension getPreferredScrollableViewportSize()
          Gets the preferredScrollableViewportSize attribute of the DataField object
 java.lang.String getReferencedColumn()
          Primary key column of referenced table of foreign key
 java.lang.String getReferencedTable()
          Referenced table of foreign key
 boolean getRequired()
          Gets the required attribute of the DataField object
 int getScrollableBlockIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
          Gets the scrollableBlockIncrement attribute of the DataField object
 int getScrollableUnitIncrement(java.awt.Rectangle visibleRect, int orientation, int direction)
          Gets the scrollableUnitIncrement attribute of the DataField object
 int getScrollOffset()
          Gets the scrollOffset attribute of the DataField object
 java.lang.String getSelectedText()
          Gets the selectedText attribute of the DataField object
 int getSelectionEnd()
          Gets the selectionEnd attribute of the DataField object
 int getSelectionStart()
          Gets the selectionStart attribute of the DataField object
 java.lang.String getTable()
          Table where the data is to be stored
 java.lang.String getText()
          Gets the text attribute of the DataField object
 java.lang.String getText(int offs, int len)
          Gets the text attribute of the DataField object
 boolean getValidateOnLostFocus()
          Propriedade que define se o campo deve ou nao ser validado quando perde o focus
 java.lang.String getWhereString()
          Getter for property whereString.
 void grabFocus()
          Description of the Method
 boolean hasFocus()
           
 boolean isAutoFormat()
          Gets the autoFormat attribute of the DataField object
 boolean isContainer()
          Mas servia para nao aparecer o Layout no IDE como sub-componente ???
 boolean isEditable()
          Gets the editable attribute of the DataField object
 boolean isFk()
          Columns is foreign key
 boolean isFocusable()
          Gets the focusable attribute of the DataField object
 boolean isLookupOnSetObject()
          Devolve o valor da flag que indica se o lookup é efectuado quando ocorre um setObject()
 boolean isOnlyDigits()
          Retorna se o campo permite ou nao preencher apenas digitos ????
 boolean isPk()
          Columns is part of primary key
 boolean isQueryState()
          Devolve o query state
 boolean isShowCode()
          if foreign key should the field show the code
 boolean isShowDescription()
          if foreign key should the field show the description
 boolean isShowExpansionButton()
          Devolve a propriedade que define se o botão de expansão deve ou não ser mostrado
 boolean isValidateRoot()
          Gets the validateRoot attribute of the DataField object
 java.awt.Rectangle modelToView(int pos)
          Description of the Method
 void moveCaretPosition(int pos)
          Description of the Method
 void paste()
          Description of the Method
 void postActionEvent()
          Description of the Method
 void read(java.io.Reader in, java.lang.Object desc)
          Description of the Method
 void removeActionListener(java.awt.event.ActionListener l)
          Description of the Method
 void removeCaretListener(javax.swing.event.CaretListener listener)
          Removes a caret listener
 void removeComponentListener(java.awt.event.ComponentListener l)
          Removes the specified component listener so that it no longer receives component events from this component.
 void removeContainerListener(java.awt.event.ContainerListener l)
          Removes the specified container listener so it no longer receives container events from this container.
 void removeFieldListener(FieldListener l)
          Remove um listener do Field
 void removeFocListener(java.awt.event.FocusListener l)
           
 void removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)
           
 void removeHierarchyListener(java.awt.event.HierarchyListener l)
           
 void removeInputMethodListener(java.awt.event.InputMethodListener l)
           
 void removeKeyListener(java.awt.event.KeyListener l)
          Removes the specified key listener that receives key events from this component.
 void removeMouseListener(java.awt.event.MouseListener l)
           
 void removeMouseMotionListener(java.awt.event.MouseMotionListener l)
           
 void removeMouseWheelListener(java.awt.event.MouseWheelListener l)
           
 void removeNotify()
          Description of the Method
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
           
 void removePropertyChangeListener(java.lang.String nome, java.beans.PropertyChangeListener l)
           
 void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
           
 void requestFocus()
           
 void select(int selectionStart, int selectionEnd)
          Description of the Method
 void selectAll()
          Description of the Method
 void setActionCommand(java.lang.String command)
          Sets the actionCommand attribute of the DataField object
 void setAllowedCharacters(java.lang.String allowedCharacters)
          Set the of characters that are allowed to be used in the widget.
 void setAutoFormat(boolean _auto)
          setAutomaticFormat
 void setBackground(java.awt.Color c)
          Muda a cor do background
 void setBackgroundDisabledColor(java.awt.Color c)
           
 void setBackgroundEnabledColor(java.awt.Color c)
           
 void setBorder(javax.swing.border.Border border)
          Sets the border attribute of the DataField object
 void setBounds(java.awt.Rectangle r)
          Muda o tamanho do campo.
 void setCaretPosition(int position)
          Sets the caretPosition attribute of the DataField object
 void setColumn(java.lang.String _column)
          Sets the column attribute of the DataField object
 void setColumns(int columns)
          Sets the columns attribute of the DataField object
 void setComboElements(java.lang.Object[] elements)
          Adiciona um conjunto de elementos a combox.
 void setComponentType(int _componentType)
          Define a propriedade tipo de componente usada
Controla qual a componente usada para desenhar o campo Se o tipo de componente anterior for igual ao novo, nao acontece nada.
 void setDataFieldSize(int _dataFieldSize)
          Afecta o tamanho em pixeis do campo usado para preencher a chave primária
 void setDataSource(DataSource dataSource)
          Setter for property dataSource.
 void setDbDataType(java.lang.String dbDataType)
          Afecta o tipo de dados (com uma string que o identifica) que o campo recolhe ou mostra
 void setDecimals(int _nd)
          Define o numero de casas decimais
 void setDescriptionColumn(java.lang.String _descriptionColumn)
          Sets the descriptionColumn attribute of the DataField object
 void setDisabledTextColor(java.awt.Color c)
          Sets the disabledTextColor attribute of the DataField object
 void setDocument(javax.swing.text.Document doc)
          Sets the document attribute of the DataField object
 void setEditable(boolean _editable)
          setEditable
 void setEnabled(boolean b)
          Sets the enabled attribute of the DataField object
 void setFk(boolean _fk)
          Sets the fk attribute of the DataField object
 void setFocusAccelerator(char aKey)
          Sets the focusAccelerator attribute of the DataField object
 void setFont(java.awt.Font f)
          Sets the font attribute of the DataField object
 void setFormat(java.lang.String _format)
          Afecta o formato para formatacao de valores numericos e(ou) datas apos perda de focus
 void setHelpContextId(java.lang.String _helpContextId)
          Afecta a URL do help sensivel ao contexto deste campo
 void setHorizontalAlignment(int alignment)
          Sets the horizontalAlignment attribute of the DataField object
 void setLookupOnSetObject(boolean _lookupOnSetObject)
          Afecta a propriedade que indica que a descodificação deve ser efectuada quando é feito um setObject
 void setMaxColumns(int maxColumns)
          Altera o numero maximo de colunas se o field for um EDITOR_PANE, caso nao seja, este metodo nao produz qualquer efeito.
 void setMaxErrorMessage(java.lang.String message)
          Altera a mensagem de validação do valor maximo o caracter # é utilizado como macro para o valor currente o caracter ^ é utilizado como macro para o valor maximo
 void setMaxLength(int _maxLength)
          Sets the maxLength attribute of the DataField object
 void setMaxLines(int maxLines)
          Altera o numero maximo de linhas se o field for um EDITOR_PANE, caso nao seja, este metodo nao produz qualquer efeito.
 void setMaxValue(long _maxValue)
          Sets the maxValue attribute of the DataField object
 void setMaxValue(java.lang.Object _maxValue)
          Sets the maxValue attribute of the DataField object
 void setMinErrorMessage(java.lang.String message)
          Altera a mensagem de validação do valor minimo o caracter # é utilizado como macro para o valor currente o caracter ^ é utilizado como macro para o valor minimo
 void setMinValue(long _minValue)
          Sets the minValue attribute of the DataField object
 void setMinValue(java.lang.Object _minValue)
          Sets the minValue attribute of the DataField object
 void setNextFocusableComponent(java.awt.Component aComponent)
          Sets the nextFocusableComponent attribute of the DataField object
 void setObject(java.lang.Object object)
          Afecta o objecto com um valor e mostra no Field o seu conteudo
Se a coluna a que o campo pertence fôr chave estrangeira efectua o lookup da descodificação correspondente.
 void setOnlyDigits(boolean _onlyDigits)
          Sets the onlyDigits attribute of the DataField object
 void setPk(boolean _pk)
          Sets the pk attribute of the DataField object
 void setQueryState(boolean _queryState)
          Afecta o query state
 void setReferencedColumn(java.lang.String _referencedColumn)
          Afecta a coluna que é chave primária na tabela referenciada (igualada à coluna que é chave estrangeira na tabela corrente).
 void setReferencedTable(java.lang.String _referencedTable)
          Sets the referencedTable attribute of the DataField object
 void setRequired(boolean _required)
          Se required a true o campo eh de preenchimento obrigatorio
 void setScrollOffset(int scrollOffset)
          Sets the scrollOffset attribute of the DataField object
 void setSelectionEnd(int selectionEnd)
          Sets the selectionEnd attribute of the DataField object
 void setSelectionStart(int selectionStart)
          Sets the selectionStart attribute of the DataField object
 void setShowCode(boolean _showCode)
          Sets the showCode attribute of the DataField object
 void setShowDescription(boolean _showDescription)
          Sets the showDescription attribute of the DataField object
 void setShowExpansionButton(boolean _showExpansionButton)
          Define se o botão de expansão deve ou não estar visivel
 void setTable(java.lang.String _table)
          Sets the table attribute of the DataField object
 void setText(java.lang.String text)
          Override do setText para que se possam afectar valores com o programa mas nao aceitar digitacao
 void setValidateOnLostFocus(boolean _validateOnLostFocus)
          Sets the validateOnLostFocus attribute of the DataField object
 void setWhereString(java.lang.String whereString)
          Setter for property whereString.
 int viewToModel(java.awt.Point pt)
          Description of the Method
 void write(java.io.Writer out)
          Description of the Method
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, 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, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addFocusListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeFocusListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Field

public Field()
Constructor for the DataField object

Method Detail

setMaxErrorMessage

public void setMaxErrorMessage(java.lang.String message)
Altera a mensagem de validação do valor maximo o caracter # é utilizado como macro para o valor currente o caracter ^ é utilizado como macro para o valor maximo

Parameters:
message - Mensagem mostrada após validar máximo

getMaxErrorMessage

public java.lang.String getMaxErrorMessage()
Mensagem de validação do valor maximo

Returns:
Mensagem

setMinErrorMessage

public void setMinErrorMessage(java.lang.String message)
Altera a mensagem de validação do valor minimo o caracter # é utilizado como macro para o valor currente o caracter ^ é utilizado como macro para o valor minimo

Parameters:
message - The new minErrorMessage value

getMinErrorMessage

public java.lang.String getMinErrorMessage()
Mensagem de validação do valor maximo

Returns:
The minErrorMessage value

setText

public void setText(java.lang.String text)
Override do setText para que se possam afectar valores com o programa mas nao aceitar digitacao

Parameters:
text - Texto a mostrar no caso de TextField

setAutoFormat

public void setAutoFormat(boolean _auto)
setAutomaticFormat

Parameters:
_auto - true para que exista formatação automática, false não faz qualquer formatação

isAutoFormat

public boolean isAutoFormat()
Gets the autoFormat attribute of the DataField object

Returns:
The autoFormat value

setEditable

public void setEditable(boolean _editable)
setEditable

Parameters:
_editable - true se o campo fôr editável, false caso contrário

setDecimals

public void setDecimals(int _nd)
Define o numero de casas decimais

Parameters:
_nd - Número de casas decimais

getDecimals

public int getDecimals()
Devolve o numero de casas decimais que se permite digitar

Returns:
The decimals value

getDbDataType

public java.lang.String getDbDataType()
Devolve o valor da propriedade do text field

Returns:
Tipo de dados conforme definido em DataType

setDbDataType

public void setDbDataType(java.lang.String dbDataType)
Afecta o tipo de dados (com uma string que o identifica) que o campo recolhe ou mostra

Parameters:
dbDataType - Tipo de dados devolvido

getMaxObjValue

public java.lang.Object getMaxObjValue()
Gets the maxObjValue attribute of the DataField object

Returns:
The maxObjValue value

getMaxValue

public long getMaxValue()
Deprecated.  

Returns:
The maxValue value

setMaxValue

public void setMaxValue(long _maxValue)
Sets the maxValue attribute of the DataField object

Parameters:
_maxValue - The new maxValue value

setMaxValue

public void setMaxValue(java.lang.Object _maxValue)
Sets the maxValue attribute of the DataField object

Parameters:
_maxValue - The new maxValue value

getMinObjValue

public java.lang.Object getMinObjValue()
Gets the minObjValue attribute of the DataField object

Returns:
The minObjValue value

getMinValue

public long getMinValue()
Deprecated.  

Returns:
The minValue value

setMinValue

public void setMinValue(long _minValue)
Sets the minValue attribute of the DataField object

Parameters:
_minValue - The new minValue value

setMinValue

public void setMinValue(java.lang.Object _minValue)
Sets the minValue attribute of the DataField object

Parameters:
_minValue - The new minValue value

getHelpContextId

public java.lang.String getHelpContextId()
Gets the helpContextId attribute of the DataField object

Returns:
The helpContextId value

setHelpContextId

public void setHelpContextId(java.lang.String _helpContextId)
Afecta a URL do help sensivel ao contexto deste campo

Parameters:
_helpContextId - The new helpContextId value

getRequired

public boolean getRequired()
Gets the required attribute of the DataField object

Returns:
The required value

setRequired

public void setRequired(boolean _required)
Se required a true o campo eh de preenchimento obrigatorio

Parameters:
_required - The new required value

getFormat

public java.lang.String getFormat()
Gets the format attribute of the DataField object

Returns:
The format value

setFormat

public void setFormat(java.lang.String _format)
Afecta o formato para formatacao de valores numericos e(ou) datas apos perda de focus

Parameters:
_format - The new format value

getValidateOnLostFocus

public boolean getValidateOnLostFocus()
Propriedade que define se o campo deve ou nao ser validado quando perde o focus

Returns:
The validateOnLostFocus value

setValidateOnLostFocus

public void setValidateOnLostFocus(boolean _validateOnLostFocus)
Sets the validateOnLostFocus attribute of the DataField object

Parameters:
_validateOnLostFocus - The new validateOnLostFocus value

getMaxLength

public int getMaxLength()
Maximum length in characters for the field

Returns:
The maxLength value

setMaxLength

public void setMaxLength(int _maxLength)
Sets the maxLength attribute of the DataField object

Parameters:
_maxLength - The new maxLength value

getTable

public java.lang.String getTable()
Table where the data is to be stored

Returns:
The table value

setTable

public void setTable(java.lang.String _table)
Sets the table attribute of the DataField object

Parameters:
_table - The new table value

getColumn

public java.lang.String getColumn()
Column where the data is to be stored

Returns:
The column value

setColumn

public void setColumn(java.lang.String _column)
Sets the column attribute of the DataField object

Parameters:
_column - The new column value

isPk

public boolean isPk()
Columns is part of primary key

Returns:
The pk value

setPk

public void setPk(boolean _pk)
Sets the pk attribute of the DataField object

Parameters:
_pk - The new pk value

isFk

public boolean isFk()
Columns is foreign key

Returns:
The fk value

setFk

public void setFk(boolean _fk)
Sets the fk attribute of the DataField object

Parameters:
_fk - The new fk value

setDataFieldSize

public void setDataFieldSize(int _dataFieldSize)
Afecta o tamanho em pixeis do campo usado para preencher a chave primária

Parameters:
_dataFieldSize - Tamanho em pixeis

getDataFieldSize

public int getDataFieldSize()
Devolve a propriedade com tamanho do campo de dados

Returns:
dataFieldSize

getDescriptionColumn

public java.lang.String getDescriptionColumn()
Column of foreign key description

Returns:
The descriptionColumn value

setDescriptionColumn

public void setDescriptionColumn(java.lang.String _descriptionColumn)
Sets the descriptionColumn attribute of the DataField object

Parameters:
_descriptionColumn - The new descriptionColumn value

getReferencedTable

public java.lang.String getReferencedTable()
Referenced table of foreign key

Returns:
The referencedTable value

setReferencedTable

public void setReferencedTable(java.lang.String _referencedTable)
Sets the referencedTable attribute of the DataField object

Parameters:
_referencedTable - The new referencedTable value

getReferencedColumn

public java.lang.String getReferencedColumn()
Primary key column of referenced table of foreign key

Returns:
The referencedColumn value

setReferencedColumn

public void setReferencedColumn(java.lang.String _referencedColumn)
Afecta a coluna que é chave primária na tabela referenciada (igualada à coluna que é chave estrangeira na tabela corrente).

Parameters:
_referencedColumn - The new referencedColumn value

isShowCode

public boolean isShowCode()
if foreign key should the field show the code

Returns:
The showCode value

setShowCode

public void setShowCode(boolean _showCode)
Sets the showCode attribute of the DataField object

Parameters:
_showCode - The new showCode value

isShowDescription

public boolean isShowDescription()
if foreign key should the field show the description

Returns:
The showDescription value

setShowDescription

public void setShowDescription(boolean _showDescription)
Sets the showDescription attribute of the DataField object

Parameters:
_showDescription - The new showDescription value

getObject

public java.lang.Object getObject()
Devolve o valor que esta preenchido no campo ??? Ainda nao esta a funcionar com combos

Returns:
The object value

getDouble

public double getDouble()
Devolve o valor correspondente ao campo em double ??? Isto devia ser deprecado

Returns:
The double value

getLong

public long getLong()
Devolve o valor correspondente ao campo em long ??? Isto devia ser deprecado

Returns:
The long value

setObject

public void setObject(java.lang.Object object)
Afecta o objecto com um valor e mostra no Field o seu conteudo
Se a coluna a que o campo pertence fôr chave estrangeira efectua o lookup da descodificação correspondente.

Parameters:
object - Objecto que contem o valor a mostrar no campo

isOnlyDigits

public boolean isOnlyDigits()
Retorna se o campo permite ou nao preencher apenas digitos ???? A mudança para a propriedade interna pode dar barraca

Returns:
The onlyDigits value

setOnlyDigits

public void setOnlyDigits(boolean _onlyDigits)
Sets the onlyDigits attribute of the DataField object

Parameters:
_onlyDigits - The new onlyDigits value

isQueryState

public boolean isQueryState()
Devolve o query state

Returns:
The queryState value

setQueryState

public void setQueryState(boolean _queryState)
Afecta o query state

Parameters:
_queryState - The new queryState value

setShowExpansionButton

public void setShowExpansionButton(boolean _showExpansionButton)
Define se o botão de expansão deve ou não estar visivel

Parameters:
_showExpansionButton - Valor da flag

isShowExpansionButton

public boolean isShowExpansionButton()
Devolve a propriedade que define se o botão de expansão deve ou não ser mostrado

Returns:
The showExpansionButton value

setComponentType

public void setComponentType(int _componentType)
Define a propriedade tipo de componente usada
Controla qual a componente usada para desenhar o campo Se o tipo de componente anterior for igual ao novo, nao acontece nada.

Parameters:
_componentType - Tipo de componente

getComponentType

public int getComponentType()
Devolve o tipo de componente usado para mostrar o campo

Returns:
componentType

setLookupOnSetObject

public void setLookupOnSetObject(boolean _lookupOnSetObject)
Afecta a propriedade que indica que a descodificação deve ser efectuada quando é feito um setObject

Parameters:
_lookupOnSetObject - Flag que indica se a descodificação deve ser efectuada no setObject()

isLookupOnSetObject

public boolean isLookupOnSetObject()
Devolve o valor da flag que indica se o lookup é efectuado quando ocorre um setObject()

Returns:
The lookupOnSetObject value

setBounds

public void setBounds(java.awt.Rectangle r)
Muda o tamanho do campo.

Trata de adaptar as sub-componentes da forma que achar necessário. ???? Aparentemente o resize dos campos pode dar problemas


setBackground

public void setBackground(java.awt.Color c)
Muda a cor do background

Parameters:
c - The new background value

isValidateRoot

public boolean isValidateRoot()
Gets the validateRoot attribute of the DataField object

Returns:
The validateRoot value

getHorizontalAlignment

public int getHorizontalAlignment()
Gets the horizontalAlignment attribute of the DataField object

Returns:
The horizontalAlignment value

setHorizontalAlignment

public void setHorizontalAlignment(int alignment)
Sets the horizontalAlignment attribute of the DataField object

Parameters:
alignment - The new horizontalAlignment value

getColumns

public int getColumns()
Gets the columns attribute of the DataField object

Returns:
The columns value

setColumns

public void setColumns(int columns)
Sets the columns attribute of the DataField object

Parameters:
columns - The new columns value

setFont

public void setFont(java.awt.Font f)
Sets the font attribute of the DataField object

Parameters:
f - The new font value

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Adds a feature to the ActionListener attribute of the DataField object

Parameters:
l - The feature to be added to the ActionListener attribute

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Description of the Method

Parameters:
l - Description of the Parameter

setActionCommand

public void setActionCommand(java.lang.String command)
Sets the actionCommand attribute of the DataField object

Parameters:
command - The new actionCommand value

getActions

public javax.swing.Action[] getActions()
Gets the actions attribute of the DataField object

Returns:
The actions value

postActionEvent

public void postActionEvent()
Description of the Method


getHorizontalVisibility

public javax.swing.BoundedRangeModel getHorizontalVisibility()
Gets the horizontalVisibility attribute of the DataField object

Returns:
The horizontalVisibility value

getScrollOffset

public int getScrollOffset()
Gets the scrollOffset attribute of the DataField object

Returns:
The scrollOffset value

setScrollOffset

public void setScrollOffset(int scrollOffset)
Sets the scrollOffset attribute of the DataField object

Parameters:
scrollOffset - The new scrollOffset value

getAccessibleContext

public javax.accessibility.AccessibleContext getAccessibleContext()
Gets the accessibleContext attribute of the DataField object

Returns:
The accessibleContext value

addCaretListener

public void addCaretListener(javax.swing.event.CaretListener listener)
Adds a feature to the CaretListener attribute of the DataField object

Parameters:
listener - The feature to be added to the CaretListener attribute

removeCaretListener

public void removeCaretListener(javax.swing.event.CaretListener listener)
Removes a caret listener

Parameters:
listener - The listener to be removed

setDocument

public void setDocument(javax.swing.text.Document doc)
Sets the document attribute of the DataField object

Parameters:
doc - The new document value

getDocument

public javax.swing.text.Document getDocument()
Gets the document attribute of the DataField object

Returns:
The document value

getText

public java.lang.String getText(int offs,
                                int len)
                         throws javax.swing.text.BadLocationException
Gets the text attribute of the DataField object

Parameters:
offs - Description of the Parameter
len - Description of the Parameter
Returns:
The text value
Throws:
javax.swing.text.BadLocationException - Description of the Exception

getText

public java.lang.String getText()
Gets the text attribute of the DataField object

Returns:
The text value

modelToView

public java.awt.Rectangle modelToView(int pos)
                               throws javax.swing.text.BadLocationException
Description of the Method

Parameters:
pos - Description of the Parameter
Returns:
Description of the Return Value
Throws:
javax.swing.text.BadLocationException - Description of the Exception

viewToModel

public int viewToModel(java.awt.Point pt)
Description of the Method

Parameters:
pt - Description of the Parameter
Returns:
Description of the Return Value

cut

public void cut()
Description of the Method


copy

public void copy()
Description of the Method


paste

public void paste()
Description of the Method


moveCaretPosition

public void moveCaretPosition(int pos)
Description of the Method

Parameters:
pos - Description of the Parameter

setFocusAccelerator

public void setFocusAccelerator(char aKey)
Sets the focusAccelerator attribute of the DataField object

Parameters:
aKey - The new focusAccelerator value

getFocusAccelerator

public char getFocusAccelerator()
Gets the focusAccelerator attribute of the DataField object

Returns:
The focusAccelerator value

read

public void read(java.io.Reader in,
                 java.lang.Object desc)
          throws java.io.IOException
Description of the Method

Parameters:
in - Description of the Parameter
desc - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

write

public void write(java.io.Writer out)
           throws java.io.IOException
Description of the Method

Parameters:
out - Description of the Parameter
Throws:
java.io.IOException - Description of the Exception

removeNotify

public void removeNotify()
Description of the Method


setEnabled

public void setEnabled(boolean b)
Sets the enabled attribute of the DataField object

Parameters:
b - The new enabled value

isFocusable

public boolean isFocusable()
Gets the focusable attribute of the DataField object

Returns:
The focusable value

setCaretPosition

public void setCaretPosition(int position)
Sets the caretPosition attribute of the DataField object

Parameters:
position - The new caretPosition value

getCaretPosition

public int getCaretPosition()
Gets the caretPosition attribute of the DataField object

Returns:
The caretPosition value

getSelectedText

public java.lang.String getSelectedText()
Gets the selectedText attribute of the DataField object

Returns:
The selectedText value

isEditable

public boolean isEditable()
Gets the editable attribute of the DataField object

Returns:
The editable value

getSelectionStart

public int getSelectionStart()
Gets the selectionStart attribute of the DataField object

Returns:
The selectionStart value

setSelectionStart

public void setSelectionStart(int selectionStart)
Sets the selectionStart attribute of the DataField object

Parameters:
selectionStart - The new selectionStart value

getSelectionEnd

public int getSelectionEnd()
Gets the selectionEnd attribute of the DataField object

Returns:
The selectionEnd value

setSelectionEnd

public void setSelectionEnd(int selectionEnd)
Sets the selectionEnd attribute of the DataField object

Parameters:
selectionEnd - The new selectionEnd value

select

public void select(int selectionStart,
                   int selectionEnd)
Description of the Method

Parameters:
selectionStart - Description of the Parameter
selectionEnd - Description of the Parameter

selectAll

public void selectAll()
Description of the Method


getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()
Gets the preferredScrollableViewportSize attribute of the DataField object

Returns:
The preferredScrollableViewportSize value

getScrollableUnitIncrement

public int getScrollableUnitIncrement(java.awt.Rectangle visibleRect,
                                      int orientation,
                                      int direction)
Gets the scrollableUnitIncrement attribute of the DataField object

Parameters:
visibleRect - Description of the Parameter
orientation - Description of the Parameter
direction - Description of the Parameter
Returns:
The scrollableUnitIncrement value

getScrollableBlockIncrement

public int getScrollableBlockIncrement(java.awt.Rectangle visibleRect,
                                       int orientation,
                                       int direction)
Gets the scrollableBlockIncrement attribute of the DataField object

Parameters:
visibleRect - Description of the Parameter
orientation - Description of the Parameter
direction - Description of the Parameter
Returns:
The scrollableBlockIncrement value

addInputMethodListener

public void addInputMethodListener(java.awt.event.InputMethodListener l)
Adds a feature to the InputMethodListener attribute of the DataField object

Parameters:
l - The feature to be added to the InputMethodListener attribute

removeInputMethodListener

public void removeInputMethodListener(java.awt.event.InputMethodListener l)

getFont

public java.awt.Font getFont()
Gets the font attribute of the DataField object

Returns:
The font value

clear

public void clear()
Limpa o conteudo do campo de ddaos e das descodificações se fôr caso disso.
Fica a faltar a limpeza de ocmboBox e imagem


requestFocus

public void requestFocus()

hasFocus

public boolean hasFocus()

isContainer

public boolean isContainer()
Mas servia para nao aparecer o Layout no IDE como sub-componente

??? Eu acho que isto deixa de ser necessario

Returns:
The container value

addAfterField

public void addAfterField(AfterFieldListener a)
Adds a feature to the AfterField attribute of the DataField object

Parameters:
a - The feature to be added to the AfterField attribute

foreignKeyLookup

public void foreignKeyLookup()
Faz um lookup de acordo com a chave estrangeira preenchida

Em geral preenche a descrição correspondente à chave estrangeira preenchida.

??? Este método não deveria ser publico mas sim disponibilizado sob a forma de evento.


addFieldListener

public void addFieldListener(FieldListener l)
Adiciona um listener para o evento FieldEvent

Parameters:
l - Listener a adicionar

removeFieldListener

public void removeFieldListener(FieldListener l)
Remove um listener do Field

Parameters:
l - Listener a remover

setDisabledTextColor

public void setDisabledTextColor(java.awt.Color c)
Sets the disabledTextColor attribute of the DataField object

Parameters:
c - The new disabledTextColor value

setNextFocusableComponent

public void setNextFocusableComponent(java.awt.Component aComponent)
Sets the nextFocusableComponent attribute of the DataField object

Parameters:
aComponent - The new nextFocusableComponent value

grabFocus

public void grabFocus()
Description of the Method


setBorder

public void setBorder(javax.swing.border.Border border)
Sets the border attribute of the DataField object

Parameters:
border - The new border value

addKeyListener

public void addKeyListener(java.awt.event.KeyListener l)
Adds the specified key listener to receive key events from this component. If l is null, no exception is thrown and no action is performed.

Parameters:
l - - the key listener.

removeKeyListener

public void removeKeyListener(java.awt.event.KeyListener l)
Removes the specified key listener that receives key events from this component. If l is null, no exception is thrown and no action is performed.

Parameters:
l - - the key listener.

addComponentListener

public void addComponentListener(java.awt.event.ComponentListener l)
Adds the specified component listener to receive component events from this component. If listener l is null, no exception is thrown and no action is performed.

Parameters:
l - - the component listener

removeComponentListener

public void removeComponentListener(java.awt.event.ComponentListener l)
Removes the specified component listener so that it no longer receives component events from this component. This method performs no function, nor does it throw an exception, if the listener specified by the argument was not previously added to this component. If listener l is null, no exception is thrown and no action is performed.

Parameters:
l - - the component listener

addContainerListener

public void addContainerListener(java.awt.event.ContainerListener l)
Adds the specified container listener to receive container events from this container. If l is null, no exception is thrown and no action is performed.

Parameters:
l - - the component listener

removeContainerListener

public void removeContainerListener(java.awt.event.ContainerListener l)
Removes the specified container listener so it no longer receives container events from this container. If l is null, no exception is thrown and no action is performed.

Parameters:
l - - the container listener

addFocListener

public void addFocListener(java.awt.event.FocusListener l)

removeFocListener

public void removeFocListener(java.awt.event.FocusListener l)

addHierarchyBoundsListener

public void addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)

removeHierarchyBoundsListener

public void removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener l)

addHierarchyListener

public void addHierarchyListener(java.awt.event.HierarchyListener l)

removeHierarchyListener

public void removeHierarchyListener(java.awt.event.HierarchyListener l)

addMouseListener

public void addMouseListener(java.awt.event.MouseListener l)

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener l)

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener l)

removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener l)

addMouseWheelListener

public void addMouseWheelListener(java.awt.event.MouseWheelListener l)

removeMouseWheelListener

public void removeMouseWheelListener(java.awt.event.MouseWheelListener l)

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String nome,
                                      java.beans.PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String nome,
                                         java.beans.PropertyChangeListener l)

addVetoableChangeListener

public void addVetoableChangeListener(java.beans.VetoableChangeListener l)

removeVetoableChangeListener

public void removeVetoableChangeListener(java.beans.VetoableChangeListener l)

setBackgroundEnabledColor

public void setBackgroundEnabledColor(java.awt.Color c)

setBackgroundDisabledColor

public void setBackgroundDisabledColor(java.awt.Color c)

getWhereString

public java.lang.String getWhereString()
Getter for property whereString.

Returns:
Value of property whereString.

setWhereString

public void setWhereString(java.lang.String whereString)
Setter for property whereString.

Parameters:
whereString - New value of property whereString.

addComboElement

public void addComboElement(java.lang.Object code,
                            java.lang.Object description)
Adiciona um elemento a combobox. Se o field nao for uma combobox, o metodo nao produz qualquer efeito.


setComboElements

public void setComboElements(java.lang.Object[] elements)
Adiciona um conjunto de elementos a combox. Se o campo nao for do tipo combobox, e alterado automaticamente.

Parameters:
elements - Pares ordenados de codigo/descricao.

setMaxColumns

public void setMaxColumns(int maxColumns)
Altera o numero maximo de colunas se o field for um EDITOR_PANE, caso nao seja, este metodo nao produz qualquer efeito.

Parameters:
maxColumns - O numero maximo de colunas.

getMaxColumns

public int getMaxColumns()
Devolve o numero maximo de linhas se o field for um EDITOR_PANE, caso contrario devolve -1.


setMaxLines

public void setMaxLines(int maxLines)
Altera o numero maximo de linhas se o field for um EDITOR_PANE, caso nao seja, este metodo nao produz qualquer efeito.

Parameters:
maxLines - O numero maximo de linhas.

getMaxLines

public int getMaxLines()
Devolve o numero maximo de linhas se o field for um EDITOR_PANE, caso contrario devolve -1.


getDataSource

public DataSource getDataSource()
Getter for property dataSource.

Returns:
Value of property dataSource.

setDataSource

public void setDataSource(DataSource dataSource)
Setter for property dataSource.

Parameters:
dataSource - New value of property dataSource.

getAllowedCharacters

public java.lang.String getAllowedCharacters()
Return a String with a set of characters that are allowed to be used in the widget.

Returns:
A String with a set of characters that are allowed to be used in the widget.

setAllowedCharacters

public void setAllowedCharacters(java.lang.String allowedCharacters)
Set the of characters that are allowed to be used in the widget.

Parameters:
allowedCharacters - A string with the allowed characters.