当前位置: 首页>>代码示例>>Java>>正文


Java ChangeEvent类代码示例

本文整理汇总了Java中com.google.gwt.event.dom.client.ChangeEvent的典型用法代码示例。如果您正苦于以下问题:Java ChangeEvent类的具体用法?Java ChangeEvent怎么用?Java ChangeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ChangeEvent类属于com.google.gwt.event.dom.client包,在下文中一共展示了ChangeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onChange

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
    Object source = event.getSource();
    if ((source != null) && (source instanceof AnalysisWidget)) {
        AnalysisWidget analysis = (AnalysisWidget) source;
        applyButton.addStyleDependentName("APPLY-NEEDED");
        // String v = xAnalysisWidget.getAnalysisAxis();
        if (analysis.isActive()) {
            tOperationsMenu.setCorrelationButtonEnabled(false);
            String v = analysis.getAnalysisAxis();
            setAnalysisAxes(v);
            for (Iterator panelIt = xPanels.iterator(); panelIt.hasNext();) {
            	OutputPanel p = (OutputPanel) panelIt.next();
            	p.setAnalysis(analysis.getAnalysisSerializable());
            }
        } else {
            turnOffAnalysis();
        }
    }
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:21,代码来源:UI.java

示例2: onChange

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
    TextBox source = (TextBox)changeEvent.getSource();
    double value = Double.parseDouble(source.getValue());
    if (source == _hueShiftTBox) {
        _csVPanel.getViewer().scene().skyAtmosphere.hueShift = (float)value;
        _hueShiftSlider.setValue((int)(value * 100));
    }
    else if (source == _saturationShiftTBox) {
        _csVPanel.getViewer().scene().skyAtmosphere.saturationShift = (float)value;
        _saturationShiftSlider.setValue((int)(value * 100));
    }
    else if (source == _brightnessShiftTBox) {
        _csVPanel.getViewer().scene().skyAtmosphere.brightnessShift = (float)value;
        _brightnessShiftSlider.setValue((int)(value * 100));
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:18,代码来源:AtmosphereColor.java

示例3: onChange

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
    TextBox source = (TextBox) event.getSource();
    float value = Float.parseFloat(source.getValue());
    if (source == alphaTBox) {
        alphaSlider.setValue((int) (value * 100));
        alpha = value;
        csVPanel.getViewer().trackedEntity.model.color = new ConstantProperty<>(getColor(colorStr, alpha));
    } else if (source == mixTBox) {
        mixSlider.setValue((int) (value * 100));
        colorBlendAmount = value;
        csVPanel.getViewer().trackedEntity.model.colorBlendAmount = new ConstantProperty<>(colorBlendAmount);
    } else if (source == silhouetteAlphaTBox) {
        silhouetteAlphaSlider.setValue((int) (value * 100));
        silhouetteAlpha = value;
        csVPanel.getViewer().trackedEntity.model.silhouetteColor = new ConstantProperty<>(getColor(silhouetteColorStr, silhouetteAlpha));
    } else if (source == silhouetteSizeTBox) {
        silhouetteSizeSlider.setValue((int) (value * 100));
        silhouetteSize = value;
        csVPanel.getViewer().trackedEntity.model.silhouetteSize = new ConstantProperty<>(silhouetteSize);
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:23,代码来源:Models3DColoring.java

示例4: onChange

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public void onChange(ChangeEvent changeEvent) {
    TextBox source = (TextBox) changeEvent.getSource();
    float value = Float.parseFloat(source.getText());
    if (source.equals(brightnessTBox)) {
        brightnessSlider.setValue((int)(value * 100));
    }
    else if (source.equals(contrastTBox)) {
        contrastSlider.setValue((int)(value * 100));
    }
    else if (source.equals(hueTBox)) {
        hueSlider.setValue((int)(value * 100));
    }
    else if (source.equals(saturationTBox)) {
        saturationSlider.setValue((int)(value * 100));
    }
    else if (source.equals(gammaTBox)) {
        gammaSlider.setValue((int)(value * 100));
    }
}
 
开发者ID:iSergio,项目名称:gwt-cs,代码行数:21,代码来源:ImageryAdjustment.java

示例5: dispatch

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
boolean dispatch(ChangeEvent event, Element context, WaveChangeHandler handler) {
  Timer timer = null;
  if (Timing.isEnabled()) {
    Timing.enterScope();
    timer = Timing.start("Mouse event dispatch");
  }
  try {
    return handler.onChange(event, context);
  } finally {
    if (timer != null) {
      Timing.stop(timer);
      Timing.exitScope();
    }
  }
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:17,代码来源:EventDispatcherPanel.java

示例6: initializeListBox

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
/**
 * Initializes the list box that allows to select styles
 * @param listBox the list box to initialize
 * @param dataToName the mapping from the style ID to the human readable name of the style
 * @param dataToStyleName the mapping from the style ID to the CSS style name
 * @param defaultValue the default style ID that should be set as selected
 */
public void initializeListBox( final ListBox listBox, final Map<Integer, String> dataToName,
							   final Map<Integer, String> dataToStyleName, final int defaultValue) {
	//Initialize the list box with data
	Iterator< Entry<Integer,String> > entrySetIter = dataToName.entrySet().iterator();
	while( entrySetIter.hasNext() ) {
		Entry<Integer, String> entry = entrySetIter.next();
		listBox.addItem( entry.getValue(), dataToStyleName.get( entry.getKey() ) );
	}
	listBox.setVisibleItemCount( 1 );
	
	//Set the default value as being selected
	setListBoxStyleID( listBox, defaultValue, dataToStyleName );
	
	//Add the change listener
	listBox.addChangeHandler(new ChangeHandler() {
		public void onChange(ChangeEvent e) {
			//Update the sample view
			updateSampleViewStyles();
		}
	});
}
 
开发者ID:ivan-zapreev,项目名称:x-cure-chat,代码行数:29,代码来源:FontSelectorPanelUI.java

示例7: addIntervalChangeHandler

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
private final void addIntervalChangeHandler() {
	intervalListBox.addChangeHandler(new ChangeHandler() {

		@Override
		public void onChange(ChangeEvent event) {
			String divisor = intervalListBox.getValue(intervalListBox.getSelectedIndex());
			String headerName = getSelectedRadioValue();
			if (!(headerName.equalsIgnoreCase(ReportingConstants.MODULE) || headerName.equalsIgnoreCase(ReportingConstants.PLUGIN))) {
				headerName = ReportingConstants.MODULE;
			}
			List<Record> recordList = createTableData(reportList, Integer.parseInt(divisor));
			reportingListView.updateHeaders(headerName, intervalListBox.getItemText(intervalListBox.getSelectedIndex()));
			reportingListView.listView.updateRecords(recordList, presenter.getStartIndex(), presenter.getTotalCount());
		}
	});
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:17,代码来源:ReportingView.java

示例8: FolderSelectionWidget

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
public FolderSelectionWidget(final Map<String, String> batchClassesNameMap, final HandlerManager eventBus) {
	super();
	initWidget(BINDER.createAndBindUi(this));
	mainPanel.addStyleName(FolderManagementConstants.OPTIONS_BOX);
	batchClassSelectionListBox.setWidth(_150PX);
	batchClassSelectionListBox.addStyleName(FolderManagementConstants.CUSTOM_LIST_BOX);
	if (null != batchClassesNameMap && !batchClassesNameMap.isEmpty()) {
		Set<Entry<String, String>> entrySet = batchClassesNameMap.entrySet();
		for (Entry<String, String> entry : entrySet) {
			batchClassSelectionListBox.addItem(entry.getKey());
		}
		fireEventForFolderSelection(batchClassesNameMap, eventBus);
		batchClassSelectionListBox.addChangeHandler(new ChangeHandler() {

			@Override
			public void onChange(ChangeEvent event) {
				fireEventForFolderSelection(batchClassesNameMap, eventBus);
			}
		});
	} else {
		eventBus.fireEvent(new BatchClassChangeEvent());
	}
}
 
开发者ID:kuzavas,项目名称:ephesoft,代码行数:24,代码来源:FolderSelectionWidget.java

示例9: postConstruct

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
/**
 * Called after construction.
 */
@PostConstruct
protected void postConstruct() {
	sourceTablesTable.clear();
	
    // Change Listener for Available sources ListBox
    listboxSources.addChangeHandler(new ChangeHandler()
    {
    	// Changing the updates status
    	public void onChange(ChangeEvent event)
    	{
    		sourceTablesTable.clear();
			String srcName = getSelectedSource();
			if (srcName != null) {
				doGetTablesAndProcs(srcName);
			}
    	}
    });
    
    sourceTablesTable.setOwner(this.getClass().getName());
    sourceTablesTable.setShowHeader(false);
}
 
开发者ID:Teiid-Designer,项目名称:teiid-webui,代码行数:25,代码来源:TableSelectorWidget.java

示例10: init

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public void init(final RepositoryConfigurationPresenter presenter) {
    this.presenter = presenter;

    configureButton.setText(constants.Configure_Repository());
    sourceBranchText.setText("master");
    devBranchText.setText("dev");
    releaseBranchText.setText("release");
    currentVersionText.setReadOnly(true);
    chooseRepositoryBox.addChangeHandler(new ChangeHandler() {

        @Override
        public void onChange(ChangeEvent event) {
            String value = chooseRepositoryBox.getSelectedValue();
            GWT.log(value);

            presenter.loadRepositoryStructure(value);
        }
    });
    presenter.loadRepositories();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:22,代码来源:RepositoryConfigurationViewImpl.java

示例11: onChange

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public void onChange(ChangeEvent event) {
  AggregateUI.getUI().getTimer().restartTimer();
  FormSummary form = formsBox.getSelectedForm();
  if (form != null) {
    if (selectedForm == null || !selectedForm.equals(form)) {
      selectedForm = form;
      // update filter list based on new form
      // NOTE: the filter list MUST be updated BEFORE the selected
      // updateSelectedFormNFilter() is called
      updateFilterList();
    }
    // otherwise no-op (form unchanged)...
  } else {
    // no selected form...
    selectedForm = null;
    updateFilterList();
  }
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:20,代码来源:FilterNavigationTable.java

示例12: addValueChangeHandler

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
{
	// Initialization code
	if (!valueChangeHandlerInitialized)
	{
		valueChangeHandlerInitialized = true;
		super.addChangeHandler(new ChangeHandler()
		{
			public void onChange(ChangeEvent event)
			{
				ValueChangeEvent.fire(EnumListBox.this, getValue());
			}
		});
	}
	return addHandler(handler, ValueChangeEvent.getType());
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:18,代码来源:EnumListBox.java

示例13: addValueChangeHandler

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
@Override
public HandlerRegistration addValueChangeHandler(ValueChangeHandler<T> handler)
{
	// Initialization code
	if (!valueChangeHandlerInitialized)
	{
		valueChangeHandlerInitialized = true;
		super.addChangeHandler(new ChangeHandler()
		{
			public void onChange(ChangeEvent event)
			{
				ValueChangeEvent.fire(SelectOneListBox.this, getValue());
			}
		});
	}
	return addHandler(handler, ValueChangeEvent.getType());
}
 
开发者ID:turbomanage,项目名称:listmaker,代码行数:18,代码来源:SelectOneListBox.java

示例14: addChangeHandler

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
private void addChangeHandler(final PropertyEditorFieldInfo property,
                              final PropertyEditorComboBox listBox) {
    listBox.addChangeHandler(new ChangeHandler() {
                                 @Override
                                 public void onChange(ChangeEvent event) {
                                     int selectedIndex = listBox.getSelectedIndex();
                                     if (validate(property,
                                                  listBox.getItemText(selectedIndex))) {
                                         listBox.clearOldValidationErrors();
                                         property.setCurrentStringValue(listBox.getItemText(selectedIndex));
                                         propertyEditorChangeEventEvent.fire(new PropertyEditorChangeEvent(property,
                                                                                                           listBox.getItemText(selectedIndex)));
                                     } else {
                                         listBox.setValidationError(getValidatorErrorMessage(property,
                                                                                             listBox.getItemText(selectedIndex)));
                                         listBox.setSelectItemByText(property.getCurrentStringValue());
                                     }
                                 }
                             }

    );
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:ComboField.java

示例15: ShiftsLimitTextBox

import com.google.gwt.event.dom.client.ChangeEvent; //导入依赖的package包/类
public ShiftsLimitTextBox(final RiaContext ctx, final EmployeePreferences employeePreferences) {
	shiftLimit=employeePreferences.getShiftsLimit();
	
	setStyleName("s2-preferencesJobsTextBox");
	setTitle(ctx.getI18n().job());
	setText(""+shiftLimit);

	addChangeHandler(new ChangeHandler() {
		@Override
		public void onChange(ChangeEvent event) {
			try {
				shiftLimit=(Integer.parseInt(getText()));
				ctx.getStatusLine().showInfo("Shift limit set to "+getText()); // TODO i18n
			} catch(Exception e) {
				ctx.getStatusLine().showError(getText()+" is not valid shift limit number"); // TODO i18n
			}
		}
	});
}
 
开发者ID:dvorka,项目名称:shifts-solver,代码行数:20,代码来源:ShiftsLimitTextBox.java


注:本文中的com.google.gwt.event.dom.client.ChangeEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。