|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.openswing.swing.client.GridControl
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
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 |
public boolean showPageNumber
public boolean searchAdditionalRows
Constructor Detail |
public GridControl()
Method Detail |
public final void addNotify()
public final void commitColumnContainer()
public final GridControl.ColumnContainer getColumnContainer()
public final java.lang.String getValueObjectClassName()
public final void setValueObjectClassName(java.lang.String valueObjectClassName)
valueObjectClassName
- value object class namepublic final boolean isReorderingAllowed()
public final void setReorderingAllowed(boolean reorderingAllowed)
reorderingAllowed
- allows column reorderingpublic final boolean isResizingAllowed()
public final void setResizingAllowed(boolean resizingAllowed)
resizingAllowed
- allows column resizingpublic final int getMode()
public final void setMode(int mode)
mode
- grid mode; possibile values: READONLY, INSERT, EDITpublic final GridController getController()
public final void setController(GridController controller)
public final void setVisibleStatusPanel(boolean visibleStatusPanel)
visibleStatusPanel
- true
to show the status panel, false
to hide the status panelpublic final boolean isVisibleStatusPanel()
public final VOListTableModel getVOListTableModel()
public final int getSelectionMode()
public final void setSelectionMode(int selectionMode)
selectionMode
- grid selection modepublic final InsertButton getInsertButton()
public final ExportButton getExportButton()
public final ImportButton getImportButton()
public final FilterButton getFilterButton()
public final CopyButton getCopyButton()
public final EditButton getEditButton()
public final void setEditButton(EditButton editButton)
editButton
- edit buttonpublic final void setInsertButton(InsertButton insertButton)
insertButton
- insert buttonpublic final void setExportButton(ExportButton exportButton)
exportButton
- export buttonpublic final void setImportButton(ImportButton importButton)
importButton
- import buttonpublic final void setCopyButton(CopyButton copyButton)
copyButton
- insert buttonpublic final ReloadButton getReloadButton()
public final void setReloadButton(ReloadButton reloadButton)
reloadButton
- reload/cancel buttonpublic final DeleteButton getDeleteButton()
public final void setDeleteButton(DeleteButton deleteButton)
deleteButton
- delete buttonpublic final void setFilterButton(FilterButton filterButton)
filterButton
- filter buttonpublic final SaveButton getSaveButton()
public final void setSaveButton(SaveButton saveButton)
saveButton
- save buttonpublic final void addGenericButton(GenericButton button)
button
- generic buttonpublic final void removeGenericButton(GenericButton button)
button
- generic buttonpublic final boolean isAutoLoadData()
true
to automatically load data when the grid is showed, false
otherwisepublic final void setAutoLoadData(boolean autoLoadData)
autoLoadData
- true
to automatically load data when the grid is showed, false
otherwisepublic final void reloadCurrentBlockOfData()
public final void reloadData()
public final boolean save()
public final void setFunctionId(java.lang.String functionId)
functionId
- identifier associated to the containerpublic final java.lang.String getFunctionId()
public final GridDataLocator getGridDataLocator()
public final void setGridDataLocator(GridDataLocator gridDataLocator)
gridDataLocator
- grid data locator; can be set to "ClientGridDataLocator" or to "ServerGridDataLocator"public final NavigatorBar getNavBar()
public final void setNavBar(NavigatorBar navBar)
navBar
- navigation barpublic final java.util.Map getOtherGridParams()
public final void setOtherGridParams(java.util.Map otherGridParams)
otherGridParams
- other grid parameterspublic final void setMaxSortedColumns(int maxSortedColumns)
maxSortedColumns
- maximum number of sorted columnspublic final int getMaxSortedColumns()
public final void clearData()
public final void cleanUp(int row)
public final void cleanUp(int row, boolean cleanUpAlsoNotEditableCells)
cleanUpAlsoNotEditableCells
- define if all cells must be clean uppublic final int getLockedColumns()
public final void setLockedColumns(int lockedColumns)
lockedColumns
- number of locked columns, i.e. columns anchored to the left side of the gridpublic final boolean isFieldEditable(int rowNumber, java.lang.String attributeName)
rowNumber
- TableModel row indexattributeName
- attribute name that identifies a grid column
true
means that the cell having the specified row and column index is editable, false
otherwisepublic int[] getSelectedRows()
getSelectedRow()
public int getSelectedRow()
public int getSelectedColumn()
public final boolean stopCellEditing()
true
if current editing cell is in valid state, false
otherwisepublic final void enableDrag(java.lang.String gridId)
gridId
- grid identifierpublic final void addButtonsNotEnabled(java.util.HashSet buttons, GenericButtonController buttonController)
buttons
- collections GenericButton objects linked to this that have to be disabledbuttonController
- interface that defines button disabilitation, according to some custom policypublic final boolean isButtonDisabled(GenericButton button)
button
- button whose abilitation must be checked
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)public final void resetButtonsState()
public final void transferFocus()
public final int getMaxNumberOfRowsOnInsert()
public final void setMaxNumberOfRowsOnInsert(int maxNumberOfRowsOnInsert)
maxNumberOfRowsOnInsert
- maximum number of rows to insert by pressing "down" keypublic final java.util.Map getQuickFilterValues()
public final void add(java.awt.Component comp, java.lang.Object constraint)
comp
- Component to addconstraint
- contraint to use for the component to addpublic final java.awt.Component add(java.awt.Component comp)
comp
- Component to addpublic final void paint(java.awt.Graphics g)
public java.awt.LayoutManager getLayout()
public final int getRowHeight()
public final void setRowHeight(int rowHeight)
rowHeight
- row height of the grid controlpublic final boolean isRowHeightFixed()
true
public final void setRowHeightFixed(boolean rowHeightFixed)
rowHeightFixed
- define if row height can change for each row, according to image height included in a cell of grid; default value: true
public final boolean isOrderWithLoadData()
public final void setOrderWithLoadData(boolean orderWithLoadData)
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)public final void setOrderPolicy(OrderPolicy orderPolicy)
orderWithLoadData
property has been set to false
,
otherwise this setting will be ignored.
orderPolicy
- interface that must be implemented in order to sort columnspublic final boolean isShowFilterPanelOnGrid()
true
to automatically show a filter panel when moving mouse at right of the grid; false
to do not show itpublic final void setShowFilterPanelOnGrid(boolean showFilterPanelOnGrid)
true
value to automatically show a filter panel when moving mouse at right of the grid; false
to do not show it
showFilterPanelOnGrid
- true
to automatically show a filter panel when moving mouse at right of the grid; false
to do not show itpublic final int getLockedRowsOnBottom()
public final int getLockedRowsOnTop()
public final void setLockedRowsOnBottom(int lockedRowsOnBottom)
lockedRowsOnBottom
- number of rows locked (anchored) on the top of the gridpublic final void setLockedRowsOnTop(int lockedRowsOnTop)
lockedRowsOnTop
- number of rows locked (anchored) on the top of the gridpublic final GridController getTopGridController()
public final GridDataLocator getTopGridDataLocator()
public final void setTopGridDataLocator(GridDataLocator topGridDataLocator)
topGridDataLocator
- top grid data locatorpublic final void setTopGridController(GridController topGridController)
topGridController
- top grid controllerpublic final Grids getTopTable()
public final Grids getBottomTable()
public final Grids getTable()
public final GridDataLocator getBottomGridDataLocator()
public final GridController getBottomGridController()
public final void setBottomGridController(GridController bottomGridController)
bottomGridController
- bottom grid controllerpublic final void setBottomGridDataLocator(GridDataLocator bottomGridDataLocator)
bottomGridDataLocator
- bottom grid data locatorpublic final int getDefaultQuickFilterCriteria()
public final void setDefaultQuickFilterCriteria(int defaultQuickFilterCriteria)
defaultQuickFilterCriteria
- values allowed: Consts.EQUALS,Consts.CONTAINS,Consts.STARTS_WITH,Consts.ENDS_WITHpublic final void setRowSelectionInterval(int startRow, int endRow)
startRow
- first selected row indexendRow
- last selected row indexpublic final void editCellAt(int row, java.lang.String attributeName)
row
- row indexattributeName
- attribute name that identify the grid columnpublic final void setIntercellSpacing(java.awt.Dimension spacing)
rowMargin
and the columnMargin
--
the height and width of the space between cells -- to
intercellSpacing
.
getIntercellSpacing()
public final void setRowMargin(int rowMargin)
rowMargin
- the number of pixels between cells in a rowgetRowMargin()
public final java.awt.Dimension getIntercellSpacing()
Dimension
specifying the new width and height between cellspublic final int getRowMargin()
public final boolean isCreateInnerVO()
public final void setCreateInnerVO(boolean createInnerVO)
createInnerVO
- define if an inner v.o. must be automatically instantiated when a setter method is invokedpublic final boolean mergeCells(int[] rows, int[] columns)
rows
- row indexes that identify the cells to mergecolumns
- column indexes that identify the cells to merge
true
if merge operation is allowed, false
if the cells range is invalidpublic final boolean mergeCellsOnTop(int[] rows, int[] columns)
rows
- row indexes that identify the cells to mergecolumns
- column indexes that identify the cells to merge
true
if merge operation is allowed, false
if the cells range is invalidpublic final boolean mergeCellsOnBottom(int[] rows, int[] columns)
rows
- row indexes that identify the cells to mergecolumns
- column indexes that identify the cells to merge
true
if merge operation is allowed, false
if the cells range is invalidpublic final boolean isColorsInReadOnlyMode()
public final void setColorsInReadOnlyMode(boolean colorsInReadOnlyMode)
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 modepublic final void addLoadDataCompletedListener(java.awt.event.ActionListener listener)
public final void removeLoadDataCompletedListener(java.awt.event.ActionListener listener)
public final void addPopupCommand(javax.swing.JMenuItem command)
command
- menu item to addpublic final void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled)
command
- menu item text (this text will be translated according to internationalization settings)listener
- ActionListener linked to this menu itemenabled
- flag used to initially enable/disable the menu itempublic final void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled, javax.swing.Icon icon)
command
- menu item text (this text will be translated according to internationalization settings)enabled
- flag used to initially enable/disable the menu itemicon
- icon image associated to this menu itemlistener
- ActionListener linked to this menu itempublic final void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled, int mnemonic)
command
- menu item text (this text will be translated according to internationalization settings)listener
- ActionListener linked to this menu itemenabled
- flag used to initially enable/disable the menu itemmnemonic
- ALT+char key combination that fires the item selection eventpublic final void addPopupCommand(java.lang.String command, java.awt.event.ActionListener listener, boolean enabled, int mnemonic, javax.swing.KeyStroke accelerator)
command
- menu item text (this text will be translated according to internationalization settings)mnemonic
- mnemonic char associated to this menu itemlistener
- ActionListener linked to this menu itemenabled
- flag used to initially enable/disable the menu itemaccelerator
- key combination (e.g. CTRL+key, etc.) that fires the item selection eventpublic final void renamePopupCommand(java.lang.String oldCommand, java.lang.String newCommand)
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)public final void setEnablePopupCommand(java.lang.String command, boolean enabled)
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 itempublic final org.openswing.swing.table.profiles.java.GridProfile getProfile()
public final int getFilterPanelOnGridPolicy()
true
; define filter panel policy for hiding it; allowed values: Consts.FILTER_PANEL_ON_GRID_xxx; default value: ClientSettings.FILTER_PANEL_ON_GRID_POLICYpublic final void setFilterPanelOnGridPolicy(int filterPanelOnGridPolicy)
filterPanelOnGridPolicy
- used only when "showFilterPanelOnGrid" is set to true
; define filter panel policy for hiding it; allowed values: Consts.FILTER_PANEL_ON_GRID_xxxpublic boolean isAnchorLastColumn()
public void setAnchorLastColumn(boolean anchorLastColumn)
anchorLastColumn
- flag used to anchor the last column on the right margin of the grid, only when all columns width is lesser than grid widthpublic final int getExpandableColumn()
public final void setExpandableColumn(int expandableColumn)
expandableColumn
- column index declared as expandable, i.e. user can click on it to expand cell to show an inner componentpublic final boolean isSingleExpandableRow()
public final void setSingleExpandableRow(boolean singleExpandableRow)
singleExpandableRow
- define whether expanded rows in the past must be collapsed when expanding the current one; used only when "expandableColumn" property is not nullpublic final ExpandableRowController getExpandableRowController()
public final void setExpandableRowController(ExpandableRowController expandableRowController)
expandableRowController
- controller that manages row expansionpublic final boolean isOverwriteRowWhenExpanding()
public final void setOverwriteRowWhenExpanding(boolean overwriteRowWhenExpanding)
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 itpublic final void finalize()
public final void requestFocus()
public final boolean isShowWarnMessageBeforeReloading()
public final void setShowWarnMessageBeforeReloading(boolean showWarnMessageBeforeReloading)
showWarnMessageBeforeReloading
- flag used to define if a warning message must be showed when reloading data in grid and grid is in EDIT/INSERT modepublic final boolean isAllowInsertInEdit()
false
public final void setAllowInsertInEdit(boolean allowInsertInEdit)
false
allowInsertInEdit
- allow insert row (using DOWN key) in edit mode toopublic final boolean isInsertRowsOnTop()
true
at the top of the grid or false
at the bottompublic final void setInsertRowsOnTop(boolean insertRowsOnTop)
true
at the top of the grid or false
at the bottom; default value: true
insertRowsOnTop
- define where new rows must be added: true
at the top of the grid or false
at the bottompublic final int getHeaderHeight()
public final void setHeaderHeight(int headerHeight)
headerHeight
- header heightpublic final boolean isEditOnSingleRow()
false
all rows are editable, true
edit is allowed only on current selected rowpublic final void setEditOnSingleRow(boolean editOnSingleRow)
false
all rows are editable, true
edit is allowed only on current selected row
editOnSingleRow
- false
all rows are editable, true
edit is allowed only on current selected rowpublic final GridExportOptions getDefaultGridExportOptions()
public final GridExportOptions getDefaultGridExportOptions(java.util.HashSet attributesToExport)
attributesToExport
- attributes to export
public final void addListFilter(java.lang.String attributeName, ListFilterController filter)
attributeName
- attribute name that identifies the column having a list-filter to removepublic final void removeComboFilter(java.lang.String attributeName)
attributeName
- attribute name that identifies the column having a filter to removepublic final boolean isShowPageNumber()
public final void setShowPageNumber(boolean showPageNumber)
showPageNumber
- flag used to show current page number in gridpublic final void setVisibleColumn(java.lang.String attributeName, boolean visible)
attributeName
- attribute name that identities the columnvisible
- true
to show column; false
to hide itpublic final java.util.ArrayList getCurrentSortedColumns()
public final java.util.ArrayList getCurrentSortedVersusColumns()
public final void removeSortedColumn(java.lang.String attributeName, boolean reloadGrid)
attributeName
- attribute name that identities the columnreloadGrid
- true
to force grid reloading; false
to do not reload grid (for instance when sorting conditions for other columns must be removed too)public final void addSortedColumn(java.lang.String attributeName, java.lang.String sortingVersus, boolean reloadGrid)
attributeName
- attribute name that identities the columnsortingVersus
- sorting versus; possible values: Consts.ASC_SORTED,Consts.DESC_SORTEDreloadGrid
- true
to force grid reloading; false
to do not reload grid (for instance when sorting conditions for other columns must be add too)public final boolean isSearchAdditionalRows()
true
means that grid has to automatically retrieve additional rows in fast search, when search criteria failspublic final void setSearchAdditionalRows(boolean searchAdditionalRows)
searchAdditionalRows
- flag used in grid to enable the retrieval of additional rows in fast search, when search criteria failspublic final int getStatusPanelHeight()
public final boolean isAllowColumnsSortingInEdit()
orderWithLoadData
property is set to false
public final void setAllowColumnsSortingInEdit(boolean allowColumnsSortingInEdit)
orderWithLoadData
property is set to false
allowColumnsSortingInEdit
- allows the columns sorting in edit mode toopublic final boolean isAnchorLockedColumnsToLeft()
true
i.e. to the leftpublic final void setAnchorLockedColumnsToLeft(boolean anchorLockedColumnsToLeft)
anchorLockedColumnsToLeft
- true
to anchor locked columns the left of the grid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |