LookupController

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.lookup.client
Class LookupController

    java.lang.Object
      org.openswing.swing.lookup.client.LookupController

public class LookupController
extends java.lang.Object

Title: OpenSwing Framework

Description: Lookup controller.

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

Field Summary
`boolean` | `autoFitColumns` flag used to auto fit column sizes, according to text headers; default value: `ClientSettings.AUTO_FIT_COLUMNS`
`static int` | `GRID_AND_FILTER_FRAME` constant used in "codeSelectionWindow" property to view a frame that contains a grid and a filter panel when pressing the lookup button
`static int` | `GRID_AND_PANEL_FRAME` constant used in "codeSelectionWindow" property to view a frame that contains a grid and a custom panel when pressing the lookup button
`static int` | `GRID_FRAME` constant used in "codeSelectionWindow" property to view a grid frame when pressing the lookup button
`static int` | `ON_INVALID_CODE_CLEAR_CODE` constant used in "onInvalidCode" property to clear code on validation task that returns an invalid code
`static int` | `ON_INVALID_CODE_RESTORE_FOCUS` constant used in "onInvalidCode" property to do nothing except restore focus inside the code input field on validation task that returns an invalid code
`static int` | `ON_INVALID_CODE_RESTORE_LAST_VALID_CODE` constant used in "onInvalidCode" property to restore the last valid code (on "" if there no exists any valid code in the past) on validation task that returns an invalid code
`static int` | `TREE_FRAME` constant used in "codeSelectionWindow" property to view a tree frame when pressing the lookup button
`static int` | `TREE_GRID_AND_FILTER_FRAME` constant used in "codeSelectionWindow" property to view a frame that contains a tree+grid and a filter panel when pressing the lookup button
`static int` | `TREE_GRID_AND_PANEL_FRAME` constant used in "codeSelectionWindow" property to view a frame that contains a tree+grid and a custom panel when pressing the lookup button
`static int` | `TREE_GRID_FRAME` constant used in "codeSelectionWindow" property to view a tree+grid frame when pressing the lookup button

Constructor Summary
`LookupController()`

Method Summary
`void` | `addComboFilter(java.lang.String attributeName, ListFilterController filter)` Remove a combo-box filter for the specified column.
`void` | `addLookup2ParentLink(java.lang.String parentAttributeName)` Add a link from the whole lookup value object to an equivalent inner v.o. included in the container v.o.
`void` | `addLookup2ParentLink(java.lang.String lookupAttributeName, java.lang.String parentAttributeName)` Add a link from an attribute of the lookup v.o. to an attribute of the lookup container v.o.
`void` | `addLookupListener(LookupListener listener)` Add a lookup listener.
`void` | `doubleClick(int rowNumber, LookupParent lookupParent)` This method is automatically invoked by LookupGridController.doubleClick() method.
`void` | `forceValidate()` Force the code validation: it calles fireForceValidateEvent method.
`int` | `getAllColumnPreferredWidth()`
`int` | `getCodeSelectionWindow()`
`CustomFilterPanel` | `getCustomPanel()`
`Form` | `getForm()`
`java.awt.Dimension` | `getFramePreferedSize()`
`java.lang.String` | `getFrameTitle()`
`java.lang.String` | `getLookupAttributeName(java.lang.String parentAttributeName)` Method invoked by LookupAutoCompletitionDataLocator class, in order to retrieve the attribute in lookup value object mapped to the attribute of grid/form container.
`LookupDataLocator` | `getLookupDataLocator()`
`LookupGridController` | `getLookupGridController()`
`LookupListener[]` | `getLookupListeners()`
`java.lang.String` | `getLookupValueObjectClassName()`
`ValueObject` | `getLookupVO()`
`int` | `getMaxSortedColumns()`
`int` | `getOnInvalidCode()`
`java.lang.Boolean` | `isAllColumnsSelectable()`
`boolean` | `isAllColumnVisible()`
`boolean` | `isAllowTreeLeafSelectionOnly()`
`boolean` | `isAnchorLastColumn()`
`boolean` | `isAutoFitColumns()`
`boolean` | `isCodeValid()`
`boolean` | `isDisableFrameClosing()`
`boolean` | `isGridCopyButton()`
`boolean` | `isGridDeleteButton()`
`boolean` | `isGridEditButton()`
`boolean` | `isGridExportButton()`
`boolean` | `isGridFilterButton()`
`boolean` | `isGridInsertButton()`
`boolean` | `isShowCustomErrorMessage()`
`boolean` | `isShowNavigatorBar()`
`boolean` | `isVisibleStatusPanel()`
`void` | `openLookupFrame(javax.swing.JComponent source, LookupParent lookupParent)` Method called by CodLookupControl when clicking on lookup button: it opens lookup frame (grid/tree/grid+tree frame).
`void` | `openLookupFrame(javax.swing.JFrame parentFrame, LookupParent lookupParent)` Method called by a grid column cell editor when user click on lookup button: it opens lookup frame (grid/tree/grid+tree frame).
`void` | `removeComboFilter(java.lang.String attributeName)` Remove a combo-box filter for the specified column.
`void` | `removeLookupListener(LookupListener listener)` Remove a lookup listener.
`void` | `setAllColumnPreferredWidth(int preferredWidth)` Set columns width for the whole columns of the lookup grid frame.
`void` | `setAllColumnsSelectable(java.lang.Boolean allColumnsSelectable)` Set the selectable property on all columns of lookup grid.
`void` | `setAllColumnVisible(boolean visible)` Set column visibility for the whole columns of the lookup grid frame.
`void` | `setAllowTreeLeafSelectionOnly(boolean allowTreeLeafSelectionOnly)` This is used when codeSelectionWindow is set to TREE_FRAME: it means that user can select only leaves (by double clicking)
`void` | `setAnchorLastColumn(boolean anchorLastColumn)` Define if the last column must be anchored on the right margin of the grid, only when all columns width is lesser than grid width.
`void` | `setAutoFitColumns(boolean autoFitColumns)` Set auto fit column sizes, according to text headers.
`void` | `setCodeSelectionWindow(int codeSelectionWindow)` Set the code selection window.
`void` | `setColumnEditableOnEdit(java.lang.String lookupAttributeName, boolean editable)` Define if a column is editable in edit mode.
`void` | `setColumnEditableOnInsert(java.lang.String lookupAttributeName, boolean editable)` Define if a column is editable in insert mode.
`void` | `setColumnRequired(java.lang.String lookupAttributeName, boolean required)` Define if an editable column is required in insert/edit mode.
`void` | `setColumnTextAlignment(java.lang.String lookupAttributeName, int alignement)` Define column alignement in the lookup grid frame.
`void` | `setCustomPanel(CustomFilterPanel customPanel)` Set the return custom filter panel to show on top of the lookup grid; this panel is showed only if "codeSelectionWindow" property is set to "xxx_AND_PANEL_FRAME"
`void` | `setDisableFrameClosing(boolean disableFrameClosing)` Define if lookup grid frame must not be closed when selecting codes on it.
`void` | `setDomainColumn(java.lang.String lookupAttributeName, java.lang.String domainId)` Set domain identifier in a domain type column.
`void` | `setFilterableColumn(java.lang.String lookupAttributeName, boolean filterable)` Define if a column is filterable in the lookup grid frame.
`void` | `setForm(Form form)` Method called by CodLookupControl to set the Form container panel.
`void` | `setFormattedTextColumn(java.lang.String lookupAttributeName, javax.swing.JFormattedTextField.AbstractFormatter formatter)` Set the formatter to a formatted text type column column.
`void` | `setFramePreferedSize(java.awt.Dimension framePreferredSize)` Set the preferred size of the lookup frame.
`void` | `setFrameTitle(java.lang.String frameTitle)` Set lookup frame title.
`void` | `setGridCopyButton(boolean gridCopyButton)` Define if a copy button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define insertRecords method.
`void` | `setGridDeleteButton(boolean gridDeleteButton)` Define if a delete button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define deleteRecords method.
`void` | `setGridEditButton(boolean gridEditButton)` Define if an edit button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define updateRecords method.
`void` | `setGridExportButton(boolean gridExportButton)` Define if an export button has to be added on top of the lookup grid.
`void` | `setGridFilterButton(boolean gridFilterButton)` Define if a filter button has to be added on top of the lookup grid.
`void` | `setGridInsertButton(boolean gridInsertButton)` Define if an insert button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define insertRecords method.
`void` | `setGroupingEnabledColumn(java.lang.String lookupAttributeName, boolean groupEnabled)` Set grouping setting in a numeric column.
`void` | `setHeaderColumnName(java.lang.String lookupAttributeName, java.lang.String name)` Set a column header in the lookup grid frame.
`void` | `setLookupDataLocator(LookupDataLocator lookupDataLocator)` Set lookup data locator.
`void` | `setLookupGridController(LookupGridController lookupGridController)` Set grid controller used with lookup grid or tree+grid frame.
`void` | `setLookupValueObjectClassName(java.lang.String lookupValueObjectClassName)` Set value object class name associated to the lookup: this method calls initLookupVO method.
`void` | `setMaxSortedColumns(int maxSortedColumns)` Set maximum number of sorted columns.
`void` | `setOnInvalidCode(int onInvalidCode)` Define what to do in case of invalid code on validation task: clear code on input field or restore last invalid code in the input field or restore focus in the input field
`void` | `setPreferredWidthColumn(java.lang.String lookupAttributeName, int preferredWidth)` Set column width in the lookup grid frame.
`void` | `setSelectableColumn(java.lang.String lookupAttributeName, boolean selectable)` Set selectable column in the lookup grid frame.
`void` | `setShowCustomErrorMessage(boolean showCustomErrorMessage)` Define if, in case of a validation task which returns an ErrorResponse, the error message must be showed instead of the standard behavior: do nothing and log error.
`void` | `setShowNavigatorBar(boolean showNavigatorBar)` Define if the navigator bar must be showed on top of the lookup grid frame.
`void` | `setSortableColumn(java.lang.String lookupAttributeName, boolean sortable)` Define if a column is sortable in the lookup grid frame.
`void` | `setSortedColumn(java.lang.String lookupAttributeName, java.lang.String sortVersus)` Define if a column is sorted when the lookup grid frame is opened.
`void` | `setSortedColumn(java.lang.String lookupAttributeName, java.lang.String sortVersus, int sortingOrder)` Define if a column is sorted when the lookup grid frame is opened.
`void` | `setVisibleColumn(java.lang.String lookupAttributeName, boolean visible)` Set column visibility in the lookup grid frame.
`void` | `setVisibleStatusPanel(boolean visibleStatusPanel)` Set status panel visibility.
`void` | `validateCode(javax.swing.JComponent parentComponent, java.lang.String code, LookupParent lookupParent)` Execute the code validation.

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

Field Detail

### GRID_FRAME

    public static final int GRID_FRAME

  constant used in "codeSelectionWindow" property to view a grid frame when pressing the lookup button

  See Also:
    Constant Field Values

### TREE_FRAME

    public static final int TREE_FRAME

  constant used in "codeSelectionWindow" property to view a tree frame when pressing the lookup button

  See Also:
    Constant Field Values

### TREE_GRID_FRAME

    public static final int TREE_GRID_FRAME

  constant used in "codeSelectionWindow" property to view a tree+grid frame when pressing the lookup button

  See Also:
    Constant Field Values

### GRID_AND_FILTER_FRAME

    public static final int GRID_AND_FILTER_FRAME

  constant used in "codeSelectionWindow" property to view a frame that contains a grid and a filter panel when pressing the lookup button

  See Also:
    Constant Field Values

### TREE_GRID_AND_FILTER_FRAME

    public static final int TREE_GRID_AND_FILTER_FRAME

  constant used in "codeSelectionWindow" property to view a frame that contains a tree+grid and a filter panel when pressing the lookup button

  See Also:
    Constant Field Values

### GRID_AND_PANEL_FRAME

    public static final int GRID_AND_PANEL_FRAME

  constant used in "codeSelectionWindow" property to view a frame that contains a grid and a custom panel when pressing the lookup button

  See Also:
    Constant Field Values

### TREE_GRID_AND_PANEL_FRAME

    public static final int TREE_GRID_AND_PANEL_FRAME

  constant used in "codeSelectionWindow" property to view a frame that contains a tree+grid and a custom panel when pressing the lookup button

  See Also:
    Constant Field Values

### ON_INVALID_CODE_CLEAR_CODE

    public static final int ON_INVALID_CODE_CLEAR_CODE

  constant used in "onInvalidCode" property to clear code on validation task that returns an invalid code

  See Also:
    Constant Field Values

### ON_INVALID_CODE_RESTORE_LAST_VALID_CODE

    public static final int ON_INVALID_CODE_RESTORE_LAST_VALID_CODE

  constant used in "onInvalidCode" property to restore the last valid code (on "" if there no exists any valid code in the past) on validation task that returns an invalid code

  See Also:
    Constant Field Values

### ON_INVALID_CODE_RESTORE_FOCUS

    public static final int ON_INVALID_CODE_RESTORE_FOCUS

  constant used in "onInvalidCode" property to do nothing except restore focus inside the code input field on validation task that returns an invalid code

  See Also:
    Constant Field Values

### autoFitColumns

    public boolean autoFitColumns

  flag used to auto fit column sizes, according to text headers; default value: `ClientSettings.AUTO_FIT_COLUMNS`

Constructor Detail

### LookupController

    public LookupController()

Method Detail

### validateCode

    public final void validateCode(javax.swing.JComponent parentComponent,
                                   java.lang.String code,
                                   LookupParent lookupParent)
                            throws RestoreFocusOnInvalidCodeException

  Execute the code validation.

  Parameters:
    `parentComponent` - component which contains the code input field
    `code` - code to validate
  Returns:
    `true` if code is correcly validated, `false` otherwise
  Throws:
    `RestoreFocusOnInvalidCodeException`

### openLookupFrame

    public final void openLookupFrame(javax.swing.JComponent source,
                                      LookupParent lookupParent)

  Method called by CodLookupControl when clicking on lookup button: it opens lookup frame (grid/tree/grid+tree frame).

### openLookupFrame

    public final void openLookupFrame(javax.swing.JFrame parentFrame,
                                      LookupParent lookupParent)

  Method called by a grid column cell editor when user click on lookup button: it opens lookup frame (grid/tree/grid+tree frame).

  Parameters:
    `parentFrame` - parent frame
    `lookupParent` - lookup container

### doubleClick

    public final void doubleClick(int rowNumber,
                                  LookupParent lookupParent)

  This method is automatically invoked by LookupGridController.doubleClick() method.

### setVisibleColumn

    public final void setVisibleColumn(java.lang.String lookupAttributeName,
                                       boolean visible)

  Set column visibility in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the grid column
    `visible` - column visibility state

### setSelectableColumn

    public final void setSelectableColumn(java.lang.String lookupAttributeName,
                                          boolean selectable)

  Set selectable column in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the grid column

### setPreferredWidthColumn

    public final void setPreferredWidthColumn(java.lang.String lookupAttributeName,
                                              int preferredWidth)

  Set column width in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the grid column
    `preferredWidth` - column width

### getFrameTitle

    public final java.lang.String getFrameTitle()

  Returns:
    lookup frame title

### setFrameTitle

    public final void setFrameTitle(java.lang.String frameTitle)

  Set lookup frame title.

  Parameters:
    `frameTitle` - lookup frame title

### addLookupListener

    public final void addLookupListener(LookupListener listener)

  Add a lookup listener.

  Parameters:
    `listener` - lookup listener.

### getLookupListeners

    public final LookupListener[] getLookupListeners()

  Returns:
    lookup listeners

### removeLookupListener

    public final void removeLookupListener(LookupListener listener)

  Remove a lookup listener.

  Parameters:
    `listener` - lookup listener

### isAllColumnVisible

    public final boolean isAllColumnVisible()

  Returns:
    columns visibility

### setAllColumnVisible

    public final void setAllColumnVisible(boolean visible)

  Set column visibility for the whole columns of the lookup grid frame.

  Parameters:
    `visible` - columns visibility

### getAllColumnPreferredWidth

    public final int getAllColumnPreferredWidth()

  Returns:
    columns width

### setAllColumnPreferredWidth

    public final void setAllColumnPreferredWidth(int preferredWidth)

  Set columns width for the whole columns of the lookup grid frame.

  Parameters:
    `preferredWidth` - columns width

### getFramePreferedSize

    public final java.awt.Dimension getFramePreferedSize()

  Returns:
    preferred size of the lookup frame

### setFramePreferedSize

    public final void setFramePreferedSize(java.awt.Dimension framePreferredSize)

  Set the preferred size of the lookup frame.

  Parameters:
    `framePreferredSize` - preferred size of the lookup frame

### forceValidate

    public final void forceValidate()

  Force the code validation: it calles fireForceValidateEvent method.

### setForm

    public final void setForm(Form form)

  Method called by CodLookupControl to set the Form container panel.

  Parameters:
    `form` - Form container panel

### getForm

    public final Form getForm()

  Returns:
    Form container panel

### setHeaderColumnName

    public final void setHeaderColumnName(java.lang.String lookupAttributeName,
                                          java.lang.String name)

  Set a column header in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `name` - column header name

### setGroupingEnabledColumn

    public final void setGroupingEnabledColumn(java.lang.String lookupAttributeName,
                                               boolean groupEnabled)

  Set grouping setting in a numeric column.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `groupEnabled` - flag used to grouping in a numeric column

### setDomainColumn

    public final void setDomainColumn(java.lang.String lookupAttributeName,
                                      java.lang.String domainId)

  Set domain identifier in a domain type column.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `domainId` - domain identifier

### setFormattedTextColumn

    public final void setFormattedTextColumn(java.lang.String lookupAttributeName,
                                             javax.swing.JFormattedTextField.AbstractFormatter formatter)

  Set the formatter to a formatted text type column column.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `formatter` - formatter to use for this column

### setSortableColumn

    public final void setSortableColumn(java.lang.String lookupAttributeName,
                                        boolean sortable)

  Define if a column is sortable in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `sortable` - `true` if the column is sortable, `false` otherwise

### setFilterableColumn

    public final void setFilterableColumn(java.lang.String lookupAttributeName,
                                          boolean filterable)

  Define if a column is filterable in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `filterable` - `true` if the column is filterable, `false` otherwise

### setSortedColumn

    public final void setSortedColumn(java.lang.String lookupAttributeName,
                                      java.lang.String sortVersus)

  Define if a column is sorted when the lookup grid frame is opened. Current column will be sorted as the last one: in order to specify the sorting order for current column, use `setSortedColumn(String lookupAttributeName,String sortVersus,int sortingOrder)` method.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `sortVersus` - ascending/descending ordering versus; possible values: Consts.ASC_SORTED or Consts.DESC_SORTED

### setSortedColumn

    public final void setSortedColumn(java.lang.String lookupAttributeName,
                                      java.lang.String sortVersus,
                                      int sortingOrder)

  Define if a column is sorted when the lookup grid frame is opened.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `sortVersus` - ascending/descending ordering versus; possible values: Consts.ASC_SORTED or Consts.DESC_SORTED
    `sortingOrder` - sorting order (e.g. 0, 1, 2, ...)

### setColumnTextAlignment

    public final void setColumnTextAlignment(java.lang.String lookupAttributeName,
                                             int alignement)

  Define column alignement in the lookup grid frame.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column

### setColumnEditableOnInsert

    public final void setColumnEditableOnInsert(java.lang.String lookupAttributeName,
                                                boolean editable)

  Define if a column is editable in insert mode.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `editable` - `true` if the column is editable in insert mode, `false` otherwise

### setColumnEditableOnEdit

    public final void setColumnEditableOnEdit(java.lang.String lookupAttributeName,
                                              boolean editable)

  Define if a column is editable in edit mode.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `editable` - `true` if the column is editable in edit mode, `false` otherwise

### setColumnRequired

    public final void setColumnRequired(java.lang.String lookupAttributeName,
                                        boolean required)

  Define if an editable column is required in insert/edit mode.

  Parameters:
    `lookupAttributeName` - attribute name that identifies the column
    `required` - `true` if the editable column is required, `false` otherwise

### setMaxSortedColumns

    public final void setMaxSortedColumns(int maxSortedColumns)

  Set maximum number of sorted columns.

  Parameters:
    `maxSortedColumns` - maximum number of sorted columns

### getMaxSortedColumns

    public final int getMaxSortedColumns()

  Returns:
    maximum number of sorted columns

### addLookup2ParentLink

    public final void addLookup2ParentLink(java.lang.String lookupAttributeName,
                                           java.lang.String parentAttributeName)

  Add a link from an attribute of the lookup v.o. to an attribute of the lookup container v.o.

  Parameters:
    `lookupAttributeName` - attribute of the lookup v.o.
    `parentAttributeName` - attribute of the lookup container v.o.

### addLookup2ParentLink

    public final void addLookup2ParentLink(java.lang.String parentAttributeName)

  Add a link from the whole lookup value object to an equivalent inner v.o. included in the container v.o.

  Parameters:
    `parentAttributeName` - attribute of the lookup container v.o., related to an inner v.o. having the same type of the lookup v.o.

### getLookupAttributeName

    public final java.lang.String getLookupAttributeName(java.lang.String parentAttributeName)

  Method invoked by LookupAutoCompletitionDataLocator class, in order to retrieve the attribute in lookup value object mapped to the attribute of grid/form container.

  Parameters:
    `parentAttributeName` - parent attribute name included in mapping
  Returns:
    attribute name in lookup mapped to the specified parent attribute name

### getLookupDataLocator

    public final LookupDataLocator getLookupDataLocator()

  Returns:
    lookup data locator

### setLookupDataLocator

    public final void setLookupDataLocator(LookupDataLocator lookupDataLocator)

  Set lookup data locator.

  Parameters:
    `lookupDataLocator` - lookup data locator

### setLookupValueObjectClassName

    public final void setLookupValueObjectClassName(java.lang.String lookupValueObjectClassName)

  Set value object class name associated to the lookup: this method calls initLookupVO method.

### getLookupValueObjectClassName

    public final java.lang.String getLookupValueObjectClassName()

  Returns:
    value object class name associated to the lookup

### getCodeSelectionWindow

    public final int getCodeSelectionWindow()

  Returns:
    this flag is used to set the code selection window; three values are allowed: GRID_FRAME, TREE_FRAME and TREE_GRID_FRAME

### setCodeSelectionWindow

    public final void setCodeSelectionWindow(int codeSelectionWindow)

  Set the code selection window.

  Parameters:
    `codeSelectionWindow` - three values are allowed: GRID_FRAME, TREE_FRAME and TREE_GRID_FRAME

### isAllowTreeLeafSelectionOnly

    public final boolean isAllowTreeLeafSelectionOnly()

### setAllowTreeLeafSelectionOnly

    public final void setAllowTreeLeafSelectionOnly(boolean allowTreeLeafSelectionOnly)

  This is used when codeSelectionWindow is set to TREE_FRAME: it means that user can select only leaves (by double clicking)

  Parameters:
    `allowTreeLeafSelectionOnly` - user can select only leaves (by double clicking)

### getLookupVO

    public final ValueObject getLookupVO()

  Returns:
    lookup value object

### getOnInvalidCode

    public final int getOnInvalidCode()

  Returns:
    define what to do in case of invalid code on validation task; possible values: ON_INVALID_CODE_xxx; default value: ClientSettings.ON_INVALID_CODE

### setOnInvalidCode

    public final void setOnInvalidCode(int onInvalidCode)

  Define what to do in case of invalid code on validation task: clear code on input field or restore last invalid code in the input field or restore focus in the input field

  Parameters:
    `onInvalidCode` - define what to do in case of invalid code on validation task; possible values: ON_INVALID_CODE_xxx

### isCodeValid

    public final boolean isCodeValid()

  Returns:
    used by Form.save to check if lookup control is in a valid state

### isAnchorLastColumn

    public boolean isAnchorLastColumn()

  Returns:
    define if the last column must be to anchored on the right margin of the grid, only when all columns width is lesser than grid width

### setAnchorLastColumn

    public void setAnchorLastColumn(boolean anchorLastColumn)

  Define if the last column must be anchored on the right margin of the grid, only when all columns width is lesser than grid width. Default value: `false`

  Parameters:
    `anchorLastColumn` - flag used to anchor the last column on the right margin of the grid, only when all columns width is lesser than grid width

### getCustomPanel

    public final CustomFilterPanel getCustomPanel()

  Returns:
    custom filter panel to show on top of the lookup grid

### setCustomPanel

    public final void setCustomPanel(CustomFilterPanel customPanel)

  Set the return custom filter panel to show on top of the lookup grid; this panel is showed only if "codeSelectionWindow" property is set to "xxx_AND_PANEL_FRAME"

  Parameters:
    `customPanel` - return custom filter panel to show on top of the lookup grid

### getLookupGridController

    public final LookupGridController getLookupGridController()

  Returns:
    grid controller used with lookup grid or tree+grid frame

### setLookupGridController

    public final void setLookupGridController(LookupGridController lookupGridController)

  Set grid controller used with lookup grid or tree+grid frame.

  Parameters:
    `lookupGridController` - grid controller used with lookup grid or tree+grid frame

### isGridCopyButton

    public final boolean isGridCopyButton()

  Returns:
    define if a copy button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define insertRecords method

### isGridDeleteButton

    public final boolean isGridDeleteButton()

  Returns:
    define if a delete button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define deleteRecords method

### isGridEditButton

    public final boolean isGridEditButton()

  Returns:
    define if an edit button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define updateRecords method

### isGridExportButton

    public final boolean isGridExportButton()

  Returns:
    define if an export button has to be added on top of the lookup grid

### isGridFilterButton

    public final boolean isGridFilterButton()

  Returns:
    define if a filter button has to be added on top of the lookup grid

### isGridInsertButton

    public final boolean isGridInsertButton()

  Returns:
    define if an insert button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define insertRecords method

### setGridInsertButton

    public final void setGridInsertButton(boolean gridInsertButton)

  Define if an insert button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define insertRecords method.

  Parameters:
    `gridInsertButton` - define if an insert button has to be added on top of the lookup grid

### setGridFilterButton

    public final void setGridFilterButton(boolean gridFilterButton)

  Define if a filter button has to be added on top of the lookup grid.

  Parameters:
    `gridFilterButton` - define if a filter button has to be added on top of the lookup grid

### setGridExportButton

    public final void setGridExportButton(boolean gridExportButton)

  Define if an export button has to be added on top of the lookup grid.

  Parameters:
    `gridExportButton` - define if an export button has to be added on top of the lookup grid

### setGridEditButton

    public final void setGridEditButton(boolean gridEditButton)

  Define if an edit button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define updateRecords method.

  Parameters:
    `gridEditButton` - define if an edit button has to be added on top of the lookup grid

### setGridDeleteButton

    public final void setGridDeleteButton(boolean gridDeleteButton)

  Define if a delete button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define deleteRecords method.

  Parameters:
    `gridDeleteButton` - define if a delete button has to be added on top of the lookup grid

### setGridCopyButton

    public final void setGridCopyButton(boolean gridCopyButton)

  Define if a copy button has to be added on top of the lookup grid; if set to `true`, then the GridLookupController instance must define insertRecords method.

  Parameters:
    `gridCopyButton` - define if a copy button has to be added on top of the lookup grid

### addComboFilter

    public final void addComboFilter(java.lang.String attributeName,
                                     ListFilterController filter)

  Remove a combo-box filter for the specified column.

  Parameters:
    `attributeName` - attribute name that identifies the column having a filter to remove

### removeComboFilter

    public final void removeComboFilter(java.lang.String attributeName)

  Remove a combo-box filter for the specified column.

  Parameters:
    `attributeName` - attribute name that identifies the column having a filter to remove

### isAllColumnsSelectable

    public final java.lang.Boolean isAllColumnsSelectable()

  Returns:
    define the selectable property on all columns of lookup grid

### setAllColumnsSelectable

    public final void setAllColumnsSelectable(java.lang.Boolean allColumnsSelectable)

  Set the selectable property on all columns of lookup grid.

### isAutoFitColumns

    public final boolean isAutoFitColumns()

  Returns:
    flag used to auto fit column sizes, according to text headers

### setAutoFitColumns

    public final void setAutoFitColumns(boolean autoFitColumns)

  Set auto fit column sizes, according to text headers. Default value: `ClientSettings.AUTO_FIT_COLUMNS`

  Parameters:
    `autoFitColumns` - used to auto fit column sizes, according to text headers

### setShowNavigatorBar

    public final void setShowNavigatorBar(boolean showNavigatorBar)

  Define if the navigator bar must be showed on top of the lookup grid frame.

  Parameters:
    `showNavigatorBar` - `true` to show the navigator bar on top of the grid lookup frame

### isShowNavigatorBar

    public final boolean isShowNavigatorBar()

  Returns:
    define if the navigator bar must be showed on top of the lookup grid frame; default value: `false`

### isDisableFrameClosing

    public final boolean isDisableFrameClosing()

  Returns:
    `false`, i.e. frame will be closed when selecting a code

### setDisableFrameClosing

    public final void setDisableFrameClosing(boolean disableFrameClosing)

  Define if lookup grid frame must not be closed when selecting codes on it. Default value: `false`, i.e. frame will be closed when selecting a code. If this property is set to `true` then the lookup frame is not automatically closed

  Parameters:
    `disableFrameClosing` - define if lookup grid frame must not be closed when selecting codes on it

### setVisibleStatusPanel

    public final void setVisibleStatusPanel(boolean visibleStatusPanel)

  Set status panel visibility.

  Parameters:
    `visibleStatusPanel` - `true` to show the status panel, `false` to hide the status panel

### isVisibleStatusPanel

    public final boolean isVisibleStatusPanel()

  Returns:
    status panel visibility

### isShowCustomErrorMessage

    public final boolean isShowCustomErrorMessage()

  Returns:
    define if, in case of a validation task which returns an ErrorResponse, the error message must be showed instead of the standard behavior: do nothing and log error

### setShowCustomErrorMessage

    public final void setShowCustomErrorMessage(boolean showCustomErrorMessage)

  Define if, in case of a validation task which returns an ErrorResponse, the error message must be showed instead of the standard behavior: do nothing and log error. Default value: `false`, i.e. do not show a custom error message

  Parameters:
    `showCustomErrorMessage` - `true` to show the error message in case of validation task which returns an ErrorResponse

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

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