xworker.swt.widgets.Control
事物 Control(Control)点击打开事物点击浏览描述

描述者:
MetaDescriptor3
thing
继承:
Widget
LayoutDatas

Control is the abstract superclass of all windowed user interface classes.

字段摘要
           String background
           Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.
           String backgroundImage
           Sets the receiver's background image to the image specified by the argument, or to the default system color for the control if the argument is null.
           String bounds
           Sets the receiver's size and location to the rectangular area specified by the arguments.
           String capture
           If the argument is true, causes the receiver to have all mouse events delivered to it until the method is called with false as the argument.
           String cls
           样式名称。
           String cursor
           Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null.
           String enabled
           Enables the receiver if the argument is true, and disables it otherwise.
           String font
           Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
           String foreground
           Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.
           String layoutData
           Sets the layout data associated with the receiver to the argument.
           String location
           Sets the receiver's location to the point specified by the arguments which are relative to the receiver's parent (or its display if its parent is null), unless the receiver is a shell.
           String menu
           Sets the receiver's pop up menu to the argument.
           String parent
           Changes the parent of the widget to be the one provided if the underlying operating system supports this feature.
           String redraw
           If the argument is false, causes subsequent drawing operations in the receiver to be ignored.
           String region
           Sets the shape of the control to the region specified by the argument.
           String size
           Sets the receiver's size to the point specified by the arguments.
           String toolTipText
           Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.
           String varref(变量引用)
           引用上下文中的其他变量。
           String visible
           Marks the receiver as visible if the argument is true, and marks it invisible otherwise.
           String xw_cl_global(全局变量)
           如果是全局变量,那么它将会放入到动作上下文中的索引为0的变量范围中。
           String xw_cl_namespace(名字空间)
           如果指定了名字空间,那么放入到指定的名字空间中。
           String xw_cl_varName(变量名)
           放入到动作上下文中的变量名称,如果没有则不放入到变量上下文中。
 
方法摘要
           addObjectToContext
          
           init
          

参数 :control

 
子事物摘要
           ControlListener
          Classes which implement this interface provide methods that deal with the events that are generated by moving and resizing controls.
           DisposeListener
          Classes which implement this interface provide a method that deals with the event that is generated when a widget is disposed.
           DragDetectListener
          
void dragDetected(DragDetectEvent e)
           DragSource
          DragSource defines the source object for a drag and drop transfer.
           DropTarget
          Class DropTarget defines the target object for a drag and drop transfer.
           FocusListener
          
           FormData
          
           GridData
          
           HelpListener
          
           KeyListener
          
           Listeners
          SWT通用事件监听。
           ListenersPrepared
          创建时不注册到控件的事件监听,通常用于多个控件都需要注册的事件监听,可以在创建后由控件增加监听时引用。
           Menu
          
           MenuDetectListener
          
           MouseListener
          
           MouseMoveListener
          
           MouseTrackListener
          
           MouseWheelListener
          
           PaintListener
          
           RowData
          Each control controlled by a RowLayout can have its initial width and height specified by setting a RowData object into the control.
           TraverseListener
          
 
字段详细信息

background点击打开事物

Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.


backgroundImage点击打开事物

Sets the receiver's background image to the image specified by the argument, or to the default system color for the control if the argument is null.


bounds点击打开事物

Sets the receiver's size and location to the rectangular area specified by the arguments.


capture点击打开事物

If the argument is true, causes the receiver to have all mouse events delivered to it until the method is called with false as the argument.


cls点击打开事物

样式名称。

目前的样式只是Control的公共属性的集合,可以设置Control的属性,功能仅限SWT的Control。

样式定义在StyleManager下,样式的目的类似HTML中的样式单,即在一个地方定义样式其他地方可以通过引用的方式实现样式的效果。


cursor点击打开事物

Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null.


enabled点击打开事物

Enables the receiver if the argument is true, and disables it otherwise.


font点击打开事物

Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.


foreground点击打开事物

Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.


layoutData点击打开事物

Sets the layout data associated with the receiver to the argument.


location点击打开事物

Sets the receiver's location to the point specified by the arguments which are relative to the receiver's parent (or its display if its parent is null), unless the receiver is a shell.


menu点击打开事物

Sets the receiver's pop up menu to the argument.


parent点击打开事物

Changes the parent of the widget to be the one provided if the underlying operating system supports this feature.


redraw点击打开事物

If the argument is false, causes subsequent drawing operations in the receiver to be ignored.


region点击打开事物

Sets the shape of the control to the region specified by the argument.


size点击打开事物

Sets the receiver's size to the point specified by the arguments.


toolTipText点击打开事物

Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.


varref(变量引用)点击打开事物

引用上下文中的其他变量。


visible点击打开事物

Marks the receiver as visible if the argument is true, and marks it invisible otherwise.


xw_cl_global(全局变量)点击打开事物

如果是全局变量,那么它将会放入到动作上下文中的索引为0的变量范围中。


xw_cl_namespace(名字空间)点击打开事物

如果指定了名字空间,那么放入到指定的名字空间中。

名字空间是放到动作上下文中的全局变量中的,每一个名字空间是一个Map,名字空间可以嵌套,如XWorker.util.file等。注意:需要自行处理名字空间中的变量生命周期。

有一个特殊变量空间是xw_objects,xw_objects的结构是根据创建变量的顺序而产生的树形结构,每一个节点的构成如下:
{
    name: //名字
    id:       //标识
    value: //值,注意这里是软引用,系统垃圾回收后值的内容会消失
    thingEntry: //创建该变量的事物引用实体
    childs:      //下一级子事物列表
}

动作上下文是公用的,本事物的名字前缀是xw_cl_,请注意不要重复。


xw_cl_varName(变量名)点击打开事物

放入到动作上下文中的变量名称,如果没有则不放入到变量上下文中。


 
方法详细信息

addObjectToContext


init

参数 :control


 
子事物详细信息

ControlListener点击打开事物

Classes which implement this interface provide methods that deal with the events that are generated by moving and resizing controls.

After creating an instance of a class that implements this interface it can be added to a control using the addControlListener method and removed using the removeControlListener method. When a control is moved or resized, the appropriate method will be invoked.


DisposeListener点击打开事物

Classes which implement this interface provide a method that deals with the event that is generated when a widget is disposed.

After creating an instance of a class that implements this interface it can be added to a widget using the addDisposeListener method and removed using the removeDisposeListener method. When a widget is disposed, the widgetDisposed method will be invoked.

see: DisposeListener


DragDetectListener点击打开事物

void dragDetected(DragDetectEvent e)
          Sent when a drag gesture is detected.


DragSource点击打开事物

DragSource defines the source object for a drag and drop transfer.


DropTarget点击打开事物

Class DropTarget defines the target object for a drag and drop transfer.


FocusListener点击打开事物


FormData点击打开事物


GridData点击打开事物


HelpListener点击打开事物


KeyListener点击打开事物


Listeners点击打开事物

SWT通用事件监听。

通过指定事件的类型调用控件的addListener(int, Listener)方法注册事件监听。

SWT还有另一种事件监听是通过控件的addXXListener(XXLitener)方法注册的,此方法是那种方法不兼容,互相引用无效。


ListenersPrepared点击打开事物

创建时不注册到控件的事件监听,通常用于多个控件都需要注册的事件监听,可以在创建后由控件增加监听时引用。


Menu点击打开事物


MenuDetectListener点击打开事物


MouseListener点击打开事物


MouseMoveListener点击打开事物


MouseTrackListener点击打开事物


MouseWheelListener点击打开事物


PaintListener点击打开事物


RowData点击打开事物

Each control controlled by a RowLayout can have its initial width and height specified by setting a RowData object into the control.

TraverseListener点击打开事物