CodLookupCellEditor

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openswing.swing.table.editors.client
Class CodLookupCellEditor

    java.lang.Object
      org.openswing.swing.table.editors.client.AbstractCellEditor
          org.openswing.swing.table.editors.client.CodLookupCellEditor

All Implemented Interfaces:
  java.awt.event.ActionListener, javax.swing.CellEditor, java.util.EventListener, LookupParent, javax.swing.table.TableCellEditor

public class CodLookupCellEditor
extends AbstractCellEditor
implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener, LookupParent

Title: OpenSwing Framework

Description: Column editor used to edit a lookup control.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

Constructor Summary

`CodLookupCellEditor(int maxCharacters, LookupController lookupController, boolean required, boolean numericValue, boolean codBoxVisible, boolean codBoxEditable, boolean buttonVisible, java.lang.String controllerClassName, java.lang.String controllerMethodName, long autoCompletitionWaitTime, java.lang.String codAttributeName, java.awt.ComponentOrientation orientation, boolean selectDataOnEdit)`
Constructor.

Method Summary
`void` | `actionPerformed(java.awt.event.ActionEvent e)` Method called when user clicks the lookup button.
`void` | `finalize()`
`void` | `forceValidate()` Method invoked by AutoCompletitionListener class.
`java.lang.Object` | `getCellEditorValue()` This method should be overrided.
`java.lang.Object` | `getLookupCodeParentValue()`
`java.awt.Component` | `getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)`
`ValueObject` | `getValueObject()`
`void` | `setValue(java.lang.String attributeName, java.lang.Object value)` Method called by LookupController to update parent v.o.
`boolean` | `stopCellEditing()` Stop cell editing.
`boolean` | `validate()` Perform the validation.

Methods inherited from class org.openswing.swing.table.editors.client.AbstractCellEditor
`addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.swing.CellEditor
`addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell`

Constructor Detail

### CodLookupCellEditor

    public CodLookupCellEditor(int maxCharacters,
                               LookupController lookupController,
                               boolean required,
                               boolean numericValue,
                               boolean codBoxVisible,
                               boolean codBoxEditable,
                               boolean buttonVisible,
                               java.lang.String controllerClassName,
                               java.lang.String controllerMethodName,
                               long autoCompletitionWaitTime,
                               java.lang.String codAttributeName,
                               java.awt.ComponentOrientation orientation,
                               boolean selectDataOnEdit)

  Constructor.

Parameters:
  `maxCharacters` - maximum number of characters
  `lookupController` - lookup controller
  `required` - flag used to set mandatory property of the cell
  `numericValue` - allow number only on code input field
  `codBoxVisible` - flag used to hide code
  `codBoxEditable` - flag used to disable code editability
  `buttonVisible` - flag used to hide button
  `controllerClassName` - class name of the controller that must be invoked by pressing the "+" button
  `controllerMethodName` - method name defined in ClientFacade class, related to the controller that must be invoked by pressing the "+" button
  `autoCompletitionWaitTime` - wait time (expressed in ms) before showing code auto completition feature for lookup controls; default value: ClientSettings.LOOKUP_AUTO_COMPLETITION_WAIT_TIME
  `codAttributeName` - attribute name linked to the code

Method Detail

### actionPerformed

    public final void actionPerformed(java.awt.event.ActionEvent e)

  Method called when user clicks the lookup button.

  Specified by:
    `actionPerformed` in interface `java.awt.event.ActionListener`

### stopCellEditing

    public final boolean stopCellEditing()

  Stop cell editing. This method stops cell editing (effectively committing the edit) only if the data entered is validated successfully.

  Specified by:
    `stopCellEditing` in interface `javax.swing.CellEditor`
  Overrides:
    `stopCellEditing` in class `AbstractCellEditor`
  Returns:
    `true` if cell editing may stop, and `false` otherwise.

### validate

    public final boolean validate()

  Perform the validation.

### setValue

    public void setValue(java.lang.String attributeName,
                         java.lang.Object value)

  Method called by LookupController to update parent v.o.

  Specified by:
    `setValue` in interface `LookupParent`
  Parameters:
    `attributeName` - attribute name in the parent v.o. that must be updated
    `value` - updated value

### getValueObject

    public ValueObject getValueObject()

  Specified by:
    `getValueObject` in interface `LookupParent`
  Returns:
    parent value object

### getLookupCodeParentValue

    public java.lang.Object getLookupCodeParentValue()

  Specified by:
    `getLookupCodeParentValue` in interface `LookupParent`
  Returns:
    attribute name in the parent value object related to lookup code

### getCellEditorValue

    public final java.lang.Object getCellEditorValue()

  Description copied from class: `AbstractCellEditor`
  This method should be overrided.

  Specified by:
    `getCellEditorValue` in interface `javax.swing.CellEditor`
  Overrides:
    `getCellEditorValue` in class `AbstractCellEditor`
  Returns:
    null

### getTableCellEditorComponent

    public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                          java.lang.Object value,
                                                          boolean isSelected,
                                                          int row,
                                                          int column)

  Specified by:
    `getTableCellEditorComponent` in interface `javax.swing.table.TableCellEditor`

### forceValidate

    public final void forceValidate()

  Method invoked by AutoCompletitionListener class.

### finalize

    public final void finalize()

Overview | Package | Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD