Package com.ms.ui |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class UIPanel extends Panel implements IUIContainer, IAccessible, IUIAccessible { // Constructors public UIPanel(); public UIPanel(int edge); // Methods public void addNotify(); public int countChildren(); public void doDefaultAction(); public void remove(Component comp); public void removeAll(); public void removeAllChildren(); public int continueInvalidate(); public boolean continueInvalidate(Component comp); public boolean ensureVisible(Rectangle rect); public void fullValidate(); public void fullValidate(Component comp); public void invalidate(); public boolean isEnabled(); public boolean isKeyable(); public boolean isSelectable(); public void initGraphics(); public Insets insets(); public void layout(); public Dimension minimumSize(); public Dimension preferredSize(); public void paint(Graphics g); public Component navigate(Component comp, int direction, boolean keyable); public Component passFocus(Event e, int dir); public String toString(); public boolean gotFocus(Event e, Object o); public boolean lostFocus(Event e, Object o); public boolean keyDown(Event e, int key); 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 Component getChild(int index); public Rectangle getClientRect(); public int getCompIndex(Component comp); public Component getComponent(String s); public Component getComponent(Component comp); public int getEdge(); public boolean getEnabled(); public int getFlags(); public boolean getFocus(); public Component getFocusComp(); public Component getHeader(); 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 UILayoutManager getUILayout(); public String getValueText(); public void setAccName(Variant varChild, String name); public void setAccValue(Variant varChild, String value); public void setChecked(boolean on); public void setEdge(int flags); public void setEnabled(boolean on); public void setFlags(int flags); public void setFocus(boolean on); public Component setHeader(Component header); 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 Panel object.
public UIPanel()Creates a panel object.
public UIPanel(int edge)Creates a panel object with the specified edge.
Parameter Description edge The style of the panel's edge. For a list of valid style flags, see the setEdge method.
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 int continueInvalidate();Determines whether an invalidate of any child should invalidate this container as well, continuing the propogation.
Return Value:
Returns 1 for continue; -1 for don't continue; and 0 when each component needs to be checked specifically.
public boolean continueInvalidate(Component comp);Determines whether a invalidate of the specified child should invalidate the current container as well, continuing the propogation.
Return Value:
Returns true to continue the propogation, or false to stop the invalidate propogation.
Parameter Description comp The invalidated component.
public int countChildren();Retrieves the number of children in this object that are not including the header child.
Return Value:
Returns the number of children in this object.
public void doDefaultAction();Performs the default action for this object.
Return Value:
No return value.
public boolean ensureVisible(Rectangle rect);Forwards a visible request up to the parent.
Return Value:
Returns true if any window has moved or has 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 invalidatepropagation stopped.
Return Value:
No return value.
Remarks:
This is a start case method, whereas fullValidate(comp) performs validations on specific components.
public void fullValidate(Component comp);Performs a validation on the specified component from the object where the invalidate propagation stopped.
Return Value:
No return value.
Parameter Description comp The component to validate.
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.
Remarks:
This method is used as part of the Active Accessibility Java classes.
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);Retrieves the bounding rectangle of the current component, in coordinates relative to the given component.
Return Value:
Returns the bounding rectangle of the component.
Parameter Description comp The relative component reference for the coordinates of the bounding rectangle.
public boolean getChecked();Retrieves the current checked state of this object.
Return Value:
Returns true if this object is checked; otherwise, returns false.
public Component getChild(int index)Retrieves the specified child in this object.
Return Value:
Returns the child at the specified index.
Parameter Description index Index in the component array of the child object to retrieve.
public Rectangle getClientRect();Retrieves the panel's client area, which is identified by the panel's bounding rectangle minus its insets.
Return Value:
Returns the bounding rectangle for the client area.
public int getCompIndex(Component comp);Retrieves the child index of the specified component.
Return Value:
Returns the location of the component in the container's component array.
Parameter Description comp The component whose index is to be retrieved.
public Component getComponent(String s);Retrieves the child component that contains the specified component's name in its hierarchy.
Return Value:
Returns the component with the specified name.
Parameter Description s The name of the component to retrieve.
public Component getComponent(Component comp);Retrieves the child component that contains the specified component in its hierarchy.
Return Value:
Returns the child that contains the comp parameter, or null if comp is not in this hierarchy.
Parameter Description comp The component to walk the ancestry chain from. Overrides:
Overrides getComponent in class Component.
public String getDefaultAction();Retrieves the default action for this object.
Return Value:
Returns a string describing the object's default action (i.e. "Press" for a Button).
public String getDescription();Provides a description of the object.
Return Value:
Returns a string describing the object beyond information provided by getRoleCode, getStateCode, and getName.
public int getEdge();Retrieves the current edge flags used when drawing the panel.
Return Value:
Returns the edge.
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 bit settings for the current state.
public boolean getFocus();Retrieves the current focus state of this object.
Return Value:
Returns true if this object has focus; otherwise, returns false.
public Component getFocusComp();Retrieves the component that currently has focus.
Return Value:
Returns the component with focus.
public Component getHeader();Retrieves the header (label) child of this object.
Return Value:
Returns the header child; returns null if this object doesn't have one.
public String getHelp();Provides help text for the object.
Return Value:
Returns a string describing the object's function beyond information provided by getRoleCode, getStateCode, and getName.
Remarks:
It is used to provide a ToolTip for the object when it is tracked.
public boolean getHot();Retrieves 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();Retrieves the current indeterminate state of this object.
Return Value:
Returns true if this object is indeterminate; otherwise, returns false.
public String getKeyboardShortcut();Describes the keystrokes needed to change input focus from the current object to the selected object.
Return Value:
Returns a string describing a keystroke sequence.
public String getName();Retrieves the object's displayed name.
Return Value:
Returns the string displayed as the object's name.
public boolean getPressed();Retrieves 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 the panel.
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();Retrieves 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 panel.
Return Value:
Returns the combination of STATE_SYSTEM codes that best describes the state of the panel.
Remarks:
This returned code always contains the flags STATE_SYSTEM_SIZEABLE and STATE_SYSTEM_MOVEABLE. Depending on the current state of the panel, the code may also contain one or more of the following flags.
public UILayoutManager getUILayout();Retrieves the layout manager associated with the container.
Return Value:
Returns the layout manager object.
public String getValueText();Provides help text for the object.
Return Value:
Returns a string describing the object's function beyond information provided by getRoleCode, getStateCode, and getName.
Remarks:
This help text is used for more complete help than the simple tips supplied with the getHelp method.
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). Overrides:
Overrides gotFocus in class Component.
public void initGraphics();Initializes graphics when the 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 Insets insets();Determines the insets of this container, which indicate the size of the panel's border.
Return Value:
Returns the panel insets.
Overrides:
Overrides insets in class Container.
public void invalidate();This method marks the object as invalid, when an object has been resized or changed. It propagates itself up a chain until a continueInvalidate method stops its propagation.
Return Value:
No return value.
Remarks:
The next method called, fullValidate, then redraws the object. It, too, propagates up the same chain until the continueInvalidate method is reached that stopped the invalidate, and validates objects down the propagation chain from that point.
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 keyDown(Event e, int key);Handles the passing of focus among components within the panel when the arrow keys are pressed.
Return Value:
Returns true if focus was handled; otherwise, returns the result of calling the superclass implementation.
Parameter Description e The event that caused the action. key The key that has been pressed. Overrides:
Overrides keyDown in class Component.
public void layout();Lays out the container.
Return Value:
No return value.
Remarks:
If there's no layout manager specified and there's only one child component, this method will size that child to fill the entire container. Otherwise, the superclass's layout method is called.
Overrides:
Overrides layout in class Container. </element
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). Overrides:
Overrides lostFocus in class Component.
public Dimension minimumSize();Determines the minimum size of the panel.
Return Value:
If there's no layout manager specified and there's only one child component, this method returns the minimum size of that child. Otherwise, the call goes to the superclass's minimumSize method and returns the value from it.
Overrides:
Overrides minimumSize in class Component.
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. Overrides:
Overrides mouseDown in class Component.
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.
Overrides:
Overrides mouseDrag in class Component.
public boolean mouseEnter(Event e, int x, int y);Reacts to the mouse entering the object by setting the object's hot-tracked state.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate. Overrides:
Overrides mouseEnter in class Component.
public boolean mouseExit(Event e, int x, int y);Reacts to the mouse exiting the object by clearing the object's hot-tracked state.
Return Value:
Returns false.
Parameter Description e The event that caused the action. x The x coordinate. y The y coordinate. Overrides:
Overrides mouseExit in class Component.
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. Overrides:
Overrides mouseUp in class Component.
public Component navigate(Component comp, int direction, boolean keyable);Navigates to another component from the specified component in the given direction.
Return Value:
Returns the component navigated to, or null if no component in the specified direction exists.
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 paint(Graphics g);Repaints the panel.
Return Value:
No return value.
Parameter Description g The graphics context. Overrides:
Overrides paint in class Component.
public Component passFocus(Event e, int dir);Passes the focus to the appropriate component in the panel, according to the specified direction.
Return Value:
Returns the component that focus was passed to.
Parameter Description e The event that was trapped. dir The direction to navigate. Specify one of the field values in IUIAccessible.
public Dimension preferredSize();Determines the preferred size of the panel.
Return Value:
If there's no layout manager specified and there's only one child component, this method returns the preferred size of that child. Otherwise, it calls the superclass's preferredSize method and returns that method's return value.
Remarks:
The preferred size is the width and height specified by the most recent call to the reshape or resize method.
Overrides:
Overrides preferredSize in class Component.
public void remove (Component comp);Removes the specified component of the panel's component array.
Return Value:
No return value.
Parameter Description comp Object to be removed. Overrides:
Overrides remove in class Container.
public void removeAll();Removes all components from the panel.
Return Value:
No return value.
public void removeAllChildren();Removes all child objects from the panel.
Return Value:
No return value.
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);Sets or clears the checked state of the panel.
Return Value:
No return value.
Parameter Description on If true, the checked state is set; otherwise, it is cleared.
public void setEdge(int flags);Sets the edge flags for drawing the panel.
Return Value:
No return value.
Parameter Description flags The style of the panel's edge. You can specify any bitwise combination of the following style flags.
- FxGraphics.BDR_RAISEDOUTER
- FxGraphics.BDR_SUNKENOUTER
- FxGraphics.BDR_RAISEDINNER
- FxGraphics.BDR_SUNKENINNER
- FxGraphics.BDR_FLAT
public void setEnabled(boolean on);Sets or clears the enabled state of the panel.
Return Value:
No return value.
Parameter Description on If true, the enabled state is set; otherwise, it is cleared.
public void setFlags(int flags);Set the current owner-defined state bits for this object.
Return Value:
No return value.
Parameter Description flags The 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);Sets or clears the focus state of the panel.
Return Value:
No return value.
Parameter Description on If true, the focus state is set; otherwise, it is cleared.
public Component setHeader(Component header);Makes the specified component the header object.
Return Value:
Returns the new header.
Parameter Description header Component to be made the header.
public void setHot(boolean on);Sets or clears the ho-tracked state of the panel.
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);Sets or clears the indeterminate state of the panel.
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 object's displayed name.
Return Value:
No return value.
public void setPressed(boolean on);Sets or clears the pressed state of the panel.
Return Value:
No return value.
Parameter Description on If true, the pressed state is set; otherwise, it is cleared.
public void setSelected(boolean on);Sets or clears the selected state of the panel.
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 an object's string value.
Return Value:
No return value.
Parameter Description value A string that describes the visual information contained in the object, beyond the information provided by getRoleCode,getStateCode, and getName. Remarks:
An application of this could be to set the text contained in a UIEdit object.
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.