org.openswing.swing.lookup.client
Class LookupGridController

java.lang.Object
  extended byorg.openswing.swing.table.client.GridController
      extended byorg.openswing.swing.lookup.client.LookupGridController

public class LookupGridController
extends GridController

Title: OpenSwing Framework

Description: Lookup grid controller. This class is used within LookupController to listen for events fired by lookup grid frame, such as double click events and ENTER key pressing.

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
LookupGridController()
           
 
Method Summary
 void doubleClick(int rowNumber, ValueObject valueObject)
          This method cannot be overrided: it forwards the event to "doubleClick" method of LookupController class.
 void enterButton(int rowNumber, ValueObject valueObject)
          This method cannot be overrided: it forwards the event to "doubleClick" method.
 void init(LookupController lookupController, LookupParent lookupParent, VOListTableModel model, Grids grid)
          Method called by lookup controller when user clicks on the lookup button.
 boolean isCellEditable(GridControl gridcontrol, int row, java.lang.String attributeName)
           
 
Methods inherited from class org.openswing.swing.table.client.GridController
afterDeleteGrid, afterEditGrid, afterInsertGrid, afterReloadGrid, beforeCopyGrid, beforeDeleteGrid, beforeEditGrid, beforeFilterGrid, beforeInsertGrid, beforeRetrieveAdditionalRows, createValueObject, deleteRecords, dragDropEnd, dragEnabled, dragEnter, dragExit, dragOver, dropActionChanged, dropEnabled, dropEnter, dropExit, dropOver, exportGrid, getBackgroundColor, getCellTooltip, getDeltaColor, getDeltaRow, getExportDialogSize, getExportingFormats, getFont, getForegroundColor, getHeaderTooltip, getInitialQuickFilterValue, insertRecords, loadDataCompleted, modeChanged, rowChanged, selectedCell, setDeltaColor, setDeltaRow, updateRecords, validateCell
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupGridController

public LookupGridController()
Method Detail

init

public final void init(LookupController lookupController,
                       LookupParent lookupParent,
                       VOListTableModel model,
                       Grids grid)
Method called by lookup controller when user clicks on the lookup button.

Parameters:
lookupController - lookup controller
lookupParent - lookup container (whose value object will be updated when grid row has been selected)
model - lookup grid model
grid - inner grid component

enterButton

public final void enterButton(int rowNumber,
                              ValueObject valueObject)
This method cannot be overrided: it forwards the event to "doubleClick" method.

Overrides:
enterButton in class GridController
Parameters:
rowNumber - selected row index
valueObject - v.o. related to the selected row

doubleClick

public final void doubleClick(int rowNumber,
                              ValueObject valueObject)
This method cannot be overrided: it forwards the event to "doubleClick" method of LookupController class.

Overrides:
doubleClick in class GridController
Parameters:
rowNumber - selected row index
valueObject - v.o. related to the selected row

isCellEditable

public final boolean isCellEditable(GridControl gridcontrol,
                                    int row,
                                    java.lang.String attributeName)
Overrides:
isCellEditable in class GridController
Parameters:
gridcontrol - it is always null: do not use it!
row - selected row index
attributeName - attribute name that identifies the selected grid column
Returns:
true if the selected cell is editable, false otherwise