Package com.ms.ui Previous
Previous
Contents
Contents
Index
Index
Next
Next

Interface IUIComponent

Methods

public interface IUIComponent
{
  // Methods
  public Rectangle getBounds(Component comp);
  public boolean getChecked();
  public boolean getEnabled();
  public int getFlags();
  public boolean getFocus();
  public boolean getHot();
  public int getID();
  public boolean getIndeterminate();
  public String getName();
  public boolean getPressed();
  public IUIRootContainer getRoot();
  public boolean getSelected();

  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 boolean ensureVisible(Rectangle rect);
  public void fullValidate();
  public void initGraphics();
  public boolean isKeyable();
  public boolean isSelectable();

}

Defines an interface for the extensions to the Component class.


Methods


ensureVisible

public boolean ensureVisible(Rectangle rect);

Forwards visible request up to 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.

ParameterDescription
rect Rectangle whose visibility is to be ensured in its container.


fullValidate

public void fullValidate();

Performs a validation from the root container.

Return Value:

No return value.


getBounds

public Rectangle getBounds(Component comp);

Retrieves the bounding rectangle of the object; the coordinates of the rectangle are relative to the specified component.

Return Value:

Returns the object's bounding rectangle.

ParameterDescription
comp The component used to determine the coordinates of the bounding rectangle. If this parameter is null, the bounding rectangle will be given in screen cooridnates.


getChecked

public boolean getChecked();

Retrieves the checked status of this object.

Return Value:

Returns true if the object is checked; otherwise, returns false.


getEnabled

public boolean getEnabled();

Retrieves the enabled status of this object.

Return Value:

Returns true if the object is enabled; otherwise, returns false.


getFlags

public int getFlags();

Retrieves the current owner-defined state bits that are set for this object.

Return Value:

Returns the current state bit settings.


getFocus

public boolean getFocus();

Retrieves the current focus state of this object.

Return Value:

Returns true if this object has the focus; otherwise, returns false.


getHot

public boolean getHot();

Retrieves the current hot-tracked state of this object.

Return Value:

Returns true if the object is hot-tracked; otherwise, returns false.


getID

public int getID();

Retrieves the object's identification.

Return Value:

Returns the identification value associated with the object.


getIndeterminate

public boolean getIndeterminate();

Retrieves the indeterminate status of this object.

Return Value:

Returns true if the object is indeterminate; otherwise, returns false.


getName

public String getName();

Retrieves the object's displayed name.

Return Value:

Returns the string displayed as the object's name.


getPressed

public boolean getPressed();

Retrieves the current pressed state of this object.

Return Value:

Returns true if the object is pressed; otherwise, returns false.


getRoot

public IUIRootContainer getRoot();

Retrieves the first component that implements the IUIRootContainer interface, starting from this object and moving up its parent chain.

Return Value:

Returns the immediate root container of the object.


getSelected

public boolean getSelected();

Retrieves the selected status of this object.

Return Value:

Returns true if this object is selected; otherwise, returns false.


initGraphics

public void initGraphics();

Initializes the graphics when the graphics context is first available.

Return Value:

No return value.

Remarks:

This method is used instead of the constructor to perform initialization that requires the graphics context.


isKeyable

public boolean isKeyable();

Retrieves the object's keyable state.

Return Value:

Returns true if the object can accept keyboard focus; otherwise, returns false.


isSelectable

public boolean isSelectable();

Determines the object's selectable state.

Return Value:

Returns true if the object can be selected; otherwise, returns false.


setChecked

public void setChecked(boolean on);

Sets the checked state of this object.

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.


setEnabled

public void setEnabled(boolean on);

Sets the enabled state of this object.

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.


setFlags

public void setFlags(int flags);

Sets the current owner-defined state bits for this object.

Return Value:

No return value.

ParameterDescription
flags New state bit settings.


setFocus

public void setFocus(boolean on);

Sets the focus state of this object.

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.


setHot

public void setHot(boolean on);

Sets the hot-track state of this object.

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.


setID

public void setID(int id);

Sets the object's identification.

Return Value:

No return value.

ParameterDescription
id Identification value to be associated with object.


setIndeterminate

public void setIndeterminate(boolean on);

Sets the indeterminate state of this object.

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.


setName

public void setName(String name);

Sets the object's displayed name.

Return Value:

No return value.

ParameterDescription
name Name of the string to be associated with object.


setPressed

public void setPressed(boolean on);

Sets the pressed state of this object.

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.


setSelected

public void setSelected(boolean on);

Sets the selected state of this object

Return Value:

No return value.

ParameterDescription
on Set to true to enable the state, set to false to disable the state.



Top© 1997 Microsoft Corporation. All rights reserved. Legal Notices.