Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class UICanvas extends Canvas implements IUIComponent, IAccessible, IUIAccessible { // Methods public void addNotify(); public void doDefaultAction(); public boolean ensureVisible(Rectangle rect); public void fullValidate(); public void initGraphics(); public Component navigate(Component comp, int direction, boolean keyable); public String toString(); public boolean isEnabled(); public boolean isKeyable(); public boolean isSelectable(); public boolean gotFocus(Event e, Object o); public boolean lostFocus(Event e, Object o); public boolean mouseDown(Event e, int x, int y); public boolean mouseUp(Event e, int x, int y); public boolean mouseDrag(Event e, int x, int y); public boolean mouseEnter(Event e, int x, int y); public boolean mouseExit(Event e, int x, int y); public void accDoDefaultAction(Variant varChild); public Variant accHitTest(int xLeft, int yTop); public void accLocation(int[] pxLeft, int[] pyTop, int[] pcxWidth, int[] pcyHeight, Variant varChild); public Variant accNavigate(int navDir, Variant varStartFromChildOrSelf); public void accSelect(int flagsSelect, Variant varChild); public Object getAccChild(Variant varChild); public int getAccChildCount(); public String getAccDefaultAction(Variant varChild); public String getAccDescription(Variant varChild); public Variant getAccFocus(); public String getAccHelp(Variant varChild); public int getAccHelpTopic(String[] helpFile, Variant varChild); public String getAccKeyboardShortcut(Variant varChild); public String getAccName(Variant varChild); public Object getAccParent(); public Variant getAccRole(Variant varChild); public Variant getAccSelection(); public Variant getAccState(Variant varChild); public String getAccValue(Variant varChild); public Rectangle getBounds(Component comp); public String getDefaultAction(); public String getDescription(); public boolean getChecked(); public boolean getEnabled(); public int getFlags(); public boolean getFocus(); public String getHelp(); public boolean getHot(); public int getID(); public boolean getIndeterminate(); public String getKeyboardShortcut(); public String getName(); public boolean getPressed(); public int getRoleCode(); public IUIRootContainer getRoot(); public boolean getSelected(); public int getStateCode(); public String getValueText(); public void setAccName(Variant varChild, String name); public void setAccValue(Variant varChild, String value); public void setChecked(boolean on); public void setEnabled(boolean on); public void setFlags(int flags); public void setFocus(boolean on); public void setHot(boolean on); public void setID(int id); public void setIndeterminate(boolean on); public void setName(String name); public void setPressed(boolean on); public void setSelected(boolean on); public void setValueText(String value); }
A class that manages an extended Canvas object.
public void accDoDefaultAction(Variant varChild);Performs the objects default action.
Return Value:
No return value.
Parameter Description varChild A Variant child. Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant accHitTest(int xLeft, int yTop);Retrieves a child object at a given point on the screen.
Return Value:
A Variant class.
Parameter Description xLeft The x coordinate of the screen point to be hit tested. yTop the y coordinate of the screen point to be hit tested. Remarks:
This method is used as part of the Active Accessibility Java classes.
public void accLocation(int[] pxLeft, int[] pyTop, int[] pcxWidth, int[] pcyHeight, Variant varChild);Retrieves an Active Accessiblity object's screen location, and its child element.
Return Value:
No return value.
Parameter Description pxLeft The x coordinate of the object's screen location. pyTop The y coordinate of the object's screen location. pcxWidth The width, in pixels, of the object. pcyHeight The height, in pixels, of the object. varChild The Variant child contained within the object. Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant accNavigate(int navDir, Variant varStartFromChildOrSelf);Retrieves the object navigated to with the given direction.
Return Value:
Returns the Variant object navigated to.
Parameter Description navDir The navigation code. varStartFromChildOrSelf The Variant object navigated from. Remarks:
This method is used as part of the Active Accessibility Java classes.
public void accSelect(int flagsSelect, Variant varChild);Changes focus and selection according to the selection flags.
Return Value:
No return value.
Parameter Description flagsSelect The selection flags. varChild Remarks:
This method is used as part of the Active Accessibility Java classes.
public void addNotify();Monitors calls to addNotify to call initGraphics on the first call.
Return Value:
No return value.
public void doDefaultAction();Performs the default action for the object.
Return Value:
No return value.
Remarks:
The default implementation does nothing.
public boolean ensureVisible(Rectangle rect);Forwards a visible request up to parent.
Return Value:
Returns true if any window has moved or been resized to make that rectangle visible; otherwise, returns false if the rectangle was already visible.
Return Value:
No return value.
Parameter Description rect Rectangle whose visibility is to be ensured in its container.
public void fullValidate();Performs a validation from the object where the invalidate propagation stopped.
Return Value:
No return value.
public Object getAccChild(Variant varChild);Retrieves the child at the specified one-based index.
Return Value:
Returns the requested child object.
Parameter Description varChild The Variant that contains the index. Remarks:
This method is used as part of the Active Accessibility Java classes. It is currently not implemented and throws a ComFailException.
public int getAccChildCount();Retrieves the number of components in the parent container.
Return Value:
Returns the number of components in the parent container.
public String getAccDefaultAction(Variant varChild);Performs the default action for the varChild object.
Return Value:
Returns a string describing the default action of the varChild object.
Parameter Description varChild The specifiedVariant child object. Remarks:
This method is used as part of the Active Accessibility Java classes.
public String getAccDescription(Variant varChild);Retrieves a description of the object beyond what is provided in getAccRole, getAccState, and getAccName.
Return Value:
Returns a description of the current object.
Parameter Description varChild The currently selected object. Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant getAccFocus();Retrieves the child object of which currently has focus within its container, or retrieves the container object itself.
Return Value:
Returns a Variant object which currently has focus.
Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant getAccFocus();Retrieves the child object of which currently has focus within its container, or retrieves the container object itself.
Return Value:
Returns a Variant object which currently has focus.
Remarks:
This method is used as part of the Active Accessibility Java classes.
public String getAccHelp(Variant varChild);Provides help text for the object.
Return Value:
Returns a string describing the object's function beyond information provided by getAccRole, getAccState, and getAccName.
Parameter Description varChild The selected Variant object for which help text is requested. Remarks:
This method is used as part of the Active Accessibility Java classes.
public int getAccHelpTopic(String[] helpFile, Variant varChild);This method is not currently implemented.
Return Value:
Currently throws a ComFailException error.
Parameter Description helpFile A topic contained in a help file list. varChild The Variant object for which help was requested. Remarks:
This method is used as part of the Active Accessibility Java classes. It is currently not implemented.
public String getAccKeyboardShortcut(Variant varChild);Retrieves the keyboard shortcut to select the desired object.
Return Value:
Returns a string describing a sequence of keystrokes. Throws a ComFailException error if the specified varChild is invalid.
Parameter Description varChild The selected Variant object. Remarks:
This method is used as part of the Active Accessibility Java classes.
public String getAccName(Variant varChild);Retrieves the object's displayed name.
Return Value:
Returns the string displayed as the object's name.
Parameter Description varChild The specified child object. Remarks:
This method is used as part of the Active Accessibility Java classes.
public Object getAccParent();Retrieves the parent object or container of the child object.
Return Value:
Returns the parent object of the current object.
Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant getAccRole(Variant varChild);Retrieves the role of the specified object.
Return Value:
Returns a Variant with the role code of the specified varChild.
Parameter Description varChild The Variant object for which the role code is requested. Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant getAccSelection();Return Value:
Returns a new Variant.
Remarks:
This method is used as part of the Active Accessibility Java classes.
public Variant getAccState(Variant varChild);Retrieves the state code of the specified Variant object.
Return Value:
Returns a Variant describing the state of the currently selected object.
Parameter Description varChild The object for which the state code is requested. Remarks:
This method is used as part of the Active Accessibility Java classes.
public String getAccValue(Variant varChild);Provides edit field value text for the object.
Return Value:
Returns the contents of an object's edit field.
Parameter Description varChild The object for which the value text is requested. Remarks:
This method is used as part of the Active Accessibility Java classes.
public Rectangle getBounds(Component comp);Get the bounding rectangle of this component, in coordinates relative to the given component
Return Value:
Returns the bounding rectangle of this component.
Parameter Description comp The realtive reference for the bounding rectangle.
public boolean getChecked();Gets the current checked state of this object.
Return Value:
Returns true if this object is checked; otherwise, returns false.
public String getDefaultAction();Retrieve the default action for the object.
Return Value:
Returns a string describing this object's default action (e.g. "Press" for a button).
public String getDescription();Retrieve the description for the object.
Return Value:
Returns a string describing this object beyond what information is already provided by getRoleCode, getStateCode, and getName.
public boolean getEnabled();Retrieves the enabled status of this object.
Return Value:
Returns true if the object and all of its ancestors are enabled; otherwise, returns false.
public int getFlags();Gets the current owner-defined state bits set for this object.
Return Value:
Returns the current state bit settings.
public boolean getFocus();Gets the current focus state of this object.
Return Value:
Returns true if this object has focus; otherwise, returns false.
public String getHelp();Retrieves the help text for this object.
Return Value:
Returns a string describing this object's function beyond what information is provided by getRoleCode, getStateCode, and getName.
Remarks:
This is used to display a ToolTip for the object when it is tracked.
public boolean getHot();Gets the current hot-tracked state of this object.
Return Value:
Returns true if this object is hot-tracked; otherwise, returns false.
public int getID();Retrieves the object's identification.
Return Value:
Returns the identification value associated with the object.
public boolean getIndeterminate();Gets the current indeterminate state of this object.
Return Value:
Returns true if this object is indeterminate; otherwise, returns false.
public String getKeyboardShortcut();Get the keyboard shortcut for this object.
Return Value:
Returns a string describing the sequence of keystrokes needed to transfer input focus from the currently focused object to this object.
public String getName()Retrieves the object's displayed name.
Return Value:
Returns the string displayed as the object's name.
public boolean getPressed();Gets the current pressed state of this object.
Return Value:
Returns true if this object is pressed; otherwise, returns false.
public int getRoleCode();Retrieves the ROLE_SYSTEM code that best describes the role of this object.
Return Value:
Returns zero.
public IUIRootContainer getRoot();Retrieves the first component, starting from this component and moving up the parent chain, that implements the IUIRootContainer interface.
Return Value:
Returns the root container.
Remarks:
If a root container is not found, this method returns the global UIFrame object from UIFrame.getFrame.
public boolean getSelected();Gets the current selected state of this object.
Return Value:
Returns true if this object is selected; otherwise, returns false.
public int getStateCode();Determines the current state of the object.
Return Value:
Returns the combination of STATE_SYSTEM codes that best describes the state of the object.
Remarks:
This returned code always contains the flags STATE_SYSTEM_SIZEABLE and STATE_SYSTEM_MOVEABLE. Depending on the current state of the object, the code may also contain one or more of the following flags.
public String getValueText();Retrieve the help text for this object.
Return Value:
Returns a string describing this object's function beyond what information is provided by getRoleCode, getStateCode, and getName.
public boolean gotFocus(Event e, Object o);Reacts to receiving focus by setting the focus state of this object.
Return Value:
Returns the result of calling the superclass's gotFocus method.
Parameter Description e The event that caused the action. o The action (typically set to null).
public void initGraphics();Initializes graphics when a graphics context is initially made available.
Return Value:
No return value.
Remarks:
This method is used instead of the constructor to do an initialization that requires the graphics context. It has no implementation by itself; subclasses should override this method for graphics-dependent initialization code.
public boolean isEnabled()Determines whether the object is enabled.
Return Value:
Returns true if this object and all of its ancestors are enabled; otherwise, returns false.
public boolean isKeyable();Determines whether the object can receive keyboard input.
Return Value:
Returns true if the object can receive keyboard input; otherwise, returns false.
public boolean isSelectable();Determines whether the object can be selected.
Return Value:
Returns true if the object can be selected; otherwise, returns false.
public boolean lostFocus(Event e, Object o);Reacts to losing focus by clearing the focus state of this object.
Return Value:
Returns the result of calling the superclass's lostFocus method.
Parameter Description e The event that caused the action. o The action (typically set to null).
public boolean mouseDown(Event e, int x, int y);Reacts to the mouse button being pressed by setting the pressed state of this object.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate.
public boolean mouseDrag(Event e, int x, int y);Reacts to the mouse being dragged outside the object or back inside the object by setting or clearing the pressed and hot-tracked states of this object accordingly.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate. Remarks:
If the mouse is dragged from inside to outside the object, the pressed and hot-track states are both cleared. If the mouse is dragged from outside to inside, the pressed and hot-track states are both set.
public boolean mouseEnter(Event e, int x, int y);Reacts to the mouse entering the object by setting the hot-tracked state of this object.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate.
public boolean mouseExit(Event e, int x, int y);Reacts to the mouse exiting the object by clearing the hot-tracked state of this object.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate.
public boolean mouseUp(Event e, int x, int y);Reacts to the mouse button being released by clearing the pressed state of this object.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate.
public Component navigate(Component comp, int direction, boolean keyable);Navigates to another component from the specified component in the given direction.
Return Value:
Returns null, indicating no component can be navigated to.
Parameter Description comp The component from which to navigate. direction The direction to navigate. Specify one of the field values in IUIAccessible. keyable If true, non-keyable components will be ignored during the navigation; otherwise, all components can be navigated to. Remarks:
If an undefined direction is specified, an IllegalArgumentException is thrown.
public void setAccName(Variant varChild, String name);Sets the displayed name for the specified child object.
Return Value:
No return value.
Parameter Description varChild The named child object. name A string set as the object's name. Remarks:
This method is used as part of the Active Accessibility Java classes.
public void setAccValue(Variant varChild, String value);Sets the value of an edit field for the specified object.
Return Value:
No return value.
Parameter Description varChild The object for which the value text is set. value A value for the edit field. Remarks:
This method is used as part of the Active Accessibility Java classes. Value may be also used for a scrollbar or grip position, or indentation level of a tree.
public void setChecked(boolean on);Set or clears the checked state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the checked state is set; otherwise, it is cleared.
public void setEnabled(boolean on);Set or clears the enabled state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the enabled state is set; otherwise, it is cleared.
public void setFlags(int flags);Sets the current owner-defined state bits for this object.
Return Value:
No return value.
Parameter Description flags The new state bit settings. Remarks:
Any bit in the mask 0xFFFF0000 can be set. An IllegalArgumentException is thrown if any bits outside this mask are specified.
public void setFocus(boolean on);Set or clears the focus state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the focus state is set; otherwise, it is cleared.
public void setHot(boolean on);Set or clears the hot-tracked state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the hot-tracked state is set; otherwise, it is cleared.
public void setID(int id);Sets the object's identification.
Return Value:
No return value.
Parameter Description id Identification value to be associated with the object.
public void setIndeterminate(boolean on);Set or clears the indeterminate state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the indeterminate state is set; otherwise, it is cleared.
public void setName(String name);Sets the name of the canvas object.
Return Value:
No return value.
Parameter Description name The name for the canvas object.
public void setPressed(boolean on);Set or clears the pressed state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the pressed state is set; otherwise, it is cleared.
public void setSelected(boolean on);Set or clears the selected state of the canvas object.
Return Value:
No return value.
Parameter Description on If true, the selected state is set; otherwise, it is cleared.
public void setValueText(String value);Sets the value text for the specified object.
Return Value:
No return value.
Parameter Description value A help description for the object Remarks:
A string describing the visual information contained in this object, beyond what information is provided by getRoleCode, getStateCode and getName.
public String toString();Retrieves the description of the object.
Return Value:
Returns a String containing the class and object names.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.