| 套件 | flashx.textLayout.formats |
| 類別 | public class TabStopFormat |
| 繼承 | TabStopFormat Object |
| 實作 | ITabStopFormat |
| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
TextLayoutFormat.tabstops 屬性設定為 TabStopFormat 物件的陣列。
相關 API 元素
| 屬性 | 定義自 | ||
|---|---|---|---|
| alignment : *
此定位停駐點的定位對齊。 | TabStopFormat | ||
![]() | constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | |
| decimalAlignmentToken : *
對齊方式為 DECIMAL 時所要使用的對齊字符。 | TabStopFormat | ||
| defaultFormat : flashx.textLayout.formats:ITabStopFormat [靜態] [唯讀]
傳回具有預設設定的 TabStopFormat 物件。 | TabStopFormat | ||
| position : *
定位停駐點相對於欄開頭邊緣的位置 (以像素為單位)。 | TabStopFormat | ||
| 方法 | 定義自 | ||
|---|---|---|---|
TabStopFormat(initialValues:flashx.textLayout.formats:ITabStopFormat = null)
建立新的 TabStopFormat 物件。 | TabStopFormat | ||
以傳入的 ITabStopFormat 實體中設定的屬性值取代此 TabStopFormat 物件中的屬性值。 | TabStopFormat | ||
以此 TabStopFormat 物件的值連接傳入的 ITabStopFormat 實體中的屬性值。 | TabStopFormat | ||
以此 TabStopFormat 物件的值連接傳入的 ITabStopFormat 實體中的屬性值。 | TabStopFormat | ||
從 ITabStopFormat 實體值複製 TabStopFormat 設定到此 TabStopFormat 物件。 | TabStopFormat | ||
傳回由指定樣式名稱之 styleProp 參數所指定的樣式值。 | TabStopFormat | ||
![]() |
指出物件是否有已定義的指定屬性。 | Object | |
isEqual(p1:flashx.textLayout.formats:ITabStopFormat, p2:flashx.textLayout.formats:ITabStopFormat):Boolean [靜態]
比較 ITabStopFormat 實體 p1 中的屬性以及 ITabStopFormat 實體 p2 中的屬性,如果所有屬性相符,則傳回 true。 | TabStopFormat | ||
![]() |
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | |
![]() |
指出指定的屬性是否存在,以及是否可列舉。 | Object | |
如果此 TabStopFormat 物件中的屬性與傳入的 ITabStopFormat 實體中的屬性不相符,則將此 TabStopFormat 物件中的屬性設定為未定義。 | TabStopFormat | ||
如果此 TabStopFormat 物件中的屬性與傳入的 ITabStopFormat 實體中的屬性相符,則將此 TabStopFormat 物件中的屬性設定為未定義。 | TabStopFormat | ||
![]() |
為迴圈作業設定動態屬性的可用性。 | Object | |
設定由指定樣式名稱為值之 styleProp 參數所指定的樣式值。 | TabStopFormat | ||
![]() |
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | |
![]() |
會傳回指定之物件的字串形式。 | Object | |
![]() |
會傳回指定之物件的基本值。 | Object | |
alignment | 屬性 |
alignment:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
此定位停駐點的定位對齊。
有效值是 TabAlignment.START、TabAlignment.CENTER、TabAlignment.END、TabAlignment.DECIMAL 和 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 TabAlignment.START。
實作
public function get alignment():* public function set alignment(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
decimalAlignmentToken | 屬性 |
decimalAlignmentToken:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
對齊方式為 DECIMAL 時所要使用的對齊字符。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 null。
實作
public function get decimalAlignmentToken():* public function set decimalAlignmentToken(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
defaultFormat | 屬性 |
defaultFormat:flashx.textLayout.formats:ITabStopFormat [唯讀] | 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
傳回具有預設設定的 TabStopFormat 物件。此函數永遠會傳回相同物件。
實作
public static function get defaultFormat():flashx.textLayout.formats:ITabStopFormatposition | 屬性 |
position:*| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
定位停駐點相對於欄開頭邊緣的位置 (以像素為單位)。
有效值是從 0 到 10000 的數字以及 FormatValue.INHERIT。
若未定義預設值,則表示未設定。
如果重疊顯示時未定義,則此屬性的值就會是 0。
實作
public function get position():* public function set position(value:any):void擲回值
RangeError — 設定時值不在此屬性的範圍內
|
相關 API 元素
TabStopFormat | () | 建構函式 |
public function TabStopFormat(initialValues:flashx.textLayout.formats:ITabStopFormat = null)| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
建立新的 TabStopFormat 物件。所有設定為空白,或者可以選擇從提供的 initialValues 物件初始化。
initialValues:flashx.textLayout.formats:ITabStopFormat (default = null) — 要複製其初始值的選擇性實體。
|
相關 API 元素
apply | () | 方法 |
public function apply(incoming:flashx.textLayout.formats:ITabStopFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以 incoming ITabStopFormat 實體中設定的屬性值取代此 TabStopFormat 物件中的屬性值。incoming ITabStopFormat 實體中 undefined 的屬性並未在此物件中變更。
參數
incoming:flashx.textLayout.formats:ITabStopFormat — 此 TabStopFormat 物件套用其屬性值的實體。
|
concat | () | 方法 |
public function concat(incoming:flashx.textLayout.formats:ITabStopFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以此 TabStopFormat 物件的值連接 incoming ITabStopFormat 實體中的屬性值。在此 (接收) TabStopFormat 物件中,值為 FormatValue.INHERIT 的屬性,以及值為 undefined 的繼承屬性,將從 incoming 物件取得新值。值為 undefined 的非繼承屬性將取得其預設值。所有其他屬性將維持不變。
參數
incoming:flashx.textLayout.formats:ITabStopFormat — 值開始連接的實體。
|
相關 API 元素
concatInheritOnly | () | 方法 |
public function concatInheritOnly(incoming:flashx.textLayout.formats:ITabStopFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
以此 TabStopFormat 物件的值連接 incoming ITabStopFormat 實體中的屬性值。在此 (接收) TabStopFormat 物件中,值為 FormatValue.INHERIT 的屬性,以及值為 undefined 的繼承屬性,將從 incoming 物件取得新值。所有其他屬性將維持不變。
參數
incoming:flashx.textLayout.formats:ITabStopFormat — 值開始連接的實體。
|
相關 API 元素
copy | () | 方法 |
public function copy(values:flashx.textLayout.formats:ITabStopFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
從 ITabStopFormat 實體 values 複製 TabStopFormat 設定到此 TabStopFormat 物件。如果 values 是 null,則此 TabStopFormat 物件的所有屬性會初始化為未定義值。
參數
values:flashx.textLayout.formats:ITabStopFormat — 要複製其值的選擇性實體。
|
getStyle | () | 方法 |
isEqual | () | 方法 |
public static function isEqual(p1:flashx.textLayout.formats:ITabStopFormat, p2:flashx.textLayout.formats:ITabStopFormat):Boolean| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
比較 ITabStopFormat 實體 p1 中的屬性以及 ITabStopFormat 實體 p2 中的屬性,如果所有屬性相符,則傳回 true。
參數
p1:flashx.textLayout.formats:ITabStopFormat — 與 p2 比較的實體。
| |
p2:flashx.textLayout.formats:ITabStopFormat — 與 p1 比較的實體。
|
Boolean — 如果所有屬性相符則為 true,否則為 false。
|
removeClashing | () | 方法 |
public function removeClashing(incoming:flashx.textLayout.formats:ITabStopFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
如果此 TabStopFormat 物件中的屬性與 incoming 的 ITabStopFormat 實體中的屬性不相符,則將此 TabStopFormat 物件中的屬性設定為 undefined。
參數
incoming:flashx.textLayout.formats:ITabStopFormat — 與此 TabStopFormat 物件的屬性值比較的實體。
|
removeMatching | () | 方法 |
public function removeMatching(incoming:flashx.textLayout.formats:ITabStopFormat):void| 語言版本: | ActionScript 3.0 |
| 執行階段版本: | Flash Player 10, AIR 1.5 |
如果此 TabStopFormat 物件中的屬性與 incoming 的 ITabStopFormat 實體中的屬性相符,則將此 TabStopFormat 物件中的屬性設定為 undefined。
參數
incoming:flashx.textLayout.formats:ITabStopFormat — 與此 TabStopFormat 物件的屬性值比較的實體。
|
setStyle | () | 方法 |
package flashx.textLayout.formats.examples {
import flash.display.Sprite;
import flash.text.engine.TabAlignment;
import flashx.textLayout.container.ContainerController;
import flashx.textLayout.compose.StandardFlowComposer;
import flashx.textLayout.elements.ParagraphElement;
import flashx.textLayout.elements.SpanElement;
import flashx.textLayout.elements.TextFlow;
import flashx.textLayout.formats.TabStopFormat;
import flashx.textLayout.formats.TextLayoutFormat;
public class TabStopFormat_example extends Sprite
{
public function TabStopFormat_example()
{
var firstContainer:Sprite = new Sprite();
this.stage.addChild( firstContainer );
var textFlow:TextFlow = new TextFlow();
var format:TextLayoutFormat = new TextLayoutFormat();
var tabStop1:TabStopFormat = new TabStopFormat();
var tabStop2:TabStopFormat = new TabStopFormat();
var tabStop3:TabStopFormat = new TabStopFormat();
tabStop1.alignment = flash.text.engine.TabAlignment.START;
tabStop1.position = 50;
tabStop2.alignment = flash.text.engine.TabAlignment.CENTER;
tabStop2.position = 150;
tabStop3.alignment = flash.text.engine.TabAlignment.END;
tabStop3.position = 250;
format.tabStops = new Array(tabStop1,tabStop2,tabStop3);
textFlow.hostFormat = format;
var p:ParagraphElement = new ParagraphElement();
var span:SpanElement = new SpanElement();
span.text = "1\txxx\txxx\txxx\n2\tyyyyyy\tyyyyyy<\tyyyyyy\n3\tzz\tzz\tzz";
p.addChild(span);
textFlow.addChild(p);
textFlow.flowComposer = new StandardFlowComposer();
var firstController:ContainerController = new ContainerController(firstContainer, 300, 100 );
textFlow.flowComposer.addController(firstController);
textFlow.flowComposer.updateAllControllers();
}
}
}
Tue Jun 12 2018, 03:47 PM Z
隱藏繼承公用屬性
顯示繼承公用屬性