本文整理了Java中com.google.gwt.user.client.ui.Grid.setWidget()
方法的一些代码示例,展示了Grid.setWidget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.setWidget()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.Grid
类名称:Grid
方法名:setWidget
暂无
代码示例来源:origin: fr.lteconsulting/hexa.core
@Override
public void setWidget( Widget widget )
{
table.setWidget( row, column, widget );
}
}
代码示例来源:origin: ltearno/hexa.tools
@Override
public void setWidget( Widget widget )
{
table.setWidget( row, column, widget );
}
}
代码示例来源:origin: fjfd/microscope
/**
* Rebuilds parts of the UI with buttons to set AM hours.
*/
private void setupAmUI() {
hours_minutes.setWidget(0, 1, newSetHoursButton(0));
hours_minutes.setWidget(0, 2, newSetHoursButton(1));
hours_minutes.setWidget(0, 3, newSetHoursButton(2));
hours_minutes.setWidget(0, 4, newSetHoursButton(3));
hours_minutes.setWidget(0, 5, newSetHoursButton(4));
hours_minutes.setWidget(0, 6, newSetHoursButton(5));
hours_minutes.setWidget(1, 1, newSetHoursButton(6));
hours_minutes.setWidget(1, 2, newSetHoursButton(7));
hours_minutes.setWidget(1, 3, newSetHoursButton(8));
hours_minutes.setWidget(1, 4, newSetHoursButton(9));
hours_minutes.setWidget(1, 5, newSetHoursButton(10));
hours_minutes.setWidget(1, 6, newSetHoursButton(11));
}
代码示例来源:origin: fjfd/microscope
/**
* Rebuilds parts of the UI with buttons to set PM hours.
*/
private void setupPmUI() {
hours_minutes.setWidget(0, 1, newSetHoursButton(12));
hours_minutes.setWidget(0, 2, newSetHoursButton(13));
hours_minutes.setWidget(0, 3, newSetHoursButton(14));
hours_minutes.setWidget(0, 4, newSetHoursButton(15));
hours_minutes.setWidget(0, 5, newSetHoursButton(16));
hours_minutes.setWidget(0, 6, newSetHoursButton(17));
hours_minutes.setWidget(1, 1, newSetHoursButton(18));
hours_minutes.setWidget(1, 2, newSetHoursButton(19));
hours_minutes.setWidget(1, 3, newSetHoursButton(20));
hours_minutes.setWidget(1, 4, newSetHoursButton(21));
hours_minutes.setWidget(1, 5, newSetHoursButton(22));
hours_minutes.setWidget(1, 6, newSetHoursButton(23));
}
代码示例来源:origin: org.jboss.errai/errai-widgets
public void update(String[] fieldValues) {
if (fieldValues.length != fieldNames.length)
throw new IllegalArgumentException("fieldValues.length doesn't match fieldName.length: " + fieldNames);
for (int i = 0; i < fieldNames.length; i++) {
Label label = new Label(fieldNames[i]);
label.setStyleName("soa-prop-grid-label");
grid.setWidget(i, 0, label);
grid.setWidget(i, 1, new HTML(fieldValues[i]));
}
}
代码示例来源:origin: com.googlecode.gwt-test-utils/gwt-test-utils
private void handleCustomCell(Grid wrapped, Element element, List<IsWidget> childWidgets,
int columnIndex) {
checkGridSize(wrapped, columnIndex);
// should only contains one widget per <g:customCell> tag
IsWidget w = (childWidgets.size() > 0) ? childWidgets.get(0) : null;
wrapped.setWidget(currentRowIndex, columnIndex, w);
handleCellStyle(wrapped, element, columnIndex);
}
代码示例来源:origin: gwt-test-utils/gwt-test-utils
private void handleCustomCell(Grid wrapped, Element element, List<IsWidget> childWidgets,
int columnIndex) {
checkGridSize(wrapped, columnIndex);
// should only contains one widget per <g:customCell> tag
IsWidget w = (childWidgets.size() > 0) ? childWidgets.get(0) : null;
wrapped.setWidget(currentRowIndex, columnIndex, w);
handleCellStyle(wrapped, element, columnIndex);
}
代码示例来源:origin: jbossas/console
public DurationFilterConfig() {
grid = new Grid(2, 2);
grid.setWidget(0, 0, createFormLabel("Minimum"));
grid.setWidget(0, 1, min = createTextBox(5));
grid.setWidget(1, 0, createFormLabel("Maximum"));
grid.setWidget(1, 1, max = createTextBox(5));
addValueChangeHandler(new ValueChangeHandler<Config>() {
//@Override
public void onValueChange(ValueChangeEvent<Config> event) {
min.setText(Integer.toString(getMinDuration()));
max.setText(Integer.toString(getMaxDuration()));
}
});
}
代码示例来源:origin: fjfd/microscope
/**
* Additional styling options.
*/
private Grid makeStylePanel() {
final Grid grid = new Grid(5, 3);
grid.setText(0, 1, "Smooth");
grid.setWidget(0, 2, smooth);
return grid;
}
代码示例来源:origin: org.eclipse.che.core/che-core-ide-app
/**
* Show notification in container.
*
* @param notification notification that need to show
*/
public void addNotification(@NotNull Notification notification) {
notifications.add(notification);
NotificationContainerItem item = new NotificationContainerItem(notification, resources);
item.setDelegate(this);
int index = nGrid.getRowCount();
nGrid.resizeRows(index + 1);
nGrid.setWidget(index, 0, item);
}
代码示例来源:origin: org.kie.guvnor/guvnor-test-scenario-editor-client
public void onClick(ClickEvent w) {
if (Window.confirm(TestScenarioConstants.INSTANCE.AreYouSureYouWantToRemoveThisFieldExpectation(
fld.getFieldName()))) {
vf.getFieldValues().remove(fld);
FlexTable data = render(vf);
outer.setWidget(1,
0,
data);
}
}
});
代码示例来源:origin: fjfd/microscope
/**
* Small helper to build a radio button used to change the position of the
* key of the graph.
*/
private RadioButton addKeyRadioButton(final Grid grid,
final int row, final int col,
final String pos) {
final RadioButton rb = new RadioButton("keypos");
rb.addClickHandler(new ClickHandler() {
public void onClick(final ClickEvent event) {
keypos = pos;
}
});
rb.addClickHandler(refreshgraph);
grid.setWidget(row, col, rb);
keypos_map.put(pos, rb);
return rb;
}
代码示例来源:origin: com.ebmwebsourcing.geasytools/model-manager
@Override
public void onBind(IWidgetProvider widgetProvider) {
Label lbl = new Label();
lbl.getElement().setAttribute("style", "font-weight:bold;font-size:14px;");
lbl.setText(getTitle());
vp.add(lbl);
ArrayList<LabelWidgetPair> allLabelWidgetPair = new ArrayList<LabelWidgetPair>();
allLabelWidgetPair.addAll(getPairs(widgetProvider));
Grid grid = new Grid(allLabelWidgetPair.size(),2);
for(int i=0;i<=allLabelWidgetPair.size()-1;i++){
LabelWidgetPair lwp = allLabelWidgetPair.get(i);
grid.setWidget(i, 0, new Label(lwp.getLabel()));
grid.setWidget(i, 1, lwp.getWidget());
}
vp.add(grid);
}
代码示例来源:origin: org.kie.guvnor/guvnor-test-scenario-editor-client
public void onClick(ClickEvent w) {
if ( Window.confirm( TestScenarioConstants.INSTANCE.AreYouSureYouWantToRemoveThisRuleExpectation() ) ) {
rfl.remove( v );
sc.removeFixture( v );
outer.setWidget( 1,
0,
render( rfl,
sc ) );
}
}
});
代码示例来源:origin: org.jboss.errai/errai-widgets
private void initReset() {
for (int i = 0; i < fieldNames.length; i++) {
Label label = new Label(fieldNames[i]);
label.setStyleName("soa-prop-grid-label");
grid.setWidget(i, 0, label);
grid.setWidget(i, 1, new HTML(""));
String style = (i % 2 == 0) ? "soa-prop-grid-even" : "soa-prop-grid-odd";
grid.getRowFormatter().setStyleName(i, style);
grid.getColumnFormatter().setWidth(0, "20%");
grid.getColumnFormatter().setWidth(1, "80%");
}
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* @see Table#setData(DataModel)
*/
public void setData(DataModel<? extends DataModel<?>> rData)
{
this.rData = rData;
if (aToolBar == null)
{
// the toolbar depends on model features, so it can only be created
// after the model is available
aToolBar = new TableToolBar(this);
aMainPanel.setWidget(TOOLBAR_ROW, 0, aToolBar);
aMainPanel.getCellFormatter()
.setVerticalAlignment(TOOLBAR_ROW,
0,
HasVerticalAlignment.ALIGN_BOTTOM);
}
update();
}
代码示例来源:origin: org.drools/drools-wb-guided-scorecard-editor-client
private Widget getRuleAttributesPanel() {
ruleAttributesGrid = new Grid(2, 4);
ruleAttributesGrid.setCellSpacing(5);
ruleAttributesGrid.setCellPadding(5);
ruleAttributesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.ruleFlowGroup());
ruleAttributesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.agendaGroup());
final String ruleFlowGroup = model.getRuleFlowGroup();
final String agendaGroup = model.getAgendaGroup();
tbRuleFlowGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING);
if (!(ruleFlowGroup == null || ruleFlowGroup.isEmpty())) {
tbRuleFlowGroup.setText(ruleFlowGroup);
}
tbAgendaGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING);
if (!(agendaGroup == null || agendaGroup.isEmpty())) {
tbAgendaGroup.setText(agendaGroup);
}
ruleAttributesGrid.setWidget(1, 0, tbRuleFlowGroup);
ruleAttributesGrid.setWidget(1, 1, tbAgendaGroup);
return ruleAttributesGrid;
}
代码示例来源:origin: kiegroup/drools-wb
private Widget getRuleAttributesPanel() {
ruleAttributesGrid = new Grid(2, 4);
ruleAttributesGrid.setCellSpacing(5);
ruleAttributesGrid.setCellPadding(5);
ruleAttributesGrid.setText(0, 0, GuidedScoreCardConstants.INSTANCE.ruleFlowGroup());
ruleAttributesGrid.setText(0, 1, GuidedScoreCardConstants.INSTANCE.agendaGroup());
final String ruleFlowGroup = model.getRuleFlowGroup();
final String agendaGroup = model.getAgendaGroup();
tbRuleFlowGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING);
if (!(ruleFlowGroup == null || ruleFlowGroup.isEmpty())) {
tbRuleFlowGroup.setText(ruleFlowGroup);
}
tbAgendaGroup = TextBoxFactory.getTextBox(DataType.TYPE_STRING);
if (!(agendaGroup == null || agendaGroup.isEmpty())) {
tbAgendaGroup.setText(agendaGroup);
}
ruleAttributesGrid.setWidget(1, 0, tbRuleFlowGroup);
ruleAttributesGrid.setWidget(1, 1, tbAgendaGroup);
return ruleAttributesGrid;
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* Initializes the controls for tree tables.
*/
private void initTreeControls()
{
Grid aTreeButtons = new Grid(1, 2);
aCollapseAllButton =
new PushButton(new Image(GwtTable.RES.imTreeCollapse()));
aExpandAllButton =
new PushButton(new Image(GwtTable.RES.imTreeExpand()));
aTreeButtons.setWidget(0, 0, aCollapseAllButton);
aTreeButtons.setWidget(0, 1, aExpandAllButton);
aToolBarTable.setWidget(1, 0, aTreeButtons);
aCollapseAllButton.addClickHandler(this);
aExpandAllButton.addClickHandler(this);
}
}
代码示例来源:origin: org.jbpm/jbpm-gwt-form-api
private void makeGrid() {
grid.getCellFormatter().addStyleName(0, 0, "northwestCorner");
grid.setHTML(0, 0, "");
grid.getCellFormatter().addStyleName(0, 1, "horizontalLine");
grid.setHTML(0, 1, "");
grid.getCellFormatter().addStyleName(0, 2, "northeastCorner");
grid.setHTML(0, 2, "");
grid.getCellFormatter().addStyleName(1, 0, "verticalLine");
grid.setHTML(1, 0, "");
grid.setWidget(1, 1, widget);
grid.getCellFormatter().addStyleName(1, 2, "verticalLine");
grid.setHTML(1, 2, "");
grid.getCellFormatter().addStyleName(2, 0, "southwestCorner");
grid.setHTML(2, 0, "");
grid.getCellFormatter().addStyleName(2, 1, "horizontalLine");
grid.setHTML(2, 1, "");
grid.getCellFormatter().addStyleName(2, 2, "smallButton");
grid.setHTML(2, 2, "");
}
内容来源于网络,如有侵权,请联系作者删除!