com.esri.arcgis.controls
Class IToolbarControlEventsAdapter

java.lang.Object
  extended by com.esri.arcgis.controls.IToolbarControlEventsAdapter
All Implemented Interfaces:
IToolbarControlEvents, Serializable, EventListener

public class IToolbarControlEventsAdapter
extends Object
implements IToolbarControlEvents

See Also:
Serialized Form

Constructor Summary
IToolbarControlEventsAdapter()
           
 
Method Summary
 void onBuddyChanged(IToolbarControlEventsOnBuddyChangedEvent theEvent)
          Fires after the ToolbarControl Buddy is set.
 void onDoubleClick(IToolbarControlEventsOnDoubleClickEvent theEvent)
          Fires when the user presses and releases the mouse button twice in quick succession.
 void onItemClick(IToolbarControlEventsOnItemClickEvent theEvent)
          Fires after an item on the ToolbarControl is pressed.
 void onKeyDown(IToolbarControlEventsOnKeyDownEvent theEvent)
          Fires after a key is pressed on the keyboard.
 void onKeyUp(IToolbarControlEventsOnKeyUpEvent theEvent)
          Fires after a pressed key is released.
 void onMouseDown(IToolbarControlEventsOnMouseDownEvent theEvent)
          Fires when the user presses any mouse button while over the ToolbarControl.
 void onMouseMove(IToolbarControlEventsOnMouseMoveEvent theEvent)
          Fires when the user moves the mouse over the ToolbarControl.
 void onMouseUp(IToolbarControlEventsOnMouseUpEvent theEvent)
          Fires when the user releases a mouse button while over the ToolbarControl.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IToolbarControlEventsAdapter

public IToolbarControlEventsAdapter()
Method Detail

onMouseDown

public void onMouseDown(IToolbarControlEventsOnMouseDownEvent theEvent)
                 throws IOException,
                        AutomationException
Fires when the user presses any mouse button while over the ToolbarControl.

Description

The OnMouseDown event is triggered when the user presses a mouse button on the ToolbarControl. Use the event to specify actions that will occur when a given mouse button is pressed.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

Remarks

Use the win32 SetCapture function to continue receiving mouse events (until the mouse is released) when the mouse is moved outside the control's display area. The win32 ReleaseCapture function releases the mouse.

Product Availability

Available with ArcGIS Engine.

Specified by:
onMouseDown in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseUp

public void onMouseUp(IToolbarControlEventsOnMouseUpEvent theEvent)
               throws IOException,
                      AutomationException
Fires when the user releases a mouse button while over the ToolbarControl.

Description

The OnMouseUp event is triggered when the user releases a mouse button on the ToolbarControl. Use the event to specify actions that will occur when a given mouse button is released.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

Remarks

Use the win32 SetCapture function to continue receiving mouse events (until the mouse is released) when the mouse is moved outside the control's display area. The win32 ReleaseCapture function releases the mouse.

Product Availability

Available with ArcGIS Engine.

Specified by:
onMouseUp in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onMouseMove

public void onMouseMove(IToolbarControlEventsOnMouseMoveEvent theEvent)
                 throws IOException,
                        AutomationException
Fires when the user moves the mouse over the ToolbarControl.

Description

The OnMouseMove event is triggered continually as the mouse moves over the ToolbarControl.

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

Product Availability

Available with ArcGIS Engine.

Specified by:
onMouseMove in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onDoubleClick

public void onDoubleClick(IToolbarControlEventsOnDoubleClickEvent theEvent)
                   throws IOException,
                          AutomationException
Fires when the user presses and releases the mouse button twice in quick succession.

Description

button specifies which mouse button was pressed. 1 for the left mouse button, 2 for the right mouse button, and 4 for the middle mouse button.

shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

x is the X coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

y is the Y coordinate, in pixels, where the mouse button was pressed referenced against the origin (0, 0) of the ToolbarControl (the top left hand corner).

Remarks

The OnDoubleClick event is triggered when the user releases and presses a mouse button and then presses and releases it again on the ToolbarControl. If the double click does not occur within the system's double click time limit, the ToolbarControl will recognise another OnMouseDown event. Otherwise the event sequence is as follows:

OnMouseDown
OnMouseUp
OnDoubleClick
OnMouseUp

Product Availability

Available with ArcGIS Engine.

Specified by:
onDoubleClick in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onKeyDown

public void onKeyDown(IToolbarControlEventsOnKeyDownEvent theEvent)
               throws IOException,
                      AutomationException
Fires after a key is pressed on the keyboard.

Description

The OnKeyDown event is triggered when the user presses a key whilst the ToolbarControl has focus.

keyCode specifies a virtual key code value of the key pressed on the keyboard. For alpha-numeric keys this corresponds to the ASCII value, for example "A" key returns 65 which is the ASCII value for capital A. Other key codes are F1 to F12 are 112 to 123 respectively.

Shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

Remarks

Some development environments will filter out keystrokes. Typically the arrow keys are used to change control focus and will not fire the OnKeyDown event. To intercept these keys use the KeyIntercept property.

Product Availability

Available with ArcGIS Engine.

Specified by:
onKeyDown in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onKeyUp

public void onKeyUp(IToolbarControlEventsOnKeyUpEvent theEvent)
             throws IOException,
                    AutomationException
Fires after a pressed key is released.

Description

The OnKeyUp event is triggered when the user releases a key whilst the ToolbarControl has focus.

keyCode specifies a virtual key code value of the key pressed on the keyboard. For alpha-numeric keys this corresponds to the ASCII value, for example "A" key returns 65 which is the ASCII value for capital A. Other key codes are F1 to F12 are 112 to 123 respectively.

Shift specifies an integer corresponding to the state of the SHIFT (bit 0), CTRL (bit 1) and ALT (bit 2) keys. When none, some or all of these keys are pressed none, some or all the bits get set. These bits correspond to the values 1, 2, and 4, respectively. For example, if both SHIFT and ALT were pressed, ShiftState would return 5.

Remarks

Some development environments will filter out keystrokes. Typically the arrow keys are used to change control focus and will not fire the OnKeyDown event. To intercept these keys use the KeyIntercept property.

Product Availability

Available with ArcGIS Engine.

Specified by:
onKeyUp in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onItemClick

public void onItemClick(IToolbarControlEventsOnItemClickEvent theEvent)
                 throws IOException,
                        AutomationException
Fires after an item on the ToolbarControl is pressed.

Description

The OnItemClick event is triggered when the user presses the left mouse button on a ToolbarControl item. If the item is disabled the event is not triggered.

index specifies the index value of the item pressed.

Remarks

The event sequence is as follows:

OnMouseDown
OnMouseUp
OnItemClick

Product Availability

Available with ArcGIS Engine.

Specified by:
onItemClick in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

onBuddyChanged

public void onBuddyChanged(IToolbarControlEventsOnBuddyChangedEvent theEvent)
                    throws IOException,
                           AutomationException
Fires after the ToolbarControl Buddy is set.

Description

Fires when the SetBuddyControl method is used.

Any custom commands that are added to the ToolbarControl must be written in such a way as to ask the ToolbarControl for its Buddy every time an operation is requested to ensure they are always working with the current Buddy. Custom commands need to do one of two things:

ICommand::OnCreate will only get called once for each command that is added to the ToolbarControl the first time the Buddy is set. Using the SetBuddyControl method to change the buddy a subsequent time will not call ICommand::OnCreate, but will fire the OnBuddyChanged event.

Product Availability

Available with ArcGIS Engine.

Specified by:
onBuddyChanged in interface IToolbarControlEvents
Parameters:
theEvent - The event
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.