當前位置: 首頁>>代碼示例>>Java>>正文


Java Grid.getRowCount方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.Grid.getRowCount方法的典型用法代碼示例。如果您正苦於以下問題:Java Grid.getRowCount方法的具體用法?Java Grid.getRowCount怎麽用?Java Grid.getRowCount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.Grid的用法示例。


在下文中一共展示了Grid.getRowCount方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: 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;
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:23,代碼來源:SearchOptionsView.java

示例2: ColourPickerTableView

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
public ColourPickerTableView() {
    Grid grid = new Grid(50, 50);
    grid.setBorderWidth(0);
    grid.setCellPadding(0);
    grid.setCellSpacing(0);
    final double columnCount = grid.getColumnCount();
    final double rowCount = grid.getRowCount();
    for (int row = 0; row < rowCount; row++) {
        for (int column = 0; column < columnCount; column++) {
            final Element element = grid.getCellFormatter().getElement(row, column);
            final int rowValue = 255 - (int) (row / (rowCount - 1) * 255);
            final int columnValue = (int) (column / (columnCount - 1) * 255);
            final int colourValue = (int) (columnValue * (1 - row / (rowCount - 1)));
            element.setAttribute("style", "height:5px;width:5px;border:0px none;font-size:1px;color:#FFFFFF;background:rgb(" + colourValue + "," + rowValue + "," + rowValue + ")");
        }
    }
    add(grid);
}
 
開發者ID:languageininteraction,項目名稱:GraphemeColourSynaesthesiaApp,代碼行數:19,代碼來源:ColourPickerTableView.java

示例3: onInitialize

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
/**
 * Initialize this example.
 */
@ShowcaseSource
@Override
public Widget onInitialize() {
  // Create a grid
  Grid grid = new Grid(4, 4);

  // Add images to the grid
  int numRows = grid.getRowCount();
  int numColumns = grid.getColumnCount();
  for (int row = 0; row < numRows; row++) {
    for (int col = 0; col < numColumns; col++) {
      grid.setWidget(row, col, new Image(Showcase.images.gwtLogo()));
    }
  }

  // Return the panel
  grid.ensureDebugId("cwGrid");
  return grid;
}
 
開發者ID:Peergos,項目名稱:Peergos,代碼行數:23,代碼來源:CwGrid.java

示例4: insertRow

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
public void insertRow (JAHPComparison c) {
	Grid grid = (Grid) container.getWidget();
	int i = grid.getRowCount();
	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() );
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:11,代碼來源:PreferenceMatrix.java

示例5: formatGroup

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private int formatGroup(Grid lists, int row, int col, KeyCommandSet set) {
  if (set.isEmpty()) {
    return row;
  }

  if (lists.getRowCount() < row + 1) {
    lists.resizeRows(row + 1);
  }
  lists.setText(row, col + 2, set.getName());
  lists.getCellFormatter().addStyleName(row, col + 2, KeyResources.I.css().helpGroup());
  row++;

  return formatKeys(lists, row, col, set, null);
}
 
開發者ID:gerrit-review,項目名稱:gerrit,代碼行數:15,代碼來源:KeyHelpPopup.java

示例6: addDialogWidgets

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	Grid grid = new Grid(4,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	DisclosurePanel recentlyViewedPanel = new DisclosurePanel("Recently Viewed Terms");
	DisclosurePanel recentlyCreatedPanel = new DisclosurePanel("Recently Created Terms");
	Button cancelButton = new Button("Cancel");
	
	recentlyViewedPanel.getHeader().addStyleName("dialog-label");
	recentlyViewedPanel.add(recentlyViewTable);
	
	recentlyCreatedPanel.getHeader().addStyleName("dialog-label");
	recentlyCreatedPanel.add(recentlyCreatedTable);
			
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			if(currentTerm != null) {
				eventBus.fireEvent(new ViewTermEvent(currentTerm));
			}
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Relationship:"));
	grid.setWidget(++row, col, new Label("Related Term:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, typeDropBox);
	grid.setWidget(++row, col, relatedTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}
			
	buttonsHPanel.add(addButton);
	buttonsHPanel.add(cancelButton);
	
	vertPanel.add(grid);
	vertPanel.add(recentlyViewedPanel);
	vertPanel.add(recentlyCreatedPanel);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	dialogBox.setWidget(vertPanel);
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:58,代碼來源:AddRelationshipPopup.java

示例7: addDialogWidgets

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	SimplePanel decPanel = new SimplePanel();
	Grid grid = new Grid(4,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	
	Label commentsLabel = new Label("Comments:");
	Button cancelButton = new Button("Cancel");
	
	decPanel.addStyleName("decorator-panel");
	replacementLabel.addStyleName("dialog-label");
	commentsLabel.addStyleName("dialog-label");
	
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			relationship = null;
			commentsField.setValue(null);
			errorLabel.setVisible(false);
		}
	});
	
	grid.addStyleName("gwt-Grid");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Relationship:"));
	grid.setWidget(++row, col, new Label("Related Term:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, typeLabel);
	grid.setWidget(++row, col, relatedTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}			
							
	buttonsHPanel.add(obsoleteButton);
	buttonsHPanel.add(cancelButton);
	
	decPanel.setWidget(grid);
	//vertPanel.add(grid);
	vertPanel.add(decPanel);
	vertPanel.add(replacementLabel);
	vertPanel.add(table);
	vertPanel.add(commentsLabel);
	vertPanel.add(commentsField);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	
	dialogBox.setWidget(vertPanel);
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:61,代碼來源:ReplaceRelationshipPopup.java

示例8: addDialogWidgets

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	Grid grid = new Grid(3,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	DisclosurePanel recentlyViewedPanel = new DisclosurePanel("Recently Viewed Terms");
	DisclosurePanel recentlyCreatedPanel = new DisclosurePanel("Recently Created Terms");
	Label comments = new Label("Comments:");
	Button cancelButton = new Button("Cancel");
	
	comments.addStyleName("dialog-label");
	
	recentlyViewedPanel.getHeader().addStyleName("dialog-label");
	recentlyViewedPanel.add(recentlyViewTable);
	
	recentlyCreatedPanel.getHeader().addStyleName("dialog-label");
	recentlyCreatedPanel.add(recentlyCreatedTable);
			
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			obsoleteTerm = null;
			commentsField.setValue(null);
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Replaced By:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, replaceByTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}			
							
	buttonsHPanel.add(obsoleteButton);
	buttonsHPanel.add(cancelButton);
	
	vertPanel.add(grid);
	vertPanel.add(recentlyViewedPanel);
	vertPanel.add(recentlyCreatedPanel);
	vertPanel.add(comments);
	vertPanel.add(commentsField);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	dialogBox.setWidget(vertPanel);
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:60,代碼來源:ReplaceTermPopup.java

示例9: addDialogWidgets

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	SimplePanel decPanel = new SimplePanel();
   	Grid grid = new Grid(5,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	
	Label comments = new Label("Comments:");
	Button cancelButton = new Button("Cancel");
	
	decPanel.addStyleName("decorator-panel");		
	comments.addStyleName("dialog-label");
							
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
			synonym = null;
			commentsField.setValue(null);
			errorLabel.setVisible(false);
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	buttonsHPanel.addStyleName("centered-hortz");
	vertPanel.addStyleName("dialog-vpanel");		
	//vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, ontologyHeadingLabel);
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Synonym:"));
	grid.setWidget(++row, col, new Label("Source:"));
	grid.setWidget(++row, col, new Label("Reference Id:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, synonymLabel);
	grid.setWidget(++row, col, sourceLabel);
	grid.setWidget(++row, col, referenceIdLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}			
							
	buttonsHPanel.add(obsoleteButton);
	buttonsHPanel.add(cancelButton);
	
	decPanel.setWidget(grid);
	//vertPanel.add(grid);
	vertPanel.add(decPanel);
	vertPanel.add(comments);
	vertPanel.add(commentsField);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	
	dialogBox.setWidget(vertPanel);
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:61,代碼來源:ReplaceSynonymPopup.java

示例10: addDialogWidgets

import com.google.gwt.user.client.ui.Grid; //導入方法依賴的package包/類
private void addDialogWidgets() {
	VerticalPanel vertPanel = new VerticalPanel();
	Grid grid = new Grid(4,2);
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	Button cancelButton = new Button("Cancel");
	
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			dialogBox.hide();
		}
	});
	
	grid.addStyleName("gwt-Grid");
	errorLabel.addStyleName("dialog-error");
	buttonsHPanel.addStyleName("dialog-buttons");
	vertPanel.setHorizontalAlignment(VerticalPanel.ALIGN_CENTER);
			
	int row = 0, col = 0;
	grid.setWidget(row, col, new Label("Ontology:"));
	grid.setWidget(++row, col, new Label("Term:"));
	grid.setWidget(++row, col, new Label("Relationship:"));
	grid.setWidget(++row, col, new Label("Related Term:"));
	row = 0;
	col = 1;
	grid.setWidget(row, col, ontologyLabel);
	grid.setWidget(++row, col, termLabel);
	grid.setWidget(++row, col, typeDropBox);
	grid.setWidget(++row, col, relatedTermLabel);
	
	for(row = col = 0; row < grid.getRowCount(); row++) {
		Label label = (Label)grid.getWidget(row, col);
		label.addStyleName("dialog-label");
	}
	
	buttonsHPanel.add(updateButton);
	buttonsHPanel.add(cancelButton);
	
	vertPanel.add(grid);
	vertPanel.add(errorLabel);
	vertPanel.add(buttonsHPanel);
	dialogBox.setWidget(vertPanel);
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:43,代碼來源:EditRelationshipPopup.java


注:本文中的com.google.gwt.user.client.ui.Grid.getRowCount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。