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


Java HorizontalPanel.addStyleName方法代碼示例

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


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

示例1: createSeparatorPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private void createSeparatorPanel() {
	separatorPanel = new HorizontalPanel();
	separatorPanel.setSpacing(1);
	separatorPanel.setWidth("100%");
	separatorPanel.addStyleName(ThemeStyles.get().style().borderTop());
	separatorPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	separatorPanel
			.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
	separatorPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
	separatorPanel.add(new Label(UIMessages.INSTANCE
			.separator(DEFAULT_CSV_SEPARATOR)));
	separatorTextField = new TextField();
	separatorTextField.setText(DEFAULT_CSV_SEPARATOR);
	separatorTextField.setWidth(30);

	separatorPanel.add(separatorTextField);
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:18,代碼來源:JoinDataDialog.java

示例2: addDialogWidgets

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private void addDialogWidgets() {
	VerticalPanel dialogVPanel = new VerticalPanel();
	HorizontalPanel buttonsHPanel = new HorizontalPanel();
	Button cancelButton = new Button("Cancel");
			
	cancelButton.addClickHandler(new ClickHandler() {
		public void onClick(ClickEvent event) {
			typeError.setText(null);
			dialogBox.hide();
		}
	});
	
	buttonsHPanel.add(updateButton);
	buttonsHPanel.add(cancelButton);
	buttonsHPanel.addStyleName("dialog-buttons");	
	
	dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_LEFT);
	dialogVPanel.add(grid);		
	dialogVPanel.add(typeError);
	dialogVPanel.add(buttonsHPanel);
	dialogVPanel.setCellHorizontalAlignment(buttonsHPanel, VerticalPanel.ALIGN_CENTER);
	
			
	dialogBox.setWidget(dialogVPanel);
}
 
開發者ID:Novartis,項目名稱:ontobrowser,代碼行數:26,代碼來源:EditSynonymPopup.java

示例3: ColorPicker

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public ColorPicker(String color, boolean showLinks, boolean autoClose)
{
	popup = new ColorPickerPopup(colorChooserPanel, showLinks, autoClose);
	
	textBox.addStyleName("agilar-colorpicker-text");
	textBox.addFocusHandler(this);
	textBox.setMaxLength(6);
	
	popup.addStyleName("agilar-colorpicker-popup");		
	popup.addCloseHandler(this);
	
	colorPanel.addStyleName("agilar-colorpicker-colorPreview");
	colorPanel.addClickHandler(this);
	colorPanel.addFocusHandler(this);
	
	HorizontalPanel hpanel = new HorizontalPanel();
	hpanel.add(textBox);
	hpanel.add(colorPanel);
	hpanel.addStyleName("agilar-colorpicker-widget");
	initWidget(hpanel);

	setColor(color);
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:24,代碼來源:ColorPicker.java

示例4: makeLabel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
protected Widget makeLabel() {
    label = new HTML(getName(), false);
    if (tooltips != null) {
        label.setTitle(tooltips);
    }
    if (isRemovable) {
        HorizontalPanel hp = new HorizontalPanel();
        IconCreator ic= IconCreator.Creator.getInstance();
        Image img= new Image(ic.getBlueDelete10x10());
        DOM.setStyleAttribute(img.getElement(), "cursor", "pointer");
        img.addClickHandler(new ClickHandler(){
            public void onClick(ClickEvent event) {
                tabPane.removeTab(getName());
                tabPane.tabPanel.adjustTabWidth();
            }
        });
        hp.add(label);
        hp.add(GwtUtil.getFiller(5,1));
        hp.add(img);
        hp.addStyleName("removable");
        return hp;

    } else {
        return label;
    }
}
 
開發者ID:lsst,項目名稱:firefly,代碼行數:27,代碼來源:TabPane.java

示例5: getCSVComboPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private void getCSVComboPanel() {
	comboPanel = new HorizontalPanel();
	comboPanel.setWidth("100%");
	comboPanel.addStyleName(ThemeStyles.get().style().borderTop());
	comboPanel.setSpacing(5);
	comboPanel.setVisible(false);
	comboPanel.add(new Label(UIMessages.INSTANCE.bindableAttribute()));
	comboPanel.add(csvAttributeCombo);
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:10,代碼來源:JoinDataDialog.java

示例6: createLayerAttributeComboPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private void createLayerAttributeComboPanel() {
	layerAttributeComboPanel = new HorizontalPanel();
	layerAttributeComboPanel.setWidth("100%");
	layerAttributeComboPanel.addStyleName(ThemeStyles.get().style()
			.borderBottom());
	layerAttributeComboPanel.setSpacing(5);
	layerAttributeComboPanel.setVisible(false);
	layerAttributeComboPanel.add(new Label(UIMessages.INSTANCE
			.layerSchemaToolText()));
	layerAttributeComboPanel.add(layerAttributeCombo);

}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:13,代碼來源:JoinDataDialog.java

示例7: createAttrPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private HorizontalPanel createAttrPanel(){
	HorizontalPanel hPanel = new HorizontalPanel();
	hPanel.setSpacing(10);
	hPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	hPanel.addStyleName(ThemeStyles.get().style().borderTop());
	hPanel.add(getAttrCombo());
	hPanel.add(getAttrValuePanel());
	
	return hPanel;
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:11,代碼來源:AttributeSearchDialog.java

示例8: createCompanyPanel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
private HorizontalPanel createCompanyPanel(){
	HorizontalPanel hPanel = new HorizontalPanel();
	hPanel.setSpacing(10);
	hPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	hPanel.addStyleName(ThemeStyles.get().style().borderTop());
	hPanel.add(getCompanyNamePanel());
	hPanel.add(getReportPanel());
	
	return hPanel;
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:11,代碼來源:VehicleDialog.java

示例9: setupAnalyzerAndReportPanel2

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public void setupAnalyzerAndReportPanel2(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
	// Create a CellTable.
	final CellTable<AnalyzerResultDTO> table = new CellTable<AnalyzerResultDTO>();
	setupAnalyzeResultDisplayPanel(table, dataProvider);

	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
	pager.setDisplay(table);
	dataProvider.addDataDisplay(table);

	// Set the width of each column.
	// table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
	final Label errorLabelDisplay = new Label();

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	analyzerPanel.add(displayPanel);

	// DoS detector panel
	// Any detector error message
	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelActivateDetector = new Label();

	HorizontalPanel detectorPanel = new HorizontalPanel();
	detectorPanel.addStyleName("essencePanel");
	detectorPanel.setSpacing(10);
	setupDetectorPanel(detectorPanel, errorLabelActivateDetector, dataProvider);
	vPanel.add(detectorPanel);	
    
	vPanel.add(errorLabelActivateDetector);
	dPanel.addNorth(vPanel, 10);
}
 
開發者ID:dpinney,項目名稱:essence,代碼行數:36,代碼來源:AnalyzerAndReportUI.java

示例10: getbatchFolderListView

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
 * To get batch Folder List View.
 * 
 * @param propertyMap Map<String, String>
 */
public void getbatchFolderListView(Map<String, String> propertyMap) {
	HorizontalPanel horizontalPanel = new HorizontalPanel();
	horizontalPanel.addStyleName("width100");

	CheckBox checkBox = new CheckBox(propertyMap.get(BatchFolderListDTO.FOLDER_NAME));
	checkBox.setName(propertyMap.get(BatchFolderListDTO.FOLDER_NAME));
	checkBox.setFormValue(propertyMap.get(BatchFolderListDTO.FOLDER_NAME));
	checkBox.setEnabled(Boolean.parseBoolean(propertyMap.get(BatchFolderListDTO.ENABLED)));
	checkBox.setChecked(Boolean.parseBoolean(propertyMap.get(BatchFolderListDTO.CHECKED)));
	horizontalPanel.add(checkBox);
	exportBatchClassViewPanel.add(horizontalPanel);
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:18,代碼來源:ExportBatchClassView.java

示例11: MainMenuWidget

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public MainMenuWidget() {
	electionsPanel = new ElectionsPanel();
	this.add(electionsPanel);
	
	newElectionPanel = new HorizontalPanel();
	newElectionPanel.addStyleName("toolbox");
	
	newElectionButton = new Button("Create New Election");
	newElectionButton.addStyleName("tool");
	newElectionButton.addClickHandler(new NewElectionHandler());		
	newElectionPanel.add(newElectionButton);
	
	this.add(newElectionPanel);
	this.getElement().setAttribute("id", "mainPageColumn");
}
 
開發者ID:nmldiegues,項目名稱:easy-vote,代碼行數:16,代碼來源:MainMenuWidget.java

示例12: init

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
/**
 * UI Initialization
 */
protected void init() {
	this.setSize("850px", "400px");
	this.setGlassEnabled(true);
	this.setModal(true);

	desc.setText(desc.getText()+"  Job Id - "+bdaJobId);
	closeButton.setSize("10px", "10px");
	closeButton.setStyleName("closebtn");

	VerticalPanel topPanel = new VerticalPanel(); //Outermost vertical panel
	topPanel.add(closeButton);
	topPanel.setCellHeight(closeButton, "13px");
	topPanel.setStyleName("vpanel");
	desc.setStyleName("popupTitle");
	topPanel.add(desc);
	topPanel.setCellHeight(desc, "30px");

	HorizontalPanel optPanel = new HorizontalPanel(); //Operation panel(include search, batch delete.etc)
	optPanel.addStyleName("run-history-optPanel");
	DateTimeFormat pickerFormat = DateTimeFormat.getFormat("yyyy-MM-dd");
	startTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat));
	startTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup");
	endTimeBox.setFormat(new DateBox.DefaultFormat(pickerFormat));
	endTimeBox.getDatePicker().addStyleName("run-history-datepicker-popup");
	searchBtn.removeStyleName("gwt-Button");
	searchBtn.addStyleName("run-history-search-button");
	//The initial time is set to 2016-1-1
	endTime = new Date();
	DateTimeFormat tmpFormatter = DateTimeFormat.getFormat("yyyy-MM-dd");
	startTime = tmpFormatter.parse("2016-01-01");
	selectAllChkBox.setVisible(false);
	batchDelBtn.removeStyleName("gwt-Button");
	batchDelBtn.addStyleName("run-history-batch-del-button");

	optPanel.add(startTimeLabel); 
	optPanel.add(startTimeBox);
	optPanel.add(endTimeLabel);
	optPanel.add(endTimeBox);
	optPanel.add(searchBtn);
	if(isExample && !AppController.power.equals("111"))  //Example job only can be deleted by administrator privileges
	{}
	else
		optPanel.add(batchDelBtn);
	optPanel.add(selectAllChkBox);

	runHistoryGrid.addStyleName("run-history-table"); //Data view
	runHistoryGrid.addStyleName("table-striped");
	runHistoryGrid.addStyleName("table-hover");
	runHistoryGrid.resize(rowNum, colNum);
	for(int i=0;i<colNum;i++)
	{
		runHistoryGrid.setText(0, i, columns[i]);
	}
	initGridData();

	topPanel.add(optPanel);
	topPanel.add(runHistoryGrid);

	VerticalPanel bottomPanel = new VerticalPanel(); //Paging control
	bottomPanel.add(pageGrid);
	bottomPanel.addStyleName("run-history-bottomPanel");

	VerticalPanel panel = new VerticalPanel();
	panel.add(topPanel);
	panel.add(bottomPanel);

	this.add(panel);
	this.setStyleName("loading_container");
}
 
開發者ID:ICT-BDA,項目名稱:EasyML,代碼行數:73,代碼來源:HistoryPopupPanel.java

示例13: setupDecisionPanels

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public void setupDecisionPanels(ScrollPanel decisionPanel, DockLayoutPanel dPanel) {
	// Create a CellTable.
	final CellTable<DecisionDTO> table = new CellTable<DecisionDTO>();
	setupDecisionDisplayPanel(table, dataProvider);

	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
	pager.setDisplay(table);
	dataProvider.addDataDisplay(table);

    final SingleSelectionModel<DecisionDTO> selectionModel = new SingleSelectionModel<DecisionDTO>();
    table.setSelectionModel(selectionModel);

	// Set the width of each column.
	// table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
	final Label errorLabelDisplay = new Label();

	greetingService.getDecisions(new AsyncCallbackAdapter<List<DecisionDTO>>() {
		/*
		public void onFailure(Throwable caught) {
			errorLabelDisplay.setText(SERVER_ERROR);
		}
		*/
		// Called by onFailure if the session is still valid
		public void doFailureAction() {
			errorLabelDisplay.setText(SERVER_ERROR);
		}

		public void onSuccess(List<DecisionDTO> result) {
			dataProvider.setList(result);
		}
	});

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	decisionPanel.add(displayPanel);

	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelControl = new Label();
	HorizontalPanel controlPanel = new HorizontalPanel();
	controlPanel.addStyleName("essencePanel");
	controlPanel.setSpacing(10);
	setupControlPanel(controlPanel, errorLabelControl, dataProvider);
	vPanel.add(controlPanel);	
    
	vPanel.add(errorLabelControl);
	dPanel.addNorth(vPanel, 10);
}
 
開發者ID:dpinney,項目名稱:essence,代碼行數:52,代碼來源:DecisionUI.java

示例14: setupActionPanels

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public void setupActionPanels(ScrollPanel ActionPanel, DockLayoutPanel dPanel) {
	

	// Create a CellTable.
	final CellTable<ActionDTO> table = new CellTable<ActionDTO>();
	setupActionDisplayPanel(table, dataProvider);

	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
	pager.setDisplay(table);
	dataProvider.addDataDisplay(table);

    final SingleSelectionModel<ActionDTO> selectionModel = new SingleSelectionModel<ActionDTO>();
    table.setSelectionModel(selectionModel);

	// Set the width of each column.
	// table.setColumnWidth(nameColumn, 35.0, Unit.PCT);
	final Label errorLabelDisplay = new Label();

	greetingService.getActions(new AsyncCallbackAdapter<List<ActionDTO>>() {
		/*
		public void onFailure(Throwable caught) {
			errorLabelDisplay.setText(SERVER_ERROR);
		}
		*/
		
		// Called by onFailure if the session is still valid
		public void doFailureAction() {
			errorLabelDisplay.setText(SERVER_ERROR);
		}

		public void onSuccess(List<ActionDTO> result) {
			dataProvider.setList(result);
		}
	});

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	ActionPanel.add(displayPanel);

	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelControl = new Label();
	HorizontalPanel controlPanel = new HorizontalPanel();
	controlPanel.addStyleName("essencePanel");
	controlPanel.setSpacing(10);
	setupControlPanel(controlPanel, errorLabelControl, dataProvider);
	vPanel.add(controlPanel);	
    
	vPanel.add(errorLabelControl);
	dPanel.addNorth(vPanel, 10);
}
 
開發者ID:dpinney,項目名稱:essence,代碼行數:55,代碼來源:ActionUI.java

示例15: setupDecisionRulePanel

import com.google.gwt.user.client.ui.HorizontalPanel; //導入方法依賴的package包/類
public void setupDecisionRulePanel(ScrollPanel analyzerPanel, DockLayoutPanel dPanel) {
	

	final Label errorLabelDisplay = new Label();

	// Create a CellTable.
	final CellTable<DecisionRuleDTO> table = new CellTable<>();
	setupDecisionRuleDisplayPanel(table, errorLabelDisplay);

	SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
	SimplePager pager = new SimplePager(TextLocation.CENTER, pagerResources, false, 10, true);
	pager.setDisplay(table);
	dataProvider.addDataDisplay(table);

	final SingleSelectionModel<DecisionRuleDTO> selectionModel = new SingleSelectionModel<>();
    table.setSelectionModel(selectionModel);

	greetingService.getDecisionRules(new AsyncCallbackAdapter<List<DecisionRuleDTO>>() {
		// Called by onFailure if the session is still valid
		public void doFailureAction() {
			errorLabelDisplay.setText(SERVER_ERROR);
		}

		public void onSuccess(List<DecisionRuleDTO> result) {
			dataProvider.setList(result);
		}
	});

	VerticalPanel displayPanel = new VerticalPanel();
	displayPanel.add(pager);
	displayPanel.add(table);
	displayPanel.add(errorLabelDisplay);
	displayPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
	analyzerPanel.add(displayPanel);
	
	VerticalPanel vPanel = new VerticalPanel();
	final Label errorLabelActivateDetector = new Label();
	HorizontalPanel addRuleAndFilterPanel = new HorizontalPanel();
	addRuleAndFilterPanel.addStyleName("essencePanel");
	addRuleAndFilterPanel.setSpacing(10);
	setupControlPanel(addRuleAndFilterPanel, errorLabelActivateDetector, dataProvider);
	vPanel.add(addRuleAndFilterPanel);	
    
	vPanel.add(errorLabelActivateDetector);
	dPanel.addNorth(vPanel, 10);
}
 
開發者ID:dpinney,項目名稱:essence,代碼行數:47,代碼來源:DecisionRuleUI.java


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