GWT各个panal中英简介(免费)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Class AbsolutePanel
public class AbsolutePanel
extends ComplexPanel
implements InsertPanel.ForIsWidget
An absolute panel positions all of its children absolutely, allowing them to overlap.
绝对绝对面板位置所有的子控件,使他们能够重叠。

Note that this panel will not automatically resize itself to allow enough room for its absolutely-positioned children.
注意,这个面板不会自动调整本身允许足够的空间为其absolutely-positioned子控件。

It must be explicitly sized in order to make room for them.
必须明确大小,以腾出空间。

Once a widget has been added to an absolute panel, the panel effectively "owns" the positioning of the widget.
一旦一个小部件添加到一个绝对的面板,面板有效“拥有”小部件的定位。

Any existing positioning attributes on the widget may be modified by the panel.
任何现有的部件定位属性可以修改面板。

Class FlexTable
public class FlexTable
extends HTMLTable
A flexible table that creates cells on demand.
一个灵活的表上创建细胞的需求。

It can be jagged (that is, each row can contain a different number of cells) and individual cells can be set to span multiple rows or columns.
它可以是锯齿状(即每一行可以包含不同数量的细胞)和单个细胞可以跨越多个行或列。

Example
public class FlexT ableExample implements EntryPoint {
public void onModuleLoad() {
// Tables have no explicit size -- they resize automatically on demand.
FlexTable t = new FlexTable();
// Put some text at the table's extremes. This forces the table to be
// 3 by 3.
t.setText(0, 0, "upper-left corner");
t.setText(2, 2, "bottom-right corner");
// Let's put a button in the middle...
t.setWidget(1, 0, new Button("Wide Button"));
// ...and set it's column span so that it takes up the whole row.
t.getFlexCellFormatter().setColSpan(1, 0, 3);
RootPanel.get().add(t);
}
}
Class FlowPanel
public class FlowPanel
extends ComplexPanel
implements InsertPanel.ForIsWidget
A panel that formats its child widgets using the default HTML layout behavior. 面板格式子部件使用默认的HTML布局的行为。

Class HorizontalPanel
public class HorizontalPanel
extends CellPanel
implements HasAlignment, InsertPanel.ForIsWidget
A panel that lays all of its widgets out in a single horizontal column. 一个面板,将所有的部件在一个水平列。

Class VerticalPanel
public class VerticalPanel
extends CellPanel
implements HasAlignment, InsertPanel.ForIsWidget
A panel that lays all of its widgets out in a single vertical column.
一个面板,将所有的部件在一个垂直列。

Class Grid
public class Grid
extends HTMLTable
A rectangular grid that can contain text, html, or a child Widget within its cells. 一个矩形网格,可以包含文本、html或子小部件在其细胞。

It must be resized explicitly to the desired number of rows and columns.
它必须显式地调整所需的行和列的数量。

Example
public class GridExample implements EntryPoint {
public void onModuleLoad() {
// Grids must be sized explicitly, though they can be resized later.
Grid g = new Grid(5, 5);
// Put some values in the grid cells.
for (int row = 0; row < 5; ++row) {
for (int col = 0; col < 5; ++col)
g.setText(row, col, "" + row + ", " + col);
}
// Just for good measure, let's put a button in the center.
g.setWidget(2, 2, new Button("Does nothing, but could"));
// You can use the CellFormatter to affect the layout of the grid's cells.
g.getCellFormatter().setWidth(0, 2, "256px");
RootPanel.get().add(g);
}
}
Class LayoutPanel
public class LayoutPanel
extends ComplexPanel
implements AnimatedLayout, RequiresResize, ProvidesResize
A panel that lays its children out in arbitrary layers using the Layout class.
小组展示其子控件在任意层使用布局类。

This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <! DOCTYPE> declaration.
这个小部件将只在标准模式下工作,要求运行的HTML页面有一个明确的< !DOCTYPE >声明。

Class DockPanel
public class DockPanel
extends CellPanel
implements HasAlignment
A panel that lays its child widgets out "docked" at its outer edges, and allows its last widget
to take up the remaining space in its center.
一组子部件用钱“停靠”在其外缘,并允许它最后的小部件剩余空间的中心。

This widget has limitations in standards mode that did not exist in quirks mode.
这个小部件在标准模式的局限性,不存在混杂模式。

The child Widgets contained within a DockPanel cannot be sized using percentages.
子控件小部件包含在一个DockPanel不能使用百分比大小。

Setting a child widget's height to 100% will NOT cause the child to fill the available height.设定一个子控件小部件的身高100%不会导致子控件来填补可用的高度。

If you need to work around these limitations, use DockLayoutPanel instead, but understand that it is not a drop in replacement for this class.
相反,如果你需要绕过这些限制,使用DockLayoutPanel,但是明白,这不是一个替代这个类。

It requires standards mode, and is most easily used under a RootLayoutPanel (as opposed
to a RootPanel).
它需要标准模式,最容易使用RootLayoutPanel下(而不是RootPanel)。

See Also:
DockLayoutPanel
Class DockLayoutPanel
public class DockLayoutPanel
extends ComplexPanel
implements AnimatedLayout, RequiresResize, ProvidesResize
A panel that lays its child widgets out "docked" at its outer edges, and allows its last widget to take up the remaining space in its center.
一组子部件用钱“停靠”在其外缘,并允许它最后的小部件剩余空间的中心。

This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <! DOCTYPE> declaration.
这个小部件将只在标准模式下工作,要求运行的HTML页面有一个明确的< !DOCTYPE >声明。

Example
public class DockLayoutPanelExample implements EntryPoint {
public void onModuleLoad() {
// Attach five widgets to a DockLayoutPanel, one in each direction. Lay
// them out in 'em' units.
DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
p.addNorth(new HTML("north"), 2);
p.addSouth(new HTML("south"), 2);
p.addEast(new HTML("east"), 2);
p.addWest(new HTML("west"), 2);
p.add(new HTML("center"));
// Attach the LayoutPanel to the RootLayoutPanel. The latter will listen for
// resize events on the window to ensure that its children are informed of
// possible size changes.
RootLayoutPanel rp = RootLayoutPanel.get();
rp.add(p);
}
}
Class HTMLPanel
public class HTMLPanel
extends ComplexPanel
A panel that contains HTML, and which can attach child widgets to identified elements within that HTML.
一个面板,其中包含HTML,可以附加子部件发现了在HTML的元素。

Class DeckPanel
public class DeckPanel
extends ComplexPanel
implements HasAnimation, InsertPanel.ForIsWidget
A panel that displays all of its child widgets in a 'deck', where only one can be visible at a time.
一个面板显示其所有的子部件“甲板”,一次只有一个可以看得见的地方。

It is used by TabPanel.
它是由TabPanel使用。

Class TabPanel
public class TabPanel
extends Composite
implements TabListener, SourcesTabEvents, HasWidgets, HasAnimation, IndexedPanel.ForIsWidget, HasBeforeSelectionHandlers<ng.Integer>, HasSelectionHandlers<ng.Integer>
A panel that represents a tabbed set of pages, each of which contains another widget.小组代表一组选项卡页面,每个包含另一个小部件。

Its child widgets are shown as the user selects the
various tabs associated with them.
子小部件显示为用户选择与他们有关的各种标签。

The tabs can contain arbitrary HTML.
标签可以包含任意的HTML。

This widget will only work in quirks mode.
这个小部件只会在混杂模式工作。

If your application is in Standards Mode, use TabLayoutPanel instead.
如果您的应用程序在标准模式下,使用TabLayoutPanel代替。

Note that this widget is not a panel per se, but rather a Composite that aggregates a TabBar and a DeckPanel.
注意,这个小部件并不是一个面板本身,而是一个复合骨料TabBar和DeckPanel。

It does, however, implement HasWidgets.
然而,它确实实现HasWidgets。

Once a widget has been added to a DeckPanel, its visibility, width, and height attributes will be manipulated.
一旦DeckPanel添加小部件,它的可见性,宽度和高度属性将被操纵。

When the widget is removed from the DeckPanel, it will be visible, and its width and height attributes will be cleared.
当从DeckPanel删除小部件时,这将是可见的,它的宽度和高度属性将被清除。

Class StackPanel
public class StackPanel
extends ComplexPanel
implements InsertPanel.ForIsWidget
A panel that stacks its children vertically, displaying only one at a time, with a header for each child which the user can click to display.
一个面板垂直堆栈的子控件,一次只显示一个,每个子控件的头,用户可以单击显示。

This widget will only work in quirks mode.
这个小部件只会在混杂模式工作。

If your application is in Standards Mode, use StackLayoutPanel instead.
如果您的应用程序在标准模式下,使用StackLayoutPanel代替。

Class DecoratorPanel
public class DecoratorPanel
extends SimplePanel
A SimplePanel that wraps its contents in stylized boxes, which can be used to add rounded corners to a Widget.
一个SimplePanel程式化的盒子包装它的内容,可以用来添加圆角小部件。

This widget will only work in quirks mode in most cases.
这个小部件在大多数情况下只会在混杂模式下工作。

Specifically, setting the height or width of the DecoratorPanel will result in rendering issues.具体来说,设置的高度或宽度DecoratorPanel将导致呈现问题。

Wrapping a Widget in a "9-box" allows users to specify images in each of the corners and along the four borders.
包装一个小部件在一个“9-box”允许用户指定图像的每一个角落,沿着四个边界。

This method allows the content within the DecoratorPanel to resize without disrupting the look of the border.
这种方法允许DecoratorPanel中的内容调整在不影响外观的边界。

In addition, rounded corners can generally be combined into a single image file, which reduces the number of downloaded files at startup.
此外,圆角通常可以组合成一个单一的图像文件,在启动时减少了下载文件的数量。

This class also simplifies the process of using AlphaImageLoaders to support 8-bit transparencies (anti-aliasing and shadows) in ie6, which does not support them normally.
这个类还简化了使用AlphaImageLoaders支持8位幻灯片的过程(抗锯齿和阴影)在ie6,正常不支持他们。

Setting the Size:
设置大小:
If you set the width or height of the DecoratorPanel, you need to set the height and width of the middleCenter cell to 100% so that the middleCenter cell takes up all of the available space.
如果你设置DecoratorPanel的宽度或高度,您需要设置的高度和宽度middleCenter细胞100%,
以便middleCenter细胞占用所有可用的空间。

If you do not set the width and height of the DecoratorPanel, it will wrap its contents tightly.
如果你不设置DecoratorPanel的宽度和高度,它会紧紧地包裹住它的内容。

.gwt-DecoratorPanel .middleCenter {
height: 100%;
width: 100%;
}
Class StackLayoutPanel
public class StackLayoutPanel
extends ResizeComposite
implements HasWidgets, ProvidesResize, IndexedPanel.ForIsWidget, AnimatedLayout, HasBeforeSelectionHandlers<ng.Integer>, HasSelectionHandlers<ng.Integer>
A panel that stacks its children vertically, displaying only one at a time, with a header for each child which the user can click to display.
一个面板垂直堆栈的子控件,一次只显示一个,每个子控件的头,用户可以单击显示。

This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <! DOCTYPE> declaration.
这个小部件将只在标准模式下工作,要求运行的HTML页面有一个明确的< !DOCTYPE >声明。

Class SimplePanel
public class SimplePanel
extends Panel
implements HasOneWidget
Base class for panels that contain only one widget.
基类面板只包含一个小部件。

Class FocusPanel
public class FocusPanel
extends SimplePanel
implements HasFocus, SourcesClickEvents, SourcesMouseEvents, SourcesMouseWheelEvents, HasAllDragAndDropHandlers, HasAllMouseHandlers, HasClickHandlers, HasDoubleClickHandlers, HasAllKeyHandlers, HasAllFocusHandlers, HasAllGestureHandlers, HasAllTouchHandlers
A simple panel that makes its contents focusable, and adds the ability to catch mouse and keyboard events.
一个简单的面板,情况下,使其内容可定焦和添加捕获鼠标和键盘事件的能力。

Class FormPanel
public class FormPanel
extends SimplePanel
implements FiresFormEvents, er.client.ui.impl.FormPanelImplHost
A panel that wraps its contents in an HTML <FORM> element.
一个面板包装它的内容在HTML <形式>元素。

This panel can be used to achieve interoperability with servers that accept traditional HTML form encoding.
该面板可以用来实现与服务器的互操作性,接受传统的HTML表单编码。

The following widgets (those that implement HasName) will be submitted to the server if they are contained within this panel:
下面的小部件(那些实现HasName)将提交到服务器,如果他们都包含在这个面板:
TextBox
文本框
PasswordTextBox
密码框
RadioButton
单选按钮
SimpleRadioButton
简单单选按钮
CheckBox
复选框
SimpleCheckBox
简单复选框
TextArea
文本区
ListBox
列表框
FileUpload
文件上传
Hidden
隐藏的
In particular, FileUpload is only useful when used within a FormPanel, because the browser will only upload files using form submission.
特别是,FileUpload FormPanel内使用时才有用,因为浏览器将只使用表单提交上传文件。

Class ScrollPanel
public class ScrollPanel
extends SimplePanel
implements SourcesScrollEvents, RequiresResize, ProvidesResize, HasScrolling
A simple panel that wraps its contents in a scrollable area.
一个简单的面板,包装可滚动区域的内容。

Class SplitPanel
Deprecated.
Use SplitLayoutPanel instead, but understand that it is not a drop in replacement for this class. It requires standards mode, and is most easily used under a RootLayoutPanel(as opposed to a RootPanel
@Deprecated
abstract class SplitPanel
extends Panel
Abstract base class for HorizontalSplitPanel and VerticalSplitPanel.
抽象基类HorizontalSplitPanel和VerticalSplitPanel。

public final class HorizontalSplitPanel
extends SplitPanel
A panel that arranges two widgets in a single horizontal row and allows the user to interactively change the proportion of the width dedicated to each of the two widgets.
小组,安排两个小部件在一个水平行并允许用户以交互方式改变宽度的比例,致力于每一个两个小部件。

Widgets contained within a HorizontalSplitPanel will be automatically decorated with scrollbars when necessary.
小部件包含在一个HorizontalSplitPanel将自动在必要时用滚动条装饰。

This widget will only work in quirks mode.
这个小部件在混杂模式只会工作。

If your application is in Standards Mode, use SplitLayoutPanel instead.
如果您的应用程序在标准模式下,使用SplitLayoutPanel代替。

public final class VerticalSplitPanel
extends SplitPanel
A panel that arranges two widgets in a single vertical column and allows the user to
interactively change the proportion of the height dedicated to each of the two widgets.
小组,安排两个小部件在一个垂直列和允许用户交互式地变化的比例高度致力于每一个两个小部件。

Widgets contained within a VerticalSplitterPanel will be automatically decorated with scrollbars when necessary.
小部件包含在一个VerticalSplitterPanel将自动在必要时用滚动条装饰。

This widget will only work in quirks mode.
这个小部件在混杂模式只会工作。

If your application is in Standards Mode, use SplitLayoutPanel instead.
如果您的应用程序在标准模式下,使用SplitLayoutPanel代替。

Class CaptionPanel
public class CaptionPanel
extends Composite
implements HasWidgets.ForIsWidget
A panel that wraps its contents in a border with a caption that appears in the upper left corner of the border.
面板,其内容包装在边境的标题出现在左上角的边界。

This is an implementation of the fieldset HTML element.
这是一个实现自定义字段的HTML元素。

Class DisclosurePanel
public final class DisclosurePanel
extends Composite
implements FiresDisclosureEvents, HasWidgets.ForIsWidget, HasAnimation, HasOpenHandlers<DisclosurePanel>, HasCloseHandlers<DisclosurePanel>
A widget that consists of a header and a content panel that discloses the content when a user clicks on the header.
小部件,包括标题和内容面板,披露的内容当用户单击标题。

Class DecoratedTabPanel
public class DecoratedTabPanel
extends TabPanel
A TabPanel that uses a DecoratedTabBar with rounded corners.
一个使用一个圆角DecoratedTabBar TabPanel。

This widget will only work in quirks mode.
这个小部件在混杂模式只会工作。

If your application is in Standards Mode, use TabLayoutPanel instead.
如果您的应用程序在标准模式下,使用TabLayoutPanel代替。

Class TabLayoutPanel
public class TabLayoutPanel
extends ResizeComposite
implements HasWidgets, ProvidesResize, IndexedPanel.ForIsWidget, AnimatedLayout, HasBeforeSelectionHandlers<ng.Integer>, HasSelectionHandlers<ng.Integer>
A panel that represents a tabbed set of pages, each of which contains another widget.
小组代表一组选项卡页面,每个包含另一个小部件。

Its child widgets are shown as the user selects the various tabs associated with them.
子小部件显示为用户选择与他们有关的各种标签。

The tabs can contain arbitrary text, HTML, or widgets.
标签可以包含任意文本、HTML或小部件。

This widget will only work in standards mode, which requires that the HTML page in which it is run have an explicit <! DOCTYPE> declaration.
这个小部件将只在标准模式下工作,要求运行的HTML页面有一个明确的< !DOCTYPE >声明。

相关文档
最新文档