Oracle Data-aware Controls Reference

oracle.dacf.control.swing
Class GridControl

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended byoracle.dacf.control.swing.GridControl
All Implemented Interfaces:
javax.accessibility.Accessible, ApplyEditsListener, ContainerControl, Control, ControlEnabledListener, javax.infobus.DataItemChangeListener, java.util.EventListener, java.awt.event.FocusListener, java.awt.image.ImageObserver, InfoBusManagerListener, java.awt.MenuContainer, java.io.Serializable

public class GridControl
extends javax.swing.JPanel
implements Control, ControlEnabledListener, ApplyEditsListener, InfoBusManagerListener, java.awt.event.FocusListener, ContainerControl

This class is a data-aware control based on the JFC JTable class.

The grid control supports binding to data items which implements the ScrollableRowsetAccess InfoBus interface.

If the data item also implements the DataItemView InfoBus interface, the performance of the grid will be vastly improved.

The grid control does not support data items which only implement the ArrayAccess or RowsetAccess InfoBus interfaces. The data item must implement the ScrollableRowsetAccess interface as a minimum.

Version:
PUBLIC
See Also:
Control, Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  oracle.dacf.control.swing.ColumnPropertiesPopupMenu _popupMenu
           
protected  boolean _rebuildColumnModel
           
protected  boolean _showColumnPropertiesMenu
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, 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 oracle.dacf.control.Control
DEFAULT_INFOBUS_NAME, EVENT_PROPERTY_ROW, EVENT_PROPERTY_ROW_CHANGE, EVENT_PROPERTY_ROW_COUNT, EVENT_PROPERTY_VIEW_CHANGE, EVENT_PROPERTY_VIEW_REFRESHED, EVENT_PROPERTY_VIEW_SCROLLED, EXCLUDE, HIDE, SHOW
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GridControl()
          Creates a new grid data-aware control.
 
Method Summary
protected  void _displayLOV(int columnIndex)
           
protected  void _displayLOV(java.lang.String columnDataItemName)
           
protected  oracle.dacf.control.swing.ColumnPropertiesPopupMenu _getPopupMenu()
           
 void addNavigatedListener(NavigatedListener listener)
          Adds a navigated listener to this control.
 void addNavigatingListener(NavigatingListener listener)
          Adds a navigating listener to this control.
 void applyEdits()
          Causes the control to close the cell editor, saving the value
 void cancelEdits()
          Causes the control to close the cell editor, loosing the value
 boolean changeCurrency()
          Returns true if a ContainerControl (e.g.
protected  javax.swing.JScrollPane createScrollPane()
          Override this method, if you wish to use a custom ScrollPane.
protected  GridDataSource createTableDataSource(GridControl g)
           
 void dataItemAdded(javax.infobus.DataItemAddedEvent event)
          Indicates that a new item was added to the bound aggregate data item (e.g.
 void dataItemChanged(java.lang.Object oldDataItem, java.lang.Object newDataItem)
          Notifies the control that the bound InfoBus DataItem has changed.
 void dataItemDeleted(javax.infobus.DataItemDeletedEvent event)
          Indicates that an item was deleted from the bound aggregate data item (e.
 void dataItemRevoked(javax.infobus.DataItemRevokedEvent event)
          Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.
 void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent event)
          Indicates a changed value in the bound data item.
 void enabledChanged(boolean b)
           
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 boolean getAutoCreateColumnsFromModel()
           
 int getAutoResizeMode()
           
 javax.swing.table.TableCellEditor getCellEditor(int row, int column)
           
 boolean getCellSelectionEnabled()
           
protected  java.lang.String getColumnDataItemName(int columnIndex)
           
 javax.swing.table.TableColumnModel getColumnModel()
           
 boolean getColumnSelectionAllowed()
           
 java.awt.Component getComponent()
          Returns the AWT component associated with this control.
 java.lang.Object getDataItem()
          Returns the InfoBus DataItem this control is bound to.
 java.lang.String getDataItemName()
          Returns the name of the InfoBus DataItem this control is bound to.
 int getEditingColumn()
           
 int getEditingRow()
           
 java.awt.Color getFocusedSelectionBackground()
          Return background selection color used when the GridControl has focus.
 java.awt.Color getFocusedSelectionForeground()
          Return the foreground selection color when the GridControl has focus.
 java.awt.Color getGridColor()
           
 java.lang.String getInfoBusName()
          Returns the name of the InfoBus this control is connected to.
 java.awt.Dimension getIntercellSpacing()
           
 javax.swing.table.TableModel getModel()
           
 java.awt.Dimension getPreferredScrollableViewportSize()
           
 java.awt.Color getReadOnlyCellBackgroundColor()
          get the current back color used for read only cells.
 int getRowHeight()
           
 int getRowMargin()
           
 boolean getRowSelectionAllowed()
           
 java.awt.Color getSelectionBackground()
          This will return the current Color being used to indicate the current selection background.
 java.awt.Color getSelectionForeground()
          This will return the current Color being used to indicate the current selection foreground.
 javax.swing.ListSelectionModel getSelectionModel()
           
 boolean getShowHorizontalLines()
          Exposes the JTable ShowHorizontalLines property in our subcomponent to the property sheet
 boolean getShowVerticalLines()
          Exposes the JTable ShowVerticalLines property in our subcomponent to the property sheet
 SortDelegate getSortDelegate()
          Return the helper object currently used for sorting
 javax.swing.JTable getTable()
          Returns the underlying JFC JTable object.
 javax.swing.JScrollPane getTableAggregate()
          Returns the scroll pane being used by the underlying JFC JTable object.
 java.awt.Color getTableBackground()
          Exposes the JTable Background color property in our subcomponent to the property sheet
 GridDataSource getTableDataSource()
          Returns the data source being used by the underlying JFC JTable object.
 java.awt.Color getTableForeground()
          Exposes the JTable Foreground color property in our subcomponent to the property sheet
 javax.swing.table.JTableHeader getTableHeader()
           
 java.awt.Color getUnfocusedSelectionBackground()
          Return the background selection color when the Grid looses focus.
 java.awt.Color getUnfocusedSelectionForeground()
          Return the foreground selection color when the Grid looses focus.
 int getVisibleRowCount()
           
protected  void installColumnPropertiesPopupMenu()
           
 boolean isAutoRowNavigation()
          Controls how Tab or Shift-Tab will cause the selection to move.
 boolean isFocusValidated()
          Determines whether focus into this control causes validation to occur.
 boolean isForceReadOnly()
          are all the cells be forced as read only cells ?
 boolean isScrollToSelectedRow()
          Returns whether the Grid has been configured to scroll automatically to the selected row in single selection mode.
 boolean isShowColumnPropertiesPopupMenu()
           
 void processNavigatedEvent(NavigatedEvent event)
          Processes a navigated event for this control.
 void processNavigatingEvent(NavigatingEvent event)
          Processes a navigating event for this control.
 void releaseResources(InfoBusManagerReleaseEvent e)
          A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.
 void removeNavigatedListener(NavigatedListener listener)
          Removes a navigated listener from this control.
 void removeNavigatingListener(NavigatingListener listener)
          Removes a navigating listener from this control.
 void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent event)
          Indicates that the cursor for the bound RowsetAccess data item has changed rows.
 void setAutoCreateColumnsFromModel(boolean createColumns)
           
 void setAutoResizeMode(int mode)
           
 void setAutoRowNavigation(boolean auto)
          Controls how Tab or Shift-Tab will cause the selection to move.
 void setCellEditor(javax.swing.table.TableCellEditor anEditor)
           
 void setCellSelectionEnabled(boolean flag)
           
 void setColumnModel(javax.swing.table.TableColumnModel newModel)
           
 void setColumnSelectionAllowed(boolean flag)
           
 void setDataItemName(java.lang.String dataItemName)
          Sets the name of the InfoBus DataItem this control is bound to.
 void setEditingColumn(int aColumn)
           
 void setEditingRow(int aRow)
           
 void setEnabled(boolean b)
          An override of java.awt.Component.setEnabled.
 void setFocusedSelectionBackground(java.awt.Color focusedSelectionColor)
          Set the background selection color for when the GridControl has focus.
 void setFocusedSelectionForeground(java.awt.Color focusedSelectionColor)
          Set the foreground selection color for when the Grid has focus.
 void setFocusTraversable(boolean focusTraversable)
          Sets the underlying JTable as focus traversable.
 void setFocusValidated(boolean focusValidated)
          Sets whether focus into this control causes validation to occur.
 void setForceReadOnly(boolean forceReadOnly)
          force all the cells to be read only., irrespective of the underlying data object.
 void setGridColor(java.awt.Color gridColor)
           
 void setInfoBusName(java.lang.String infoBusName)
          Sets the name of the InfoBus this control is connected to.
 void setIntercellSpacing(java.awt.Dimension newSpacing)
           
 void setModel(javax.swing.table.TableModel newModel)
           
 void setOpaque(boolean isOpaque)
           
 void setPreferredScrollableViewportSize(java.awt.Dimension size)
           
 void setReadOnlyCellBackgroundColor(java.awt.Color color)
          specify the background color used for cells which are read-only
 void setRowHeight(int newHeight)
           
 void setRowMargin(int rowMargin)
           
 void setRowSelectionAllowed(boolean flag)
           
 void setScrollToSelectedRow(boolean bScroll)
          In single selection mode, this flag controls whether the grid should scroll to the selected row or not.
 void setSelectionBackground(java.awt.Color color)
          This will override the selection background setting currently in effect.
 void setSelectionForeground(java.awt.Color color)
          This will override the selection foreground setting currently in effect.
 void setSelectionModel(javax.swing.ListSelectionModel newModel)
           
 void setShowColumnPropertiesPopupMenu(boolean showMenu)
          displays the Column properties menu on right click
 void setShowGrid(boolean showGrid)
          Exposes the JTable ShowGrid property in our subcomponent
 void setShowHorizontalLines(boolean showLines)
          Exposes the JTable ShowHorizontalLines property in our subcomponent to the property sheet
 void setShowVerticalLines(boolean showLines)
          Exposes the JTable ShowVerticalLines property in our subcomponent to the property sheet
 void setSortDelegate(SortDelegate sortDelegate)
          GridControl delegates 'sorting' to this helper object.
 void setTableBackground(java.awt.Color color)
          Exposes the JTable Background color property in our subcomponent to the property sheet
 void setTableForeground(java.awt.Color color)
          Exposes the JTable Foreground color property in our subcomponent to the property sheet
 void setTableHeader(javax.swing.table.JTableHeader newHeader)
           
 void setToolTipText(java.lang.String text)
           
 void setUnfocusedSelectionBackground(java.awt.Color unfocusedSelectionColor)
          Set the background selection color for when the Grid looses focus.
 void setUnfocusedSelectionForeground(java.awt.Color unfocusedSelectionColor)
          Set the foreground selection color when the Grid looses focus.
 void showVerticalScrollBar(boolean bShow)
          The vertical scroll can be removed by this method.
protected  void uninstallColumnPropertiesPopupMenu()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, 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, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, 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, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_popupMenu

protected oracle.dacf.control.swing.ColumnPropertiesPopupMenu _popupMenu

_showColumnPropertiesMenu

protected boolean _showColumnPropertiesMenu

_rebuildColumnModel

protected boolean _rebuildColumnModel
Constructor Detail

GridControl

public GridControl()
Creates a new grid data-aware control.

Method Detail

setFocusedSelectionBackground

public void setFocusedSelectionBackground(java.awt.Color focusedSelectionColor)
Set the background selection color for when the GridControl has focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Parameters:
focusedSelectionColor - The color to be used for the selection background when the Grid has the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

getFocusedSelectionBackground

public java.awt.Color getFocusedSelectionBackground()
Return background selection color used when the GridControl has focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Returns:
The color used for the selection background when the Grid has the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

setUnfocusedSelectionBackground

public void setUnfocusedSelectionBackground(java.awt.Color unfocusedSelectionColor)
Set the background selection color for when the Grid looses focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Parameters:
unfocusedSelectionColor - The color to be used for the selection background when the Grid doesn't have the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

getUnfocusedSelectionBackground

public java.awt.Color getUnfocusedSelectionBackground()
Return the background selection color when the Grid looses focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Returns:
The color used for the selection background when the Grid doesn't have the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

setFocusedSelectionForeground

public void setFocusedSelectionForeground(java.awt.Color focusedSelectionColor)
Set the foreground selection color for when the Grid has focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Parameters:
focusedSelectionColor - The color to be used for the selection foreground when the Grid has the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

getFocusedSelectionForeground

public java.awt.Color getFocusedSelectionForeground()
Return the foreground selection color when the GridControl has focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Returns:
The color used for the selection foreground when the Grid has the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

setUnfocusedSelectionForeground

public void setUnfocusedSelectionForeground(java.awt.Color unfocusedSelectionColor)
Set the foreground selection color when the Grid looses focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Parameters:
unfocusedSelectionColor - The color to be used for the selection foreground when the Grid doesn't have the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

getUnfocusedSelectionForeground

public java.awt.Color getUnfocusedSelectionForeground()
Return the foreground selection color when the Grid looses focus. The GridControl always high-lights the current row using the selection colors according its the focus state. The GridControl uses the focusedSelectionForeground and focusedSelectionBackground colors when it has the keyboard focus. Likewise, it used the unfocusedSelectionForeground and unfocusedSelectionBackground colors when it does not have the keyboard focus.

Returns:
The color used for the selection foreground when the Grid doesn't have the keyboard focus
See Also:
setFocusedSelectionBackground(java.awt.Color), getFocusedSelectionBackground(), setFocusedSelectionForeground(java.awt.Color), getFocusedSelectionForeground(), setUnfocusedSelectionBackground(java.awt.Color), getUnfocusedSelectionBackground(), setUnfocusedSelectionForeground(java.awt.Color), getUnfocusedSelectionForeground()

getTable

public final javax.swing.JTable getTable()
Returns the underlying JFC JTable object.

Returns:
The table.

createTableDataSource

protected GridDataSource createTableDataSource(GridControl g)

getTableDataSource

public final GridDataSource getTableDataSource()
Returns the data source being used by the underlying JFC JTable object.

Returns:
The table data source.

getTableAggregate

public final javax.swing.JScrollPane getTableAggregate()
Returns the scroll pane being used by the underlying JFC JTable object.

Returns:
The table scroll pane.

changeCurrency

public boolean changeCurrency()
Description copied from interface: ContainerControl
Returns true if a ContainerControl (e.g. GridControl) successfully changes the row currency.

This method is called during the navigation process by the NavigationManager and should not be called directly.

Specified by:
changeCurrency in interface ContainerControl

enabledChanged

public void enabledChanged(boolean b)
Specified by:
enabledChanged in interface ControlEnabledListener

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

releaseResources

public void releaseResources(InfoBusManagerReleaseEvent e)
Description copied from interface: InfoBusManagerListener
A signalling method used to indicate the the control should free all resources and unregister any listeners that it has registered.

Specified by:
releaseResources in interface InfoBusManagerListener

setEnabled

public void setEnabled(boolean b)
An override of java.awt.Component.setEnabled.

Specified by:
setEnabled in interface Control
Parameters:
b - boolean flag indicating whether the control is enabled

getInfoBusName

public final java.lang.String getInfoBusName()
Returns the name of the InfoBus this control is connected to.

Specified by:
getInfoBusName in interface Control
Returns:
The name of the InfoBus this control is connected to.
See Also:
Control.getInfoBusName()

setInfoBusName

public final void setInfoBusName(java.lang.String infoBusName)
Sets the name of the InfoBus this control is connected to.

By default, the control is connected to the default InfoBus, named Control.DEFAULT_INFOBUS_NAME.

If the named InfoBus does not exist, it is created automatically.

If the control is already connected to an InfoBus, it is disconnected first.

Specified by:
setInfoBusName in interface Control
Parameters:
infoBusName - The name of the InfoBus to connect to.
See Also:
Control.DEFAULT_INFOBUS_NAME, Control.setInfoBusName(java.lang.String)

getDataItemName

public final java.lang.String getDataItemName()
Returns the name of the InfoBus DataItem this control is bound to.

Specified by:
getDataItemName in interface Control
Returns:
The name of the InfoBus DataItem this control is bound to, or null if the control is unbound.
See Also:
getDataItem(), Control.getDataItemName()

setDataItemName

public final void setDataItemName(java.lang.String dataItemName)
Sets the name of the InfoBus DataItem this control is bound to.

The DataItem with the given name is searched for on the InfoBus, and if found, is bound to this control.

If the control is already bound to a DataItem, it is unbound first.

Specified by:
setDataItemName in interface Control
Parameters:
dataItemName - The name of the DataItem to bind to.
See Also:
getDataItem(), Control.setDataItemName(java.lang.String)

getDataItem

public final java.lang.Object getDataItem()
Returns the InfoBus DataItem this control is bound to.

Specified by:
getDataItem in interface Control
Returns:
The InfoBus DataItem this control is bound to, or null if the control is unbound.
See Also:
Control.getDataItem()

isAutoRowNavigation

public boolean isAutoRowNavigation()
Controls how Tab or Shift-Tab will cause the selection to move.

When true the following rules apply:

When false:


setAutoRowNavigation

public void setAutoRowNavigation(boolean auto)
Controls how Tab or Shift-Tab will cause the selection to move.

When true the following rules apply:

When false:


setShowGrid

public final void setShowGrid(boolean showGrid)
Exposes the JTable ShowGrid property in our subcomponent


setTableBackground

public final void setTableBackground(java.awt.Color color)
Exposes the JTable Background color property in our subcomponent to the property sheet


getTableBackground

public final java.awt.Color getTableBackground()
Exposes the JTable Background color property in our subcomponent to the property sheet


setTableForeground

public final void setTableForeground(java.awt.Color color)
Exposes the JTable Foreground color property in our subcomponent to the property sheet


getTableForeground

public final java.awt.Color getTableForeground()
Exposes the JTable Foreground color property in our subcomponent to the property sheet


setReadOnlyCellBackgroundColor

public void setReadOnlyCellBackgroundColor(java.awt.Color color)
specify the background color used for cells which are read-only


getReadOnlyCellBackgroundColor

public java.awt.Color getReadOnlyCellBackgroundColor()
get the current back color used for read only cells.


setForceReadOnly

public void setForceReadOnly(boolean forceReadOnly)
force all the cells to be read only., irrespective of the underlying data object.

Parameters:
forceReadOnly - - ignore the columns 'isUpdatable' flag when true

isForceReadOnly

public boolean isForceReadOnly()
are all the cells be forced as read only cells ?

Returns:
true if all the cells are forced to be read only

setScrollToSelectedRow

public void setScrollToSelectedRow(boolean bScroll)
In single selection mode, this flag controls whether the grid should scroll to the selected row or not. By default this property is false and the grid will not scroll to the selected row.

Parameters:
bScroll - true if the grid should scroll to the selected row

isScrollToSelectedRow

public boolean isScrollToSelectedRow()
Returns whether the Grid has been configured to scroll automatically to the selected row in single selection mode.

Returns:
true if the grid should scroll to selected row.

setSortDelegate

public void setSortDelegate(SortDelegate sortDelegate)
GridControl delegates 'sorting' to this helper object.

Parameters:
sortDelegate - helper object to do the sort

getSortDelegate

public SortDelegate getSortDelegate()
Return the helper object currently used for sorting

Returns:
sort helper object

dataItemChanged

public void dataItemChanged(java.lang.Object oldDataItem,
                            java.lang.Object newDataItem)
Notifies the control that the bound InfoBus DataItem has changed.

Specified by:
dataItemChanged in interface Control
Parameters:
oldDataItem - The formerly bound DataItem (can be null).
newDataItem - The newly bound DataItem (can be null).
See Also:
Control.dataItemChanged(java.lang.Object, java.lang.Object)

applyEdits

public void applyEdits()
Causes the control to close the cell editor, saving the value

Specified by:
applyEdits in interface ApplyEditsListener

cancelEdits

public void cancelEdits()
Causes the control to close the cell editor, loosing the value

Specified by:
cancelEdits in interface ApplyEditsListener

getComponent

public java.awt.Component getComponent()
Returns the AWT component associated with this control.

Specified by:
getComponent in interface Control
Returns:
The AWT component for this control.
See Also:
Control.getComponent()

isFocusValidated

public final boolean isFocusValidated()
Determines whether focus into this control causes validation to occur.

Specified by:
isFocusValidated in interface Control
Returns:
true if focus into this control causes validation to occur, false otherwise.
See Also:
Control.isFocusValidated()

setFocusValidated

public final void setFocusValidated(boolean focusValidated)
Sets whether focus into this control causes validation to occur.

Specified by:
setFocusValidated in interface Control
Parameters:
focusValidated - If true, focus into this control will cause validation to occur.
See Also:
Control.setFocusValidated(boolean)

setFocusTraversable

public final void setFocusTraversable(boolean focusTraversable)
Sets the underlying JTable as focus traversable. By default DAC removes tooltip text from the GridControl. This causes Swing to evaluate the GridControl's JTable as non-focus traversable. The application developer may use this method to override the algorithm that is used by Swing to evaluate whether a control is focus traversable. This will force the GridControl's JTable to evaluate as focus traversable even though ToolTip text has been disabled.


addNavigatedListener

public final void addNavigatedListener(NavigatedListener listener)
Adds a navigated listener to this control.

The listener will be notified of NavigateIn and NavigateOut events.

Specified by:
addNavigatedListener in interface Control
Parameters:
listener - The listener to add.
See Also:
Control.addNavigatedListener(oracle.dacf.control.NavigatedListener)

removeNavigatedListener

public final void removeNavigatedListener(NavigatedListener listener)
Removes a navigated listener from this control.

Specified by:
removeNavigatedListener in interface Control
Parameters:
listener - The listener to remove.
See Also:
Control.removeNavigatedListener(oracle.dacf.control.NavigatedListener)

processNavigatedEvent

public final void processNavigatedEvent(NavigatedEvent event)
Processes a navigated event for this control.

This method is for use by the NavigationManager only.

Specified by:
processNavigatedEvent in interface Control
Parameters:
event - The navigated event.
See Also:
Control.processNavigatedEvent(oracle.dacf.control.NavigatedEvent)

addNavigatingListener

public final void addNavigatingListener(NavigatingListener listener)
Adds a navigating listener to this control.

The listener will be notified of NavigateIn and NavigateOut events.

Specified by:
addNavigatingListener in interface Control
Parameters:
listener - The listener to add.
See Also:
Control.addNavigatingListener(oracle.dacf.control.NavigatingListener)

removeNavigatingListener

public final void removeNavigatingListener(NavigatingListener listener)
Removes a navigating listener from this control.

Specified by:
removeNavigatingListener in interface Control
Parameters:
listener - The listener to remove.
See Also:
Control.removeNavigatingListener(oracle.dacf.control.NavigatingListener)

processNavigatingEvent

public final void processNavigatingEvent(NavigatingEvent event)
                                  throws NavigatingException
Processes a navigating event for this control.

This method is for use by the NavigationManager only.

Specified by:
processNavigatingEvent in interface Control
Parameters:
event - The navigating event.
Throws:
NavigatingException - If the navigation is redirected to a different control.
See Also:
Control.processNavigatingEvent(oracle.dacf.control.NavigatingEvent)

dataItemValueChanged

public final void dataItemValueChanged(javax.infobus.DataItemValueChangedEvent event)
Indicates a changed value in the bound data item.

A reference to the data item that changed can be obtained from the event.

Specified by:
dataItemValueChanged in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains change information.
See Also:
DataItemChangeListener.dataItemValueChanged(javax.infobus.DataItemValueChangedEvent)

dataItemAdded

public final void dataItemAdded(javax.infobus.DataItemAddedEvent event)
Indicates that a new item was added to the bound aggregate data item (e.g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was added, and a reference to the one that gained it, can be obtained from the event.

Specified by:
dataItemAdded in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the addition.
See Also:
DataItemChangeListener.dataItemAdded(javax.infobus.DataItemAddedEvent)

dataItemDeleted

public final void dataItemDeleted(javax.infobus.DataItemDeletedEvent event)
Indicates that an item was deleted from the bound aggregate data item (e. g. ArrayAccess, a JDK Collection, etc).

A reference to the data item that was deleted, and a reference to the one that lost it, can be obtained from the event.

Specified by:
dataItemDeleted in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the deletion.
See Also:
DataItemChangeListener.dataItemDeleted(javax.infobus.DataItemDeletedEvent)

dataItemRevoked

public final void dataItemRevoked(javax.infobus.DataItemRevokedEvent event)
Indicates that the bound data item (and its sub-items, if any) has been revoked, and is temporarily unavailable.

A reference to the data item that was revoked can be obtained from the event.

Specified by:
dataItemRevoked in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the revoked data.
See Also:
DataItemChangeListener.dataItemRevoked(javax.infobus.DataItemRevokedEvent)

rowsetCursorMoved

public final void rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent event)
Indicates that the cursor for the bound RowsetAccess data item has changed rows.

A reference to the rowset data item can be obtained from the event.

Specified by:
rowsetCursorMoved in interface javax.infobus.DataItemChangeListener
Parameters:
event - Contains details of the cursor move.
See Also:
DataItemChangeListener.rowsetCursorMoved(javax.infobus.RowsetCursorMovedEvent)

installColumnPropertiesPopupMenu

protected void installColumnPropertiesPopupMenu()

uninstallColumnPropertiesPopupMenu

protected void uninstallColumnPropertiesPopupMenu()

createScrollPane

protected javax.swing.JScrollPane createScrollPane()
Override this method, if you wish to use a custom ScrollPane. A custom ScrollPane may be used, for example, if you wish to change the way the scroll bar refreshes the View.


setOpaque

public void setOpaque(boolean isOpaque)

setToolTipText

public void setToolTipText(java.lang.String text)

setAutoCreateColumnsFromModel

public void setAutoCreateColumnsFromModel(boolean createColumns)

getAutoCreateColumnsFromModel

public boolean getAutoCreateColumnsFromModel()

setAutoResizeMode

public void setAutoResizeMode(int mode)

getAutoResizeMode

public int getAutoResizeMode()

setCellEditor

public void setCellEditor(javax.swing.table.TableCellEditor anEditor)

getCellEditor

public javax.swing.table.TableCellEditor getCellEditor(int row,
                                                       int column)

setCellSelectionEnabled

public void setCellSelectionEnabled(boolean flag)

getCellSelectionEnabled

public boolean getCellSelectionEnabled()

setColumnModel

public void setColumnModel(javax.swing.table.TableColumnModel newModel)

getColumnModel

public javax.swing.table.TableColumnModel getColumnModel()

setColumnSelectionAllowed

public void setColumnSelectionAllowed(boolean flag)

getColumnSelectionAllowed

public boolean getColumnSelectionAllowed()

setEditingColumn

public void setEditingColumn(int aColumn)

getEditingColumn

public int getEditingColumn()

setEditingRow

public void setEditingRow(int aRow)

getEditingRow

public int getEditingRow()

setGridColor

public final void setGridColor(java.awt.Color gridColor)

getGridColor

public final java.awt.Color getGridColor()

setIntercellSpacing

public void setIntercellSpacing(java.awt.Dimension newSpacing)

getIntercellSpacing

public java.awt.Dimension getIntercellSpacing()

setModel

public void setModel(javax.swing.table.TableModel newModel)

getModel

public javax.swing.table.TableModel getModel()

setPreferredScrollableViewportSize

public void setPreferredScrollableViewportSize(java.awt.Dimension size)

getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()

setRowHeight

public void setRowHeight(int newHeight)

getRowHeight

public int getRowHeight()

setRowMargin

public void setRowMargin(int rowMargin)

getRowMargin

public int getRowMargin()

setRowSelectionAllowed

public void setRowSelectionAllowed(boolean flag)

getRowSelectionAllowed

public boolean getRowSelectionAllowed()

setSelectionBackground

public final void setSelectionBackground(java.awt.Color color)
This will override the selection background setting currently in effect. This setting is inherently temporary because when keyboard focus changes, the appropriate value will be utilized.

See Also:
setFocusedSelectionBackground(java.awt.Color), setUnfocusedSelectionBackground(java.awt.Color)

getSelectionBackground

public final java.awt.Color getSelectionBackground()
This will return the current Color being used to indicate the current selection background. This setting is inherently temporary because when keyboard focus changes, the appropriate value will be utilized.

See Also:
getFocusedSelectionBackground(), getUnfocusedSelectionBackground()

setSelectionForeground

public final void setSelectionForeground(java.awt.Color color)
This will override the selection foreground setting currently in effect. This setting is inherently temporary because when keyboard focus changes, the appropriate value will be utilized.

See Also:
setFocusedSelectionForeground(java.awt.Color), setUnfocusedSelectionForeground(java.awt.Color)

getSelectionForeground

public final java.awt.Color getSelectionForeground()
This will return the current Color being used to indicate the current selection foreground. This setting is inherently temporary because when keyboard focus changes, the appropriate value will be utilized.

See Also:
getFocusedSelectionForeground(), getUnfocusedSelectionForeground()

setSelectionModel

public void setSelectionModel(javax.swing.ListSelectionModel newModel)

getSelectionModel

public javax.swing.ListSelectionModel getSelectionModel()

setShowHorizontalLines

public final void setShowHorizontalLines(boolean showLines)
Exposes the JTable ShowHorizontalLines property in our subcomponent to the property sheet


getShowHorizontalLines

public final boolean getShowHorizontalLines()
Exposes the JTable ShowHorizontalLines property in our subcomponent to the property sheet


setShowVerticalLines

public final void setShowVerticalLines(boolean showLines)
Exposes the JTable ShowVerticalLines property in our subcomponent to the property sheet


getShowVerticalLines

public final boolean getShowVerticalLines()
Exposes the JTable ShowVerticalLines property in our subcomponent to the property sheet


setTableHeader

public void setTableHeader(javax.swing.table.JTableHeader newHeader)

getTableHeader

public javax.swing.table.JTableHeader getTableHeader()

getVisibleRowCount

public int getVisibleRowCount()

showVerticalScrollBar

public void showVerticalScrollBar(boolean bShow)
The vertical scroll can be removed by this method. Application, will have to scroll by explicitly changing the cursor for the dataitem.


_displayLOV

protected void _displayLOV(int columnIndex)

_displayLOV

protected void _displayLOV(java.lang.String columnDataItemName)

setShowColumnPropertiesPopupMenu

public void setShowColumnPropertiesPopupMenu(boolean showMenu)
displays the Column properties menu on right click

Parameters:
showMenu - true if the column show/hide properties menu should be displayed

isShowColumnPropertiesPopupMenu

public boolean isShowColumnPropertiesPopupMenu()

getColumnDataItemName

protected java.lang.String getColumnDataItemName(int columnIndex)

_getPopupMenu

protected oracle.dacf.control.swing.ColumnPropertiesPopupMenu _getPopupMenu()

Oracle Data-aware Controls Reference

 

Copyright © 1997, 2003, Oracle. All rights reserved.