本文整理汇总了Java中com.google.gwt.user.client.ui.Grid.setWidget方法的典型用法代码示例。如果您正苦于以下问题:Java Grid.setWidget方法的具体用法?Java Grid.setWidget怎么用?Java Grid.setWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Grid
的用法示例。
在下文中一共展示了Grid.setWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createGrid
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
* Create a Grid that describes the job
*/
@SuppressWarnings("deprecation")
private Grid createGrid() {
Grid grid = new Grid(2, 2);
grid.setWidth("280px");
grid.setWidget(0, 0, new Label(Constants.studioUIMsg.jobName()));
/**
* Panel information
*/
namebox.setStyleName("boxstyle");
grid.setWidget(0, 1, namebox);
grid.setWidget(1, 0, new Label(Constants.studioUIMsg.jobDescription()));
SubmitListener sl = new SubmitListener();
namebox.addKeyboardListener(sl);
descArea.setStyleName("boxstyle");
descArea.setHeight("auto");
grid.setWidget(1, 1, descArea);
grid.setStyleName("bda-newjob-grid");
return grid;
}
示例2: initGridHead
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
protected void initGridHead(int size){
this.setSpacing(3);
paramsGrid = new Grid(size, 3);
paramsGrid.setStyleName("gridstyle");
paramsGrid.setBorderWidth(1);
paramsGrid.setWidth("250px");
Label nameLabel = new Label(Constants.studioUIMsg.parameter());
nameLabel.setWidth("65px");
paramsGrid.setWidget(0, 0, nameLabel);
Label typeLabel = new Label(Constants.studioUIMsg.type());
typeLabel.setWidth("40px");
paramsGrid.setWidget(0, 1, typeLabel);
Label valueLabel = new Label(Constants.studioUIMsg.value());
paramsGrid.setWidget(0, 2, valueLabel);
paramsGrid.setVisible(false);
}
示例3: createPanel
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
private Panel createPanel() {
Label label = new Label("Search Options");
label.addStyleName("search-header");
label.getElement().getStyle().setDisplay(Display.BLOCK);
Grid grid = new Grid(2,2);
grid.setText(0, 0, "Ontology/Codelist:");
grid.setWidget(0, 1, ontologiesDropBox);
grid.setText(1, 0, "Include Synonyms:");
grid.setWidget(1, 1, includeSynonyms);
grid.addStyleName("search-options");
CellFormatter cellFormatter = grid.getCellFormatter();
for(int i = 0; i < grid.getRowCount(); i++) {
cellFormatter.addStyleName(i, 0, "search-option");
}
Panel panel = new FlowPanel();
panel.add(label);
panel.add(grid);
return panel;
}
示例4: showRiskData
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
protected void showRiskData( JsonRiskDataList list ) {
VerticalPanel p = new VerticalPanel();
p.setWidth("100%");
Grid grid = new Grid( list.size(), 2 );
// grid.getColumnFormatter().setWidth(0, "20%");
// grid.getColumnFormatter().setWidth(1, "80%");
for( int i = 0; i < list.size(); i++ ) {
JsonRiskDataList.RiskDataItem item = list.get( i );
grid.setWidget( i, 0, new Label( item.getId() ) );
grid.setWidget( i, 1, new Label( item.getValue() ) );
}
Label title = new Label(entity);
title.setStyleName("smallTitle");
p.add(title);
p.add(grid);
panel.setWidget( p );
}
示例5: loadValues
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public void loadValues( ArrayList<JAHPComparison> list ) {
if( container.getWidget() != null ) {
container.getWidget().removeFromParent();
}
Grid grid = new Grid( 0, 3 );
int i = 0;
for( JAHPComparison c : list ) {
if( c.getId1().equals( c.getId2() ) ) continue;
grid.resize( grid.getRowCount() +1, 3 );
ComparisonRow row = new ComparisonRow( c );
grid.setWidget( i, 0, row.getLeftWidget() );
grid.setWidget( i, 1, row.getSlider() );
grid.setWidget( i, 2, row.getRightWidget() );
i++;
}
this.preferences = list;
container.setWidget( grid );
}
示例6: createView
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public void createView() {
leftButton = new Button( getLeftButtonName() );
rightButton = new Button( getRightButtonName() );
Grid grid = new Grid( 2, 2 );
grid.setText( 0, 0, "Name :" );
grid.setWidget( 0, 1, createAndGetNameWidget() );
HorizontalPanel buttons = new HorizontalPanel();
buttons.add( leftButton );
buttons.add( rightButton );
grid.setWidget( 1, 1, buttons );
setWidget( grid );
}
示例7: createView
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public void createView() {
selectButton = new Button( "Select Name");
leftButton = new Button( getLeftButtonName() );
rightButton = new Button( getRightButtonName() );
Grid grid = new Grid( 2, 2 );
grid.setText( 0, 0, "Name :" );
grid.setWidget( 0, 1, createAndGetNameWidget() );
HorizontalPanel buttons = new HorizontalPanel();
buttons.add( selectButton );
buttons.add( leftButton );
buttons.add( rightButton );
grid.setWidget( 1, 1, buttons );
initWidget( grid );
}
示例8: UserCreateView
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public UserCreateView() {
id = new Label();
lastName = new TextBox();
firstName = new TextBox();
Grid grid = new Grid( 3, 2 );
grid.setText( 0, 0, "Last Name: " );
grid.setText( 1, 0, "First Name: " );
grid.setWidget( 0, 1, lastName );
grid.setWidget( 1, 1, firstName );
create = new Button( "Create" );
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add( grid );
mainPanel.add( create );
initWidget( mainPanel );
}
示例9: UserDisplayView
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
public UserDisplayView() {
id = new Label();
lastName = new Label();
firstName = new Label();
Grid grid = new Grid( 3, 2 );
grid.setText( 0, 0, "Last Name: " );
grid.setText( 1, 0, "First Name: " );
grid.setText( 2, 0, "Generated Id: " );
grid.setWidget( 0, 1, lastName );
grid.setWidget( 1, 1, firstName );
grid.setWidget( 2, 1, id );
create = new Button( "New" );
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.add( grid );
mainPanel.add( create );
initWidget( mainPanel );
}
示例10: HistoryWrapper
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
* Wrap the given field.
*
* @param field Field to wrap.
*/
public HistoryWrapper(Field<V> field) {
super(new FlowPanel());
this.field = field;
final Grid grid = new Grid(1, 2);
((FlowPanel)getWidget()).add(grid);
historyButton = Forms.button();
historyButton.setIcon(IconImageBundle.ICONS.history16());
grid.setWidget(0, 0, field);
grid.setWidget(0, 1, historyButton);
grid.getCellFormatter().setVerticalAlignment(0, 1, HasVerticalAlignment.ALIGN_TOP);
grid.getCellFormatter().setStyleName(0, 1, "flexibility-action-iconable");
}
示例11: addUndeletableCustomChoice
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void addUndeletableCustomChoice(final String value, boolean checked, final Listener<FieldEvent> disableHandler) {
final ClickableLabel customChoiceLabel = new ClickableLabel(value);
final Grid grid = (Grid) customChoiceLabel.getWidget();
final CheckBox checkBox = new CheckBox();
checkBox.setValue(checked);
grid.setWidget(0, 0, checkBox);
if(disableHandler != null) {
checkBox.addListener(Events.Change, disableHandler);
}
customChoicesPanel.add(customChoiceLabel);
}
示例12: createOrgUnitBannerPanel
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
/**
* Creates the OrgUnit banner panel.
*
* @return The OrgUnit banner panel.
*/
private Component createOrgUnitBannerPanel() {
// Main panel.
orgUnitBannerPanel = Panels.content(I18N.CONSTANTS.orgunit()); // Temporary title.
// Main grid.
orgUnitBannerGrid = new Grid(1, 2);
orgUnitBannerGrid.addStyleName(ProjectView.STYLE_HEADER_BANNER);
orgUnitBannerGrid.setCellPadding(0);
orgUnitBannerGrid.setCellSpacing(0);
orgUnitBannerGrid.setWidth("100%");
orgUnitBannerGrid.setHeight("100%");
// Logo cell.
orgUnitBannerGrid.getCellFormatter().setStyleName(HEADER_BANNER_LOGO_CELL.left, HEADER_BANNER_LOGO_CELL.right, ProjectView.STYLE_HEADER_BANNER_LOGO);
orgUnitBannerGrid.setWidget(HEADER_BANNER_LOGO_CELL.left, HEADER_BANNER_LOGO_CELL.right, OrgUnitImageBundle.ICONS.orgUnitLarge().createImage());
orgUnitBannerPanel.add(orgUnitBannerGrid);
return orgUnitBannerPanel;
}
示例13: createAndAddFilterGrid
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
private void createAndAddFilterGrid() {
filterGrid = new Grid(2, 3);
filterGrid.setHTML(0, 0, translatorappI18n.transPage_moduleSelect());
moduleListBox =
new ListBoxFW(
formCtx,
new RelationFDesc("", "", ModuleConsts.descriptorName).setNullable(true),
new WidgetRDesc());
filterGrid.setWidget(0, 1, moduleListBox);
massUpload = new IneButton(IneButtonType.ACTION, translatorappI18n.massUpload());
filterGrid.setWidget(0, 2, massUpload);
massUpload.setVisible(false);
filterGrid.setHTML(1, 0, translatorappI18n.rowListPage_magicFilter());
textBox = new TextBoxFW();
filterGrid.setWidget(1, 1, textBox);
filterGrid.getElement().getStyle().setMarginBottom(25, Unit.PX);
filterGrid.getElement().getStyle().setMarginLeft(5, Unit.PX);
mainPanel.add(filterGrid);
}
示例14: createAndAddFilterGrid
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
private void createAndAddFilterGrid() {
Grid filterGrid = new Grid(2, 2);
filterGrid.setHTML(0, 0, translatorappI18n.transPage_listmodeSelect());
listTypeRadioButton =
new RadioEnumSelectorFW(
new LongFDesc().setNullable(false),
TranslateListingType.getValuesAsString(),
new WidgetRDesc());
filterGrid.setWidget(0, 1, listTypeRadioButton);
filterGrid.setHTML(1, 0, translatorappI18n.transPage_moduleSelect());
moduleListBox =
new ListBoxFW(
formCtx,
new RelationFDesc("", "", ModuleConsts.descriptorName).setNullable(true),
new WidgetRDesc());
filterGrid.setWidget(1, 1, moduleListBox);
filterGrid.getElement().getStyle().setMarginBottom(25, Unit.PX);
filterGrid.getElement().getStyle().setMarginLeft(5, Unit.PX);
filterGrid.getElement().getStyle().setHeight(90, Unit.PX);
filterGrid.getElement().getStyle().setWidth(700, Unit.PX);
mainPanel.add(filterGrid);
}
示例15: buildStructure
import com.google.gwt.user.client.ui.Grid; //导入方法依赖的package包/类
private void buildStructure(Rendering rendering) {
switch (rendering) {
case HORIZONTAL:
Grid g = new Grid(1, 2);
g.setWidget(0, 0, tb);
g.setWidget(0, 1, img);
initWidget(g);
g.setCellSpacing(0);
g.setCellPadding(0);
g.setBorderWidth(0);
break;
case VERTICAL:
default:
FlowPanel fp = new FlowPanel();
fp.add(img);
fp.add(tb);
initWidget(fp);
setPixelSize(150, 80);
break;
}
}