本文整理了Java中org.fujion.component.Grid.getRows()
方法的一些代码示例,展示了Grid.getRows()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid.getRows()
方法的具体详情如下:
包路径:org.fujion.component.Grid
类名称:Grid
方法名:getRows
[英]Returns the Rows child.
[中]返回子行。
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting
/**
* Clear the current selection, if any.
*/
protected void clearSelection() {
grid.getRows().clearSelected();
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting
/**
* Returns the last row added.
*
* @return The last row added.
*/
private Row getLastRow() {
return (Row) grid.getRows().getLastChild();
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.sharedforms
protected Row getSelectedRow() {
return grid.getRows().getSelectedRow();
}
代码示例来源:origin: org.fujion/fujion-core
/**
* Returns the model from the associated grid rows.
*
* @return The model backing the associated grid rows. May be null.
*/
private IListModel<Object> getRowsModel() {
Grid grid = getAncestor(Grid.class);
Rows rows = grid == null ? null : grid.getRows();
return rows == null ? null : rows.getModel(Object.class);
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting
/**
* Returns a list of rows.
*
* @param selectedOnly If true, only selected rows are returned.
* @return List of rows.
*/
protected Iterable<Row> getRows(boolean selectedOnly) {
Rows rows = grid.getRows();
return selectedOnly ? rows.getSelected() : rows.getChildren(Row.class);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.help.core
@Override
public void afterInitialized(BaseComponent comp) {
super.afterInitialized(comp);
modelAndView = tblSrchResults.getRows().getModelAndView(HelpSearchHit.class);
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-plugin-scenario
private IBaseResource getSelectedResource() {
Row row = tblResources.getRows().getSelectedRow();
return row == null ? null : (IBaseResource) row.getData();
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting
/**
* Initializes the controller. Loads user preferences and properties.
*/
@Override
protected void initializeController() {
if (grid.getRows() == null) {
grid.addChild(new Rows());
}
setComponents(grid, grid.getRows());
super.initializeController();
boolean expandAll = getPropertyValue(Constants.PROPERTY_ID_EXPAND_DETAIL, Boolean.class,
chkExpandAll != null && chkExpandAll.isChecked());
if (this.chkExpandAll != null) {
this.chkExpandAll.setChecked(expandAll);
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.help.core
/**
* Sets the currently viewed topic when a search result is selected.
*/
@EventHandler(value = "change", target = "@tblSrchResults")
private void onSelect$tblSrchResults() {
Row row = tblSrchResults.getRows().getSelectedRow();
setTopic((HelpTopic) row.getData());
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting
/**
* Show the popup dialog, populating it with detail information for the specified data object.
*/
@Override
public void show() {
addRows();
if (debug) {
debugObject(dataObject, false);
}
if (grid.getRows().getChildren().size() > 20) {
grid.setHeight("600px");
}
super.show();
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
@Override
public void init(Grid grid) {
grid.getRows().getModelAndView(AttributeItem.class).setRenderer(this);
addColumn(grid, "Attribute", "30%", "@name");
addColumn(grid, "Value", "70%", "@value");
}
代码示例来源:origin: org.carewebframework/org.carewebframework.help.core
/**
* Perform the search and display the results.
*/
@EventHandler(value = "click", target = "btnSearch")
private void onClick$btnSearch() {
modelAndView.setModel(null);
tblSrchResults.getRows().destroyChildren();
String query = txtSearch.getValue();
showMessage(null);
if (query != null && query.trim().length() > 0) {
HelpUtil.getSearchService().search(query, helpSets, this);
} else {
showMessage("cwf.help.tab.search.noentry");
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
@Override
public void init(Grid grid) {
grid.getRows().getModelAndView(ManifestItem.class).setRenderer(this);
addColumn(grid, "Module", "40%", "@implModule").setSortColumn(true);
addColumn(grid, "Version", "20%", "@implVersion");
addColumn(grid, "Author", "40%", "@implVendor");
}
}
代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core
public void filterChanged(String filter) {
IModelAndView<Row, IMatchable> modelAndView = grid.getRows().getModelAndView(IMatchable.class);
modelAndView.setModel(null);
model.clear();
if (StringUtils.isEmpty(filter)) {
model.addAll(items);
} else {
for (IMatchable<?> row : items) {
if (row.matches(filter)) {
model.add(row);
}
}
}
modelAndView.setModel(model);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.plugin.sessiontracker
@Override
public void refresh() {
needsRefresh = false;
Rows rows = grid.getRows();
rows.setRenderer(sessionRenderer);
model.clear();
model.addAll(sessions.getActiveSessions());
rows.setModel(model);
updateCount();
}
代码示例来源:origin: org.carewebframework/org.carewebframework.plugin.messagetesting
@Override
public void onLoad(ElementPlugin plugin) {
super.onLoad(plugin);
ListModel<IMessageProducer> providers = new ListModel<>(getProviders());
//providers.setMultiple(true);
lboxProviders.setModel(providers);
lboxProviders.setRenderer(new MessageProviderRenderer());
gridReceived.getRows().setModel(received);
gridReceived.getRows().setRenderer(new ReceivedMessageRenderer(gridReceived));
//channels.setMultiple(true);
lboxSubscriptions.setModel(channels);
lboxSubscriptions.setRenderer(new SubscriptionRenderer());
cboxChannels.setModel(channels2);
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-patientselection-core
/**
* Set up the list box based on dynamic properties passed via the execution.
*
* @param comp The top level component.
*/
@Override
public void afterInitialized(BaseComponent comp) {
super.afterInitialized(comp);
IPatientList plist = getPatientList();
Rows rows = patientList.getRows();
rows.setRenderer(new PatientListItemRenderer(patientList));
Collection<PatientListItem> items = plist.getListItems();
rows.setModel(new ListModel<>(items));
selectListener = comp.getAttribute(ATTR_EVENT_LISTENER, IEventListener.class);
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting
/**
* Add a row containing the specified header (left column) and value container (right column).
*
* @param header Text for header column
* @param container Object containing text value(s)
*/
protected void addRow(String header, BaseComponent container) {
Row row = new Row();
grid.getRows().addChild(row);
Div div = new Div();
Label label = new Label(header + ":");
label.addStyle("font-weight", "bold");
label.addStyle("word-wrap", "word-break");
row.addChild(div);
row.addChild(label);
row.addChild(container);
}
代码示例来源:origin: org.carewebframework/org.carewebframework.shell
/**
* Handles the selection of a row in the property grid.
*
* @param event Row selection event.
*/
@EventHandler(value = "change", target = "rowProperties")
private void onRowSelect(ChangeEvent event) {
Rows rows = gridProperties.getRows();
Row selectedRow = rows.getSelectedCount() == 0 ? null : rows.getSelectedRow();
PropertyEditorBase<?> editor = selectedRow == null ? null
: (PropertyEditorBase<?>) (selectedRow.getAttribute(EDITOR_ATTR));
PropertyInfo propInfo = editor == null ? null : editor.getPropInfo();
setPropertyDescription(
propInfo == null ? "@cwf.shell.designer.property.grid.propdx.some.caption" : propInfo.getName(),
propInfo == null ? " " : propInfo.getDescription());
if (editor != null) {
editor.setFocus();
}
}
代码示例来源:origin: org.hspconsortium.carewebframework/cwf-plugin-scenario
@Override
public void afterInitialized(BaseComponent comp) {
super.afterInitialized(comp);
window = (Window) comp;
title = window.getTitle();
scenario = (Scenario) comp.getAttribute("scenario");
model.addAll(scenario.getResources());
model.sort(resourceComparator, true);
colResource.setSortComparator(resourceComparator);
IModelAndView<Row, IBaseResource> mv = tblResources.getRows().getModelAndView(IBaseResource.class);
mv.setRenderer(resourceRenderer);
mv.setModel(model);
updateCaption();
}
内容来源于网络,如有侵权,请联系作者删除!