org.openswing.swing.client
Class GridControl

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byorg.openswing.swing.client.GridControl
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
CustomGridControl

public class GridControl
extends javax.swing.JPanel

Title: OpenSwing Framework

Description: Grid based on VOListTableModel.

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

See Also:
Serialized Form

Nested Class Summary
 class GridControl.ColumnContainer
          Title: OpenSwing Framework Description: Inner class used inside GridControl to add column to the columns container.
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Field Summary
 boolean searchAdditionalRows
          flag used in grid to enable the retrieval of additional rows in fast search, when search criteria fails; default value: ClientSettings.SEARCH_ADDITION_ROWS
 boolean showPageNumber
          flag used to show current page number in grid; default value: ClientSettings.SHOW_PAGE_NUMBER_IN_GRID
 
Fields inherited from class javax.swing.JComponent
TOOL_TIP_TEXT_KEY, 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
GridControl()
          Costructor.
 
Method Summary
 java.awt.Component add(java.awt.Component comp)
          Method invoked by UI designers (e.g.
 void add(java.awt.Component comp, java.lang.Object constraint)
          Method invoked by UI designers (e.g.
 void addButtonsNotEnabled(java.util.HashSet buttons, GenericButtonController buttonController)
          Define GenericButton objects linked to this that will be disabled (independently from the grid mode) when the specified attribute will be set to the specified value.
 void addGenericButton(GenericButton button)
          Add an optional button.
 void addListFilter(java.lang.String attributeName, ListFilterController filter)
          Add a list-filter for the specified column, showed in the quick filter panel.
 void addLoadDataCompletedListener(java.awt.event.ActionListener listener)
          Add a "load data completed" listener.
 void addNotify()
          Method called when the this panel is set to visible: it calls commitColumnContainer method.
 void addPopupCommand(javax.swing.JMenuItem command)
          Add a menu item to the popup menu accessed through the right mouse click onto the grid.
 void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled)
          Add a menu item to the popup menu accessed through the right mouse click onto the grid.
 void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled, javax.swing.Icon icon)
          Add a menu item to the popup menu accessed through the right mouse click onto the grid.
 void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled, int mnemonic)
          Add a menu item to the popup menu accessed through the right mouse click onto the grid.
 void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled, int mnemonic, javax.swing.KeyStroke accelerator)
          Add a menu item to the popup menu accessed through the right mouse click onto the grid.
 void addSortedColumn(java.lang.String attributeName, java.lang.String sortingVersus, boolean reloadGrid)
          Add the specified sorting condition to the column identified by the attribute name (as last sorting condition).
 void cleanUp(int row)
          Clean up cells content for the specified row.
 void cleanUp(int row, boolean cleanUpAlsoNotEditableCells)
          Clean up cells content for the specified row, for each field or editable only cells.
 void clearData()
          Clear grid content.
 void commitColumnContainer()
          This method is called by addNotify method when this panel is set to visible: it will create the grid and add it to this panel.
 void editCellAt(int row, java.lang.String attributeName)
          Set editing to the specified cell.
 void enableDrag(java.lang.String gridId)
          Enable drag onto the grid.
 void finalize()
           
 GridController getBottomGridController()
           
 GridDataLocator getBottomGridDataLocator()
           
 Grids getBottomTable()
           
 GridControl.ColumnContainer getColumnContainer()
           
 GridController getController()
           
 CopyButton getCopyButton()
           
 java.util.ArrayList getCurrentSortedColumns()
           
 java.util.ArrayList getCurrentSortedVersusColumns()
           
 GridExportOptions getDefaultGridExportOptions()
           
 GridExportOptions getDefaultGridExportOptions(java.util.HashSet attributesToExport)
           
 int getDefaultQuickFilterCriteria()
           
 DeleteButton getDeleteButton()
           
 EditButton getEditButton()
           
 int getExpandableColumn()
           
 ExpandableRowController getExpandableRowController()
           
 ExportButton getExportButton()
           
 FilterButton getFilterButton()
           
 int getFilterPanelOnGridPolicy()
           
 java.lang.String getFunctionId()
           
 GridDataLocator getGridDataLocator()
           
 int getHeaderHeight()
           
 ImportButton getImportButton()
           
 InsertButton getInsertButton()
           
 java.awt.Dimension getIntercellSpacing()
           
 java.awt.LayoutManager getLayout()
           
 int getLockedColumns()
           
 int getLockedRowsOnBottom()
           
 int getLockedRowsOnTop()
           
 int getMaxNumberOfRowsOnInsert()
           
 int getMaxSortedColumns()
          Set maximum number of sorted columns.
 int getMode()
           
 NavigatorBar getNavBar()
           
 java.util.Map getOtherGridParams()
           
 org.openswing.swing.table.profiles.java.GridProfile getProfile()
           
 java.util.Map getQuickFilterValues()
           
 ReloadButton getReloadButton()
           
 int getRowHeight()
           
 int getRowMargin()
           
 SaveButton getSaveButton()
           
 int getSelectedColumn()
          Returns the index of the first selected column, -1 if no column is selected.
 int getSelectedRow()
          Returns the index of the first selected row, -1 if no row is selected.
 int[] getSelectedRows()
          Returns the indices of all selected rows.
 int getSelectionMode()
           
 int getStatusPanelHeight()
           
 Grids getTable()
           
 GridController getTopGridController()
           
 GridDataLocator getTopGridDataLocator()
           
 Grids getTopTable()
           
 java.lang.String getValueObjectClassName()
           
 VOListTableModel getVOListTableModel()
           
 boolean isAllowColumnsSortingInEdit()
           
 boolean isAllowInsertInEdit()
           
 boolean isAnchorLastColumn()
           
 boolean isAnchorLockedColumnsToLeft()
           
 boolean isAutoLoadData()
           
 boolean isButtonDisabled(GenericButton button)
          Method called by GenericButton.setEnabled method to check if the button must be disabled.
 boolean isColorsInReadOnlyMode()
           
 boolean isCreateInnerVO()
           
 boolean isEditOnSingleRow()
           
 boolean isFieldEditable(int rowNumber, java.lang.String attributeName)
           
 boolean isInsertRowsOnTop()
           
 boolean isOrderWithLoadData()
           
 boolean isOverwriteRowWhenExpanding()
           
 boolean isReorderingAllowed()
           
 boolean isResizingAllowed()
           
 boolean isRowHeightFixed()
           
 boolean isSearchAdditionalRows()
           
 boolean isShowFilterPanelOnGrid()
           
 boolean isShowPageNumber()
           
 boolean isShowWarnMessageBeforeReloading()
           
 boolean isSingleExpandableRow()
           
 boolean isVisibleStatusPanel()
           
 boolean mergeCells(int[] rows, int[] columns)
          Set the cell span for the specified range of cells.
 boolean mergeCellsOnBottom(int[] rows, int[] columns)
          Set the cell span for the specified range of cells in the locked rows at the bottom of the table.
 boolean mergeCellsOnTop(int[] rows, int[] columns)
          Set the cell span for the specified range of cells in the locked rows on the top of the table.
 void paint(java.awt.Graphics g)
           
 void reloadCurrentBlockOfData()
          Sets READONLY mode and reloads current block of data.
 void reloadData()
          Sets READONLY mode and reloads the first block of data.
 void removeComboFilter(java.lang.String attributeName)
          Remove a list-filter for the specified column.
 void removeGenericButton(GenericButton button)
          Remove an optional button.
 void removeLoadDataCompletedListener(java.awt.event.ActionListener listener)
          Remove a "load data completed" listener.
 void removeSortedColumn(java.lang.String attributeName, boolean reloadGrid)
          Remove the sorting condition currently applied to the specified column.
 void renamePopupCommand(java.lang.String oldCommand, java.lang.String newCommand)
          Rename a menu item added to the popup menu and accessed through the right mouse click onto the grid.
 void requestFocus()
           
 void resetButtonsState()
          Method automatically called by the Grid to check buttons disabilitation.
 boolean save()
          Save data and sets grid in READONLY mode (if saving task was successfully completed).
 void setAllowColumnsSortingInEdit(boolean allowColumnsSortingInEdit)
          Define whether columns sorting is enabled also in edit mode.
 void setAllowInsertInEdit(boolean allowInsertInEdit)
          Allow insert row (using DOWN key) in edit mode too; default value: false
 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 setAnchorLockedColumnsToLeft(boolean anchorLockedColumnsToLeft)
          Define where to anchor locked columns: to the left or to the right of the grid.
 void setAutoLoadData(boolean autoLoadData)
          Define if grid must be automatically loaded when it is showed.
 void setBottomGridController(GridController bottomGridController)
          Set the bottom grid controller.
 void setBottomGridDataLocator(GridDataLocator bottomGridDataLocator)
          Set the bottomgrid data locator.
 void setColorsInReadOnlyMode(boolean colorsInReadOnlyMode)
          Define if background and foreground colors must be setted according to GridController definition only in READONLY mode.
 void setController(GridController controller)
          Set grid container.
 void setCopyButton(CopyButton copyButton)
          Set the copy button.
 void setCreateInnerVO(boolean createInnerVO)
          Define if an inner v.o. must be automatically instantiated when a setter method is invoked.
 void setDefaultQuickFilterCriteria(int defaultQuickFilterCriteria)
          Set default value that could be set in the quick filter criteria; values allowed: Consts.EQUALS,Consts.CONTAINS,Consts.STARTS_WITH,Consts.ENDS_WITH.
 void setDeleteButton(DeleteButton deleteButton)
          Set the delete button.
 void setEditButton(EditButton editButton)
          Set the edit button.
 void setEditOnSingleRow(boolean editOnSingleRow)
          Define if cell editing is allows on one row only or on all rows: false all rows are editable, true edit is allowed only on current selected row
 void setEnablePopupCommand(java.lang.String command, boolean enabled)
          Enable/disable a menu item added to the popup menu and accessed through the right mouse click onto the grid.
 void setExpandableColumn(int expandableColumn)
          Define which column index declared as expandable, i.e. user can click on it to expand cell to show an inner component.
 void setExpandableRowController(ExpandableRowController expandableRowController)
          Define the controller that manages row expansion.
 void setExportButton(ExportButton exportButton)
          Set the export button.
 void setFilterButton(FilterButton filterButton)
          Set the filter button.
 void setFilterPanelOnGridPolicy(int filterPanelOnGridPolicy)
          Define filter panel policy for hiding it; allowed values: Consts.FILTER_PANEL_ON_GRID_xxx; default value: ClientSettings.FILTER_PANEL_ON_GRID_POLICY
 void setFunctionId(java.lang.String functionId)
          Set the functionId identifier, associated to the container
 void setGridDataLocator(GridDataLocator gridDataLocator)
          Set the grid data locator.
 void setHeaderHeight(int headerHeight)
          Set the header height.
 void setImportButton(ImportButton importButton)
          Set the import button.
 void setInsertButton(InsertButton insertButton)
          Set the insert button.
 void setInsertRowsOnTop(boolean insertRowsOnTop)
          Define where new rows must be added: true at the top of the grid or false at the bottom; default value: true
 void setIntercellSpacing(java.awt.Dimension spacing)
          Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.
 void setLockedColumns(int lockedColumns)
          Set the number of locked columns, i.e. columns anchored to the left side of the grid.
 void setLockedRowsOnBottom(int lockedRowsOnBottom)
          Set the number of rows locked (anchored) on the top of the grid.
 void setLockedRowsOnTop(int lockedRowsOnTop)
          Set the number of rows locked (anchored) on the bottom of the grid.
 void setMaxNumberOfRowsOnInsert(int maxNumberOfRowsOnInsert)
          Set the maximum number of rows to insert by pressing "down" key; default value: 1.
 void setMaxSortedColumns(int maxSortedColumns)
          Set maximum number of sorted columns.
 void setMode(int mode)
          Set grid mode.
 void setNavBar(NavigatorBar navBar)
          Set navigation bar.
 void setOrderPolicy(OrderPolicy orderPolicy)
          Used to define the sorting algorithm to use to sort columns.
 void setOrderWithLoadData(boolean orderWithLoadData)
          Used to define if grid sorting operation must always invoke loadData method to retrieve a new list of v.o. or the grid must sort the current v.o. list without invoking loadData (only with the whole result set loaded).
 void setOtherGridParams(java.util.Map otherGridParams)
          Set other grid parameters.
 void setOverwriteRowWhenExpanding(boolean overwriteRowWhenExpanding)
          Define whether the row to show, when expanding the current one, must be showed over the current one on in a new row below it; used only when "overwriteRowWhenExpanding" property is not null.
 void setReloadButton(ReloadButton reloadButton)
          Set reload/cancel button.
 void setReorderingAllowed(boolean reorderingAllowed)
          Define if column reordering is allowed.
 void setResizingAllowed(boolean resizingAllowed)
          Define if column resizing is allowed.
 void setRowHeight(int rowHeight)
          Set the row height of the grid control.
 void setRowHeightFixed(boolean rowHeightFixed)
           
 void setRowMargin(int rowMargin)
          Sets the amount of empty space between cells in adjacent rows.
 void setRowSelectionInterval(int startRow, int endRow)
          Set row selection interval.
 void setSaveButton(SaveButton saveButton)
          Set the save button.
 void setSearchAdditionalRows(boolean searchAdditionalRows)
          Define whether enabling the retrieval of additional rows in fast search, when search criteria fails.
 void setSelectionMode(int selectionMode)
          Set grid selection mode.
 void setShowFilterPanelOnGrid(boolean showFilterPanelOnGrid)
          Set a true value to automatically show a filter panel when moving mouse at right of the grid; false to do not show it
 void setShowPageNumber(boolean showPageNumber)
          Show/hide current page number in grid.
 void setShowWarnMessageBeforeReloading(boolean showWarnMessageBeforeReloading)
          Define if a warning message must be showed when reloading data in grid and grid is in EDIT/INSERT mode.
 void setSingleExpandableRow(boolean singleExpandableRow)
          Define whether expanded rows in the past must be collapsed when expanding the current one; used only when "expandableColumn" property is not null.
 void setTopGridController(GridController topGridController)
          Set the top grid controller.
 void setTopGridDataLocator(GridDataLocator topGridDataLocator)
          Set the top grid data locator.
 void setValueObjectClassName(java.lang.String valueObjectClassName)
          Set the value object class name.
 void setVisibleColumn(java.lang.String attributeName, boolean visible)
          Show/hide a column.
 void setVisibleStatusPanel(boolean visibleStatusPanel)
          Set status panel visibility.
 boolean stopCellEditing()
           
 void transferFocus()
          Remove cell editing, if needed.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

showPageNumber

public boolean showPageNumber
flag used to show current page number in grid; default value: ClientSettings.SHOW_PAGE_NUMBER_IN_GRID


searchAdditionalRows

public boolean searchAdditionalRows
flag used in grid to enable the retrieval of additional rows in fast search, when search criteria fails; default value: ClientSettings.SEARCH_ADDITION_ROWS

Constructor Detail

GridControl

public GridControl()
Costructor.

Method Detail

addNotify

public final void addNotify()
Method called when the this panel is set to visible: it calls commitColumnContainer method.


commitColumnContainer

public final void commitColumnContainer()
This method is called by addNotify method when this panel is set to visible: it will create the grid and add it to this panel. It must not be manually invoked!


getColumnContainer

public final GridControl.ColumnContainer getColumnContainer()
Returns:
column container

getValueObjectClassName

public final java.lang.String getValueObjectClassName()
Returns:
value object class name

setValueObjectClassName

public final void setValueObjectClassName(java.lang.String valueObjectClassName)
Set the value object class name.

Parameters:
valueObjectClassName - value object class name

isReorderingAllowed

public final boolean isReorderingAllowed()
Returns:
allows column reordering

setReorderingAllowed

public final void setReorderingAllowed(boolean reorderingAllowed)
Define if column reordering is allowed.

Parameters:
reorderingAllowed - allows column reordering

isResizingAllowed

public final boolean isResizingAllowed()
Returns:
allows column resizing

setResizingAllowed

public final void setResizingAllowed(boolean resizingAllowed)
Define if column resizing is allowed.

Parameters:
resizingAllowed - allows column resizing

getMode

public final int getMode()
Returns:
current grid mode

setMode

public final void setMode(int mode)
Set grid mode.

Parameters:
mode - grid mode; possibile values: READONLY, INSERT, EDIT

getController

public final GridController getController()
Returns:
grid container

setController

public final void setController(GridController controller)
Set grid container. This method is callable ONLY before the grid is set to visible.


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

getVOListTableModel

public final VOListTableModel getVOListTableModel()
Returns:
grid data model

getSelectionMode

public final int getSelectionMode()
Returns:
grid selection mode

setSelectionMode

public final void setSelectionMode(int selectionMode)
Set grid selection mode.

Parameters:
selectionMode - grid selection mode

getInsertButton

public final InsertButton getInsertButton()
Returns:
insert button

getExportButton

public final ExportButton getExportButton()
Returns:
export button

getImportButton

public final ImportButton getImportButton()
Returns:
import button

getFilterButton

public final FilterButton getFilterButton()
Returns:
filter button

getCopyButton

public final CopyButton getCopyButton()
Returns:
copy button

getEditButton

public final EditButton getEditButton()
Returns:
edit button

setEditButton

public final void setEditButton(EditButton editButton)
Set the edit button.

Parameters:
editButton - edit button

setInsertButton

public final void setInsertButton(InsertButton insertButton)
Set the insert button.

Parameters:
insertButton - insert button

setExportButton

public final void setExportButton(ExportButton exportButton)
Set the export button.

Parameters:
exportButton - export button

setImportButton

public final void setImportButton(ImportButton importButton)
Set the import button.

Parameters:
importButton - import button

setCopyButton

public final void setCopyButton(CopyButton copyButton)
Set the copy button.

Parameters:
copyButton - insert button

getReloadButton

public final ReloadButton getReloadButton()
Returns:
reload/cancel button

setReloadButton

public final void setReloadButton(ReloadButton reloadButton)
Set reload/cancel button.

Parameters:
reloadButton - reload/cancel button

getDeleteButton

public final DeleteButton getDeleteButton()
Returns:
delete button

setDeleteButton

public final void setDeleteButton(DeleteButton deleteButton)
Set the delete button.

Parameters:
deleteButton - delete button

setFilterButton

public final void setFilterButton(FilterButton filterButton)
Set the filter button.

Parameters:
filterButton - filter button

getSaveButton

public final SaveButton getSaveButton()
Returns:
save button

setSaveButton

public final void setSaveButton(SaveButton saveButton)
Set the save button.

Parameters:
saveButton - save button

addGenericButton

public final void addGenericButton(GenericButton button)
Add an optional button.

Parameters:
button - generic button

removeGenericButton

public final void removeGenericButton(GenericButton button)
Remove an optional button.

Parameters:
button - generic button

isAutoLoadData

public final boolean isAutoLoadData()
Returns:
true to automatically load data when the grid is showed, false otherwise

setAutoLoadData

public final void setAutoLoadData(boolean autoLoadData)
Define if grid must be automatically loaded when it is showed.

Parameters:
autoLoadData - true to automatically load data when the grid is showed, false otherwise

reloadCurrentBlockOfData

public final void reloadCurrentBlockOfData()
Sets READONLY mode and reloads current block of data. Data Loading is executed in a separated thread. After data loading, the old selected row is selected again. Note: This method can be called ONLY when the grid is already visibile.


reloadData

public final void reloadData()
Sets READONLY mode and reloads the first block of data. Data Loading is executed in a separated thread. After data loading, the first row is automatically selected. Note: This method can be called ONLY when the grid is already visibile.


save

public final boolean save()
Save data and sets grid in READONLY mode (if saving task was successfully completed).


setFunctionId

public final void setFunctionId(java.lang.String functionId)
Set the functionId identifier, associated to the container

Parameters:
functionId - identifier associated to the container

getFunctionId

public final java.lang.String getFunctionId()
Returns:
identifier (functionId) associated to the container

getGridDataLocator

public final GridDataLocator getGridDataLocator()
Returns:
grid data locator; can be set to "ClientGridDataLocator" or to "ServerGridDataLocator"

setGridDataLocator

public final void setGridDataLocator(GridDataLocator gridDataLocator)
Set the grid data locator.

Parameters:
gridDataLocator - grid data locator; can be set to "ClientGridDataLocator" or to "ServerGridDataLocator"

getNavBar

public final NavigatorBar getNavBar()
Returns:
navigation bar (optional)

setNavBar

public final void setNavBar(NavigatorBar navBar)
Set navigation bar.

Parameters:
navBar - navigation bar

getOtherGridParams

public final java.util.Map getOtherGridParams()
Returns:
other grid parameters

setOtherGridParams

public final void setOtherGridParams(java.util.Map otherGridParams)
Set other grid parameters.

Parameters:
otherGridParams - other grid parameters

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()
Set maximum number of sorted columns.


clearData

public final void clearData()
Clear grid content.


cleanUp

public final void cleanUp(int row)
Clean up cells content for the specified row. Note: this method can be invoked only in INSERT/EDIT modes.


cleanUp

public final void cleanUp(int row,
                          boolean cleanUpAlsoNotEditableCells)
Clean up cells content for the specified row, for each field or editable only cells. Note: this method can be invoked only in INSERT/EDIT modes.

Parameters:
cleanUpAlsoNotEditableCells - define if all cells must be clean up

getLockedColumns

public final int getLockedColumns()
Returns:
number of locked columns, i.e. columns anchored to the left side of the grid

setLockedColumns

public final void setLockedColumns(int lockedColumns)
Set the number of locked columns, i.e. columns anchored to the left side of the grid.

Parameters:
lockedColumns - number of locked columns, i.e. columns anchored to the left side of the grid

isFieldEditable

public final boolean isFieldEditable(int rowNumber,
                                     java.lang.String attributeName)
Parameters:
rowNumber - TableModel row index
attributeName - attribute name that identifies a grid column
Returns:
true means that the cell having the specified row and column index is editable, false otherwise

getSelectedRows

public int[] getSelectedRows()
Returns the indices of all selected rows.

Returns:
an array of integers containing the indices of all selected rows, or an empty array if no row is selected
See Also:
getSelectedRow()

getSelectedRow

public int getSelectedRow()
Returns the index of the first selected row, -1 if no row is selected.

Returns:
the index of the first selected row

getSelectedColumn

public int getSelectedColumn()
Returns the index of the first selected column, -1 if no column is selected.

Returns:
the index of the first selected column

stopCellEditing

public final boolean stopCellEditing()
Returns:
true if current editing cell is in valid state, false otherwise

enableDrag

public final void enableDrag(java.lang.String gridId)
Enable drag onto the grid.

Parameters:
gridId - grid identifier

addButtonsNotEnabled

public final void addButtonsNotEnabled(java.util.HashSet buttons,
                                       GenericButtonController buttonController)
Define GenericButton objects linked to this that will be disabled (independently from the grid mode) when the specified attribute will be set to the specified value.

Parameters:
buttons - collections GenericButton objects linked to this that have to be disabled
buttonController - interface that defines button disabilitation, according to some custom policy

isButtonDisabled

public final boolean isButtonDisabled(GenericButton button)
Method called by GenericButton.setEnabled method to check if the button must be disabled.

Parameters:
button - button whose abilitation must be checked
Returns:
true if no policy is defined in the grid for the specified button, false if there exists a disabilitation policy for the specified button (through addButtonsNotEnabledOnState grid method)

resetButtonsState

public final void resetButtonsState()
Method automatically called by the Grid to check buttons disabilitation.


transferFocus

public final void transferFocus()
Remove cell editing, if needed.


getMaxNumberOfRowsOnInsert

public final int getMaxNumberOfRowsOnInsert()
Returns:
maximum number of rows to insert by pressing "down" key; default value: 1

setMaxNumberOfRowsOnInsert

public final void setMaxNumberOfRowsOnInsert(int maxNumberOfRowsOnInsert)
Set the maximum number of rows to insert by pressing "down" key; default value: 1.

Parameters:
maxNumberOfRowsOnInsert - maximum number of rows to insert by pressing "down" key

getQuickFilterValues

public final java.util.Map getQuickFilterValues()
Returns:
collection of pairs < attribute name,new FilterWhereClause[2] > related to filters currently applied to grid

add

public final void add(java.awt.Component comp,
                      java.lang.Object constraint)
Method invoked by UI designers (e.g. JDeveloper) that does not correctly use the "containerDelegate" property defined in GridControlBeanInfo

Parameters:
comp - Component to add
constraint - contraint to use for the component to add

add

public final java.awt.Component add(java.awt.Component comp)
Method invoked by UI designers (e.g. Eclipse + Window Builder plugin) that does not correctly use the "containerDelegate" property defined in GridControlBeanInfo

Parameters:
comp - Component to add

paint

public final void paint(java.awt.Graphics g)

getLayout

public java.awt.LayoutManager getLayout()

getRowHeight

public final int getRowHeight()
Returns:
row height of the grid control

setRowHeight

public final void setRowHeight(int rowHeight)
Set the row height of the grid control.

Parameters:
rowHeight - row height of the grid control

isRowHeightFixed

public final boolean isRowHeightFixed()
Returns:
define if row height can change for each row, according to image height included in a cell of grid; default value: true

setRowHeightFixed

public final void setRowHeightFixed(boolean rowHeightFixed)
Parameters:
rowHeightFixed - define if row height can change for each row, according to image height included in a cell of grid; default value: true

isOrderWithLoadData

public final boolean isOrderWithLoadData()
Returns:
flag used to define if grid sorting operation must always invoke loadData method to retrieve a new list of v.o. or the grid must sort the current v.o. list without invoking loadData (only with the whole result set loaded)

setOrderWithLoadData

public final void setOrderWithLoadData(boolean orderWithLoadData)
Used to define if grid sorting operation must always invoke loadData method to retrieve a new list of v.o. or the grid must sort the current v.o. list without invoking loadData (only with the whole result set loaded).

Parameters:
orderWithLoadData - flag used to define if grid sorting operation must always invoke loadData method to retrieve a new list of v.o. or the grid must sort the current v.o. list without invoking loadData (only with the whole result set loaded)

setOrderPolicy

public final void setOrderPolicy(OrderPolicy orderPolicy)
Used to define the sorting algorithm to use to sort columns. Note that this method is used by grid control ONLY IF orderWithLoadData property has been set to false, otherwise this setting will be ignored.

Parameters:
orderPolicy - interface that must be implemented in order to sort columns

isShowFilterPanelOnGrid

public final boolean isShowFilterPanelOnGrid()
Returns:
true to automatically show a filter panel when moving mouse at right of the grid; false to do not show it

setShowFilterPanelOnGrid

public final void setShowFilterPanelOnGrid(boolean showFilterPanelOnGrid)
Set a true value to automatically show a filter panel when moving mouse at right of the grid; false to do not show it

Parameters:
showFilterPanelOnGrid - true to automatically show a filter panel when moving mouse at right of the grid; false to do not show it

getLockedRowsOnBottom

public final int getLockedRowsOnBottom()
Returns:
number of rows locked (anchored) on the bottom of the grid

getLockedRowsOnTop

public final int getLockedRowsOnTop()
Returns:
number of rows locked (anchored) on the top of the grid; default value: 0

setLockedRowsOnBottom

public final void setLockedRowsOnBottom(int lockedRowsOnBottom)
Set the number of rows locked (anchored) on the top of the grid.

Parameters:
lockedRowsOnBottom - number of rows locked (anchored) on the top of the grid

setLockedRowsOnTop

public final void setLockedRowsOnTop(int lockedRowsOnTop)
Set the number of rows locked (anchored) on the bottom of the grid.

Parameters:
lockedRowsOnTop - number of rows locked (anchored) on the top of the grid

getTopGridController

public final GridController getTopGridController()
Returns:
top grid controller

getTopGridDataLocator

public final GridDataLocator getTopGridDataLocator()
Returns:
top grid data locator

setTopGridDataLocator

public final void setTopGridDataLocator(GridDataLocator topGridDataLocator)
Set the top grid data locator.

Parameters:
topGridDataLocator - top grid data locator

setTopGridController

public final void setTopGridController(GridController topGridController)
Set the top grid controller.

Parameters:
topGridController - top grid controller

getTopTable

public final Grids getTopTable()
Returns:
top grid containepd in this panel (optional); it will be created only on run-time

getBottomTable

public final Grids getBottomTable()
Returns:
bottom grid contained in this panel (optional); it will be created only on run-time

getTable

public final Grids getTable()
Returns:
std grid contained in this panel; it will be created only on run-time DO NOT USE THIS HOOK TO ACCESS TO INTERNAL JTABLE CLASS AND CHANGE SOME SETTINGS!

getBottomGridDataLocator

public final GridDataLocator getBottomGridDataLocator()
Returns:
bottom grid data locator

getBottomGridController

public final GridController getBottomGridController()
Returns:
bottom grid controller

setBottomGridController

public final void setBottomGridController(GridController bottomGridController)
Set the bottom grid controller.

Parameters:
bottomGridController - bottom grid controller

setBottomGridDataLocator

public final void setBottomGridDataLocator(GridDataLocator bottomGridDataLocator)
Set the bottomgrid data locator.

Parameters:
bottomGridDataLocator - bottom grid data locator

getDefaultQuickFilterCriteria

public final int getDefaultQuickFilterCriteria()
Returns:
default value that could be set in the quick filter criteria; values allowed: Consts.EQUALS,Consts.CONTAINS,Consts.STARTS_WITH,Consts.ENDS_WITH

setDefaultQuickFilterCriteria

public final void setDefaultQuickFilterCriteria(int defaultQuickFilterCriteria)
Set default value that could be set in the quick filter criteria; values allowed: Consts.EQUALS,Consts.CONTAINS,Consts.STARTS_WITH,Consts.ENDS_WITH.

Parameters:
defaultQuickFilterCriteria - values allowed: Consts.EQUALS,Consts.CONTAINS,Consts.STARTS_WITH,Consts.ENDS_WITH

setRowSelectionInterval

public final void setRowSelectionInterval(int startRow,
                                          int endRow)
Set row selection interval.

Parameters:
startRow - first selected row index
endRow - last selected row index

editCellAt

public final void editCellAt(int row,
                             java.lang.String attributeName)
Set editing to the specified cell. This method is ignored if the grid control is in READONY mode.

Parameters:
row - row index
attributeName - attribute name that identify the grid column

setIntercellSpacing

public final void setIntercellSpacing(java.awt.Dimension spacing)
Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.

See Also:
getIntercellSpacing()

setRowMargin

public final void setRowMargin(int rowMargin)
Sets the amount of empty space between cells in adjacent rows.

Parameters:
rowMargin - the number of pixels between cells in a row
See Also:
getRowMargin()

getIntercellSpacing

public final java.awt.Dimension getIntercellSpacing()
Returns:
a Dimension specifying the new width and height between cells

getRowMargin

public final int getRowMargin()
Returns:
the number of pixels between cells in a row

isCreateInnerVO

public final boolean isCreateInnerVO()
Returns:
define if an inner v.o. must be automatically instantiated when a setter method is invoked

setCreateInnerVO

public final void setCreateInnerVO(boolean createInnerVO)
Define if an inner v.o. must be automatically instantiated when a setter method is invoked.

Parameters:
createInnerVO - define if an inner v.o. must be automatically instantiated when a setter method is invoked

mergeCells

public final boolean mergeCells(int[] rows,
                                int[] columns)
Set the cell span for the specified range of cells.

Parameters:
rows - row indexes that identify the cells to merge
columns - column indexes that identify the cells to merge
Returns:
true if merge operation is allowed, false if the cells range is invalid

mergeCellsOnTop

public final boolean mergeCellsOnTop(int[] rows,
                                     int[] columns)
Set the cell span for the specified range of cells in the locked rows on the top of the table.

Parameters:
rows - row indexes that identify the cells to merge
columns - column indexes that identify the cells to merge
Returns:
true if merge operation is allowed, false if the cells range is invalid

mergeCellsOnBottom

public final boolean mergeCellsOnBottom(int[] rows,
                                        int[] columns)
Set the cell span for the specified range of cells in the locked rows at the bottom of the table.

Parameters:
rows - row indexes that identify the cells to merge
columns - column indexes that identify the cells to merge
Returns:
true if merge operation is allowed, false if the cells range is invalid

isColorsInReadOnlyMode

public final boolean isColorsInReadOnlyMode()
Returns:
define if background and foreground colors must be setted according to GridController definition only in READONLY mode

setColorsInReadOnlyMode

public final void setColorsInReadOnlyMode(boolean colorsInReadOnlyMode)
Define if background and foreground colors must be setted according to GridController definition only in READONLY mode.

Parameters:
colorsInReadOnlyMode - false to enable background and foreground colors to be setted according to GridController definition in all grid modes; true to enable background and foreground colors to be setted according to GridController definition only in READONLY mode

addLoadDataCompletedListener

public final void addLoadDataCompletedListener(java.awt.event.ActionListener listener)
Add a "load data completed" listener.


removeLoadDataCompletedListener

public final void removeLoadDataCompletedListener(java.awt.event.ActionListener listener)
Remove a "load data completed" listener.


addPopupCommand

public final void addPopupCommand(javax.swing.JMenuItem command)
Add a menu item to the popup menu accessed through the right mouse click onto the grid.

Parameters:
command - menu item to add

addPopupCommand

public final void addPopupCommand(java.lang.String command,
                                  java.awt.event.ActionListener listener,
                                  boolean enabled)
Add a menu item to the popup menu accessed through the right mouse click onto the grid.

Parameters:
command - menu item text (this text will be translated according to internationalization settings)
listener - ActionListener linked to this menu item
enabled - flag used to initially enable/disable the menu item

addPopupCommand

public final void addPopupCommand(java.lang.String command,
                                  java.awt.event.ActionListener listener,
                                  boolean enabled,
                                  javax.swing.Icon icon)
Add a menu item to the popup menu accessed through the right mouse click onto the grid.

Parameters:
command - menu item text (this text will be translated according to internationalization settings)
enabled - flag used to initially enable/disable the menu item
icon - icon image associated to this menu item
listener - ActionListener linked to this menu item

addPopupCommand

public final void addPopupCommand(java.lang.String command,
                                  java.awt.event.ActionListener listener,
                                  boolean enabled,
                                  int mnemonic)
Add a menu item to the popup menu accessed through the right mouse click onto the grid.

Parameters:
command - menu item text (this text will be translated according to internationalization settings)
listener - ActionListener linked to this menu item
enabled - flag used to initially enable/disable the menu item
mnemonic - ALT+char key combination that fires the item selection event

addPopupCommand

public final void addPopupCommand(java.lang.String command,
                                  java.awt.event.ActionListener listener,
                                  boolean enabled,
                                  int mnemonic,
                                  javax.swing.KeyStroke accelerator)
Add a menu item to the popup menu accessed through the right mouse click onto the grid.

Parameters:
command - menu item text (this text will be translated according to internationalization settings)
mnemonic - mnemonic char associated to this menu item
listener - ActionListener linked to this menu item
enabled - flag used to initially enable/disable the menu item
accelerator - key combination (e.g. CTRL+key, etc.) that fires the item selection event

renamePopupCommand

public final void renamePopupCommand(java.lang.String oldCommand,
                                     java.lang.String newCommand)
Rename a menu item added to the popup menu and accessed through the right mouse click onto the grid.

Parameters:
oldCommand - old menu item text (this text will be translated according to internationalization settings)
newCommand - new menu item text (this text will be translated according to internationalization settings)

setEnablePopupCommand

public final void setEnablePopupCommand(java.lang.String command,
                                        boolean enabled)
Enable/disable a menu item added to the popup menu and accessed through the right mouse click onto the grid.

Parameters:
command - menu item text (this text will be translated according to internationalization settings)
enabled - flag used to define if enable or disable the specified menu item

getProfile

public final org.openswing.swing.table.profiles.java.GridProfile getProfile()
Returns:
current grid profile

getFilterPanelOnGridPolicy

public final int getFilterPanelOnGridPolicy()
Returns:
used only when "showFilterPanelOnGrid" is set to true; define filter panel policy for hiding it; allowed values: Consts.FILTER_PANEL_ON_GRID_xxx; default value: ClientSettings.FILTER_PANEL_ON_GRID_POLICY

setFilterPanelOnGridPolicy

public final void setFilterPanelOnGridPolicy(int filterPanelOnGridPolicy)
Define filter panel policy for hiding it; allowed values: Consts.FILTER_PANEL_ON_GRID_xxx; default value: ClientSettings.FILTER_PANEL_ON_GRID_POLICY

Parameters:
filterPanelOnGridPolicy - used only when "showFilterPanelOnGrid" is set to true; define filter panel policy for hiding it; allowed values: Consts.FILTER_PANEL_ON_GRID_xxx

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.

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

getExpandableColumn

public final int getExpandableColumn()
Returns:
column index declared as expandable, i.e. user can click on it to expand cell to show an inner component

setExpandableColumn

public final void setExpandableColumn(int expandableColumn)
Define which column index declared as expandable, i.e. user can click on it to expand cell to show an inner component.

Parameters:
expandableColumn - column index declared as expandable, i.e. user can click on it to expand cell to show an inner component

isSingleExpandableRow

public final boolean isSingleExpandableRow()
Returns:
define whether expanded rows in the past must be collapsed when expanding the current one; used only when "expandableColumn" property is not null

setSingleExpandableRow

public final void setSingleExpandableRow(boolean singleExpandableRow)
Define whether expanded rows in the past must be collapsed when expanding the current one; used only when "expandableColumn" property is not null.

Parameters:
singleExpandableRow - define whether expanded rows in the past must be collapsed when expanding the current one; used only when "expandableColumn" property is not null

getExpandableRowController

public final ExpandableRowController getExpandableRowController()
Returns:
controller that manages row expansion

setExpandableRowController

public final void setExpandableRowController(ExpandableRowController expandableRowController)
Define the controller that manages row expansion.

Parameters:
expandableRowController - controller that manages row expansion

isOverwriteRowWhenExpanding

public final boolean isOverwriteRowWhenExpanding()
Returns:
define whether the row to show, when expanding the current one, must be showed over the current one on in a new row below it; used only when "overwriteRowWhenExpanding" property is not null

setOverwriteRowWhenExpanding

public final void setOverwriteRowWhenExpanding(boolean overwriteRowWhenExpanding)
Define whether the row to show, when expanding the current one, must be showed over the current one on in a new row below it; used only when "overwriteRowWhenExpanding" property is not null.

Parameters:
overwriteRowWhenExpanding - define whether the row to show, when expanding the current one, must be showed over the current one on in a new row below it

finalize

public final void finalize()

requestFocus

public final void requestFocus()

isShowWarnMessageBeforeReloading

public final boolean isShowWarnMessageBeforeReloading()
Returns:
define if a warning message must be showed when reloading data in grid and grid is in EDIT/INSERT mode

setShowWarnMessageBeforeReloading

public final void setShowWarnMessageBeforeReloading(boolean showWarnMessageBeforeReloading)
Define if a warning message must be showed when reloading data in grid and grid is in EDIT/INSERT mode.

Parameters:
showWarnMessageBeforeReloading - flag used to define if a warning message must be showed when reloading data in grid and grid is in EDIT/INSERT mode

isAllowInsertInEdit

public final boolean isAllowInsertInEdit()
Returns:
allow insert row (using DOWN key) in edit mode too; default value: false

setAllowInsertInEdit

public final void setAllowInsertInEdit(boolean allowInsertInEdit)
Allow insert row (using DOWN key) in edit mode too; default value: false

Parameters:
allowInsertInEdit - allow insert row (using DOWN key) in edit mode too

isInsertRowsOnTop

public final boolean isInsertRowsOnTop()
Returns:
define where new rows must be added: true at the top of the grid or false at the bottom

setInsertRowsOnTop

public final void setInsertRowsOnTop(boolean insertRowsOnTop)
Define where new rows must be added: true at the top of the grid or false at the bottom; default value: true

Parameters:
insertRowsOnTop - define where new rows must be added: true at the top of the grid or false at the bottom

getHeaderHeight

public final int getHeaderHeight()
Returns:
header height

setHeaderHeight

public final void setHeaderHeight(int headerHeight)
Set the header height. This method can be invoked only before grid control is visible.

Parameters:
headerHeight - header height

isEditOnSingleRow

public final boolean isEditOnSingleRow()
Returns:
force the editing of one row only: the current selected row: false all rows are editable, true edit is allowed only on current selected row

setEditOnSingleRow

public final void setEditOnSingleRow(boolean editOnSingleRow)
Define if cell editing is allows on one row only or on all rows: false all rows are editable, true edit is allowed only on current selected row

Parameters:
editOnSingleRow - false all rows are editable, true edit is allowed only on current selected row

getDefaultGridExportOptions

public final GridExportOptions getDefaultGridExportOptions()
Returns:
GridExportOptions object created, starting from current visible columns

getDefaultGridExportOptions

public final GridExportOptions getDefaultGridExportOptions(java.util.HashSet attributesToExport)
Parameters:
attributesToExport - attributes to export
Returns:
GridExportOptions object created, starting from specified attributes to export

addListFilter

public final void addListFilter(java.lang.String attributeName,
                                ListFilterController filter)
Add a list-filter for the specified column, showed in the quick filter panel.

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

removeComboFilter

public final void removeComboFilter(java.lang.String attributeName)
Remove a list-filter for the specified column.

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

isShowPageNumber

public final boolean isShowPageNumber()
Returns:
show current page number in grid

setShowPageNumber

public final void setShowPageNumber(boolean showPageNumber)
Show/hide current page number in grid.

Parameters:
showPageNumber - flag used to show current page number in grid

setVisibleColumn

public final void setVisibleColumn(java.lang.String attributeName,
                                   boolean visible)
Show/hide a column. Do not invoke this method before grid is being visible.

Parameters:
attributeName - attribute name that identities the column
visible - true to show column; false to hide it

getCurrentSortedColumns

public final java.util.ArrayList getCurrentSortedColumns()
Returns:
current sorted columns

getCurrentSortedVersusColumns

public final java.util.ArrayList getCurrentSortedVersusColumns()
Returns:
current sorted columns versus (Ascending/Descending)

removeSortedColumn

public final void removeSortedColumn(java.lang.String attributeName,
                                     boolean reloadGrid)
Remove the sorting condition currently applied to the specified column. Do not invoke this method before grid is being visible.

Parameters:
attributeName - attribute name that identities the column
reloadGrid - true to force grid reloading; false to do not reload grid (for instance when sorting conditions for other columns must be removed too)

addSortedColumn

public final void addSortedColumn(java.lang.String attributeName,
                                  java.lang.String sortingVersus,
                                  boolean reloadGrid)
Add the specified sorting condition to the column identified by the attribute name (as last sorting condition). Do not invoke this method before grid is being visible.

Parameters:
attributeName - attribute name that identities the column
sortingVersus - sorting versus; possible values: Consts.ASC_SORTED,Consts.DESC_SORTED
reloadGrid - true to force grid reloading; false to do not reload grid (for instance when sorting conditions for other columns must be add too)

isSearchAdditionalRows

public final boolean isSearchAdditionalRows()
Returns:
true means that grid has to automatically retrieve additional rows in fast search, when search criteria fails

setSearchAdditionalRows

public final void setSearchAdditionalRows(boolean searchAdditionalRows)
Define whether enabling the retrieval of additional rows in fast search, when search criteria fails. Default value: ClientSettings.SEARCH_ADDITION_ROWS

Parameters:
searchAdditionalRows - flag used in grid to enable the retrieval of additional rows in fast search, when search criteria fails

getStatusPanelHeight

public final int getStatusPanelHeight()
Returns:
height of status panel (expressed in pixels)

isAllowColumnsSortingInEdit

public final boolean isAllowColumnsSortingInEdit()
Returns:
allows the columns sorting in edit mode too; note that this setting is used only when orderWithLoadData property is set to false

setAllowColumnsSortingInEdit

public final void setAllowColumnsSortingInEdit(boolean allowColumnsSortingInEdit)
Define whether columns sorting is enabled also in edit mode. Note that this setting is used only when orderWithLoadData property is set to false

Parameters:
allowColumnsSortingInEdit - allows the columns sorting in edit mode too

isAnchorLockedColumnsToLeft

public final boolean isAnchorLockedColumnsToLeft()
Returns:
define where to anchor locked columns: to the left or to the right of the grid; default value: true i.e. to the left

setAnchorLockedColumnsToLeft

public final void setAnchorLockedColumnsToLeft(boolean anchorLockedColumnsToLeft)
Define where to anchor locked columns: to the left or to the right of the grid.

Parameters:
anchorLockedColumnsToLeft - true to anchor locked columns the left of the grid