org.fujion.component.Grid类的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(185)

本文整理了Java中org.fujion.component.Grid类的一些代码示例,展示了Grid类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grid类的具体详情如下:
包路径:org.fujion.component.Grid
类名称:Grid

Grid介绍

[英]A grid component.
[中]网格组件。

代码示例

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

  1. /**
  2. * Clear the current selection, if any.
  3. */
  4. protected void clearSelection() {
  5. grid.getRows().clearSelected();
  6. }

代码示例来源:origin: org.carewebframework/org.carewebframework.help.core

  1. /**
  2. * Displays the specified message. The list box is hidden if the message is not empty.
  3. *
  4. * @param message Message to display.
  5. */
  6. private void showMessage(String message) {
  7. message = message == null ? null : StrUtil.getLabel(message);
  8. lblNoResultsFound.setLabel(message);
  9. lblNoResultsFound.setVisible(!StringUtils.isEmpty(message));
  10. tblSrchResults.setVisible(!lblNoResultsFound.isVisible());
  11. }

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

  1. /**
  2. * Initializes the controller. Loads user preferences and properties.
  3. */
  4. @Override
  5. protected void initializeController() {
  6. if (grid.getRows() == null) {
  7. grid.addChild(new Rows());
  8. }
  9. setComponents(grid, grid.getRows());
  10. super.initializeController();
  11. boolean expandAll = getPropertyValue(Constants.PROPERTY_ID_EXPAND_DETAIL, Boolean.class,
  12. chkExpandAll != null && chkExpandAll.isChecked());
  13. if (this.chkExpandAll != null) {
  14. this.chkExpandAll.setChecked(expandAll);
  15. }
  16. }

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

  1. /**
  2. * Show the popup dialog, populating it with detail information for the specified data object.
  3. */
  4. @Override
  5. public void show() {
  6. addRows();
  7. if (debug) {
  8. debugObject(dataObject, false);
  9. }
  10. if (grid.getRows().getChildren().size() > 20) {
  11. grid.setHeight("600px");
  12. }
  13. super.show();
  14. }

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.sharedforms

  1. @Test
  2. public void testForm() throws Exception {
  3. BaseComponent root = PageUtil.createPage("web/org/carewebframework/ui/sharedforms/listviewForm.fsp", null).get(0);
  4. TestController controller = new TestController();
  5. root.wireController(controller);
  6. ElementPlugin dummy = new ElementPlugin();
  7. controller.onLoad(dummy);
  8. controller.requestData();
  9. assertEquals(10, controller.model.size());
  10. Grid grid = (Grid) root.findByName("grid");
  11. Rows rows = grid.getRows();
  12. assertEquals(10, rows.getChildCount());
  13. assertEquals("Item #2.3", ((ILabeled) rows.getChildAt(1).getChildAt(2)).getLabel());
  14. assertEquals("Test Title", controller.getCaption());
  15. assertEquals("Header3", ((Column) grid.getColumns().getLastChild()).getLabel());
  16. assertEquals(":1:false;0:33%;1:33%;2:33%", controller.getLayout());
  17. controller.setLayout(":2:true;0:20%;1:30%;2:50%");
  18. assertEquals(":2:true;0:20%;1:30%;2:50%", controller.getLayout());
  19. }
  20. }

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

  1. grid.getColumns().getChild(Column.class).sort();

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

  1. /**
  2. * Adds a column to a grid.
  3. *
  4. * @param grid Grid.
  5. * @param label Label for column.
  6. * @param width Width for column.
  7. * @param sortBy Field for sorting.
  8. * @return Newly created column.
  9. */
  10. public Column addColumn(Grid grid, String label, String width, String sortBy) {
  11. Column column = new Column();
  12. grid.getColumns().addChild(column);
  13. column.setLabel(label);
  14. column.setWidth(width);
  15. column.setSortComparator(sortBy);
  16. column.setSortOrder(SortOrder.ASCENDING);
  17. return column;
  18. }

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

  1. /**
  2. * Returns the last row added.
  3. *
  4. * @return The last row added.
  5. */
  6. private Row getLastRow() {
  7. return (Row) grid.getRows().getLastChild();
  8. }

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.sharedforms

  1. protected void status(String message) {
  2. if (message != null) {
  3. grid.setVisible(false);
  4. status.setLabel(StrUtil.piece(message, "^"));
  5. status.setHint(StrUtil.piece(message, "^", 2, 999));
  6. status.setVisible(true);
  7. } else {
  8. status.setVisible(false);
  9. status.setLabel(null);
  10. status.setHint(null);
  11. grid.setVisible(true);
  12. }
  13. }

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-patientselection-core

  1. Patient patient = patientListItem.getPatient();
  2. Columns columns = grid.getColumns();
  3. int max = columns == null ? 0 : columns.getChildCount();
  4. String info = patientListItem.getInfo();

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.sharedforms

  1. protected Row getSelectedRow() {
  2. return grid.getRows().getSelectedRow();
  3. }

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

  1. gridProperties.setVisible(true);
  2. setPropertyDescription("@cwf.shell.designer.property.grid.propdx.some.caption",
  3. "@cwf.shell.designer.property.grid.propdx.some.message");
  4. } else {
  5. gridProperties.setVisible(false);
  6. setPropertyDescription("@cwf.shell.designer.property.grid.propdx.none.caption",
  7. "@cwf.shell.designer.property.grid.propdx.none.message");

代码示例来源:origin: org.fujion/fujion-core

  1. /**
  2. * Returns the model from the associated grid rows.
  3. *
  4. * @return The model backing the associated grid rows. May be null.
  5. */
  6. private IListModel<Object> getRowsModel() {
  7. Grid grid = getAncestor(Grid.class);
  8. Rows rows = grid == null ? null : grid.getRows();
  9. return rows == null ? null : rows.getModel(Object.class);
  10. }

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-ui-reporting

  1. /**
  2. * Returns a list of rows.
  3. *
  4. * @param selectedOnly If true, only selected rows are returned.
  5. * @return List of rows.
  6. */
  7. protected Iterable<Row> getRows(boolean selectedOnly) {
  8. Rows rows = grid.getRows();
  9. return selectedOnly ? rows.getSelected() : rows.getChildren(Row.class);
  10. }

代码示例来源:origin: org.carewebframework/org.carewebframework.help.core

  1. @Override
  2. public void afterInitialized(BaseComponent comp) {
  3. super.afterInitialized(comp);
  4. modelAndView = tblSrchResults.getRows().getModelAndView(HelpSearchHit.class);
  5. }

代码示例来源:origin: org.hspconsortium.carewebframework/cwf-plugin-scenario

  1. private IBaseResource getSelectedResource() {
  2. Row row = tblResources.getRows().getSelectedRow();
  3. return row == null ? null : (IBaseResource) row.getData();
  4. }

代码示例来源:origin: org.carewebframework/org.carewebframework.help.core

  1. /**
  2. * Sets the currently viewed topic when a search result is selected.
  3. */
  4. @EventHandler(value = "change", target = "@tblSrchResults")
  5. private void onSelect$tblSrchResults() {
  6. Row row = tblSrchResults.getRows().getSelectedRow();
  7. setTopic((HelpTopic) row.getData());
  8. }

代码示例来源:origin: org.carewebframework/org.carewebframework.ui.core

  1. @Override
  2. public void init(Grid grid) {
  3. grid.getRows().getModelAndView(AttributeItem.class).setRenderer(this);
  4. addColumn(grid, "Attribute", "30%", "@name");
  5. addColumn(grid, "Value", "70%", "@value");
  6. }

代码示例来源:origin: org.carewebframework/org.carewebframework.help.core

  1. /**
  2. * Perform the search and display the results.
  3. */
  4. @EventHandler(value = "click", target = "btnSearch")
  5. private void onClick$btnSearch() {
  6. modelAndView.setModel(null);
  7. tblSrchResults.getRows().destroyChildren();
  8. String query = txtSearch.getValue();
  9. showMessage(null);
  10. if (query != null && query.trim().length() > 0) {
  11. HelpUtil.getSearchService().search(query, helpSets, this);
  12. } else {
  13. showMessage("cwf.help.tab.search.noentry");
  14. }
  15. }

代码示例来源:origin: org.carewebframework/org.carewebframework.shell

  1. /**
  2. * Returns the editor associated with the named property, or null if none found.
  3. *
  4. * @param propName The property name.
  5. * @param select If true, select editor's the containing row.
  6. * @return The associated property editor (may be null).
  7. */
  8. public PropertyEditorBase<?> findEditor(String propName, boolean select) {
  9. for (Object child : gridProperties.getRows().getChildren()) {
  10. if (child instanceof Row) {
  11. Row row = (Row) child;
  12. PropertyEditorBase<?> editor = (PropertyEditorBase<?>) row.getAttribute(EDITOR_ATTR);
  13. if (editor != null && editor.getPropInfo().getId().equals(propName)) {
  14. if (select) {
  15. row.setSelected(true);
  16. }
  17. return editor;
  18. }
  19. }
  20. }
  21. return null;
  22. }

相关文章