Paket | spark.layouts |
Sınıf | public class TileLayout |
Miras Alma | TileLayout LayoutBase OnDemandEventDispatcher Object |
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Per-element supported constraints are
percentWidth
and percentHeight
.
Element's minimum and maximum sizes are always be respected and
where possible, an element's size is limited to less then or equal
of the cell size.
When not explicitly set, the columnWidth
property
is calculated as the maximum preferred bounds width of all elements
and the columnHeight
property is calculated
as the maximum preferred bounds height of all elements.
When not explicitly set, the columnCount
and
rowCount
properties are calculated from
any explicit width and height settings for the layout target,
and columnWidth
and columnHeight
.
In case none is specified, the columnCount
and rowCount
values are picked so that the resulting pixel area is as square as possible.
The measured size is calculated from the columnCount
, rowCount
,
columnWidth
, rowHeight
properties and the gap sizes.
The default measured size, when no properties were explicitly set, is as square as possible area and is large enough to fit all elements.
In other cases the measured size may not be big enough to fit all elements.
For example, when both columnCount
and rowCount
are explicitly set to values
such that columnCount
* rowCount
< element count.
The minimum measured size is calculated the same way as the measured size but it's guaranteed to encompass enough rows and columns along the minor axis to fit all elements.
MXML SözdizimiMXML Sözdizimini GizleThe <s:TileLayout>
tag inherits all of the tag
attributes of its superclass and adds the following tag attributes:
<s:TileLayout Properties columnAlign="left" columnWidth="NaN" horizontalAlign="justify" horizontalGap="6" orientation="rows" requestedColumnCount="-1" requestedRowCount="-1" rowAlign="top" rowCount="-1" rowHeight="NaN" verticalAlign="justify" verticalGap="6" />
Özellik | Tanımlayan: | ||
---|---|---|---|
clipAndEnableScrolling : Boolean
If true, specifies to clip the children to the boundaries of the viewport. | LayoutBase | ||
columnAlign : String
Specifies how to justify the fully visible columns to the container width. | TileLayout | ||
columnCount : int [salt okunur]
Contain the actual column count. | TileLayout | ||
columnWidth : Number
Contain the actual column width, in pixels. | TileLayout | ||
constructor : Object
Belirli bir nesne örneği için sınıf nesnesine veya yapıcı işlevine bir başvuru. | Object | ||
dropIndicator : DisplayObject
The DisplayObject that this layout uses for
the drop indicator during a drag-and-drop operation. | LayoutBase | ||
horizontalAlign : String
Specifies how to align the elements within the cells in the horizontal direction. | TileLayout | ||
horizontalGap : Number
Horizontal space between columns, in pixels. | TileLayout | ||
horizontalScrollPosition : Number
The x coordinate of the origin of the viewport in the component's coordinate system,
where the default value is (0,0) corresponding to the upper-left corner of the component. | LayoutBase | ||
orientation : String
Specifies whether elements are arranged row by row or
column by column. | TileLayout | ||
paddingBottom : Number
Number of pixels between the container's bottom edge
and the bottom edge of the last layout element. | TileLayout | ||
paddingLeft : Number
The minimum number of pixels between the container's left edge and
the left edge of the layout element. | TileLayout | ||
paddingRight : Number
The minimum number of pixels between the container's right edge and
the right edge of the layout element. | TileLayout | ||
paddingTop : Number
Number of pixels between the container's top edge
and the top edge of the first layout element. | TileLayout | ||
requestedColumnCount : int
Number of columns to be displayed. | TileLayout | ||
requestedRowCount : int
Number of rows to be displayed. | TileLayout | ||
rowAlign : String
Specifies how to justify the fully visible rows to the container height. | TileLayout | ||
rowCount : int [salt okunur]
The row count. | TileLayout | ||
rowHeight : Number
The row height, in pixels. | TileLayout | ||
target : GroupBase
The GroupBase container whose elements are measured, sized and positioned
by this layout. | LayoutBase | ||
typicalLayoutElement : ILayoutElement
Used by layouts when fixed row/column sizes are requested but
a specific size isn't specified. | LayoutBase | ||
useVirtualLayout : Boolean
A container can hold any number of children. | LayoutBase | ||
verticalAlign : String
Specifies how to align the elements within the cells in the vertical direction. | TileLayout | ||
verticalGap : Number
Vertical space between rows, in pixels. | TileLayout | ||
verticalScrollPosition : Number
The y coordinate of the origin of the viewport in the component's coordinate system,
where the default value is (0,0) corresponding to the upper-left corner of the component. | LayoutBase |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Constructor. | TileLayout | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | OnDemandEventDispatcher | ||
Calculates the drop location in the data provider of the drop target for
the specified dragEvent. | LayoutBase | ||
When useVirtualLayout is true,
this method can be used by the layout target
to clear cached layout information when the target changes. | LayoutBase | ||
Dispatches an event into the event flow. | OnDemandEventDispatcher | ||
Called by the target after a layout element
has been added and before the target's size and display list are
validated. | LayoutBase | ||
This method must is called by the target after a layout element
has been removed and before the target's size and display list are
validated. | LayoutBase | ||
Returns the specified element's layout bounds as a Rectangle or null
if the index is invalid, the corresponding element is null,
includeInLayout=false,
or if this layout's target property is null. | LayoutBase | ||
Returns the change to the horizontal scroll position to handle
different scrolling options. | LayoutBase | ||
getNavigationDestinationIndex(currentIndex:int, navigationUnit:uint, arrowKeysWrapFocus:Boolean):int
Delegation method that determines which item
to navigate to based on the current item in focus
and user input in terms of NavigationUnit. | LayoutBase | ||
Computes the verticalScrollPosition and
horizontalScrollPosition deltas needed to
scroll the element at the specified index into view. | LayoutBase | ||
Returns the change to the vertical scroll position to handle
different scrolling options. | LayoutBase | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | OnDemandEventDispatcher | ||
Bir nesnenin belirli bir özelliğinin tanımlı olup olmadığını gösterir. | Object | ||
Hides the previously shown drop indicator,
created by the showDropIndicator() method,
removes it from the display list and also stops the drag scrolling. | LayoutBase | ||
Object sınıfının bir örneğinin parametre olarak belirtilen nesnenin prototip zincirinde olup olmadığını gösterir. | Object | ||
Measures the target's default size based on its content, and optionally
measures the target's default minimum size. | LayoutBase | ||
Belirtilen özelliğin bulunup bulunmadığını ve numaralandırılabilir olup olmadığını gösterir. | Object | ||
Removes a listener from the EventDispatcher object. | OnDemandEventDispatcher | ||
Dinamik bir özelliğin döngü işlemlerinde kullanılabilirliğini ayarlar. | Object | ||
Sizes, positions and parents the drop indicator based on the specified
drop location. | LayoutBase | ||
Bu nesnenin, yerel ayara özel kurallara göre biçimlendirilmiş dize temsilini döndürür. | Object | ||
Belirtilen nesnenin dize olarak temsil edilen halini döndürür. | Object | ||
Sizes and positions the target's elements. | LayoutBase | ||
Called by the target at the end of its updateDisplayList
to have the layout update its scrollRect. | LayoutBase | ||
Belirtilen nesnenin temel değerini döndürür. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type. | OnDemandEventDispatcher |
Yöntem | Tanımlayan: | ||
---|---|---|---|
Calculates how much to scroll for the specified dropLocation
during a drag and drop gesture. | LayoutBase | ||
[geçersiz kıl]
Returns the index where a new item should be inserted if
the user releases the mouse at the specified coordinates
while completing a drag and drop gesture. | TileLayout | ||
[geçersiz kıl]
Calculates the bounds for the drop indicator that provides visual feedback
to the user of where the items will be inserted at the end of a drag and drop
gesture. | TileLayout | ||
Returns the bounds of the first layout element that either spans or
is above the scrollRect's top edge. | LayoutBase | ||
Returns the bounds of the first layout element that either spans or
is below the scrollRect's bottom edge. | LayoutBase | ||
Returns the bounds of the first layout element that either spans or
is to the left of the scrollRect's left edge. | LayoutBase | ||
Returns the bounds of the first layout element that either spans or
is to the right of the scrollRect's right edge. | LayoutBase | ||
Returns the bounds of the target's scroll rectangle in layout coordinates. | LayoutBase | ||
Called when the verticalScrollPosition or
horizontalScrollPosition properties change. | LayoutBase |
columnAlign | özellik |
columnAlign:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Specifies how to justify the fully visible columns to the container width.
ActionScript values can be ColumnAlign.LEFT
, ColumnAlign.JUSTIFY_USING_GAP
and ColumnAlign.JUSTIFY_USING_WIDTH
.
MXML values can be "left"
, "justifyUsingGap"
and "justifyUsingWidth"
.
When set to ColumnAlign.LEFT
it turns column justification off.
There may be partially visible columns or whitespace between the last column and
the right edge of the container. This is the default value.
When set to ColumnAlign.JUSTIFY_USING_GAP
the horizontalGap
actual value increases so that
the last fully visible column right edge aligns with the container's right edge.
In case there is only a single fully visible column, the horizontalGap
actual value
increases so that it pushes any partially visible column beyond the right edge
of the container.
Note that explicitly setting the horizontalGap
property does not turn off
justification. It only determines the initial gap value.
Justification may increases it.
When set to ColumnAlign.JUSTIFY_USING_WIDTH
the columnWidth
actual value increases so that
the last fully visible column right edge aligns with the container's right edge.
Note that explicitly setting the columnWidth
property does not turn off justification.
It only determines the initial column width value.
Justification may increases it.
Varsayılan değer şudur ColumnAlign.LEFT.
Uygulama
public function get columnAlign():String
public function set columnAlign(value:String):void
İlgili API Öğeleri
columnCount | özellik |
columnCount:int
[salt okunur] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Contain the actual column count.
Varsayılan değer şudur -1.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get columnCount():int
İlgili API Öğeleri
columnWidth | özellik |
columnWidth:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Contain the actual column width, in pixels.
If not explicitly set, the column width is determined from the width of the widest element.
If the columnAlign
property is set
to "justifyUsingWidth"
, the column width grows to the
container width to justify the fully-visible columns.
Varsayılan değer şudur NaN.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get columnWidth():Number
public function set columnWidth(value:Number):void
İlgili API Öğeleri
horizontalAlign | özellik |
horizontalAlign:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Specifies how to align the elements within the cells in the horizontal direction.
Supported values are
HorizontalAlign.LEFT
,
HorizontalAlign.CENTER
,
HorizontalAlign.RIGHT
,
HorizontalAlign.JUSTIFY
.
When set to HorizontalAlign.JUSTIFY
the width of each
element is set to the columnWidth
.
Varsayılan değer şudur HorizontalAlign.JUSTIFY
.
Uygulama
public function get horizontalAlign():String
public function set horizontalAlign(value:String):void
horizontalGap | özellik |
horizontalGap:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Horizontal space between columns, in pixels.
Varsayılan değer şudur 6.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get horizontalGap():Number
public function set horizontalGap(value:Number):void
İlgili API Öğeleri
orientation | özellik |
orientation:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Specifies whether elements are arranged row by row or
column by column.
ActionScript values can be TileOrientation.ROWS
and
TileOrientation.COLUMNS
.
MXML values can be "rows"
and "columns"
.
Varsayılan değer şudur TileOrientation.ROWS.
Uygulama
public function get orientation():String
public function set orientation(value:String):void
paddingBottom | özellik |
paddingBottom:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Number of pixels between the container's bottom edge and the bottom edge of the last layout element.
Varsayılan değer şudur 0.
Uygulama
public function get paddingBottom():Number
public function set paddingBottom(value:Number):void
paddingLeft | özellik |
paddingLeft:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The minimum number of pixels between the container's left edge and the left edge of the layout element.
Varsayılan değer şudur 0.
Uygulama
public function get paddingLeft():Number
public function set paddingLeft(value:Number):void
paddingRight | özellik |
paddingRight:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The minimum number of pixels between the container's right edge and the right edge of the layout element.
Varsayılan değer şudur 0.
Uygulama
public function get paddingRight():Number
public function set paddingRight(value:Number):void
paddingTop | özellik |
paddingTop:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Number of pixels between the container's top edge and the top edge of the first layout element.
Varsayılan değer şudur 0.
Uygulama
public function get paddingTop():Number
public function set paddingTop(value:Number):void
requestedColumnCount | özellik |
requestedColumnCount:int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Number of columns to be displayed.
Set to -1 to allow the TileLayout to determine the column count automatically.
If the orientation
property is set to TileOrientation.ROWS
,
then setting this property has no effect
In this case, the rowCount
is explicitly set, and the
container width is explicitly set.
Varsayılan değer şudur -1.
Uygulama
public function get requestedColumnCount():int
public function set requestedColumnCount(value:int):void
İlgili API Öğeleri
requestedRowCount | özellik |
requestedRowCount:int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Number of rows to be displayed.
Set to -1 to remove explicit override and allow the TileLayout to determine the row count automatically.
If the orientation
property is set to
TileOrientation.COLUMNS
, setting this property has no effect.
in this case, columnCount
is explicitly set, and the
container height is explicitly set.
Varsayılan değer şudur -1.
Uygulama
public function get requestedRowCount():int
public function set requestedRowCount(value:int):void
İlgili API Öğeleri
rowAlign | özellik |
rowAlign:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Specifies how to justify the fully visible rows to the container height.
ActionScript values can be RowAlign.TOP
, RowAlign.JUSTIFY_USING_GAP
and RowAlign.JUSTIFY_USING_HEIGHT
.
MXML values can be "top"
, "justifyUsingGap"
and "justifyUsingHeight"
.
When set to RowAlign.TOP
it turns column justification off.
There might be partially visible rows or whitespace between the last row and
the bottom edge of the container. This is the default value.
When set to RowAlign.JUSTIFY_USING_GAP
the verticalGap
actual value increases so that
the last fully visible row bottom edge aligns with the container's bottom edge.
In case there is only a single fully visible row, the value of verticalGap
increases so that it pushes any partially visible row beyond the bottom edge
of the container. Note that explicitly setting the verticalGap
does not turn off
justification, but just determines the initial gap value.
Justification can then increases it.
When set to RowAlign.JUSTIFY_USING_HEIGHT
the rowHeight
actual value increases so that
the last fully visible row bottom edge aligns with the container's bottom edge. Note that
explicitly setting the rowHeight
does not turn off justification, but
determines the initial row height value.
Justification can then increase it.
Varsayılan değer şudur RowAlign.TOP.
Uygulama
public function get rowAlign():String
public function set rowAlign(value:String):void
İlgili API Öğeleri
rowCount | özellik |
rowCount:int
[salt okunur] Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The row count.
Varsayılan değer şudur -1.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get rowCount():int
İlgili API Öğeleri
rowHeight | özellik |
rowHeight:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
The row height, in pixels.
If not explicitly set, the row height is determined from the maximum of elements' height.
IfrowAlign
is set to "justifyUsingHeight", the actual row height
increases to justify the fully-visible rows to the container height.
Varsayılan değer şudur NaN.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get rowHeight():Number
public function set rowHeight(value:Number):void
İlgili API Öğeleri
verticalAlign | özellik |
verticalAlign:String
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Specifies how to align the elements within the cells in the vertical direction.
Supported values are
VerticalAlign.TOP
,
VerticalAlign.MIDDLE
,
VerticalAlign.BOTTOM
,
VerticalAlign.JUSTIFY
.
When set to VerticalAlign.JUSTIFY
, the height of each
element is set to rowHeight
.
Varsayılan değer şudur VerticalAlign.JUSTIFY
.
Uygulama
public function get verticalAlign():String
public function set verticalAlign(value:String):void
verticalGap | özellik |
verticalGap:Number
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Vertical space between rows, in pixels.
Varsayılan değer şudur 6.
Bu özellik veri ciltleme kaynağı olarak kullanılabilir. Bu özellik değiştirildiğinde, propertyChange
olayını gönderir.
Uygulama
public function get verticalGap():Number
public function set verticalGap(value:Number):void
İlgili API Öğeleri
TileLayout | () | Yapıcı |
public function TileLayout()
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Constructor.
calculateDropIndex | () | yöntem |
override protected function calculateDropIndex(x:Number, y:Number):int
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Returns the index where a new item should be inserted if
the user releases the mouse at the specified coordinates
while completing a drag and drop gesture.
Called by the calculatedDropLocation()
method.
Parametreler
x:Number — The x coordinate of the drag and drop gesture, in
local coordinates.
| |
y:Number — The y coordinate of the drag and drop gesture, in
the drop target's local coordinates.
|
int — The drop index or -1 if the drop operation is not available
at the specified coordinates.
|
calculateDropIndicatorBounds | () | yöntem |
override protected function calculateDropIndicatorBounds(dropLocation:DropLocation):Rectangle
Dil Sürümü: | ActionScript 3.0 |
Ürün Sürümü: | Flex 4 |
Çalışma Zamanı Sürümleri: | Flash Player 10, AIR 1.5 |
Calculates the bounds for the drop indicator that provides visual feedback
to the user of where the items will be inserted at the end of a drag and drop
gesture.
Called by the showDropIndicator()
method.
Parametreler
dropLocation:DropLocation — A valid DropLocation object previously returned
by the calculateDropLocation() method.
|
Rectangle — The bounds for the drop indicator or null.
|
Tue Jun 12 2018, 01:09 PM Z