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


Java RadioButton.setValue方法代碼示例

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


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

示例1: setChecked

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private void setChecked(RadioButton button) {
  button.setValue(true);
  if (button == domButton) {
    setNewSelection(Selection.DOM);
  } else if (button == localXmlButton) {
    setNewSelection(Selection.LOCAL_XML);
  } else if (button == persistenDocumentButton){
    setNewSelection(Selection.PERSISTENT_DOCUMENT);
  } else if (button == annotationButton){
    setNewSelection(Selection.ANNOTATIONS);
  } else if (button == logButton){
    setNewSelection(Selection.LOG);
  } else if (button == optionsButton) {
    setNewSelection(Selection.OPTIONS);
  }
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:17,代碼來源:DebugDialog.java

示例2: addItem

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private void addItem(final int val, String imageSrc, String title, int col,String id) {
	final RadioButton button = new RadioButton(id);
	if (col==2) {
		button.setValue(true);
	}
	button.setTitle(title);
	ClickHandler handler = new ClickHandler() {
		public void onClick(ClickEvent event) {
			value = val;
			button.setValue(true);
			if (changeHandler != null) {
				changeHandler.onChange(null);
			}
		}
	};
	button.addClickHandler(handler);
	Image image = new Image(imageSrc);
	image.setStyleName(PlayerStyles.CLICKABLE);
	image.setTitle(title);
	image.addClickHandler(handler);
	setWidget(0, col, image);
	getCellFormatter().setHorizontalAlignment(0, col, HasHorizontalAlignment.ALIGN_CENTER);
	setWidget(1, col, button);
	getCellFormatter().setHorizontalAlignment(1, col, HasHorizontalAlignment.ALIGN_CENTER);
}
 
開發者ID:Antokolos,項目名稱:iambookmaster,代碼行數:26,代碼來源:FeedbackLevel.java

示例3: NestWidget

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
NestWidget()
{
	boolean fFirst = true;
	for( Pair item : items )
	{
		RadioButton radio = new RadioButton( groupName, item.text );
		stream.addDown( radio );

		radios.put( item.id, radio );

		if( fFirst && fSelectFirstByDefault )
		{
			fFirst = false;
			radio.setValue( true );
		}
	}

	initWidget( stream );
}
 
開發者ID:ltearno,項目名稱:hexa.tools,代碼行數:20,代碼來源:ChoiceFieldType.java

示例4: setUserDataList

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
@Override
public void setUserDataList(List<PacketUserData> userDataList) {
	panelUserCodeList.clear();
	radioButtonToUserData = Maps.newHashMap();
	for (PacketUserData userData : userDataList) {
		SafeUri imageUrl = UriUtils.fromString(Constant.ICON_URL_PREFIX
				+ userData.imageFileName);
		SafeHtml label = TEMPLATE.image(imageUrl, userData.userCode, userData.playerName);
		RadioButton radioButton = new RadioButton(GROUP_USER_CODE, label);
		radioButtonToUserData.put(radioButton, userData);
		panelUserCodeList.add(radioButton);

		if (this.userData.getUserCode() == userData.userCode) {
			radioButton.setValue(true);
		}
	}
}
 
開發者ID:nodchip,項目名稱:QMAClone,代碼行數:18,代碼來源:PanelSettingUserCodeView.java

示例5: setBatchList

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private void setBatchList(List<List<String>> data) {
	int rowIndex = 0;
	for (List<String> rowData : data) {
		if (rowIndex > 0) {
			final RadioButton radioButton = new RadioButton(new Date().toString());
			radioButton.addClickHandler(new ClickHandler() {

				@Override
				public void onClick(ClickEvent arg0) {
					for (RadioButton radio : radioButtonVsRowIdMap.keySet()) {
						radio.setValue(false);
					}
					radioButton.setValue(true);
					selectedRowId = radioButtonVsRowIdMap.get(radioButton).toString();
				}
			});
			radioButtonVsRowIdMap.put(radioButton, rowIndex);
			if (rowIndex == 1) {
				radioButton.setValue(true);
				selectedRowId = "1";
			}
			fuzzyTable.setWidget(rowIndex, 0, radioButton);

			if (rowIndex % 2 == 0) {
				fuzzyTable.getRowFormatter().setStyleName(rowIndex, "oddRow");
			} else {
				fuzzyTable.getRowFormatter().setStyleName(rowIndex, "evenRow");
			}

			int columnIndex = 1;
			for (String columnData : rowData) {
				fuzzyTable.setWidget(rowIndex, columnIndex, new Label(columnData));
				columnIndex++;
			}
		}
		rowIndex++;
	}

	fuzzyTable.getRowFormatter().addStyleName(0, "rowHighlighted");
}
 
開發者ID:kuzavas,項目名稱:ephesoft,代碼行數:41,代碼來源:FuzzySearchResultView.java

示例6: initComp

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private void initComp() {
    matchAllButton = new RadioButton("matchGroup", "Match All");
    matchAllButton.setValue(true);
    matchAnyButton = new RadioButton("matchGroup", "Match Any");

    filterPanel = new VStack();
    filterPanel.setWidth100();
    filterPanel.addMember(new RowFilter());

    addButton = new Anchor();
    addButton.setPixelSize(12, 12);
    addButton.addClickHandler(event -> addRow());
    addButton.getElement().appendChild(new Image(ADD_BUTTON_IMAGE).getElement());
    updateRemoveButtonStatus();
}
 
開發者ID:ow2-proactive,項目名稱:scheduling-portal,代碼行數:16,代碼來源:FilterView.java

示例7: setSelected

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
void setSelected( int id )
{
	RadioButton radio = radios.get( id );
	if( radio == null )
		return;
	radio.setValue( true );
}
 
開發者ID:ltearno,項目名稱:hexa.tools,代碼行數:8,代碼來源:ChoiceFieldType.java

示例8: EndpointProfilesViewImpl

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
/**
 * Instantiates a new EndpointProfilesViewImpl.
 */
public EndpointProfilesViewImpl() {
  super(false);

  supportPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
  supportPanel.setWidth("1000px");

  resetButton = new Button(Utils.constants.reset());
  supportPanel.add(resetButton);

  endpointGroupButton = new RadioButton("filter", Utils.constants.endpointGroup());
  listBox = new EndpointGroupsInfoListBox();
  listBox.getElement().getStyle().setPropertyPx("minWidth", 100);
  HorizontalPanel groupPanel = new HorizontalPanel();
  groupPanel.setSpacing(15);
  groupPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  groupPanel.add(endpointGroupButton);
  groupPanel.add(listBox);
  supportPanel.add(groupPanel);

  HorizontalPanel keyHashPanel = new HorizontalPanel();
  keyHashPanel.setSpacing(15);
  keyHashPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
  endpointKeyHashButton = new RadioButton("filter", Utils.constants.endpointKeyHash());
  endpointKeyHash = new TextBox();
  endpointKeyHash.setWidth("100%");
  findButton = new Button(Utils.constants.find());
  findButton.addStyleName(Utils.avroUiStyle.buttonSmall());
  keyHashPanel.add(endpointKeyHashButton);
  keyHashPanel.add(endpointKeyHash);
  keyHashPanel.add(findButton);
  supportPanel.add(keyHashPanel);

  endpointGroupButton.setValue(true);
}
 
開發者ID:kaaproject,項目名稱:kaa,代碼行數:38,代碼來源:EndpointProfilesViewImpl.java

示例9: LayerPresenter

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private LayerPresenter(MapEventBus eventBus, final WmsLayer layer) {
	setStyleName(ExampleBase.getShowcaseResource().css().sampleRow());
	setWidth("100%");
	add(new Label(layer.getTitle()));
	WmsLayerInfo capabilities = layer.getCapabilities();
	boolean first = true;
	if (capabilities != null) {
		for (final WmsLayerStyleInfo styleInfo : capabilities.getStyleInfo()) {
			final RadioButton styleWidget = new RadioButton(layer.getId() + "Radio", styleInfo.getTitle());
			styleWidget.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

				@Override
				public void onValueChange(ValueChangeEvent<Boolean> event) {
					if (event.getValue()) {
						layer.getConfiguration().setStyles(styleInfo.getName());
						layer.refresh();
					}
				}
			});
			if (first) {
				styleWidget.setValue(true);
				first = false;
			}
			add(styleWidget);
		}
		WmsLayerLegend legend = new WmsLayerLegend(eventBus, layer);
		if (scaleBox.getValue() != null) {
			if (scaleBox.getValue() > 0.2 && scaleBox.getValue() < 5) {
				legend.scale(scaleBox.getValue());
			} else {
				Window.alert("Choose a scale between 0.2 and 5");
			}
		}
		add(legend);
	}
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt2,代碼行數:37,代碼來源:WmsLayerLegendPanel.java

示例10: LayerPresenter

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private LayerPresenter(final WmsLayer layer) {
	setStyleName(ExampleBase.getShowcaseResource().css().sampleRow());
	setWidth("100%");
	add(new Label(layer.getTitle()));
	WmsLayerInfo capabilities = layer.getCapabilities();
	boolean first = true;
	if (capabilities != null) {
		for (final WmsLayerStyleInfo styleInfo : capabilities.getStyleInfo()) {
			final RadioButton styleWidget = new RadioButton(layer.getId() + "Radio", styleInfo.getTitle());
			styleWidget.addValueChangeHandler(new ValueChangeHandler<Boolean>() {

				@Override
				public void onValueChange(ValueChangeEvent<Boolean> event) {
					if (event.getValue()) {
						layer.getConfiguration().setStyles(styleInfo.getName());
						layer.refresh();
					}
				}
			});
			if (first) {
				styleWidget.setValue(true);
				first = false;
			}
			add(styleWidget);
		}
	}
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt2,代碼行數:28,代碼來源:SelectStylePanel.java

示例11: addRadioButtons

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
private void addRadioButtons(HorizontalPanel hp) {
    RadioButton r30m = getRadioButton("m30", 30);
    r30m.setValue(true);
    hp.add(r30m);
    hp.add(getRadioButton("1h", 60));
    hp.add(getRadioButton("2h", 120));
    hp.add(getRadioButton("6h", 360));
    hp.add(getRadioButton("12h", 720));
    hp.add(getRadioButton("1d", 1440));
}
 
開發者ID:armangal,項目名稱:SmartMonitoring,代碼行數:11,代碼來源:ServerStatsPopup.java

示例12: AnimationButton

import com.google.gwt.user.client.ui.RadioButton; //導入方法依賴的package包/類
public AnimationButton(final MapArea map, final String jsonProxyUrl,
        final LayerSelectorIF wmsUrlProvider, final TimeSelectorIF currentTimeSelector,
        AviExportHandler aviExporter) {
    super(new Image(GWT.getModuleBaseURL() + "img/film.png"), new Image(GWT.getModuleBaseURL()
            + "img/stop.png"));
    super.setTitle("Open the animation wizard");

    this.map = map;
    this.jsonProxyUrl = jsonProxyUrl;
    this.wmsUrlProvider = wmsUrlProvider;
    this.currentTimeSelector = currentTimeSelector;
    this.aviExporter = aviExporter;

    this.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            if (AnimationButton.this.isDown()) {
                completed = false;
                /*
                 * The first action on clicking is to get a wizard to select
                 * start/end times, frame rate, etc.
                 */
                popup = getWizard();
                popup.center();
                AnimationButton.this.setTitle("Stop the animation");
            } else {
                AnimationButton.this.setTitle("Open the animation wizard");
                map.stopAnimation();
                AnimationButton.this.aviExporter.animationStopped();
            }
        }
    });

    /*
     * Define all of the constant widgets ready for when they get used
     */
    formatSelector = new VerticalPanel();
    overlayRadioButton = new RadioButton("formatSelector", "Overlay");
    overlayRadioButton.setValue(true);
    aviRadioButton = new RadioButton("formatSelector", "Export to AVI");
    formatSelector.add(overlayRadioButton);
    formatSelector.add(aviRadioButton);

    fpsSelector = new ListBox();
    fpsSelector.addItem("1fps", "1");
    fpsSelector.addItem("2fps", "2");
    fpsSelector.addItem("5fps", "5");
    fpsSelector.addItem("10fps", "10");
    fpsSelector.addItem("15fps", "15");
    fpsSelector.addItem("24fps", "24");
    fpsSelector.addItem("30fps", "30");
    fpsSelector.setSelectedIndex(3);

    /*
     * We disable the animation button until we have a layer selected
     */
    setEnabled(false);
}
 
開發者ID:Reading-eScience-Centre,項目名稱:edal-java,代碼行數:59,代碼來源:AnimationButton.java


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