Packages
 In this topic

*Constructors

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.ui   Previous This
Package
Next

 


Class AwtUIBandBox

public class AwtUIBandBox extends AwtUIControl
{
  // Constructors
  public AwtUIBandBox();

  // Methods
  public void addActionListener(ActionListener l);
  public IUIComponent getBase();
  public boolean getMoveable(int i);
  public int getRowCount();
  protected void processActionEvent(ActionEvent e);
  protected void processHostEvent(AWTEvent e);
  public synchronized void removeActionListener(ActionListener l);
}

This class implements the functionality of a UIBandBox object in an AWT-based control. An AwtUIBandBox control is an AwtUIHost component whose associated root container holds a UIBandBox object. By hosting this object, an AwtUIBandBox control integrates AFC with AWT. Although an AwtUIBandBox control is fully compatible with AWT, a UIBandBox control is optimized for performance and size.

Panel
  |
  +--AwtUIHost
    |
    +--AwtUIControl
      |
      +--AwtUIBandBox

Constructors

AwtUIBandBox

public AwtUIBandBox();

Creates an AWT-based band box control.

Methods

addActionListener

public void addActionListener(ActionListener l);

Adds the specified action listener. The listener receives all action events generated for the control.

Return Value:

No return value.

ParameterDescription
l The action listener to be added.

See Also: removeActionListener

getBase

public IUIComponent getBase();

Retrieves the UI component that the button is based on.

Return Value:

Returns the UIBandBox object associated with the control.

Remarks:

When the AWT-based control is first created, it is associated with a UIBandBox object.

getMoveable

public boolean getMoveable(int i);

Determines whether the band at the specified index is moveable.

Return Value:

Returns true if the band can be moved; otherwise, returns false.

ParameterDescription
i The zero-based index of the band.

getRowCount

public int getRowCount();

Determines the number of rows in the control.

Return Value:

Returns the number of rows.

processActionEvent

protected void processActionEvent(ActionEvent e);

Processes action events.

Return Value:

No return value.

ParameterDescription
e The action event.

Remarks:

This method is called by processHostEvent and dispatches the event to a registered action listener. When overriding this method, call the super method processActionEvent to ensure the default event processing continues normally.

See Also: addActionListener

processHostEvent

protected void processHostEvent(AWTEvent e);

Processes the specified event.

Return Value:

No return value.

ParameterDescription
e The event.

Remarks:

This method is automatically invoked if a listener has been registered through a call to addXXXListener. Depending on the type of event, processHostEvent calls one of the following methods.

Event type Method called
action event processActionEvent
component event processComponentEvent (inherited through AwtUIHost)
container event processContainerEvent (inherited through AwtUIHost)
focus event processFocusEvent (inherited through AwtUIHost)
key event processKeyEvent (inherited through AwtUIHost)
mouse event processMouseEvent (inherited through AwtUIHost)
mouse motion event processMouseMotionEvent (inherited through AwtUIHost)

When overriding processHostEvent, call the super method processHostEvent to ensure the default event processing continues normally.

removeActionListener

public synchronized void removeActionListener(ActionListener l);

Removes the specified action listener. The listener no longer receives the control's action events.

Return Value:

No return value.

ParameterDescription
l The action listener to be removed.

See Also: addActionListener

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.