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


Java ValueChangeEvent.fire方法代码示例

本文整理汇总了Java中com.google.gwt.event.logical.shared.ValueChangeEvent.fire方法的典型用法代码示例。如果您正苦于以下问题:Java ValueChangeEvent.fire方法的具体用法?Java ValueChangeEvent.fire怎么用?Java ValueChangeEvent.fire使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.event.logical.shared.ValueChangeEvent的用法示例。


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

示例1: addMeetings

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
protected void addMeetings(List<MeetingInterface> meetings) {
	List<MeetingInterface> existingMeetings = iMeetings.getMeetings();
	if (!iEventType.isReadOnly())
		iEvent.setType(getEventType());
	if (meetings != null && !meetings.isEmpty())
		meetings: for (MeetingInterface meeting: meetings) {
			if (meeting.getApprovalStatus() != ApprovalStatus.Pending && meeting.getApprovalStatus() != ApprovalStatus.Approved) continue; 
			for (MeetingInterface existing: existingMeetings) {
				if (existing.getApprovalStatus() != ApprovalStatus.Pending && existing.getApprovalStatus() != ApprovalStatus.Approved) continue;
				if (existing.inConflict(meeting)) {
					UniTimeNotifications.warn(MESSAGES.warnNewMeetingOverlaps(meeting.toString(), existing.toString()));
					continue meetings;
				}
			}
			iMeetings.add(new EventMeetingRow(iEvent, meeting));
		}
	ValueChangeEvent.fire(iMeetings, iMeetings.getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:19,代码来源:EventAdd.java

示例2: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(final Integer value, boolean fireEvents) {
	iValue = value;
	if (value != null && value.intValue() != 0) {
		final int column = (value > 0 ? value - 1 : -value - 1);
		final UniTimeTableHeader h = getHeader(column);
		if (h != null)
			sort(h, new Comparator<TableInterface.TableRowInterface>() {
				@Override
				public int compare(TableInterface.TableRowInterface r1, TableInterface.TableRowInterface r2) {
					return r1.compareTo(r2, column, true);
				}
			}, value > 0);
	}
	if (fireEvents)
		ValueChangeEvent.fire(this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:18,代码来源:DataTable.java

示例3: addChip

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void addChip(Chip chip, boolean fireEvents) {
	final ChipPanel panel = new ChipPanel(chip, getChipColor(chip));
	panel.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			remove(panel);
			resizeFilterIfNeeded();
			setAriaLabel(toAriaString());
			ValueChangeEvent.fire(CourseRequestFilterBox.this, getValue());
		}
	});
	insert(panel, getWidgetIndex(iFilterFinder));
	resizeFilterIfNeeded();
	setAriaLabel(toAriaString());
	if (fireEvents)
		ValueChangeEvent.fire(this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:19,代码来源:CourseRequestBox.java

示例4: SuggestionMenuItem

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
private SuggestionMenuItem(final Suggestion suggestion) {
	super(suggestion.getDisplayString() == null
			? suggestion.getChip().getLabel() + " <span class='item-command'>" + suggestion.getChip().getTranslatedCommand() + "</span>"
			: SafeHtmlUtils.htmlEscape(suggestion.getDisplayString()) + (suggestion.getHint() == null ? "" : " " + suggestion.getHint()),
		true,
		new Command() {
			@Override
			public void execute() {
				hideSuggestions();
				setStatus(ARIA.suggestionSelected(suggestion.toAriaString(FilterBox.this)));
				applySuggestion(suggestion);
				iLastValue = getValue();
				setAriaLabel(toAriaString());
				fireSelectionEvent(suggestion);
				ValueChangeEvent.fire(FilterBox.this, getValue());
			}
		});
	setStyleName("item");
	getElement().setAttribute("whiteSpace", "nowrap");
	iSuggestion = suggestion;
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:22,代码来源:FilterBox.java

示例5: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(Integer value, boolean fireEvents) {
	if (value == null) {
		int row = iRequestsTable.getSelectedRow();
		if (row >= 0) iRequestsTable.setSelected(row, false);
	} else {
		iRequestsTable.setSelected(value + 1, true);
	}
	if (fireEvents)
		ValueChangeEvent.fire(this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:12,代码来源:InstructorDetails.java

示例6: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(Request value, boolean fireEvents) {
	if (value == null) {
		if (iWaitList != null) iWaitList.setValue(false);
		for (int i = iCourses.size() - 1; i > 0; i--)
			deleteAlternative(i);
		iCourses.get(0).setValue(null, true);
	} else {
		if (iWaitList != null) iWaitList.setValue(value.isWaitList());
		int index = 0;
		if (value.hasRequestedCourse())
			for (RequestedCourse rc: value.getRequestedCourse()) {
				if (rc.isEmpty()) continue;
				if (iCourses.size() <= index) insertAlternative(index);
				iCourses.get(index).setValue(rc, true);
				index ++;
			}
		if (index == 0) { iCourses.get(0).setValue(null, true); index++; }
		for (int i = iCourses.size() - 1; i >= index; i--)
			deleteAlternative(i);
	}
	if (iWaitList != null && iWaitList.isVisible()) {
		iWaitList.setEnabled(value == null || !value.isReadOnly());
	}
	if (fireEvents)
		ValueChangeEvent.fire(this, value);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:28,代码来源:CourseRequestLine.java

示例7: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(Boolean value, boolean fireEvents) {
	if (value == null) value = false;
	iValue = value;
	setResource(iValue ? iCheckedFace : iUncheckedFace);
	Roles.getCheckboxRole().setAriaCheckedState(getElement(), iValue ? CheckedValue.TRUE : CheckedValue.FALSE);
	if (fireEvents)
		ValueChangeEvent.fire(this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:10,代码来源:AriaToggleButton.java

示例8: setOption

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
public void setOption(RoomSharingOption option) {
	if (!isEditable(iDay, iSlot)) return;
	iModel.setOption(iDay, iSlot, iMode.getStep(), option);
	if (option == null) {
		getElement().getStyle().clearBackgroundColor();
		setHTML("");
		setTitle("");
	} else {
		getElement().getStyle().setBackgroundColor(option.getColor());
		setHTML(option.getCode() == null ? "" : option.getCode());
		setTitle(CONSTANTS.longDays()[iDay] + " " + slot2short(iSlot) + " - " + slot2short(iSlot + iMode.getStep()) + ": " + option.getName());
	}
	ValueChangeEvent.fire(RoomSharingWidget.this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:15,代码来源:RoomSharingWidget.java

示例9: setOption

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
public void setOption(PreferenceInterface preference) {
	if (!isEditable() || iPeriod == null) return;
	iModel.setPreference(iDay, iSlot, preference);
	if (preference == null) {
		getElement().getStyle().clearBackgroundColor();
		setTitle("");
	} else {
		getElement().getStyle().setBackgroundColor(preference.getColor());
		setTitle(DateTimeFormat.getFormat(CONSTANTS.examPeriodDateFormat()).format(iDate) + " " + slot2short(iSlot) + " - " + slot2short(iSlot + iPeriod.getLength()) + ": " + preference.getName());
	}
	ValueChangeEvent.fire(PeriodPreferencesWidget.this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:13,代码来源:PeriodPreferencesWidget.java

示例10: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(Integer value, boolean fireEvents) {
	if (value == null)
		iText.setText("");
	else {
		if (iStart != null && iStart.getValue() != null)
			iDiff = value - iStart.getValue();
		iText.setText(TimeUtils.slot2time(value));
	}
	if (fireEvents)
		ValueChangeEvent.fire(this, value);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:13,代码来源:TimeSelector.java

示例11: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(Boolean value, boolean fireEvents) {
	if (value == null) return;
	iValue = value;
	setResource(iValue ? RESOURCES.treeOpen() : RESOURCES.treeClosed());
	if (fireEvents)
		ValueChangeEvent.fire(this, iValue);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:9,代码来源:OpenCloseSectionImage.java

示例12: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(List<FreeTime> value, boolean fireEvents) {
	if (value == null || value.isEmpty()) {
		for (int d=0; d<CONSTANTS.freeTimeDays().length; d++)
			for (int p=0; p<CONSTANTS.freeTimePeriods().length - 1; p++) {
				iSelected[d][p] = false;
				td(d, p).getStyle().setBackgroundColor(bg(d, p));
				setHTML(1 + d, 1 + p, "&nbsp;");
			}
	} else {
		for (int d=0; d<CONSTANTS.freeTimeDays().length; d++)
			for (int p=0; p<CONSTANTS.freeTimePeriods().length - 1; p++)
				iSelected[d][p] = false;
		for (CourseRequestInterface.FreeTime f: value) {
			for (int day: f.getDays()) {
				if (day < CONSTANTS.freeTimeDays().length) {
					for (int p = toPeriod(f.getStart()); p < toPeriod(f.getStart() + f.getLength()); p++)
						iSelected[day][p] = true;
				}
			}
		}
		generatePriorities();
		update();
	}
	if (fireEvents)
		ValueChangeEvent.fire(this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:28,代码来源:FreeTimePicker.java

示例13: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(Boolean value, boolean fireEvents) {
	if (iSelected == value || value == null || !isEnabled()) return;
	iSelected = value;
   	if (iSelected)
   		addStyleName("selected");
   	else
   		removeStyleName("selected");
	if (fireEvents)
		ValueChangeEvent.fire(this, getValue());
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:12,代码来源:SessionDatesSelector.java

示例14: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(StartEndTime value, boolean fireEvents) {
	iStart.setValue(value == null ? null : value.getStart(), fireEvents);
	iEnd.setValue(value == null ? null : value.getEnd(), fireEvents);
	if (fireEvents)
		ValueChangeEvent.fire(this, value);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:8,代码来源:StartEndTimeSelector.java

示例15: setValue

import com.google.gwt.event.logical.shared.ValueChangeEvent; //导入方法依赖的package包/类
@Override
public void setValue(CourseRequestInterface value, boolean fireEvents) {
	setRequest(value);
	if (fireEvents)
		ValueChangeEvent.fire(this, value);
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:7,代码来源:CourseRequestsTable.java


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