AccessibleObject.Navigate メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > AccessibleObject.Navigate メソッドの意味・解説 

AccessibleObject.Navigate メソッド

他のユーザー補助オブジェクト移動します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Overridable Function
 Navigate ( _
    navdir As AccessibleNavigation _
) As AccessibleObject
Dim instance As AccessibleObject
Dim navdir As AccessibleNavigation
Dim returnValue As AccessibleObject

returnValue = instance.Navigate(navdir)
public virtual AccessibleObject Navigate (
    AccessibleNavigation navdir
)
public:
virtual AccessibleObject^ Navigate (
    AccessibleNavigation navdir
)
public AccessibleObject Navigate (
    AccessibleNavigation navdir
)
public function Navigate (
    navdir : AccessibleNavigation
) : AccessibleObject

パラメータ

navdir

AccessibleNavigation 値の 1 つ

戻り値
AccessibleNavigation 値の 1 つを表す AccessibleObject。

例外例外
解説解説

移動は、空間的な移動論理的な移動のどちらの場合でも、常にコンテナ内のユーザー インターフェイス要素制限されます。空間的な移動では、クライアントは、開始オブジェクト兄弟だけに移動できます論理的な移動では、クライアントは、使用する移動フラグに応じて開始オブジェクトの子または兄弟いずれかに移動できます。このメソッドでは、選択項目またはフォーカス変更されません。フォーカス変更したり、オブジェクト選択したりするには、Select使用しますNavigate メソッドでは、画面位置定義されているユーザー インターフェイス要素だけを取得できます

継承時の注意 表示可能なオブジェクトはすべて、このメソッドサポートする必要があります。状態が AccessibleStates.Invisible に設定されている隠しオブジェクトへは、移動できないことありますメニューメニュー項目、ポップアップ メニューなど、システム定義の一部インターフェイス要素では、表示されないオブジェクト移動できます。ただし、システム定義の他のユーザー インターフェイス要素は、非表示オブジェクトへの移動サポートしていません。サーバーは、表示されないオブジェクトへの移動できるだけサポートする必要がありますが、必須ではありません。また、クライアントは、サポートされないことを予測しておく必要があります

使用例使用例

ユーザー補助情報公開する AccessibleObject クラスおよび Control.ControlAccessibleObject クラス使用してユーザー補助対応のチャート コントロール作成する方法の例を次に示しますコントロールは、凡例沿って 2 つ曲線プロットます。ControlAccessibleObject から派生された ChartControlAccessibleObject クラスは、チャート コントロールの独自のユーザー補助情報提供することを目的として、CreateAccessibilityInstance メソッド使用しますチャート凡例実際Control ベースコントロールではなくチャート コントロールによって描画されるため、組み込みユーザー補助情報含まれていません。このためChartControlAccessibleObject クラスは、GetChild メソッドオーバーライドして、凡例各部分のユーザー補助情報を表す CurveLegendAccessibleObject返しますユーザー補助対応のアプリケーションでこのコントロール使用され場合、このコントロール必要なユーザー補助情報を提供できます

Navigate メソッドオーバーライドする例を次に示しますコード例全体については、AccessibleObject クラス概要参照してください

' Inner class CurveLegendAccessibleObject represents accessible information
 
' associated with the CurveLegend object.
Public Class CurveLegendAccessibleObject
    Inherits AccessibleObject

    Private curveLegend As CurveLegend
    
    Public Sub New(curveLegend
 As CurveLegend)
        Me.curveLegend = curveLegend
    End Sub 'New
    
    ' Private property that helps get the reference to the parent ChartControl.
                
    Private ReadOnly Property
 ChartControl() As ChartControlAccessibleObject
        Get
            Return CType(Parent, ChartControlAccessibleObject)
        End Get
    End Property

    ' Friend helper function that returns the ID for this CurveLegend.
                
    Friend ReadOnly Property
 ID() As Integer
        Get
            Dim i As Integer
            For i = 0 To (ChartControl.GetChildCount())
 - 1
                If ChartControl.GetChild(i) Is
 Me Then
                    Return i
                End If
            Next i
            Return - 1
        End Get
    End Property
    
    ' Gets the Bounds for the CurveLegend. This is used by accessibility
 programs.
    Public Overrides ReadOnly
 Property Bounds() As Rectangle
        Get
            ' The bounds is in screen coordinates.
            Dim loc As Point = curveLegend.Location
            Return New Rectangle(curveLegend.chart.PointToScreen(loc),
 curveLegend.Size)
        End Get
    End Property

    ' Gets or sets the Name for the CurveLegend. This is used by accessibility
 programs.                
    Public Overrides Property
 Name() As String
        Get
            Return curveLegend.Name
        End Get
        Set
            curveLegend.Name = value
        End Set
    End Property
    
    ' Gets the Curve Legend Parent's Accessible object.
    ' This is used by accessibility programs.                
    Public Overrides ReadOnly
 Property Parent() As AccessibleObject
        Get
            Return curveLegend.chart.AccessibilityObject
        End Get
    End Property
    
    ' Gets the role for the CurveLegend. This is used by accessibility
 programs.                
    Public Overrides ReadOnly
 Property Role() As AccessibleRole
        Get
            Return System.Windows.Forms.AccessibleRole.StaticText
        End Get
    End Property

    ' Gets the state based on the selection for the CurveLegend. 
    ' This is used by accessibility programs.                
    Public Overrides ReadOnly
 Property State() As AccessibleStates
        Get
            Dim stateTemp As AccessibleStates
 = AccessibleStates.Selectable
            If curveLegend.Selected Then
                stateTemp = stateTemp Or AccessibleStates.Selected
            End If
            Return stateTemp
        End Get
    End Property
    
    ' Navigates through siblings of this CurveLegend. This is used by
 accessibility programs.                
    Public Overrides Function
 Navigate(navdir As AccessibleNavigation) As
 AccessibleObject
        ' Use the Friend NavigateFromChild helper function that exists
        ' on ChartControlAccessibleObject.
        Return ChartControl.NavigateFromChild(Me,
 navdir)
    End Function
    
    ' Selects or unselects this CurveLegend. This is used by accessibility
 programs.
    Public Overrides Sub
 [Select](selection As AccessibleSelection)

        ' Use the internal SelectChild helper function that exists
        ' on ChartControlAccessibleObject.
        ChartControl.SelectChild(Me, selection)
    End Sub

End Class 'CurveLegendAccessibleObject
// Inner class CurveLegendAccessibleObject represents accessible information
 
// associated with the CurveLegend object.
public class CurveLegendAccessibleObject :
 AccessibleObject
{
    private CurveLegend curveLegend;

    public CurveLegendAccessibleObject(CurveLegend curveLegend)
 : base() 
    {
        this.curveLegend = curveLegend;                    
    }                

    // Private property that helps get the reference to the parent ChartControl.
    private ChartControlAccessibleObject ChartControl
    {   
        get {
            return Parent as ChartControlAccessibleObject;
        }
    }

    // Internal helper function that returns the ID for this CurveLegend.
    internal int ID
    {
        get {
            for(int i = 0; i < ChartControl.GetChildCount();
 i++) {
                if (ChartControl.GetChild(i) == this)
 {
                    return i;
                }
            }
            return -1;
        }
    }

    // Gets the Bounds for the CurveLegend. This is used by accessibility
 programs.
    public override Rectangle Bounds
    {
        get {                        
            // The bounds is in screen coordinates.
            Point loc = curveLegend.Location;
            return new Rectangle(curveLegend.chart.PointToScreen(loc)
,
 curveLegend.Size);
        }
    }

    // Gets or sets the Name for the CurveLegend. This is used by accessibility
 programs.
    public override string Name
    {
        get {
            return curveLegend.Name;
        }
        set {
            curveLegend.Name = value;                        
        }
    }

    // Gets the Curve Legend Parent's Accessible object.
    // This is used by accessibility programs.
    public override AccessibleObject Parent
    {
        get {
            return curveLegend.chart.AccessibilityObject;
        }
    }

    // Gets the role for the CurveLegend. This is used by accessibility
 programs.
    public override AccessibleRole Role 
    {
        get {
            return AccessibleRole.StaticText;
        }
    }

    // Gets the state based on the selection for the CurveLegend. 
    // This is used by accessibility programs.
    public override AccessibleStates State 
    {
        get {
            AccessibleStates state = AccessibleStates.Selectable;
            if (curveLegend.Selected) 
            {
                state |= AccessibleStates.Selected;
            }
            return state;
        }
    }

    // Navigates through siblings of this CurveLegend. This is used
 by accessibility programs.
    public override AccessibleObject Navigate(AccessibleNavigation
 navdir) 
    {
        // Uses the internal NavigateFromChild helper function that
 exists
        // on ChartControlAccessibleObject.
        return ChartControl.NavigateFromChild(this,
 navdir);
    }

    // Selects or unselects this CurveLegend. This is used by accessibility
 programs.
    public override void Select(AccessibleSelection
 selection) 
    {
        // Uses the internal SelectChild helper function that exists
        // on ChartControlAccessibleObject.
        ChartControl.SelectChild(this, selection);
    }
}
   // Inner class CurveLegendAccessibleObject represents accessible information
   // associated with the CurveLegend object.
public:
   ref class CurveLegendAccessibleObject: public
 AccessibleObject
   {
   private:
      CurveLegend^ curveLegend;

   public:
      CurveLegendAccessibleObject( CurveLegend^ curveLegend )
         : AccessibleObject()
      {
         this->curveLegend = curveLegend;
      }


   private:

      property ChartControlAccessibleObject^ ChartControl 
      {

         // Private property that helps get the reference to the parent
 ChartControl.
         ChartControlAccessibleObject^ get()
         {
            return dynamic_cast<ChartControlAccessibleObject^>(Parent);
         }

      }

   internal:

      property int ID 
      {

         // Internal helper function that returns the ID for this CurveLegend.
         int get()
         {
            for ( int i = 0; i < ChartControl->GetChildCount();
 i++ )
            {
               if ( ChartControl->GetChild( i ) == this
 )
               {
                  return i;
               }

            }
            return  -1;
         }

      }

   public:

      property Rectangle Bounds 
      {

         // Gets the Bounds for the CurveLegend. This is used by accessibility
 programs.
         virtual Rectangle get() override
         {
            
            // The bounds is in screen coordinates.
            Point loc = curveLegend->Location;
            return Rectangle(curveLegend->chart->PointToScreen(
 loc ),curveLegend->Size);
         }

      }

      property String^ Name 
      {

         // Gets or sets the Name for the CurveLegend. This is used by accessibility
 programs.
         virtual String^ get() override
         {
            return curveLegend->Name;
         }

         virtual void set( String^ value )
 override
         {
            curveLegend->Name = value;
         }

      }

      property AccessibleObject^ Parent 
      {

         // Gets the Curve Legend Parent's Accessible object.
         // This is used by accessibility programs.
         virtual AccessibleObject^ get() override
         {
            return curveLegend->chart->AccessibilityObject;
         }

      }

      property System::Windows::Forms::AccessibleRole Role 
      {

         // Gets the role for the CurveLegend. This is used by accessibility
 programs.
         virtual System::Windows::Forms::AccessibleRole get()
 override
         {
            return ::AccessibleRole::StaticText;
         }

      }

      property AccessibleStates State 
      {

         // Gets the state based on the selection for the CurveLegend.
         // This is used by accessibility programs.
         virtual AccessibleStates get() override
         {
            AccessibleStates state = AccessibleStates::Selectable;
            if ( curveLegend->Selected )
            {
               state = static_cast<AccessibleStates>(state | AccessibleStates::Selected);
            }

            return state;
         }

      }

      // Navigates through siblings of this CurveLegend. This is used
 by accessibility programs.
      virtual AccessibleObject^ Navigate( AccessibleNavigation navdir ) override
      {
         
         // Uses the internal NavigateFromChild helper function that
 exists
         // on ChartControlAccessibleObject.
         return ChartControl->NavigateFromChild( this,
 navdir );
      }


      // Selects or unselects this CurveLegend. This is used by accessibility
 programs.
      virtual void Select( AccessibleSelection selection ) override
      {
         
         // Uses the internal SelectChild helper function that exists
         // on ChartControlAccessibleObject.
         ChartControl->SelectChild( this, selection );
      }

   };
// Inner class CurveLegendAccessibleObject represents accessible 
// information associated with the CurveLegend object.
public static class CurveLegendAccessibleObject
 extends AccessibleObject
{
    private CurveLegend curveLegend;

    public CurveLegendAccessibleObject(CurveLegend curveLegend)
    {
        this.curveLegend = curveLegend;
    } //CurveLegendAccessibleObject

    // Private property that helps get the reference to the parent 
    // ChartControl.
    /** @property 
     */
    private ChartControlAccessibleObject get_ChartControl()
    {
        return (ChartControlAccessibleObject)get_Parent();
    } //get_ChartControl

    // Internal helper function that returns the ID for this CurveLegend.
    /** @property 
     */
    int get_ID()
    {
        for (int i = 0; i < get_ChartControl().GetChildCount();
 i++) {
            if (get_ChartControl().GetChild(i).Equals(this))
 {
                return i;
            }
        }
        return -1;
    } //get_ID

    // Gets the Bounds for the CurveLegend. 
    // This is used by accessibility programs.
    /** @property 
     */
    public Rectangle get_Bounds()
    {
        // The bounds is in screen coordinates.
        Point loc = curveLegend.get_Location();
        return new Rectangle(curveLegend.chart.PointToScreen(loc)
,
            curveLegend.get_Size());
    } //get_Bounds

    // Gets or sets the Name for the CurveLegend. 
    // This is used by accessibility programs.
    /** @property 
     */
    public String get_Name()
    {
        return curveLegend.get_Name();
    } //get_Name

    /** @property 
     */
    public void set_Name(String value)
    {
        curveLegend.set_Name(value);
    } //set_Name

    // Gets the Curve Legend Parent's Accessible object.
    // This is used by accessibility programs.
    /** @property 
     */
    public AccessibleObject get_Parent()
    {
        return curveLegend.chart.get_AccessibilityObject();
    } //get_Parent

    // Gets the role for the CurveLegend. 
    // This is used by accessibility programs.
    /** @property 
     */
    public AccessibleRole get_Role()
    {
        return AccessibleRole.StaticText;
    } //get_Role

    // Gets the state based on the selection for the CurveLegend. 
    // This is used by accessibility programs.
    /** @property 
     */
    public AccessibleStates get_State()
    {
        AccessibleStates state = AccessibleStates.Selectable;
        if (curveLegend.get_Selected()) {
            state = state | AccessibleStates.Selected;
        }
        return state;
    } //get_State

    // Navigates through siblings of this CurveLegend. 
    // This is used by accessibility programs.
    public AccessibleObject Navigate(AccessibleNavigation navDir)
    {
        // Uses the internal NavigateFromChild helper function 
        // that exists on ChartControlAccessibleObject.
        return get_ChartControl().NavigateFromChild(this,
 navDir);
    } //Navigate

    // Selects or unselects this CurveLegend. 
    // This is used by accessibility programs.
    public void Select(AccessibleSelection
 selection)
    {
        // Uses the internal SelectChild helper function that exists
        // on ChartControlAccessibleObject.
        get_ChartControl().SelectChild(this, selection);
    } //Select
} //CurveLegendAccessibleObject
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「AccessibleObject.Navigate メソッド」の関連用語

AccessibleObject.Navigate メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



AccessibleObject.Navigate メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS