Adobe® Flash® Platform 用 ActionScript® 3.0 リファレンスガイド
ホーム  |  パッケージおよびクラスリストの非表示 |  パッケージ  |  クラス  |  新機能  |  索引  |  付録  |  英語で表示される理由
フィルター: AIR 30.0 以前, Flash Player 30.0 以前, Flash Lite 4
Flex 4.6 以前, Flash Pro CS6 以前
フィルターを非表示
flashx.textLayout.edit 

EditManager  - AS3

パッケージx

トップレベル
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

言語エレメント

グローバル定数
グローバル関数
演算子
ステートメント、キーワード、ディレクティブ
特殊な型

付録

新機能
コンパイルエラー
コンパイラー警告
ランタイムエラー
ActionScript 3 への移行
サポートされている文字セット
MXML のみのタグ
モーション XML エレメント
Timed Text タグ
使用されなくなったエレメントのリスト
Accessibility Implementation 定数
ActionScript の例の使用方法
法律上の注意
パッケージflashx.textLayout.edit
クラスpublic class EditManager
継承EditManager Inheritance SelectionManager Inheritance Object
実装 IEditManager

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

EditManager クラスは、TextFlow への編集変更を管理します。

テキストフローの編集を可能にするには、EditManager オブジェクトを TextFlow オブジェクトの interactionManager プロパティに割り当てます。編集マネージャーは、テキストへの変更を処理します(挿入、削除、フォーマット変更など)。編集マネージャーに取り消しマネージャーが含まれる場合、変更を取り消すことができます。編集マネージャーは必要に応じて、テキストフローの再作成および表示をトリガーします。

EditManager クラスは、次のキーボードショートカットをサポートします。

キー結果
ctrl-z元に戻す
ctrl-yやり直し
ctrl-backspacedeletePreviousWord
ctrl-deletedeleteNextWord
alt-deletedeleteNextWord
ctrl+alt-deletedeleteNextWord
ctrl-shift- ハイフン任意ハイフンを挿入
ctrl+backspacedeletePreviousWord
alt+backspacedeletePreviousWord
ctrl+alt-backspacedeletePreviousWord
INSERToverWriteMode を切り替えます
backspacedeletePreviousCharacter
ENTERリストでの textFlow.configuration.manageEnterKey の場合は、新しいリストアイテムを作成します。そうでない場合は、新しい段落を作成します。
shift-ENTERtextFlow.configuration.manageEnterKey の場合は、新しい段落を作成します。
TABリストでの textFlow.configuration.manageTabKey の場合は、ネストされたリストを作成します。そうでない場合は、タブを挿入するか、次の文字をタブで上書きします。
shift-TABリストの最初のアイテムでの textFlow.configuration.manageTabKey の場合は、リストからアイテムを除きます(アイテムを階層レベルを上げます)。

注意:次のキーは、Windows では機能しません。alt-backspace、alt-delete、ctrl+alt-backspace、ctrl+alt-delete。これらのキーでは、ランタイムのイベントが生成されません。

例を表示

関連する API エレメント



パブリックプロパティ
 プロパティ定義元
 InheritedabsoluteEnd : int
[読み取り専用] テキストフローの先頭からのオフセットとしての、選択範囲の終了のテキスト位置。
SelectionManager
 InheritedabsoluteStart : int
[読み取り専用] テキストフローの先頭からのオフセットとしての、選択範囲の開始のテキスト位置。
SelectionManager
 InheritedactivePosition : int
[読み取り専用] 選択範囲のアクティブポイント。
SelectionManager
  allowDelayedOperations : Boolean
EditManager
 InheritedanchorPosition : int
[読み取り専用] 選択範囲のアンカーポイント。
SelectionManager
 Inheritedconstructor : Object
指定されたオブジェクトインスタンスのクラスオブジェクトまたはコンストラクター関数への参照です。
Object
 InheritedcurrentSelectionFormat : SelectionFormat
[読み取り専用] 現在の SelectionFormat オブジェクト。
SelectionManager
  delayUpdates : Boolean
EditManager
 InheritededitingMode : String
[読み取り専用] 編集モード。
SelectionManager
 Inheritedfocused : Boolean
[読み取り専用] テキストフロー内のコンテナがフォーカスを持つかどうかを示します。
SelectionManager
 InheritedfocusedSelectionFormat : SelectionFormat
フォーカスがあるコンテナで選択範囲の描画に使用される SelectionFormat オブジェクト。
SelectionManager
 InheritedinactiveSelectionFormat : SelectionFormat
アクティブウィンドウにない場合に、選択範囲の描画に使用される SelectionFormat オブジェクト。
SelectionManager
  overwriteMode : Boolean = false
[静的] 上書きモードがオンかオフかを示します。
EditManager
 InheritedtextFlow : flashx.textLayout.elements:TextFlow
この選択マネージャーで管理される TextFlow オブジェクト。
SelectionManager
  undoManager : IUndoManager
[読み取り専用] この編集マネージャーに割り当てられている IUndoManager。
EditManager
 InheritedunfocusedSelectionFormat : SelectionFormat
フォーカスがあるコンテナにはないが、アクティブウィンドウにある場合に、選択範囲の描画に使用される SelectionFormat オブジェクト。
SelectionManager
 InheritedwindowActive : Boolean
[読み取り専用] テキストフローに関連付けられるウィンドウがアクティブかどうかを示します。
SelectionManager
プロテクトプロパティ
 プロパティ定義元
 InheritedpointFormat : flashx.textLayout.formats:ITextLayoutFormat
[読み取り専用] 挿入されたテキストに適用するフォーマット。
SelectionManager
パブリックメソッド
 メソッド定義元
  
EditManager(undoManager:IUndoManager = null)
EditManager オブジェクトを作成します。
EditManager
 Inherited
アクティブ化イベントを処理します。
SelectionManager
  
コンテナのスタイルを、選択範囲のすべてのコンテナに適用します。
EditManager
  
指定された(または現在の)選択範囲のフォーマットを変更します。
EditManager
  
applyFormatToElement(targetElement:FlowElement, format:flashx.textLayout.formats:ITextLayoutFormat, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
スタイルを指定エレメントに適用します。
EditManager
  
指定された(または現在の)選択範囲でリーフエレメントに適用されたフォーマットを変更します。
EditManager
  
applyLink(href:String, targetString:String = null, extendToLinkBoundary:Boolean = false, operationState:SelectionState = null):LinkElement
選択をリンクに変換するか、リンクを標準テキストに変換します。
EditManager
  
段落のスタイルを、選択範囲のすべての段落に適用します。
EditManager
  
テキストを TCY のテキスト範囲に、または TCY のテキスト範囲を非 TCY テキストに変換します。
EditManager
  
操作の新規グループを開始します。
EditManager
  
changeElementID(newID:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
エレメントの ID を変更します。
EditManager
  
changeStyleName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
以降、非推奨 2.0: 推奨 applyFormatToElement
エレメントまたはエレメントの一部の styleName を変更します。
EditManager
  
changeTypeName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
エレメントまたはエレメントの一部の typeName を変更します。
EditManager
  
指定した(または現在の)選択範囲のフォーマットを未定義にします。
EditManager
  
指定したエレメントに対してスタイルを未定義にします。
EditManager
  
範囲の始点と終点の両方を含む最下位の共通親エレメントにおいて operationState で指定された範囲全体を含む新しい DivElement を作成します。
EditManager
  
範囲の始点と終点の両方を含む最下位の共通親エレメントにおいて operationState で指定された範囲全体を含む新しい ListElement を作成します。
EditManager
  
範囲の始点と終点の両方を含む最下位の共通親エレメントにおいて operationState で指定された範囲全体を含む新しい SubParagraphGroupElement を作成します。
EditManager
  
選択された領域を削除し、TextScrap オブジェクトで削除された領域を返します。
EditManager
 Inherited
非アクティブ化イベントを処理します。
SelectionManager
  
deleteNextCharacter(operationState:SelectionState = null):void
テキスト範囲を削除するか、ポイント選択が指定されている場合は、次の文字を削除します。
EditManager
  
deleteNextWord(operationState:SelectionState = null):void
次の単語を削除します。
EditManager
  
テキスト範囲を削除するか、ポイント選択が指定されている場合は、前の文字を削除します。
EditManager
  
deletePreviousWord(operationState:SelectionState = null):void
前の単語を削除します。
EditManager
  
deleteText(operationState:SelectionState = null):void
テキスト範囲を削除します。
EditManager
  
[オーバーライド] FlowOperation を実行します。
EditManager
 Inherited
編集イベントを処理します。
SelectionManager
  
操作のグループを終了します。
EditManager
 Inherited
SelectionManager
 Inherited
focusChange イベントを処理します。
SelectionManager
 Inherited
focusIn イベントを処理します。
SelectionManager
 Inherited
focusOut イベントを処理します。
SelectionManager
 Inherited
指定されたテキスト範囲または現在の選択範囲のすべての文字に共通する、文字フォーマット属性を取得します。
SelectionManager
 Inherited
指定されたテキスト範囲または現在の選択範囲のすべてのコンテナに共通する、コンテナフォーマット属性を取得します。
SelectionManager
 Inherited
指定されたテキスト範囲または現在の選択範囲のすべての段落に共通する、段落フォーマット属性を取得します。
SelectionManager
 Inherited
現在の選択範囲の SelectionState オブジェクトを取得します。
SelectionManager
 Inherited
オブジェクトに指定されたプロパティが定義されているかどうかを示します。
Object
 Inherited
選択があるかどうかを示します。
SelectionManager
 Inherited
imeStartComposition イベントを処理します
SelectionManager
  
insertInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):InlineGraphicElement
イメージを挿入します。
EditManager
  
insertText(text:String, origOperationState:SelectionState = null):void
テキストを挿入します。
EditManager
 Inherited
Object クラスのインスタンスが、パラメーターとして指定されたオブジェクトのプロトタイプチェーン内にあるかどうかを示します。
Object
 Inherited
選択範囲にテキスト範囲が収まるかどうかを示します。
SelectionManager
 Inherited
keyDown イベントを処理します。
SelectionManager
 Inherited
keyFocusChange イベントを処理します。
SelectionManager
 Inherited
keyUp イベントを処理します。
SelectionManager
 Inherited
menuSelect イベントを処理します。
SelectionManager
  
modifyInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):void
既存のインライングラフィックを変更します。
EditManager
 Inherited
mouseDoubleClick イベントを処理します。
SelectionManager
 Inherited
mouseDown イベントを処理します。
SelectionManager
 Inherited
mouseMove イベントを処理します。
SelectionManager
 Inherited
mouseOut イベントを処理します。
SelectionManager
 Inherited
mouseOver イベントを処理します。
SelectionManager
 Inherited
mouseUp イベントを処理します。
SelectionManager
 Inherited
mouseWheel イベントを処理します。
SelectionManager
  
moveChildren(source:FlowGroupElement, sourceIndex:int, numChildren:int, destination:FlowGroupElement, destinationIndex:int, selectionState:SelectionState = null):void
一連の FlowElements を 2 つの FlowGroupElement 間で移動します。
EditManager
 Inherited
notifyInsertOrDelete(absolutePosition:int, length:int):void
テキストの挿入時または削除時に、選択マネージャーを更新します。
SelectionManager
  
overwriteText(text:String, operationState:SelectionState = null):void
選択されたテキストを上書きします。
EditManager
  
TextScrap を選択された領域にペーストします。
EditManager
 Inherited
指定されたプロパティが存在し、列挙できるかどうかを示します。
Object
  
前に取り消された操作が再実行されます。
EditManager
 Inherited
選択シェイプを再表示します。
SelectionManager
 Inherited
SelectionManager
 Inherited
selectRange(anchorPosition:int, activePosition:int):void
SelectionManager
 Inherited
選択範囲の最初のコンテナにフォーカスを与えます。
SelectionManager
 Inherited
ループ処理に対するダイナミックプロパティの可用性を設定します。
Object
 Inherited
現在の選択範囲の SelectionState オブジェクトを設定します。
SelectionManager
 Inherited
softKeyboardActivating イベントを処理します。
SelectionManager
  
指定された位置のターゲットエレメントを分割し、現在のエレメントの後に新しいエレメントを作成します。
EditManager
  
現在の位置の段落を分割し、現在の段落の後に新しい段落を作成します。
EditManager
 Inherited
TextEvent を処理します。
SelectionManager
 Inherited
ロケール固有の規則に従って書式設定された、このオブジェクトのストリング表現を返します。
Object
 Inherited
指定されたオブジェクトのストリング表現を返します。
Object
  
前の操作を取り消します。
EditManager
  
EditManager
 Inherited
指定されたオブジェクトのプリミティブな値を返します。
Object
プロテクトメソッド
 メソッド定義元
 Inherited
マウスカーソルを設定します。
SelectionManager
プロパティの詳細

allowDelayedOperations

プロパティ
allowDelayedOperations:Boolean



実装
    public function get allowDelayedOperations():Boolean
    public function set allowDelayedOperations(value:Boolean):void

delayUpdates

プロパティ 
delayUpdates:Boolean



実装
    public function get delayUpdates():Boolean
    public function set delayUpdates(value:Boolean):void

overwriteMode

プロパティ 
public static var overwriteMode:Boolean = false

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

上書きモードがオンかオフかを示します。

true の場合、キーストロークはカーソルのあとの文字を上書きします。false の場合、キーストロークはカーソル位置に挿入されます。

undoManager

プロパティ 
undoManager:IUndoManager  [読み取り専用]

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

この編集マネージャーに割り当てられている IUndoManager。

編集の取り消し(およびやり直し)を可能にするには、IUndoManager インスタンスを EditManager コンストラクターに渡します。取り消しマネージャーは実行された操作のスタックを管理し、個々の操作を取り消しまたはやり直しできます。

注意:TextFlow が直接変更された場合(EditManager の呼び出しを介してではなく、管理する FlowElement オブジェクトの直接呼び出しを介して)、EditManager は取り消しスタックをクリアして、スタックが現在の状態と同期しなくなるのを防ぎます。



実装
    public function get undoManager():IUndoManager
コンストラクターの詳細

EditManager

()コンストラクター
public function EditManager(undoManager:IUndoManager = null)

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

EditManager オブジェクトを作成します。

EditManager オブジェクトをテキストフローの interactionManager プロパティに割り当てると、そのテキストフローを編集できるようになります。

変更の取り消しおよびやり直しをサポートできるようにするには、IUndoManager インスタンスを EditManager コンストラクターに渡します。flashx.undo.UndoManager クラス使用することも、カスタム IUndoManager インスタンスを作成することもできます。カスタム IUndoManager インスタンスを使用して、Text Layout Framework の変更を、UndoManager クラスのインスタンスではない既存の undo マネージャーに統合します。カスタム IUndoManager インスタンスを作成するには、undo マネージャーの定義に使用するクラスで IUndoManager インターフェイスを実装する必要があります。

パラメーター
undoManager:IUndoManager (default = null) — アプリケーションの UndoManager

関連する API エレメント


例  ( この例の使用方法 )

次の例は、テキストフロー用の EditManager オブジェクトを作成します。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_constructor
    {
        // Create a new TextFlow that is editable and undoable.
        static public function createEditableTextFlow():TextFlow
        {
             var textFlow:TextFlow = new TextFlow();
             textFlow.interactionManager = new EditManager( new UndoManager() );
             return textFlow;
        }
    }
}

メソッドの詳細

applyContainerFormat

()メソッド
public function applyContainerFormat(containerFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

コンテナのスタイルを、選択範囲のすべてのコンテナに適用します。

null のフォーマットオブジェクトのスタイルプロパティは、変更されません。

パラメーター

containerFormat:flashx.textLayout.formats:ITextLayoutFormat — 範囲内のコンテナに適用するフォーマット
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、選択範囲を含むコンテナのフォーマットを変更し、2 つの列を表示します。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyContainerFormat
    {
        public function EditManager_applyContainerFormat( selection:SelectionState ):void
         {
             var textFlow:TextFlow = selection.textFlow;
             var editManager:IEditManager = textFlow.interactionManager as IEditManager;
             
             var containerStyle:TextLayoutFormat = new TextLayoutFormat();
             containerStyle.columnCount = 2;
             
             editManager.applyContainerFormat( containerStyle );
         }    
    }
}

applyFormat

()メソッド 
public function applyFormat(leafFormat:flashx.textLayout.formats:ITextLayoutFormat, paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, containerFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

指定された(または現在の)選択範囲のフォーマットを変更します。

新規フォーマットを適用する、取り消し可能な操作を実行します。TextLayoutFormat オブジェクトに設定されたスタイル属性のみが適用されます。フォーマットオブジェクトの未定義属性は変更されません。

パラメーター

leafFormat:flashx.textLayout.formats:ITextLayoutFormat — スパンやインライングラフィックなどのリーフエレメントに適用するフォーマット。
 
paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat — 段落エレメントに適用するフォーマット。
 
containerFormat:flashx.textLayout.formats:ITextLayoutFormat — コンテナに適用するフォーマット。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、コンテナ、段落および文字のフォーマットを選択範囲に適用します。
 
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyFormat
    {
        public function EditManager_applyFormat( selection:SelectionState ):void
        {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
         
            var containerStyle:TextLayoutFormat = new TextLayoutFormat();
            containerStyle.columnCount = 2;
            
            var paraStyle:TextLayoutFormat = new TextLayoutFormat();
            paraStyle.textAlign = TextAlign.JUSTIFY;
            
            var charStyle:TextLayoutFormat = new TextLayoutFormat();
            charStyle.color = 0xff0000;
            
            editManager.applyFormat( charStyle, paraStyle, containerStyle );    
        }
    }
}

applyFormatToElement

()メソッド 
public function applyFormatToElement(targetElement:FlowElement, format:flashx.textLayout.formats:ITextLayoutFormat, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

スタイルを指定エレメントに適用します。

null のフォーマットオブジェクトのスタイルプロパティは、変更されません。指定されたエレメントに関連するスタイルのみが適用されます。

パラメーター

targetElement:FlowElement — スタイルを適用するエレメント。
 
format:flashx.textLayout.formats:ITextLayoutFormat — 適用するスタイルを含むフォーマット。
 
relativeStart:int (default = 0) — 新規フォーマットの割り当て時にエレメントを分割するエレメントの先頭からのオフセット。
 
relativeEnd:int (default = -1) — 新規フォーマットの適用時にエレメントを分割するエレメントの先頭からのオフセット。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

applyLeafFormat

()メソッド 
public function applyLeafFormat(characterFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

指定された(または現在の)選択範囲でリーフエレメントに適用されたフォーマットを変更します。

新規フォーマットをリーフエレメント(SpanElement や InlineGraphicElement オブジェクトなど)に適用する、取り消し可能な操作を実行します。TextLayoutFormat オブジェクトに設定されたスタイル属性のみが適用されます。フォーマットオブジェクトの未定義属性は変更されます。

パラメーター

characterFormat:flashx.textLayout.formats:ITextLayoutFormat — 適用するフォーマット。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、選択内のテキストの色を赤に変更します。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyLeafFormat
    {
        public function EditManager_applyLeafFormat(selection:SelectionState)
        {
             var textFlow:TextFlow = selection.textFlow;
             var editManager:IEditManager = textFlow.interactionManager as IEditManager;
        
             var charStyle:TextLayoutFormat = new TextLayoutFormat();
             charStyle.color = 0xff0000;
             
             editManager.applyLeafFormat( charStyle );    
        }
    }
}

applyLink

()メソッド 
public function applyLink(href:String, targetString:String = null, extendToLinkBoundary:Boolean = false, operationState:SelectionState = null):LinkElement

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10 - + 10.2, AIR 1.5

選択をリンクに変換するか、リンクを標準テキストに変換します。

リンクを作成または削除する、取り消し可能な操作を実行します。

target パラメーターを指定する場合、次のいずれかの値を指定する必要があります。

  • "_self"
  • "_blank"
  • "_parent"
  • "_top"

ブラウザーホストランタイムでは、ターゲット "_self" は現在の html ページを置き換えます。このため、リンクを含む SWF コンテンツがフレームまたはフレームセット内のページにある場合、リンクされたコンテンツがそのフレーム内でロードされます。ページが最上位にある場合、リンクされたコンテンツが開いて、元のページを置き換えます。ターゲット "_blank" は、名前のない新しいブラウザーウィンドウを開きます。ターゲット "_parent" は、SWF コンテンツを含む html ページの親を置き換えます。ターゲット "_top" は、現在のブラウザーウィンドウの最上位ページを置き換えます。

Adobe AIR など他のランタイムでは、ユーザーのデフォルトブラウザーでリンクが開き、target パラメーターは無視されます。

extendToLinkBoundary パラメーターにより、1 つ以上の既存リンクと交差する選択範囲が編集マネージャーで処理される方法が決定されます。パラメーターが true の場合、操作は 1 つの単位として、選択範囲および既存リンクのテキスト全体に適用されます。これにより、交差する最初のリンクの先頭から交差する最後のリンクの末尾にまたがる 1 つのリンクが作成されます。これに対し、この状況で extendToLinkBoundaryfalse の場合、部分的に選択された既存リンクは 2 つのリンクに分割されます。

パラメーター

href:String — リンクから参照される URI。
 
targetString:String (default = null) — リンクのターゲットブラウザーウィンドウ。
 
extendToLinkBoundary:Boolean (default = false) — 選択を重複する既存リンクに統合し、変更を適用するかどうかを指定します。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
LinkElement — 作成された LinkElement。

例  ( この例の使用方法 )

次の例は、2 つの関数を定義しています。最初の関数は、選択範囲をリンクに変換します。2 つ目の関数は、リンクから URL を削除します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_applyLink
    {
        
        static public function makeLink( selection:SelectionState ):void
         {
             var textFlow:TextFlow = selection.textFlow;
             var editManager:IEditManager = textFlow.interactionManager as IEditManager;
                 
             editManager.applyLink( "http://www.adobe.com" );
         }
         
        static public function removeLink( selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            
            editManager.applyLink( null, null, true );    
         }
    }
}

applyParagraphFormat

()メソッド 
public function applyParagraphFormat(paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

段落のスタイルを、選択範囲のすべての段落に適用します。

null のフォーマットオブジェクトのスタイルプロパティは、変更されません。

パラメーター

paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat — 選択された段落に適用するフォーマット。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、現在の選択範囲内の段落のフォーマットを変更する関数を定義し、テキストの位置揃えを行います。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.TextLayoutFormat;
    
    public class EditManager_applyParagraphFormat
    {
        static public function justifyParagraph( selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
         
             var paraStyle:TextLayoutFormat = new TextLayoutFormat();
             paraStyle.textAlign = TextAlign.JUSTIFY;
         
             editManager.applyParagraphFormat( paraStyle );    
         }
    }
}

applyTCY

()メソッド 
public function applyTCY(tcyOn:Boolean, operationState:SelectionState = null):flashx.textLayout.elements:TCYElement

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10 - + 10.2, AIR 1.5

テキストを TCY のテキスト範囲に、または TCY のテキスト範囲を非 TCY テキストに変換します。

TCY(縦中横)により、テキストを垂直線内に横向きに書くことができます。また、日本語以外の小さいブロックのテキストまたは数値(日付など)を縦書きテキストで読みやすく表示できます。

パラメーター

tcyOn:Boolean — TCY をテキスト範囲に適用するには true、TCY を削除するには false を設定します。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
flashx.textLayout.elements:TCYElement — 作成された TCYElement。

例  ( この例の使用方法 )

次の例は、2 つの関数を定義しています。最初の関数は、TCY フォーマットを現在の選択範囲に適用します。2 つ目の関数は、TCY フォーマットを削除します。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_applyTCY
    {
        static public function tcyOn( selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
        
             editManager.applyTCY( true );
         }
         
        static public function tcyOff( selection:SelectionState ):void
         {
        
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
        
             editManager.applyTCY( false );    
         }
    }
}

beginCompositeOperation

()メソッド 
public function beginCompositeOperation():void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

操作の新規グループを開始します。

beginCompositeOperation() の呼び出し後、および対応する endCompositeOperation() の呼び出し前に実行されるすべての操作は、1 つの単位として取り消し可能な 1 つの操作として実行およびグループ化されます。

beginCompositeOperation/endCompositeOperation ブロックは別のbeginCompositeOperation/endCompositeOperation ブロックに内にネストできます。


例  ( この例の使用方法 )

次の例は、グラフィックオブジェクトを自身の段落内に挿入する関数を定義しています。beginCompositeOperation()endCompositeOperation() 関数を使用しない場合は、それぞれのサブ操作を個別に(グループとしてではなく)取り消す必要があります。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_beginCompositeOperation
    {
        static public function insertGraphic( source:Object, width:Object, height:Object, float:String, selection:SelectionState ):void
        {
            var editManager:IEditManager = selection.textFlow.interactionManager as IEditManager;
            
            editManager.beginCompositeOperation();
            
            editManager.deleteText( selection );
            var changedSelection:SelectionState = 
                new SelectionState( selection.textFlow, selection.anchorPosition, selection.anchorPosition );
            editManager.splitParagraph( changedSelection );
            changedSelection = 
                new SelectionState( changedSelection.textFlow, changedSelection.anchorPosition + 1, changedSelection.anchorPosition + 1);
            editManager.insertInlineGraphic( source, width, height, float, changedSelection );
            changedSelection = 
                new SelectionState( changedSelection.textFlow, changedSelection.anchorPosition + 1, changedSelection.anchorPosition + 1);
            editManager.splitParagraph( changedSelection );
            
            editManager.endCompositeOperation();                
        }
    }
}

changeElementID

()メソッド 
public function changeElementID(newID:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

エレメントの ID を変更します。

relativeStart または relativeEnd パラメーターが(デフォルト値以外の値に)設定されている場合、エレメントは分割されます。この範囲外のエレメント部分は、元の ID を保持します。relativeStart パラメーターと relativeEnd パラメーターの両方を設定すると、ID が重複するエレメントが作成されます。

パラメーター

newID:String — 新しい ID 値。
 
targetElement:FlowElement — 変更するエレメント。
 
relativeStart:int (default = 0) — 新規 ID の割り当て時にエレメントを分割するエレメントの先頭からのオフセット。
 
relativeEnd:int (default = -1) — 新規 ID の割り当て時にエレメントを分割するエレメントの先頭からのオフセット。
 
operationState:SelectionState (default = null) — この操作を取り消すときに復元する選択範囲を指定します。null の場合は、操作によって現在の選択範囲が保存されます。


例  ( この例の使用方法 )

次の例は、選択範囲内の最初の段落の ID を変更する関数を定義しています。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.ElementRange;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_changeElementID
    {
        static public function changeParagraphID( id:String, selection:SelectionState ):void
         {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            var selectedRange:ElementRange = ElementRange.createElementRange( selection.textFlow, selection.absoluteStart, selection.absoluteEnd );            
        
            editManager.changeElementID( id, selectedRange.firstParagraph, 0, -1, selection );    
         }
    }
}

         

changeStyleName

()メソッド 
public function changeStyleName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void
以降、非推奨 2.0: 推奨 applyFormatToElement

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

エレメントまたはエレメントの一部の styleName を変更します。

relativeStart または relativeEnd パラメーターが(デフォルト値以外の値に)設定されている場合、エレメントは分割されます。この範囲外のエレメント部分は、元のスタイルを保持します。

パラメーター

newName:String — 新規スタイルの名前。
 
targetElement:FlowElement — 変更するエレメントを指定します。
 
relativeStart:int (default = 0) — 新規スタイルの割り当て時にエレメントを分割するエレメントの先頭からのオフセット。
 
relativeEnd:int (default = -1) — 新規スタイルの割り当て時にエレメントを分割するエレメントの末尾からのオフセット。
 
operationState:SelectionState (default = null) — この操作を取り消すときに復元する選択範囲を指定します。null の場合は、操作によって現在の選択範囲が保存されます。


例  ( この例の使用方法 )

次の例は、選択範囲内の最初の段落のスタイル名を変更する関数を定義しています。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.ElementRange;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_changeStyleName
    {
        static public function changeParagraphStyle( styleName:String, selection:SelectionState ):void
        {
            var textFlow:TextFlow = selection.textFlow;
            var editManager:IEditManager = textFlow.interactionManager as IEditManager;
            var selectedRange:ElementRange = ElementRange.createElementRange( selection.textFlow, selection.absoluteStart, selection.absoluteEnd );            
        
            editManager.changeElementID( styleName, selectedRange.firstParagraph, 0, -1, selection );    
        }
    }
}

changeTypeName

()メソッド 
public function changeTypeName(newName:String, targetElement:FlowElement, relativeStart:int = 0, relativeEnd:int = -1, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

エレメントまたはエレメントの一部の typeName を変更します。

relativeStart または relativeEnd パラメーターが(デフォルト値以外の値に)設定されている場合、エレメントは分割されます。この範囲外のエレメント部分は、元のスタイルを保持します。

パラメーター

newName:String — 新しいタイプの名前。
 
targetElement:FlowElement — 変更するエレメントを指定します。
 
relativeStart:int (default = 0) — 新規スタイルの割り当て時にエレメントを分割するエレメントの先頭からのオフセット
 
relativeEnd:int (default = -1) — 新規スタイルの割り当て時にエレメントを分割するエレメントの末尾からのオフセット
 
operationState:SelectionState (default = null) — この操作を取り消すときに復元する選択範囲を指定します。null の場合は、操作によって現在の選択範囲が保存されます。

clearFormat

()メソッド 
public function clearFormat(leafFormat:flashx.textLayout.formats:ITextLayoutFormat, paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat, containerFormat:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

指定した(または現在の)選択範囲のフォーマットを未定義にします。

指定されたフォーマットを未定義にする、取り消し可能な操作を実行します。TextLayoutFormat オブジェクトに設定されたスタイル属性のみが適用されます。フォーマットオブジェクトの未定義属性は変更されません。

パラメーター

leafFormat:flashx.textLayout.formats:ITextLayoutFormat — このフォーマットの設定値は、選択範囲内の LeafFlowElement オブジェクトに対して未定義にするプロパティを示します。
 
paragraphFormat:flashx.textLayout.formats:ITextLayoutFormat — このフォーマットの設定値は、選択範囲内の ParagraphElement オブジェクトに対して未定義にするプロパティを示します。
 
containerFormat:flashx.textLayout.formats:ITextLayoutFormat — このフォーマットの設定値は、選択範囲内の ContainerController オブジェクトに対して未定義にするプロパティを示します。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

clearFormatOnElement

()メソッド 
public function clearFormatOnElement(targetElement:FlowElement, format:flashx.textLayout.formats:ITextLayoutFormat, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

指定したエレメントに対してスタイルを未定義にします。

undefined のフォーマットオブジェクトのスタイルプロパティは、変更されません。指定されたフォーマット内に定義されているスタイルはすべて、指定されたエレメントに対して未定義になります。

パラメーター

targetElement:FlowElement — スタイルを適用するエレメント。
 
format:flashx.textLayout.formats:ITextLayoutFormat — 未定義にするスタイルが含まれているフォーマット。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

createDiv

()メソッド 
public function createDiv(parent:FlowGroupElement = null, format:flashx.textLayout.formats:ITextLayoutFormat = null, operationState:SelectionState = null):DivElement

範囲の始点と終点の両方を含む最下位の共通親エレメントにおいて operationState で指定された範囲全体を含む新しい DivElement を作成します。始点と終点が同一である場合、その位置に単一の子段落を持つ新しい DivElement が作成されます。

パラメーター

parent:FlowGroupElement (default = null) — 新しい DivElement の親エレメントを指定します。null の場合、新しい親は SelectionState を含む最下位になります。
 
format:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 新しい DivElement に適用するフォーマット属性。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
DivElement — 作成された新しい DivElement。

createList

()メソッド 
public function createList(parent:FlowGroupElement = null, format:flashx.textLayout.formats:ITextLayoutFormat = null, operationState:SelectionState = null):ListElement

範囲の始点と終点の両方を含む最下位の共通親エレメントにおいて operationState で指定された範囲全体を含む新しい ListElement を作成します。範囲内の各段落は、新しい ListElement 内の ListItemElement になります。 始点と終点が同一である場合、その位置に単一の子 ListItemElement を持つ新しい ListElement が作成されます。

パラメーター

parent:FlowGroupElement (default = null) — 必要に応じて、新しい ListElement の親エレメントを指定します。null の場合、新しい親は SelectionState を含む最下位になります。
 
format:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 新しい ListElement に適用するフォーマット属性。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
ListElement — 作成された新しい ListElement。

createSubParagraphGroup

()メソッド 
public function createSubParagraphGroup(parent:FlowGroupElement = null, format:flashx.textLayout.formats:ITextLayoutFormat = null, operationState:SelectionState = null):SubParagraphGroupElement

範囲の始点と終点の両方を含む最下位の共通親エレメントにおいて operationState で指定された範囲全体を含む新しい SubParagraphGroupElement を作成します。始点と終点が同一である場合、何も行われません。

パラメーター

parent:FlowGroupElement (default = null) — 新しい SubParagraphGroupElement エレメントの親エレメントを指定します。null の場合、新しい親は SelectionState を含む最下位になります。
 
format:flashx.textLayout.formats:ITextLayoutFormat (default = null) — 新しい SubParagraphGroupElement に適用するフォーマット属性
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
SubParagraphGroupElement — 作成された新しい SubParagraphGroupElement。

cutTextScrap

()メソッド 
public function cutTextScrap(operationState:SelectionState = null):flashx.textLayout.edit:TextScrap

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

選択された領域を削除し、TextScrap オブジェクトで削除された領域を返します。

TextScrap はシステムのクリップボードに保存するか、後続の pasteTextOperation() 操作で使用できます。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
flashx.textLayout.edit:TextScrap — 切り取られた TextScrap。

関連する API エレメント


例  ( この例の使用方法 )

次の例は、テキストフロー内に選択範囲を作成し、選択した範囲を切り取って、削除したコンテンツが格納された TextScrap オブジェクトを作成します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.TextScrap;
    import flashx.undo.UndoManager;
    import flashx.textLayout.elements.TextFlow;

    public class EditManager_cutTextScrap
    {
        static public function cutTextScrap():TextScrap
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 7 );
            var scrap:TextScrap = editManager.cutTextScrap(); //Displays: How now brown cow.
            return scrap;
        }
    }
}

deleteNextCharacter

()メソッド 
public function deleteNextCharacter(operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

テキスト範囲を削除するか、ポイント選択が指定されている場合は、次の文字を削除します。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフロー内にポイント選択を作成し、次の文字を削除します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deleteNextCharacter
    {
        static public function deleteNextCharacter():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown crow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 15, 15 );
            editManager.deleteNextCharacter(); //displays: How now brown cow.
        }
    }
}

deleteNextWord

()メソッド 
public function deleteNextWord(operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

次の単語を削除します。

範囲が選択されている場合、範囲の最初の単語が削除されます。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフロー内にポイント選択を作成し、次の単語を削除します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deleteNextWord
    {
        static public function deleteNextWord():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 3, 3 );
            editManager.deleteNextWord(); //displays: How now brown cow.
        }
    }
}

deletePreviousCharacter

()メソッド 
public function deletePreviousCharacter(operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

テキスト範囲を削除するか、ポイント選択が指定されている場合は、前の文字を削除します。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフロー内にポイント選択を作成し、前の文字を削除します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deletePreviousCharacter
    {
        
        static public function deletePreviousCharacter():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown crow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 16, 16 );
            editManager.deletePreviousCharacter(); //displays: How now brown cow.
        }
    }
}

deletePreviousWord

()メソッド 
public function deletePreviousWord(operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

前の単語を削除します。

範囲が選択されている場合、範囲の最初の単語が削除されます。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフロー内にポイント選択を作成し、前の単語を削除します。
var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
textFlow.flowComposer = new StandardFlowComposer();
textFlow.flowComposer.addController( new ContainerController( this ));
var editManager:EditManager = new EditManager( new UndoManager() );
textFlow.interactionManager = editManager;
textFlow.flowComposer.updateAllControllers();

editManager.setSelection( 7, 7 );
editManager.deletePreviousWord(); //displays: How now brown cow.

deleteText

()メソッド 
public function deleteText(operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

テキスト範囲を削除します。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフロー内に範囲選択を作成し、選択した文字を削除します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_deleteText
    {
        static public function deleteText():void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How do now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( new Sprite() ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 7 );
            editManager.deleteText(); //displays: How now brown cow.
        }
    }
}

doOperation

()メソッド 
override public function doOperation(operation:FlowOperation):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

FlowOperation を実行します。

doOperation() メソッドが、テキストフローを更新する IEditManager 関数によって呼び出されます。独自のカスタム操作を作成する場合を除き、一般にこの関数を直接呼び出す必要はありません。

この関数は、次の手順で進みます。

  1. この操作を実行する前に、保留中の操作がフラッシュされます。
  2. キャンセル可能な flowOperationBegin イベントが送信されます。キャンセルされると、このメソッドはただちに返されます。
  3. 操作を実行します。操作は true または false を返します。False は、変更が行われなかったことを示します。
  4. 操作を取り消しスタックに配置します。
  5. やり直しスタックをクリアします。
  6. 表示を更新します。
  7. キャンセル可能な flowOperationEnd イベントを送信します。

例外処理:操作で例外がスローされた場合、キャッチされてエラーが flowOperationEnd イベントにアタッチされます。イベントがキャンセルされない場合、再びエラーがスローされます。

パラメーター

operation:FlowOperation — FlowOperation オブジェクト


例  ( この例の使用方法 )

次の例は、InsertTextOperation を作成して実行します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.operations.InsertTextOperation;
    
    public class EditManager_doOperation
    {
        static public function doOperation(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager();
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            var selectionState:SelectionState = new SelectionState(textFlow, 4, 4);            
            var insertOperation:InsertTextOperation = new InsertTextOperation( selectionState, "now " );
            editManager.doOperation( insertOperation );        // displays: How now brown cow
        }
    }
}

endCompositeOperation

()メソッド 
public function endCompositeOperation():void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

操作のグループを終了します。

beginCompositeOperation() の最後の呼び出し以降に実行されたすべての操作は、CompositeOperation としてグループ化されて完了します。この CompositeOperation オブジェクトは取り消しスタックに追加されるか、この複合操作が別の複合操作内にネストされる場合は、親操作に追加されます。


例  ( この例の使用方法 )

次の例は、グラフィックオブジェクトを自身の段落内に挿入する関数を定義しています。beginCompositeOperation()endCompositeOperation() 関数を使用しない場合は、それぞれのサブ操作を個別に(グループとしてではなく)取り消す必要があります。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_beginCompositeOperation
    {
        static public function insertGraphic( source:Object, width:Object, height:Object, float:String, selection:SelectionState ):void
        {
            var editManager:IEditManager = selection.textFlow.interactionManager as IEditManager;
            
            editManager.beginCompositeOperation();
            
            editManager.deleteText( selection );
            var changedSelection:SelectionState = 
                new SelectionState( selection.textFlow, selection.anchorPosition, selection.anchorPosition );
            editManager.splitParagraph( changedSelection );
            changedSelection = 
                new SelectionState( changedSelection.textFlow, changedSelection.anchorPosition + 1, changedSelection.anchorPosition + 1);
            editManager.insertInlineGraphic( source, width, height, float, changedSelection );
            changedSelection = 
                new SelectionState( changedSelection.textFlow, changedSelection.anchorPosition + 1, changedSelection.anchorPosition + 1);
            editManager.splitParagraph( changedSelection );
            
            editManager.endCompositeOperation();                
        }
    }
}

insertInlineGraphic

()メソッド 
public function insertInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):InlineGraphicElement

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10 - + 10.2, AIR 1.5

イメージを挿入します。

イメージのソースには、URI を含むストリング、URLRequest オブジェクト、埋め込みアセットを表す Class オブジェクト、または DisplayObject インスタンスを指定できます。

幅および高さの値には、ピクセル数、パーセント、またはストリング 'auto' を指定できます。'auto' の場合、グラフィックの実際のサイズが使用されます。

float を Float クラスで定義されたいずれかの定数に設定して、イメージをテキストまたはテキストのあるインラインの左または右のどちらに表示するかを指定します。

パラメーター

source:Object — URI として解釈される String、Embed DisplayObject のクラスとして解釈される Class、DisplayObject インスタンスまたは URLRequest のいずれかです。
 
width:Object — 挿入するイメージの幅(数値、パーセントまたは「auto」)。
 
height:Object — 挿入するイメージの高さ(数値、パーセントまたは「auto」)。
 
options:Object (default = null) — none がサポートされています.
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
InlineGraphicElement

関連する API エレメント


例  ( この例の使用方法 )

次の例は、テキストフローの先頭に Shape オブジェクトを挿入します。
package flashx.textLayout.edit.examples
{
    import flash.display.Shape;
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_insertInlineGraphic
    {
        static public function insertInlineGraphic(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 0, 0 );
            editManager.insertInlineGraphic( createGraphic(), 6, 6, "none" );
            
        }
        static private function createGraphic():Shape
        {
            var shape:Shape = new Shape();
            shape.graphics.beginFill( 0x993366 );
            shape.graphics.drawCircle( 5, 4, 6 );
            return shape;
        }

    }
}

insertText

()メソッド 
public function insertText(text:String, origOperationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

テキストを挿入します。

テキストをテキスト内の位置または範囲に挿入します。operationState パラメーターで指定されている場所が範囲の場合(またはパラメーターが null で、現在の選択内容が範囲の場合)、現在範囲内にあるテキストが挿入テキストで置き換えられます。

パラメーター

text:String — 挿入するストリング。
 
origOperationState:SelectionState (default = null) — フローでこの操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、InsertTextOperation を作成して実行します。
 
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_insertText
    {
        static public function insertText(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 4 );
            editManager.insertText( "now " );
        }
    }
}

modifyInlineGraphic

()メソッド 
public function modifyInlineGraphic(source:Object, width:Object, height:Object, options:Object = null, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

既存のインライングラフィックを変更します。

変更しないプロパティを、元のグラフィックの値に設定します。(一般に、既存のグラフィックオブジェクトを変更するほうが、削除して再作成するよりもより効率的です。)

パラメーター

source:Object — URI として解釈される String、Embed DisplayObject のクラスとして解釈される Class、DisplayObject インスタンスまたは URLRequest のいずれかです。
 
width:Object — イメージの新しい幅(数値またはパーセント)。
 
height:Object — イメージの新しい高さ(数値またはパーセント)。
 
options:Object (default = null) — none がサポートされています.
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフローの先頭に円を挿入し、インライングラフィックの width プロパティと height プロパティを変更して、円を楕円に引き伸ばします。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    import flash.display.Shape;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_modifyInlineGraphic
    {
        static public function modifyInlineGraphic(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            editManager.selectRange( 0, 0 );
            editManager.insertInlineGraphic( createGraphic(), 6, 6, "none" );
            
            editManager.selectRange( 0, 1 );
            editManager.modifyInlineGraphic( null, '12', '5', 'none' );
        }
    
        static private function createGraphic():Shape
        {
            var shape:Shape = new Shape();
            shape.graphics.beginFill( 0x993366 );
            shape.graphics.drawCircle( 4, 4, 6 );
            return shape;
        }
    }
}

moveChildren

()メソッド 
public function moveChildren(source:FlowGroupElement, sourceIndex:int, numChildren:int, destination:FlowGroupElement, destinationIndex:int, selectionState:SelectionState = null):void

一連の FlowElements を 2 つの FlowGroupElement 間で移動します。desination プロパティは、移動する子に対して有効な親タイプにする必要があります。そのようにしない場合、例外がスローされます。

パラメーター

source:FlowGroupElement — 移動するエレメントの元の親。
 
sourceIndex:int — 移動する最初のエレメントのソースに含まれる子インデックス。
 
numChildren:int — 移動する子の数。
 
destination:FlowGroupElement — エレメントの移動後の新しい親。
 
destinationIndex:int — エレメントの移動先に含まれる子インデックス。
 
selectionState:SelectionState (default = null) — この操作が適用され、取り消したときに選択範囲が戻されるテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。現在の選択範囲が存在しない場合、このパラメーターは null 以外にする必要があります。

overwriteText

()メソッド 
public function overwriteText(text:String, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

選択されたテキストを上書きします。

選択がポイント選択の場合、最初の文字が新規テキストで上書きされます。

パラメーター

text:String — 挿入するストリング。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。


例  ( この例の使用方法 )

次の例は、テキストフロー内のテキストのストリングを上書きします。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_overwriteText
    {
        static public function overwriteText(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How zzz brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 4, 6 );
            editManager.overwriteText( "now" ); //Displays: How now brown cow.
        }
    }
}

pasteTextScrap

()メソッド 
public function pasteTextScrap(scrapToPaste:flashx.textLayout.edit:TextScrap, operationState:SelectionState = null):void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

TextScrap を選択された領域にペーストします。

テキスト範囲が指定されている場合、範囲内のテキストが削除されます。

パラメーター

scrapToPaste:flashx.textLayout.edit:TextScrap — ペーストする TextScrap。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

関連する API エレメント


例  ( この例の使用方法 )

次の例は、テキストスクラップを切り取って、テキストフロー内の別の場所にペーストします。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.TextScrap;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_pasteTextScrap
    {
        static public function pasteText(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How brown cow now.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 13, 17 );
            var scrap:TextScrap = editManager.cutTextScrap();
            
            editManager.selectRange( 3, 3 );
            editManager.pasteTextScrap( scrap ); //Displays: How now brown cow.
        }
    }
}

redo

()メソッド 
public function redo():void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

前に取り消された操作が再実行されます。

注意:この IEditManager に関連付けられている IUndoManager が別の IEditManager にも関連付けられている場合、別の IEditManager に関連付けられているやり直し操作をやり直し対象にすることができます。これは、別の IEditManager の FlowOperation がやり直しスタックの 1 番上にある場合に起こります。

取り消しが有効になっていない場合、この関数では何も実行されません。

関連する API エレメント


例  ( この例の使用方法 )

次の例は、テキストフロー上で最後に取り消された操作を再実行する関数を定義しています。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_redo
    {
        static public function redo( textFlow:TextFlow ):void
        {
            if( textFlow.interactionManager is IEditManager )
            {
                IEditManager( textFlow.interactionManager ).redo();
            }
        }
    }
}

splitElement

()メソッド 
public function splitElement(target:FlowGroupElement, operationState:SelectionState = null):FlowGroupElement

指定された位置のターゲットエレメントを分割し、現在のエレメントの後に新しいエレメントを作成します。operationState が範囲である場合、その範囲内のテキストが削除されます。 新しいエレメントは、operationState で指定されたテキスト位置の後に作成されます。 SubParagraphGroupElement を分割しても効果はありません。これは、これらのエレメントが隣接するエレメントに自動的に再マージされるためです。

これを使用するのは、既存のリストを 2 つのリストに分割する場合などです。

パラメーター

target:FlowGroupElement — 分割するエレメント。
 
operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
FlowGroupElement — 作成された新しい段落。

splitParagraph

()メソッド 
public function splitParagraph(operationState:SelectionState = null):ParagraphElement

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

現在の位置の段落を分割し、現在の段落の後に新しい段落を作成します。

テキスト範囲が指定されている場合、範囲内のテキストが削除されます。

パラメーター

operationState:SelectionState (default = null) — この操作を適用するテキストを指定します。null の場合、操作は現在の選択範囲に適用されます。

戻り値
ParagraphElement — 作成された新しい段落。

例  ( この例の使用方法 )

次の例は、段落を 2 つに分割します。
package flashx.textLayout.edit.examples
{
    import flash.display.Sprite;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.TextScrap;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_splitParagraph
    {
        static public function splitParagraph(sprite:Sprite):void
        {
            var textFlow:TextFlow = TextConverter.importToFlow( "How now brown cow.", TextConverter.PLAIN_TEXT_FORMAT );
            textFlow.flowComposer.addController( new ContainerController( sprite ));
            var editManager:EditManager = new EditManager( new UndoManager() );
            textFlow.interactionManager = editManager;
            textFlow.flowComposer.updateAllControllers();
            
            editManager.selectRange( 8, 8 );
            editManager.splitParagraph();    //Displays:     How now
                                            //                brown cow.
        }
    }
}

undo

()メソッド 
public function undo():void

言語バージョン: ActionScript 3.0
ランタイムバージョン: Flash Player 10, AIR 1.5

前の操作を取り消します。

注意:この IEditManager に関連付けられている IUndoManager が別の IEditManager にも関連付けられている場合、別の IEditManager に関連付けられている取り消し操作を取り消し対象にすることができます。これは、別の IEditManager の FlowOperation が取り消しスタックの 1 番上にある場合に起こります。

取り消しが有効になっていない場合、この関数では何も実行されません。

関連する API エレメント


例  ( この例の使用方法 )

次の例は、テキストフロー上の最後の操作を取り消す関数を定義しています。
package flashx.textLayout.edit.examples
{
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.elements.TextFlow;
    
    public class EditManager_undo
    {
        static public function undo( textFlow:TextFlow ):void
        {
            if( textFlow.interactionManager is IEditManager )
            {
                IEditManager( textFlow.interactionManager ).undo();
            }
        }
    }
}

updateAllControllers

()メソッド 
public function updateAllControllers():void

EditManager_example.as

次の例は、EditManager クラスを使用して、1 行のテキストを編集可能にしています。
  1. TextFlow(tf)を作成して、サンプルテキストを 1 行格納します。
  2. SpanElement にテキストを保存して、それをさらに ParagraphElement に保存します。
  3. テキストの ContainerController を作成して、表示するテキストを作成します。
  4. TextFlow マネージャーオブジェクトをインスタンス化して、後でイベントリスナーで使用できるようにします。
  5. ユーザーがテキストを編集可能にするための非常に簡単な編集ボタンを作成します。
  6. 読取り専用状態と編集可能状態を切り替える、ボタンのイベントリスナーを作成します。

TextFlow の interactionManager プロパティの値によって、サンプルテキストが編集可能かどうかが決まります。プロパティが null の場合は、サンプルテキストが読取り専用になります。プロパティに EditManager インスタンスが割り当てられると、サンプルテキストは編集可能になります。createEditButton() メソッドは、非常に簡単なボタンのような TextField インスタンスを作成します。ユーザーが TextField インスタンスをクリックすると、updateEditable() リスナー関数が、interactionManager プロパティの値を切り替えます。

package flashx.textLayout.edit.examples {
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.elements.ParagraphElement;
    import flashx.textLayout.elements.SpanElement;
    import flashx.textLayout.elements.TextFlow;
    import flashx.undo.UndoManager;
    
    public class EditManager_example extends Sprite
    {
        private var tf:TextFlow;
        private var em:EditManager;
        private var um:UndoManager;
        private var editable:TextField;
        
        public function EditManager_example()
        {
            //define TextFlow
            tf = new TextFlow();
            
            //define elements to contain text
            var p:ParagraphElement = new ParagraphElement();
            var s:SpanElement = new SpanElement();
            s.text ="This is sample text for the EditManager example.";
            
            //add these elements to the TextFlow
            p.addChild(s);
            tf.addChild(p);    
            
            //compose TextFlow to display
            var tfController:ContainerController = new ContainerController(this,600,600);
            tfController.container.y = 10
            tf.flowComposer.addController(tfController);
            tf.flowComposer.updateAllControllers();
            
            //define TextFlow manager objects
            um = new UndoManager();
            em = new EditManager(um);
            tf.interactionManager = null;
            
            createEditButton();
        }
        
        private function createEditButton ():void {
            editable = new TextField();
            editable.appendText("Click to make the sample text editable");
            editable.x = 0;
            editable.y = 50;
            editable.width = 150;
            editable.autoSize = flash.text.TextFieldAutoSize.LEFT;
            editable.selectable = false;
            editable.background = true;
            editable.backgroundColor = 0xAAAAAA;
            
            addChild(editable);
            editable.addEventListener(MouseEvent.CLICK, updateEditable);
        }
        
        private function updateEditable(me:MouseEvent):void{
            if (editable.text.indexOf("read only") >= 0) {
                editable.text = "Click to make the sample text editable";
                tf.interactionManager = null;
            }
            else {
                editable.text = "Click to make the sample text read only";
                tf.interactionManager = em;                
            }
            
        }
    }        
}





[ X ]英語で表示される理由
ActionScript 3.0 リファレンスガイドのコンテンツが英語で表示されます。

ActionScript 3.0 リファレンスガイドのすべての部分がすべての言語に翻訳されているわけではありません。言語エレメントが翻訳されていない場合、そのエレメントは英語で表示されます。例えば、ga.controls.HelpBox クラスはどの言語にも訳されていません。このため、リファレンスガイドの日本語バージョンでは、ga.controls.HelpBox クラスは英語で表示されます。