| パッケージ | flashx.textLayout.operations | 
| クラス | public class ApplyFormatOperation | 
| 継承 | ApplyFormatOperation  FlowTextOperation  FlowOperation  Object | 
| 言語バージョン: | ActionScript 3.0 | 
| ランタイムバージョン: | Flash Player 10, AIR 1.5 | 
ApplyFormatOperation は、リーフフォーマットを指定された範囲のテキストに適用します(指定された範囲が単一ポイントの場合、変更は行われません)。段落フォーマットを任意の段落(範囲内の少なくとも一部分)に適用します(範囲が単一ポイントの場合は単一段落)。また、コンテナフォーマットを任意のコンテナ(範囲内の少なくとも一部分)に適用します(範囲が単一ポイントの場合は単一コンテナ)。
関連する API エレメント
| プロパティ | 定義元 | ||
|---|---|---|---|
|  | absoluteEnd : int  
		 この操作を適用する、テキスト範囲の絶対終了ポイント。 | FlowTextOperation | |
|  | absoluteStart : int  
		 この操作を適用する、テキスト範囲の絶対開始ポイント。 | FlowTextOperation | |
|  | beginGeneration : uint [読み取り専用] 
		 操作前のテキストフロー生成。 | FlowOperation | |
|  | constructor : Object 
	 指定されたオブジェクトインスタンスのクラスオブジェクトまたはコンストラクター関数への参照です。 | Object | |
| containerFormat : flashx.textLayout.formats:ITextLayoutFormat  
		 範囲内でコンテナに適用するフォーマットプロパティ。 | ApplyFormatOperation | ||
|  | endGeneration : uint [読み取り専用]  
		 操作後のテキストフロー生成。 | FlowOperation | |
| leafFormat : flashx.textLayout.formats:ITextLayoutFormat  
		 範囲内でリーフエレメントに適用するフォーマットプロパティ。 | ApplyFormatOperation | ||
|  | originalSelectionState : SelectionState  
		 操作開始時の選択状態。 | FlowTextOperation | |
| paragraphFormat : flashx.textLayout.formats:ITextLayoutFormat  
		 範囲内で段落に適用するフォーマットプロパティ。 | ApplyFormatOperation | ||
|  | textFlow : flashx.textLayout.elements:TextFlow  
		 この操作を適用する TextFlow オブジェクト。 | FlowOperation | |
|  | userData : *  
		 エレメントに関連付けられている任意のデータ。 | FlowOperation | |
| メソッド | 定義元 | ||
|---|---|---|---|
| ApplyFormatOperation(operationState:SelectionState, leafFormat:flashx.textLayout.formats:ITextLayoutFormat, paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, containerFormat:flashx.textLayout.formats:ITextLayoutFormat = null)  
		 ApplyFormatOperation オブジェクトを作成します。 | ApplyFormatOperation | ||
|  | 	
		 この操作が取り消しスタックに配置されている場合、テストします。 | FlowOperation | |
|  |  
		 操作を実行します。 | FlowOperation | |
|  | 
	 オブジェクトに指定されたプロパティが定義されているかどうかを示します。 | Object | |
|  | 
	 Object クラスのインスタンスが、パラメーターとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。 | Object | |
|  | 
	 指定されたプロパティが存在し、列挙できるかどうかを示します。 | Object | |
|  | [オーバーライド] 	
		 	
		 操作を再実行します。 | FlowTextOperation | |
|  | 
     ループ処理に対するダイナミックプロパティの可用性を設定します。 | Object | |
|  | 
	 ロケール固有の規則に従って書式設定された、このオブジェクトのストリング表現を返します。 | Object | |
|  | 
	 指定されたオブジェクトのストリング表現を返します。 | Object | |
|  | 	
		 操作を取り消します。 | FlowOperation | |
|  | 
	 指定されたオブジェクトのプリミティブな値を返します。 | Object | |
| containerFormat | プロパティ | 
containerFormat:flashx.textLayout.formats:ITextLayoutFormat| 言語バージョン: | ActionScript 3.0 | 
| ランタイムバージョン: | Flash Player 10, AIR 1.5 | 
範囲内でコンテナに適用するフォーマットプロパティ。
任意のコンテナ(範囲内の少なくとも一部分)のフォーマットが更新されます。この操作の範囲がポイントの場合、単一コンテナが更新されます。containerFormat が null の場合、コンテナフォーマットは変更されません。
実装
    public function get containerFormat():flashx.textLayout.formats:ITextLayoutFormat    public function set containerFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void| leafFormat | プロパティ | 
leafFormat:flashx.textLayout.formats:ITextLayoutFormat| 言語バージョン: | ActionScript 3.0 | 
| ランタイムバージョン: | Flash Player 10, AIR 1.5 | 
範囲内でリーフエレメントに適用するフォーマットプロパティ。
この操作の範囲がポイントの場合、または leafFormat が null の場合、リーフエレメントフォーマットは変更されません。
実装
    public function get leafFormat():flashx.textLayout.formats:ITextLayoutFormat    public function set leafFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void| paragraphFormat | プロパティ | 
paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat| 言語バージョン: | ActionScript 3.0 | 
| ランタイムバージョン: | Flash Player 10, AIR 1.5 | 
範囲内で段落に適用するフォーマットプロパティ。
任意の段落(範囲内の少なくとも一部分)のフォーマットが更新されます。この操作の範囲がポイントの場合、単一段落が更新されます。paragraphFormat が null の場合、段落フォーマットは変更されません。
実装
    public function get paragraphFormat():flashx.textLayout.formats:ITextLayoutFormat    public function set paragraphFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void| ApplyFormatOperation | () | コンストラクター | 
public function ApplyFormatOperation(operationState:SelectionState, leafFormat:flashx.textLayout.formats:ITextLayoutFormat, paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, containerFormat:flashx.textLayout.formats:ITextLayoutFormat = null)| 言語バージョン: | ActionScript 3.0 | 
| ランタイムバージョン: | Flash Player 10, AIR 1.5 | 
ApplyFormatOperation オブジェクトを作成します。
パラメーター| operationState:SelectionState— フォーマットを適用するテキスト範囲を定義します。 | |
| leafFormat:flashx.textLayout.formats:ITextLayoutFormat—  選択された範囲で LeafFlowElement オブジェクトに適用するフォーマット。 | |
| paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat— 選択された範囲で ParagraphElement オブジェクトに適用するフォーマット。 | |
| containerFormat:flashx.textLayout.formats:ITextLayoutFormat(default =null)— 選択された範囲でコンテナに適用するフォーマット。 | 
次のコードスニペットは、ApplyFormatOperation クラスの使用方法を示しています。このタイプの操作を実行すると、新しい TextLayoutFormat のフォントサイズが収集されます。これを使用して、表示ラベルまたはメニューを更新できます。 
package flashx.textLayout.operations.examples
{
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.events.FlowOperationEvent;
    import flashx.textLayout.operations.ApplyFormatOperation;
    
    public class ApplyFormatOperation_example
    {
        public function attach(textFlow:TextFlow):void
        {
            textFlow.addEventListener(FlowOperationEvent.FLOW_OPERATION_BEGIN, opEndHandler);
        }
        
        public function opEndHandler(evt:FlowOperationEvent):void { 
            var flowOp:ApplyFormatOperation = evt.operation as ApplyFormatOperation; 
            if (flowOp is ApplyFormatOperation && flowOp.leafFormat != null && evt.cancelable) {
                //determine the font size - can be used to update a menu or label
                var fSize:int = flowOp.leafFormat.fontSize;
                if (fSize > 18)
                    evt.preventDefault();
            }
        }
    }
        
}
Tue Jun 12 2018, 10:34 AM Z
 継承されるパブリックプロパティを隠す
 継承されるパブリックプロパティを隠す 継承されるパブリックプロパティを表示
 継承されるパブリックプロパティを表示