sub_arctic.input
Interface display_help

All Known Implementing Classes:
display_help_container

public abstract interface display_help
extends pointable

This input protocol is used to display help messages on the screen when an object has the mouse over it for some period of time. If you are considering implementing this interface, you should probably be sure to examine the display_help_container class in the lib package.

Warning: This protocol is based on the various mouse events that are dispatched by the system. If you modify an interface based on other types of events (e.g. animation), the display_help interface's help_close() call will not be made immediately. In particular, such a call will not be made until the next mouse event is processed.


Method Summary
 boolean help_close(event evt, java.lang.Object user_info)
          This method is called to inform the object that the help text should not be displayed any longer.
 boolean help_open(event evt, java.lang.Object user_info)
          This method is called to inform the object that the help text should be displayed now.
 
Methods inherited from interface sub_arctic.input.pointable
mouse_enter, mouse_exit
 

Method Detail

help_open

public boolean help_open(event evt,
                         java.lang.Object user_info)
This method is called to inform the object that the help text should be displayed now. This not called in response to any normal type event, but rather when a timer expires. Thus the event parameter may not be what you expect! Since this is called in response to the user not doing anything the return value here is primarily useful to inform the system if you handled the message (and thus it might need to be logged). Of course, if you don't handle help_open() you won't get a call to help_close().

Note that this interface is derived from the pointable interface. If you return false from the "mouse_enter" call in the pointable interface, you won't be eligible to receive help_open() (and thus help_close() messages).

The user_info supplied here is the value that you provided at pick time when you were picked by a previous event (the one that caused the mouse_enter() to be sent). Since you are not picked by this event, its not clear how to do better than this.

Parameters:
event - evt the event to dispatch
Object - user_info the object you passed to the pick_collector at pick_time (of the mouse_enter not this event)
Returns:
boolean return true if you dispatched this event.

help_close

public boolean help_close(event evt,
                          java.lang.Object user_info)
This method is called to inform the object that the help text should not be displayed any longer. Although this method is called in response to a user input, the display_help container cannot "dispatch" this event in the normal sense, since it is likely that other agents may have handled this event. Because of this property, the return value here is primarily only useful the event logging system. You should return true if you handled this event.

The user_info supplied here is the value that you provided at pick time when you were picked by a previous event. Since you are not picked by this event, its not clear how to do better than this.

Parameters:
event - evt the event to dispatch
Object - user_info the object you passed to the pick_collector at pick_time (of the mouse_enter not this event)
Returns:
boolean return true if you dispatched this event.