public class FlexContainer extends FlexObject
You do not create an instance of Container in an application. Instead, you create an instance of one of Container's subclasses, such as Canvas or HBox.
The Container class contains the logic for scrolling, clipping, and dynamic instantiation. It contains methods for adding and removing children and the logic for drawing the background and borders of containers.
Modifier | Constructor and Description |
---|---|
protected |
FlexContainer(JtfObjectHandle handle,
Desktop desktop)
Creates a new FlexContainer with a JtfObjectHandle.
|
Modifier and Type | Method and Description |
---|---|
void |
dragCancel()
Defines the value of the type property of the event object for a dragComplete event.
|
void |
dragCancel(ModifierKey keyModifier)
Defines the value of the type property of the event object for a dragComplete event.
|
void |
dragDrop()
Defines the value of the type property of the event object for a dragDrop event.
|
void |
dragDrop(String draggedItem)
Defines the value of the type property of the event object for a dragDrop event.
|
void |
dragDrop(String draggedItem,
ModifierKey keyModifier)
Defines the value of the type property of the event object for a dragDrop event.
|
void |
dragStart(String draggedItem)
Defines the value of the type property of the event object for a dragStart event.
|
void |
dragStart(String draggedItem,
ModifierKey keyModifier)
Defines the value of the type property of the event object for a dragStart event.
|
double |
getBackgroundAlpha()
Gets the alpha level of the color defined by the backgroundColor property, of the image or SWF file defined by the backgroundImage style.
|
Color |
getBackgroundColor()
Gets the background color of a component.
|
Color |
getBackgroundDisabledColor()
Gets the background color of the component when it is disabled.
|
String |
getBackgroundImage()
Gets the background image of a component.
|
String |
getBackgroundSize()
Gets the percentage to change the image size to for the specified backgroundImage.
|
List<String> |
getColumnNames()
Gets a list containing the names of all columns in the data.
|
int |
getCreationIndex()
Gets the order to instantiate and draw the children of the container.
|
String |
getCreationPolicy()
Gets the child creation policy for this Container.
|
List<Double> |
getFillAlphas()
Gets the alpha transparency values used for the background fill of components.
|
List<Color> |
getFillColors()
Gets the colors used to tint the background fill of the component.
|
int |
getFirstVisibleRow()
Gets the index of the first visible child.
|
String |
getFontFamily()
Gets the name of the font to use.
|
double |
getFontSize()
Gets the height of the text, in pixels.
|
String |
getFontStyle()
Gets whether the text is italic font.
|
String |
getFontWeight()
Gets whether the text is boldface.
|
String |
getLabel()
Gets the text displayed by some navigator containers to represent this Container.
|
int |
getLastVisibleRow()
Gets the index of the last visible child.
|
int |
getNumChildren()
Gets the number of child components in this container.
|
int |
getNumColumns()
Gets the total number of columns of data available.
|
int |
getNumRows()
Gets the total number of rows of data available.
|
List<List<String>> |
getValues(int start,
int end)
Returns a matrix containing the automation values of all parts of the components.
|
void |
mouseScroll()
Dispatched when a mouse wheel is spun over an InteractiveObject instance.
|
void |
mouseScroll(int delta)
Dispatched when a mouse wheel is spun over an InteractiveObject instance.
|
void |
scroll(int position,
FlexScrollDirection direction,
FlexScrollDetail detail)
Dispatched when the user manually scrolls the container.
|
changeFocus, changeFocus, changeFocus, getAutomationClassName, getAutomationIndex, getAutomationName, getClassName, getCurrentState, getErrorColor, getErrorString, getId, getNumAutomationChildren, getPercentHeight, getPercentWidth, getScaleX, getScaleY, getThemeColor, getToolTip, isEnabled, isFocusEnabled, isUseHandCursor, move, move, move, setFocus
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAlpha, getHeight, getStyle, getTabIndex, getWidth, getX, getY, isMouseEnabled, isTabChildren, isTabEnabled, isVisible, mouseMove, mouseMove, nativeToString, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected FlexContainer(JtfObjectHandle handle, Desktop desktop)
handle
- the handle that identifies the FlexContainerdesktop
- the desktop on which this object livespublic void dragCancel()
public void dragCancel(ModifierKey keyModifier)
keyModifier
- the key modifiers (for example, the Ctrl key) to use when completing the droppublic void dragDrop()
public void dragDrop(String draggedItem)
draggedItem
- the item being draggedpublic void dragDrop(String draggedItem, ModifierKey keyModifier)
draggedItem
- the item being draggedkeyModifier
- the key modifiers (for example, the Ctrl key) to use when dropping the objectpublic void dragStart(String draggedItem)
draggedItem
- the item being draggedpublic void dragStart(String draggedItem, ModifierKey keyModifier)
draggedItem
- the item being draggedkeyModifier
- the key modifiers (for example, the Ctrl key) to use when dragging the objectpublic List<List<String>> getValues(int start, int end)
start
- the index of the starting child. The default value is 0.end
- the index of the ending child. The default value is 0.public void mouseScroll()
If the target is a text field, the text scrolls as the default behavior. Only available on Microsoft Windows operating systems.
Defines the value of the type property of a mouseWheel event object.
public void mouseScroll(int delta)
If the target is a text field, the text scrolls as the default behavior. Only available on Microsoft Windows operating systems.
Defines the value of the type property of a mouseWheel event object.
delta
- the number of lines that each notch on the mouse wheel representspublic void scroll(int position, FlexScrollDirection direction, FlexScrollDetail detail)
The event is dispatched when the scroll position is changed using either the mouse (e.g. clicking on the scrollbar's down button) or the keyboard (e.g., clicking on the down-arrow key). However, this event is not dispatched if the scroll position is changed programatically (e.g., setting the value of the horizontalScrollPosition property). The viewChanged
event is delivered whenever the scroll position is changed, either manually or programatically.
At the time when this event is dispatched, the scrollbar has been updated to the new position, but the container's child objects have not been shifted to reflect the new scroll position.
position
- contains the new scroll positiondirection
- contains the scroll direction, either ScrollEventDirection.HORIZONTAL or ScrollEventDirection.VERTICAL.detail
- provides the specifics of the type of scroll activity. Constants for the possible values are provided in the ScrollEventDetail class.public double getBackgroundAlpha()
For most controls, the default value is 1.0, but for ToolTip controls, the default value is 0.95 and for Alert controls, the default value is 0.9. The default value is 1.0.
public Color getBackgroundColor()
You can have both a backgroundColor and a backgroundImage set. Some components do not have a background. The DataGrid control ignores this style. The default value is undefined, which means it is not set. If both this style and the backgroundImage style are undefined, the component has a transparent background.
For the Application container, this style specifies the background color while the application loads, and a background gradient while it is running. Flex calculates the gradient pattern between a color slightly darker than the specified color, and a color slightly lighter than the specified color.
The default skins of most Flex controls are partially transparent. As a result, the background color of a container partially shows through to controls that are in that container. You can avoid this by setting the alpha values of the control's fillAlphas property to 1.
public Color getBackgroundDisabledColor()
The default value for List controls is 0xDDDDDD (light gray). If a container is disabled, the background is dimmed, and the degree of dimming is controlled by the disabledOverlayAlpha style.
public String getBackgroundImage()
You can either have both a backgroundColor and a backgroundImage set at the same time. The background image is displayed on top of the background color. The default value is undefined, meaning "not set." If this style and the backgroundColor style are undefined, the component has a transparent background.
The default skins of most Flex controls are partially transparent. As a result, the background image of a container partially shows through to controls that are in that container. You can avoid this by setting the alpha values of the control's fillAlphas property to 1.
public String getBackgroundSize()
A value of 100%
stretches the image to fit the entire component. To specify a percentage value, you must include the percent sign (%). The default for the Application container is 100%. The default value for all other containers is auto, which maintains the original size of the image.
public List<String> getColumnNames()
public int getCreationIndex()
This property can only be used when the creationPolicy property is set to ContainerCreationPolicy.QUEUED. Otherwise, it is ignored.
The default value is -1.
public String getCreationPolicy()
ActionScript values can be ContainerCreationPolicy.AUTO
, ContainerCreationPolicy.ALL
, ContainerCreationPolicy.NONE
, or ContainerCreationPolicy.QUEUED
. MXML values can be auto
, all
, none
, or queued
.
If no creationPolicy is specified for a container, that container inherits its parent's creationPolicy. If no creationPolicy is specified for the Application, it defaults to ContainerCreationPolicy.AUTO
.
A creationPolicy of ContainerCreationPolicy.AUTO
means that the container delays creating some or all descendants until they are needed, a process which is known as deferred instantiation. This policy produces the best startup time because fewer UIComponents are created initially. However, this introduces navigation delays when a user navigates to other parts of the application for the first time. Navigator containers such as Accordion, TabNavigator, and ViewStack implement the ContainerCreationPolicy.AUTO
policy by creating all their children immediately, but wait to create the deeper descendants of a child until it becomes the selected child of the navigator container.
A creationPolicy of ContainerCreationPolicy.ALL
means that the navigator containers immediately create deeper descendants for each child, rather than waiting until that child is selected. For single-view containers such as a VBox container, there is no difference between the ContainerCreationPolicy.AUTO
and ContainerCreationPolicy.ALL
policies.
A creationPolicy of ContainerCreationPolicy.QUEUED
means that the container is added to a creation queue rather than being immediately instantiated and drawn. When the application processes the queued container, it creates the children of the container and then waits until the children have been created before advancing to the next container in the creation queue.
A creationPolicy of ContainerCreationPolicy.NONE
means that the container creates none of its children. In that case, it is the responsibility of the MXML author to create the children by calling the createComponentsFromDescriptors
method.
public List<Double> getFillAlphas()
Set this to an Array of either two or four numbers. Elements 0 and 1 specify the start and end values for an alpha gradient. If elements 2 and 3 exist, they are used instead of elements 0 and 1 when the component is in a mouse-over state. The global default value is [ 0.60, 0.40, 0.75, 0.65 ]. Some components, such as the ApplicationControlBar container, have a different default value. For the ApplicationControlBar container, the default value is [ 0.0, 0.0 ].
Deprecated Since 3.0: Use headerStyleName
public List<Color> getFillColors()
Set this to an Array of either two or four uint values that specify RGB colors. Elements 0 and 1 specify the start and end values for a color gradient. If elements 2 and 3 exist, they are used instead of elements 0 and 1 when the component is in a mouse-over state. For a flat-looking control, set the same color for elements 0 and 1 and for elements 2 and 3, The default value is [ 0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE ].
Some components, such as the ApplicationControlBar container, have a different default value. For the ApplicationControlBar container, the default value is [ 0xFFFFFF, 0xFFFFFF ].
Deprecated Since 3.0: Use headerStyleName
public int getFirstVisibleRow()
public String getFontFamily()
Unlike in a full CSS implementation, comma-separated lists are not supported. You can use any font family name. If you specify a generic font name, it is converted to an appropriate device font. The default value is Verdana
.
public double getFontSize()
The default value is 10 for all controls except the ColorPicker control. For the ColorPicker control, the default value is 11.
public String getFontStyle()
Recognized values are normal
and italic
. The default value is normal
.
public String getFontWeight()
Recognized values are normal and bold. The default value for Button controls is bold. The default value for all other controls is normal.
public String getLabel()
For example, if this Container is a child of a TabNavigator, this string appears in the corresponding tab. If this Container is a child of an Accordion, this string appears in the corresponding header.
The default value is "".
public int getLastVisibleRow()
public int getNumChildren()
public int getNumColumns()
public int getNumRows()
Copyright 2009-2012 Micro Focus. All Rights Reserved.