Oracle Data-aware Controls Reference

oracle.dacf.control
Interface Control

All Superinterfaces:
javax.infobus.DataItemChangeListener
All Known Implementing Classes:
ButtonControl, CheckBoxControl, ComboBoxControl, FindPanel, GridControl, ImageControl, InfoFrame, InfoInternalFrame, LabelControl, ListControl, LoginDlg, NavigationBar, RadioPanelControl, StatusBarControl, StatusBarControl.StatusBarLabelControl, StatusBarControl.StatusBarProgressControl, TextAreaControl, TextFieldControl, TreeControl

public interface Control
extends javax.infobus.DataItemChangeListener

All data-aware controls that plug into the runtime framework must implement this interface.

The ControlSupport class provides default implementations for all of the methods in this interface, except for the following methods:

Those methods must be implemented directly by the data aware control itself.


Field Summary
static java.lang.String DEFAULT_INFOBUS_NAME
          The name of the default InfoBus that controls will connect to if they do not have a different InfoBus specified via their setInfoBusName method.
static java.lang.String EVENT_PROPERTY_ROW
          The event property for the initial row affected by an event.
static java.lang.String EVENT_PROPERTY_ROW_CHANGE
           
static java.lang.String EVENT_PROPERTY_ROW_COUNT
          The event property for the number of rows affected by an event.
static java.lang.String EVENT_PROPERTY_VIEW_CHANGE
           
static java.lang.String EVENT_PROPERTY_VIEW_REFRESHED
           
static java.lang.String EVENT_PROPERTY_VIEW_SCROLLED
           
static int EXCLUDE
          attribute to indicate a column should not be included.
static int HIDE
          attribute to indicate a column should be hidden., control is initially hidden.
static int SHOW
          attribute to indicate a column should be displayed., when the control is initially displayed.
 
Method Summary
 void addNavigatedListener(NavigatedListener listener)
          Adds a navigated listener to this control.
 void addNavigatingListener(NavigatingListener listener)
          Adds a navigating listener to this control.
 void dataItemChanged(java.lang.Object oldDataItem, java.lang.Object newDataItem)
          Notifies the control that the bound InfoBus DataItem has changed.
 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.
 java.lang.String getInfoBusName()
          Returns the name of the InfoBus this control is connected to.
 boolean isFocusValidated()
          Determines whether this control causes validation upon gaining focus.
 void processNavigatedEvent(NavigatedEvent event)
          Processes a navigated event for this control.
 void processNavigatingEvent(NavigatingEvent event)
          Processes a navigating event for this control.
 void removeNavigatedListener(NavigatedListener listener)
          Removes a navigated listener from this control.
 void removeNavigatingListener(NavigatingListener listener)
          Removes a navigating listener from this control.
 void setDataItemName(java.lang.String dataItemName)
          Sets the name of the InfoBus DataItem this control is bound to.
 void setEnabled(boolean b)
          An override of java.awt.Component.setEnabled.
 void setFocusValidated(boolean focusValidated)
          Sets whether focus into this control causes validation to occur.
 void setInfoBusName(java.lang.String infoBusName)
          Sets the name of the InfoBus this control is connected to.
 
Methods inherited from interface javax.infobus.DataItemChangeListener
dataItemAdded, dataItemDeleted, dataItemRevoked, dataItemValueChanged, rowsetCursorMoved
 

Field Detail

DEFAULT_INFOBUS_NAME

public static final java.lang.String DEFAULT_INFOBUS_NAME
The name of the default InfoBus that controls will connect to if they do not have a different InfoBus specified via their setInfoBusName method.

See Also:
setInfoBusName(java.lang.String), Constant Field Values

EVENT_PROPERTY_ROW

public static final java.lang.String EVENT_PROPERTY_ROW
The event property for the initial row affected by an event.

See Also:
DataItemChangeEvent.getProperty(java.lang.String), Constant Field Values

EVENT_PROPERTY_ROW_COUNT

public static final java.lang.String EVENT_PROPERTY_ROW_COUNT
The event property for the number of rows affected by an event.

See Also:
DataItemChangeEvent.getProperty(java.lang.String), Constant Field Values

EVENT_PROPERTY_VIEW_CHANGE

public static final java.lang.String EVENT_PROPERTY_VIEW_CHANGE
See Also:
Constant Field Values

EVENT_PROPERTY_ROW_CHANGE

public static final java.lang.String EVENT_PROPERTY_ROW_CHANGE
See Also:
Constant Field Values

EVENT_PROPERTY_VIEW_SCROLLED

public static final java.lang.String EVENT_PROPERTY_VIEW_SCROLLED
See Also:
Constant Field Values

EVENT_PROPERTY_VIEW_REFRESHED

public static final java.lang.String EVENT_PROPERTY_VIEW_REFRESHED
See Also:
Constant Field Values

SHOW

public static final int SHOW
attribute to indicate a column should be displayed., when the control is initially displayed. The column can be however 'hidden', later if needed.

See Also:
setColumnDisplayAttribute, Constant Field Values

HIDE

public static final int HIDE
attribute to indicate a column should be hidden., control is initially hidden. The column can be however 'displayed', later if needed. with the option of 'showind' it.

See Also:
setColumnDisplayAttribute, Constant Field Values

EXCLUDE

public static final int EXCLUDE
attribute to indicate a column should not be included. The behaviour is similair to hide attribute, except that the column cannot be 'displayed'.

See Also:
setColumnDisplayAttribute, Constant Field Values
Method Detail

setEnabled

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

A control implements this method and delegates the call to ControlSupport.

Parameters:
b - boolean flag indicating whether the control is enabled

getInfoBusName

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

Most controls should delegate this method to ControlSupport.

Returns:
The name of the InfoBus this control is connected to.
See Also:
ControlSupport.getInfoBusName()

setInfoBusName

public 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 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.

Most controls should delegate this method to ControlSupport.

Parameters:
infoBusName - The name of the InfoBus to connect to.
See Also:
DEFAULT_INFOBUS_NAME, ControlSupport.setInfoBusName(java.lang.String)

getDataItemName

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

Most controls should delegate this method to ControlSupport.

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

setDataItemName

public 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.

Most controls should delegate this method to ControlSupport.

Parameters:
dataItemName - The name of the DataItem to bind to.
See Also:
getDataItem(), ControlSupport.setDataItemName(java.lang.String)

getDataItem

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

Most controls should delegate this method to ControlSupport.

Returns:
The InfoBus DataItem this control is bound to, or null if the control is unbound.
See Also:
ControlSupport.getDataItem()

dataItemChanged

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

The control can safely ignore this notification.

Parameters:
oldDataItem - The formerly bound DataItem (can be null).
newDataItem - The newly bound DataItem (can be null).

getComponent

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

Returns:
The AWT component for this control.

isFocusValidated

public boolean isFocusValidated()
Determines whether this control causes validation upon gaining focus.

Most controls should delegate this method to ControlSupport.

Returns:
true if focus into this control causes validation to occur, false otherwise.
See Also:
ControlSupport.isFocusValidated()

setFocusValidated

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

Most controls should delegate this method to ControlSupport.

Parameters:
focusValidated - If true, focus into this control will cause validation to occur.
See Also:
ControlSupport.setFocusValidated(boolean)

addNavigatedListener

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

The listener will be notified of NavigateIn and NavigateOut events.

Most controls should delegate this method to ControlSupport.

Parameters:
listener - The listener to add.
See Also:
ControlSupport.addNavigatedListener(oracle.dacf.control.NavigatedListener)

removeNavigatedListener

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

Most controls should delegate this method to ControlSupport.

Parameters:
listener - The listener to remove.
See Also:
ControlSupport.removeNavigatedListener(oracle.dacf.control.NavigatedListener)

processNavigatedEvent

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

This method is for use by the NavigationManager only.

Most controls should delegate this method to ControlSupport.

Parameters:
event - The navigated event.
See Also:
ControlSupport.processNavigatedEvent(oracle.dacf.control.NavigatedEvent)

addNavigatingListener

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

The listener will be notified of NavigateIn and NavigateOut events.

Most controls should delegate this method to ControlSupport.

Parameters:
listener - The listener to add.
See Also:
ControlSupport.addNavigatedListener(oracle.dacf.control.NavigatedListener)

removeNavigatingListener

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

Most controls should delegate this method to ControlSupport.

Parameters:
listener - The listener to remove.
See Also:
ControlSupport.removeNavigatedListener(oracle.dacf.control.NavigatedListener)

processNavigatingEvent

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

This method is for use by the NavigatedManager only.

Most controls should delegate this method to ControlSupport.

Parameters:
event - The navigating event.
Throws:
NavigatingException - If the navigation is redirected to a different control.
See Also:
ControlSupport.processNavigatedEvent(oracle.dacf.control.NavigatedEvent)

Oracle Data-aware Controls Reference

 

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