| 패키지 | flashx.textLayout.elements |
| 클래스 | public class Configuration |
| 상속 | Configuration Object |
| 구현 | IConfiguration |
| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
TextFlow()의 매개 변수로 포함할 수 있습니다. 이렇게 하면 응용 프로그램에서 Text Layout Framework의 작동 방식을 초기에 제어할 수 있습니다.
Configuration 클래스를 사용하면 textFlowInitialFormat 속성을 통해 텍스트 흐름의 초기 단락 및 컨테이너 서식을 지정할 수 있습니다. 또한 링크, 선택 영역, 스크롤의 서식 속성과 Tab 및 Enter 키 처리를 위한 초기 서식 속성을 지정할 수 있습니다.
기타 예제
관련 API 요소
| 속성 | 정의 주체 | ||
|---|---|---|---|
![]() | constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | |
| defaultLinkActiveFormat : flashx.textLayout.formats:ITextLayoutFormat
텍스트 흐름의 모든 링크(LinkElement 객체)에 대해 초기에 적용되는 활성 문자 서식 속성을 지정합니다. | Configuration | ||
| defaultLinkHoverFormat : flashx.textLayout.formats:ITextLayoutFormat
커서가 텍스트 흐름의 한 링크(LinkElement) 위에 있을 때 해당 링크에 적용되는 초기 문자 서식 속성을 지정합니다. | Configuration | ||
| defaultLinkNormalFormat : flashx.textLayout.formats:ITextLayoutFormat
텍스트 흐름의 모든 LinkElement 객체에 대한 초기 링크 속성을 지정합니다. | Configuration | ||
| defaultListMarkerFormat : IListMarkerFormat
텍스트 흐름의 모든 ListItems에 대해 처음에 적용되는 활성 문자 서식 특성을 지정합니다. | Configuration | ||
| enableAccessibility : Boolean
액세스 가능성 지원을 설정 또는 해제할지 여부를 지정합니다. | Configuration | ||
| flowComposerClass : Class 새 TextFlow 객체에 기본적으로 연결할 흐름 컴포저의 유형을 지정합니다. | Configuration | ||
| focusedSelectionFormat : SelectionFormat
창에 포커스가 있을 때 텍스트 흐름(TextFlow)의 초기 선택 서식(SelectionFormat)입니다. | Configuration | ||
| inactiveSelectionFormat : SelectionFormat
창이 비활성화되어 있을 때 텍스트 흐름(TextFlow)의 초기 선택 서식(SelectionFormat)입니다. | Configuration | ||
| inlineGraphicResolverFunction : Function 인라인 그래픽 요소를 확인하는 데 사용되는 콜백을 지정합니다. | Configuration | ||
| manageEnterKey : Boolean
Text Layout Framework에서 단락 분리와 같은 용도를 위해 Enter/Return 키를 텍스트로 입력할지 또는 클라이언트 코드에서 이를 처리할지 여부를 지정합니다. | Configuration | ||
| manageTabKey : Boolean
Text Layout Framework에서 Tab 키를 텍스트로 입력할지 또는 Flash Player나 AIR에서 이를 처리하여 탭 패널 이벤트로 전환할지 여부를 지정합니다. | Configuration | ||
| overflowPolicy : String
컨테이너의 마지막 줄이 컨테이너에 맞는지 또는 이를 초과하는지 여부를 결정하는 데 사용되는 정책입니다. | Configuration | ||
| releaseLineCreationData : Boolean 각 단락을 컴포지션한 후 텍스트 해제 줄 생성 데이터를 컴포지션하는 프로세스를 요청합니다. | Configuration | ||
| scrollDragDelay : Number
스크롤 속도가 너무 빨라지지 않도록 스크롤 간 지연 시간을 지정합니다. | Configuration | ||
| scrollDragPixels : Number 사용자가 선택 영역을 끌어서 자동 스크롤을 시작할 때 스크롤할 기본 픽셀 수를 지정합니다. | Configuration | ||
| scrollMouseWheelMultiplier : Number 마우스 휠 이벤트의 기본 스크롤 픽셀 수를 지정합니다. | Configuration | ||
| scrollPagePercentage : Number
페이지 스크롤의 기본 텍스트 흐름 단락 비율을 지정합니다. | Configuration | ||
| textFlowInitialFormat : flashx.textLayout.formats:ITextLayoutFormat
텍스트 흐름(TextFlow 객체)의 초기 서식인 TextLayoutFormat 구성을 지정합니다. | Configuration | ||
| unfocusedSelectionFormat : SelectionFormat
창이 활성화되어 있지만 TextFlow의 컨테이너에 포커스가 없는 경우 Text Layout Framework에서 선택 영역을 그리는 데 사용하는 초기 선택 서식입니다. | Configuration | ||
| 메서드 | 정의 주체 | ||
|---|---|---|---|
Configuration(initializeWithDefaults:Boolean = true) 생성자 - 기본 구성을 만듭니다. | Configuration | ||
Configuration 객체의 복제본을 만듭니다. | Configuration | ||
![]() |
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | |
![]() |
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | |
![]() |
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | |
![]() |
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | |
![]() |
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 프리미티브 값을 반환합니다. | Object | |
defaultLinkActiveFormat | 속성 |
defaultLinkActiveFormat:flashx.textLayout.formats:ITextLayoutFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
텍스트 흐름의 모든 링크(LinkElement 객체)에 대해 초기에 적용되는 활성 문자 서식 속성을 지정합니다. 이러한 속성은 해당 속성의 값이 지정되지 않은 새 LinkElement 객체의 기본값으로 사용됩니다.
기본값은 null입니다.
구현
public function get defaultLinkActiveFormat():flashx.textLayout.formats:ITextLayoutFormat public function set defaultLinkActiveFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void관련 API 요소
defaultLinkHoverFormat | 속성 |
defaultLinkHoverFormat:flashx.textLayout.formats:ITextLayoutFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
커서가 텍스트 흐름의 한 링크(LinkElement) 위에 있을 때 해당 링크에 적용되는 초기 문자 서식 속성을 지정합니다. 이러한 속성은 해당 속성의 값이 지정되지 않은 새 LinkElement 객체의 기본값으로 사용됩니다.
기본값은 null입니다.
구현
public function get defaultLinkHoverFormat():flashx.textLayout.formats:ITextLayoutFormat public function set defaultLinkHoverFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void관련 API 요소
defaultLinkNormalFormat | 속성 |
defaultLinkNormalFormat:flashx.textLayout.formats:ITextLayoutFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
텍스트 흐름의 모든 LinkElement 객체에 대한 초기 링크 속성을 지정합니다. 이러한 속성은 해당 속성의 값이 지정되지 않은 새 LinkElement 객체의 기본값으로 사용됩니다. 기본 일반 서식에서는 링크가 밑줄과 함께 파랑으로 표시됩니다.
구현
public function get defaultLinkNormalFormat():flashx.textLayout.formats:ITextLayoutFormat public function set defaultLinkNormalFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void관련 API 요소
defaultListMarkerFormat | 속성 |
defaultListMarkerFormat:IListMarkerFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
텍스트 흐름의 모든 ListItems에 대해 처음에 적용되는 활성 문자 서식 특성을 지정합니다. 이러한 특성은 해당 특성의 값이 지정되지 않은 새 ListItemElements 객체의 기본값으로 사용됩니다.
기본값은 null입니다.
구현
public function get defaultListMarkerFormat():IListMarkerFormat public function set defaultListMarkerFormat(value:IListMarkerFormat):void관련 API 요소
enableAccessibility | 속성 |
flowComposerClass | 속성 |
focusedSelectionFormat | 속성 |
focusedSelectionFormat:SelectionFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
창에 포커스가 있을 때 텍스트 흐름(TextFlow)의 초기 선택 서식(SelectionFormat)입니다. 창이 활성화되어 있고 TextFlow의 컨테이너 중 하나에 포커스가 있으면 Text Layout Framework에서 focusedSelectionFormat을 사용하여 선택 영역을 그립니다. 필요한 경우 SelectionManager.focusedSelectionFormat을 사용하여 이 서식을 재정의할 수 있습니다.
SelectionFormat 클래스는 텍스트와 배경의 색상을 반전하는 기본값을 지정합니다.
구현
public function get focusedSelectionFormat():SelectionFormat public function set focusedSelectionFormat(value:SelectionFormat):void관련 API 요소
inactiveSelectionFormat | 속성 |
inactiveSelectionFormat:SelectionFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
창이 비활성화되어 있을 때 텍스트 흐름(TextFlow)의 초기 선택 서식(SelectionFormat)입니다. 창이 비활성화되어 있으면 Text Layout Framework에서 inactiveSelectionFormat을 사용하여 선택 영역을 그립니다. 필요한 경우 SelectionManager.inactiveSelectionFormat을 사용하여 이 서식을 재정의할 수 있습니다.
unfocusedSelectionFormat을 재정의하지 않는 경우 사용된 SelectionFormat 값은 다음과 같습니다.
color = 0xffffff(흰색)alpha = 0blendMode = flash.display.BlendMode.DIFFERENCE
이 경우 선택 영역이 표시되지 않습니다.
구현
public function get inactiveSelectionFormat():SelectionFormat public function set inactiveSelectionFormat(value:SelectionFormat):void관련 API 요소
inlineGraphicResolverFunction | 속성 |
inlineGraphicResolverFunction:Function| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
인라인 그래픽 요소를 확인하는 데 사용되는 콜백을 지정합니다. 콜백은 flashx.textLayout.elements.InlineGraphicElement 객체를 사용하며, 요소의 flashx.textLayout.elements.InlineGraphicElement#source로 사용될 값을 반환합니다. 이 콜백은 구성되기 직전까지 인라인 그래픽 요소의 소스 제공을 지연하는 메커니즘을 제공합니다.
참고: 이 콜백은 String 유형의 자리 표시자 소스가 이미 설정된 경우에만 호출됩니다. 또한 여러 번 호출될 수 있습니다.
구현
public function get inlineGraphicResolverFunction():Function public function set inlineGraphicResolverFunction(value:Function):void관련 API 요소
manageEnterKey | 속성 |
manageEnterKey:Boolean| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Text Layout Framework에서 단락 분리와 같은 용도를 위해 Enter/Return 키를 텍스트로 입력할지 또는 클라이언트 코드에서 이를 처리할지 여부를 지정합니다. 클라이언트 코드에서는 단락 분리 등을 위한 기본 단추가 포함된 양식을 적용하여 처리할 수 있습니다.
기본값은 true입니다.
구현
public function get manageEnterKey():Boolean public function set manageEnterKey(value:Boolean):voidmanageTabKey | 속성 |
overflowPolicy | 속성 |
overflowPolicy:String| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
컨테이너의 마지막 줄이 컨테이너에 맞는지 또는 이를 초과하는지 여부를 결정하는 데 사용되는 정책입니다. 이 정책을 설정하려면 OverflowPolicy 클래스의 상수를 사용합니다.
기본값 OverflowPolicy.FIT_DESCENDERS는 맨 위에서 기준선까지의 컴포지션 영역이 맞을 경우 해당 영역의 줄에 맞추도록 지정합니다.
구현
public function get overflowPolicy():String public function set overflowPolicy(value:String):void관련 API 요소
releaseLineCreationData | 속성 |
releaseLineCreationData:Boolean| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
각 단락을 컴포지션한 후 텍스트 해제 줄 생성 데이터를 컴포지션하는 프로세스를 요청합니다. 이를 요청하면 메모리 사용량은 줄어들지만 컴포지션 프로세스의 속도는 낮아집니다.
기본값은 false입니다.
구현
public function get releaseLineCreationData():Boolean public function set releaseLineCreationData(value:Boolean):void관련 API 요소
scrollDragDelay | 속성 |
scrollDragPixels | 속성 |
scrollMouseWheelMultiplier | 속성 |
scrollPagePercentage | 속성 |
textFlowInitialFormat | 속성 |
textFlowInitialFormat:flashx.textLayout.formats:ITextLayoutFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
텍스트 흐름(TextFlow 객체)의 초기 서식인 TextLayoutFormat 구성을 지정합니다.
기본값은 null입니다.
구현
public function get textFlowInitialFormat():flashx.textLayout.formats:ITextLayoutFormat public function set textFlowInitialFormat(value:flashx.textLayout.formats:ITextLayoutFormat):void관련 API 요소
unfocusedSelectionFormat | 속성 |
unfocusedSelectionFormat:SelectionFormat| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
창이 활성화되어 있지만 TextFlow의 컨테이너에 포커스가 없는 경우 Text Layout Framework에서 선택 영역을 그리는 데 사용하는 초기 선택 서식입니다. 필요한 경우 SelectionManager.unfocusedSelectionFormat을 사용하여 이 형식을 재정의할 수 있습니다.
unfocusedSelectionFormat을 재정의하지 않는 경우 사용된 SelectionFormat 값은 다음과 같습니다.
color = 0xffffff(흰색)alpha = 0blendMode = flash.display.BlendMode.DIFFERENCE
이 경우 선택 영역이 표시되지 않습니다.
구현
public function get unfocusedSelectionFormat():SelectionFormat public function set unfocusedSelectionFormat(value:SelectionFormat):void관련 API 요소
Configuration | () | 생성자 |
public function Configuration(initializeWithDefaults:Boolean = true)| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
생성자 - 기본 구성을 만듭니다.
매개 변수initializeWithDefaults:Boolean (default = true) — 기본값으로 구성을 초기화할지 여부를 지정합니다. 기본값은 true입니다. false로 설정되면 기본값 없이 초기화되므로 일부 객체가 저장됩니다. clone() 메서드는 이 값을 false로 설정하고 원본 객체에서 속성을 복사합니다.
|
관련 API 요소
clone | () | 메서드 |
public function clone():Configuration| 언어 버전: | ActionScript 3.0 |
| 런타임 버전: | Flash Player 10, AIR 1.5 |
Configuration 객체의 복제본을 만듭니다.
반환값Configuration |
hasTouchScreen | 상수 |
tlf_internal static const hasTouchScreen:Boolean
package flashx.textLayout.elements.examples {
import flash.display.Sprite;
import flash.text.engine.FontPosture;
import flash.text.engine.Kerning;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.edit.SelectionFormat;
import flashx.textLayout.edit.SelectionManager;
import flashx.textLayout.elements.Configuration;
import flashx.textLayout.elements.LinkElement;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TextAlign;
import flashx.textLayout.formats.TextDecoration;
import flashx.textLayout.formats.TextLayoutFormat;
public class ConfigurationExample extends Sprite
{
public function ConfigurationExample()
{
//create container for the text and add to stage
var textContainer:Sprite = new Sprite();
textContainer.x = 50;
textContainer.y = 20;
this.stage.addChild( textContainer );
// create Configuration, set properties for it and add to TextFlow
var config:Configuration = new Configuration();
var textLayoutFormat:TextLayoutFormat = new TextLayoutFormat();
textLayoutFormat.fontFamily = "Arial, Helvetica, _sans";
textLayoutFormat.fontSize = 16;
textLayoutFormat.kerning = Kerning.ON;
textLayoutFormat.fontStyle = FontPosture.ITALIC;
textLayoutFormat.textAlign = TextAlign.CENTER;
config.textFlowInitialFormat = textLayoutFormat;
var linkNormalFormat:TextLayoutFormat = new TextLayoutFormat();
// make links red and underlined
linkNormalFormat.color = 0xFF0000;
linkNormalFormat.textDecoration = TextDecoration.UNDERLINE;
config.defaultLinkNormalFormat = linkNormalFormat;
// set selection color to light blue
var selectionFormat:SelectionFormat = new SelectionFormat(0x333300);
config.focusedSelectionFormat = selectionFormat;
var textFlow:TextFlow = new TextFlow(config);
// make text selectable
var selectionManager:SelectionManager = new SelectionManager();
textFlow.interactionManager = selectionManager;
// create paragraph, a span of text, and a link
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
var linkSpan:SpanElement = new SpanElement();
var link:LinkElement = new LinkElement();
link.href = "http://www.adobe.com";
linkSpan.text = "Adobe's website";
link.addChild(linkSpan);
span.text = "The best place to go for information about Adobe products is: ";
// Add span and link to paragraph; add paragraph to TextFlow
p.addChild(span);
p.addChild(link);
textFlow.addChild(p);
// Add a controller for the container; specify container width and height
textFlow.flowComposer.addController(new ContainerController(textContainer, 80, 300));
textFlow.flowComposer.updateAllControllers();
}
}
}
Tue Jun 12 2018, 03:17 PM Z
상속되는 공용 속성 숨기기
상속되는 공용 속성 표시