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


Java ValueChangeHandler類代碼示例

本文整理匯總了Java中com.google.gwt.event.logical.shared.ValueChangeHandler的典型用法代碼示例。如果您正苦於以下問題:Java ValueChangeHandler類的具體用法?Java ValueChangeHandler怎麽用?Java ValueChangeHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: MoveViewImpl

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
@Inject
public MoveViewImpl(
    JavaLocalizationConstant locale,
    CellTreeResources cellTreeResources,
    JavaResources resources) {
  this.locale = locale;
  this.cellTreeResources = cellTreeResources;
  this.resources = resources;

  setTitle(locale.moveDialogTitle());

  setWidget(UI_BINDER.createAndBindUi(this));

  createButtons(locale);

  updateFullNames.addValueChangeHandler(
      new ValueChangeHandler<Boolean>() {
        @Override
        public void onValueChange(ValueChangeEvent<Boolean> event) {
          patternField.setEnabled(event.getValue());
        }
      });
}
 
開發者ID:eclipse,項目名稱:che,代碼行數:24,代碼來源:MoveViewImpl.java

示例2: TeachingAssignmentsWidget

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public TeachingAssignmentsWidget() {
	iHeader = new UniTimeHeaderPanel(MESSAGES.sectTeachingAssignments());
	iHeader.addCollapsibleHandler(new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			InstructorCookie.getInstance().setShowTeachingAssignments(event.getValue());
			if (iTable != null) {
				iTable.setVisible(event.getValue());
			} else if (event.getValue()) {
				refresh();
			}
		}
	});
	iHeader.setCollapsible(InstructorCookie.getInstance().isShowTeachingAssignments());
	iHeader.setTitleStyleName("unitime3-HeaderTitle");
	removeStyleName("unitime-NotPrintableBottomLine");
	
	addHeaderRow(iHeader);
	iHeader.getElement().getStyle().setMarginTop(10, Unit.PX);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:21,代碼來源:TeachingAssignmentsWidget.java

示例3: setInstructors

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public void setInstructors(List<InstructorInterface> instructors) {
	iInstructors.clearTable(1);
	iInstructors.resetVisibility();
	iHeader.clearMessage();
	ValueChangeHandler<Boolean> clearErrorMessage = new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			iHeader.clearMessage();
		}
	};
	if (instructors != null)
		for (InstructorInterface i: instructors) {
			int row = iInstructors.addInstructor(i);
			boolean selected = i.hasAttribute(iAttribute.getId());
			iInstructors.selectInstructor(row, selected);
			iInstructors.setSelected(row, selected);
			iInstructors.getInstructorSelection(row).addValueChangeHandler(clearErrorMessage);
		}
	int sort = InstructorCookie.getInstance().getSortInstructorsBy();
	if (sort != 0)
		iInstructors.setSortBy(sort);
	iInstructors.setVisible(iInstructors.getRowCount() > 1);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:24,代碼來源:InstructorAttributeEdit.java

示例4: Item

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
Item(T id, String name, boolean asHTML) {
	super(name, asHTML);
	iId = id;
	addStyleName("item");
	addValueChangeHandler(new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			ValueChangeEvent.fire(MultiSelect.this, MultiSelect.this.getValue());
		}
	});
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:12,代碼來源:MultiSelect.java

示例5: setRooms

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public void setRooms(List<Entity> rooms) {
	iRooms.clearTable(1);
	iHeader.clearMessage();
	ValueChangeHandler<Boolean> clearErrorMessage = new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			iHeader.clearMessage();
		}
	};
	for (Entity e: rooms) {
		RoomDetailInterface room = (RoomDetailInterface)e;
		int row = iRooms.addRoom(room);
		boolean selected = room.hasGroup(iGroup.getId());
		iRooms.selectRoom(row, selected);
		iRooms.setSelected(row, selected);
		iRooms.getRoomSelection(row).addValueChangeHandler(clearErrorMessage);
	}
	int sort = RoomCookie.getInstance().getRoomsSortBy();
	if (sort != 0)
		iRooms.setSortBy(sort);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:22,代碼來源:RoomGroupEdit.java

示例6: setRooms

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public void setRooms(List<Entity> rooms) {
	iRooms.clearTable(1);
	iHeader.clearMessage();
	ValueChangeHandler<Boolean> clearErrorMessage = new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			iHeader.clearMessage();
		}
	};
	for (Entity e: rooms) {
		RoomDetailInterface room = (RoomDetailInterface)e;
		int row = iRooms.addRoom(room);
		boolean selected = room.hasFeature(iFeature.getId());
		iRooms.selectRoom(row, selected);
		iRooms.setSelected(row, selected);
		iRooms.getRoomSelection(row).addValueChangeHandler(clearErrorMessage);
	}
	int sort = RoomCookie.getInstance().getRoomsSortBy();
	if (sort != 0)
		iRooms.setSortBy(sort);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:22,代碼來源:RoomFeatureEdit.java

示例7: setRooms

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public void setRooms(List<Entity> rooms, Integer sortBy) {
	iRooms.clearTable(1);
	iHeader.clearMessage();
	ValueChangeHandler<Boolean> clearErrorMessage = new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			iHeader.clearMessage();
		}
	};
	for (Entity e: rooms) {
		RoomDetailInterface room = (RoomDetailInterface)e;
		int row = iRooms.addRoom(room);
		boolean selected = false;
		if (iDepartment != null) {
			selected = (room.getDepartment(iDepartment.getId()) != null);
		} else if (iExamType != null) {
			selected = (room.getExamType(iExamType.getId()) != null);
		}
		iRooms.selectRoom(row, selected);
		iRooms.setSelected(row, selected);
		iRooms.getRoomSelection(row).addValueChangeHandler(clearErrorMessage);
	}
	if (sortBy != null)
		iRooms.setSortBy(sortBy);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:26,代碼來源:RoomDepartmentsEdit.java

示例8: PeriodPreferencesWidget

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public PeriodPreferencesWidget(boolean editable) {
	iEditable = editable;

	iPanel = new AbsolutePanel();
	
	iHorizontal = new CheckBox(MESSAGES.periodPreferenceHorizontal());
	iHorizontal.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			RoomCookie.getInstance().setHorizontal(iHorizontal.getValue());
			render();
		}
	});
	
	initWidget(iPanel);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:PeriodPreferencesWidget.java

示例9: PageFilter

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public PageFilter() {
	addStyleName("unitime-PageFilter");
	iHeader = new UniTimeHeaderPanel(MESSAGES.sectFilter());
	iHeader.setCollapsible(true);
	iHeader.addCollapsibleHandler(new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(ValueChangeEvent<Boolean> event) {
			for (int row: iCollapsibleRows) {
				getRowFormatter().setVisible(row, event.getValue());
			}
		}
	});
	iFilterHeaderRow = addHeaderRow(iHeader);
	iFilterLastRow = iFilterHeaderRow;
	iFooter = iHeader.clonePanel(null);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:PageFilter.java

示例10: insert

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public static AriaSuggestBox insert(RootPanel panel) {
	String config = panel.getElement().getAttribute("configuration");
	final String onchange = panel.getElement().getAttribute("onchange");
	AriaTextBox text = new AriaTextBox(panel.getElement().getFirstChildElement());
	text.getElement().setAttribute("autocomplete", "off");
	AriaSuggestBox box = new AriaSuggestBox(text, new CourseNumbersSuggestBox(config));
	if (onchange != null)
		box.addValueChangeHandler(new ValueChangeHandler<String>() {
			@Override
			public void onValueChange(ValueChangeEvent<String> event) {
				ToolBox.eval(onchange);
			}
		});
	panel.add(box);
	return box;
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:CourseNumbersSuggestBox.java

示例11: peopleLookup

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public static void peopleLookup(String query, final JavaScriptObject callback, String options) {
	final Lookup lookup = new Lookup();
	if (query != null && !query.trim().isEmpty())
		lookup.setQuery(query);
	lookup.addValueChangeHandler(new ValueChangeHandler<PersonInterface>() {
		@Override
		public void onValueChange(ValueChangeEvent<PersonInterface> event) {
			if (event.getValue() != null)
				lookup.fireCallback(callback,
					event.getValue().getId(),
					event.getValue().getFirstName(),
					event.getValue().getMiddleName(),
					event.getValue().getLastName(),
					event.getValue().getEmail(),
					event.getValue().getPhone(),
					event.getValue().getAcademicTitle(),
					event.getValue().getName());
		}
	});
	lookup.setOptions(options);
	lookup.center();
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:23,代碼來源:Lookup.java

示例12: addCourseLine

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
private void addCourseLine() {
	int i = iCourses.size();
	final CourseRequestLine line = new CourseRequestLine(iSessionProvider, i, false, iCheckForDuplicities);
	iCourses.add(line);
	CourseRequestLine prev = iCourses.get(i - 1);
	prev.getCourses().get(0).setHint("");
	line.getCourses().get(0).setHint(MESSAGES.courseRequestsHint8());
	CourseRequestLine next = iAlternatives.get(0);
	line.setPrevious(prev); prev.setNext(line);
	line.setNext(next); next.setPrevious(line);
	line.setArrowsVisible(iArrowsVisible);
	line.setWaitListVisible(iCanWaitList);
	insert(line, 1 + i);
	line.addValueChangeHandler(new ValueChangeHandler<CourseRequestInterface.Request>() {
		@Override
		public void onValueChange(ValueChangeEvent<Request> event) {
			if (event.getValue() != null && iCourses.indexOf(line) + 1 == iCourses.size())
				addCourseLine();
		}
	});
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:22,代碼來源:CourseRequestsTable.java

示例13: addAlternativeLine

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
private void addAlternativeLine() {
	int i = iAlternatives.size();
	final CourseRequestLine line = new CourseRequestLine(iSessionProvider, i, true, iCheckForDuplicities);
	iAlternatives.add(line);
	CourseRequestLine prev = iAlternatives.get(i - 1);
	line.setPrevious(prev); prev.setNext(line);
	line.setArrowsVisible(iArrowsVisible);
	insert(line, 3 + iCourses.size() + i);
	line.addValueChangeHandler(new ValueChangeHandler<CourseRequestInterface.Request>() {
		@Override
		public void onValueChange(ValueChangeEvent<Request> event) {
			if (event.getValue() != null && iAlternatives.indexOf(line) + 1 == iAlternatives.size())
				addAlternativeLine();
		}
	});
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:17,代碼來源:CourseRequestsTable.java

示例14: getSelectChangeHandler

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
@Override
protected ValueChangeHandler<Boolean> getSelectChangeHandler() {
	return new ValueChangeHandler<Boolean>() {
		@Override
		public void onValueChange(final ValueChangeEvent<Boolean> event) {

			if (event.getValue()) {
				setActive(true);
				basicToolBar.setAnchorVisible(true);
				basicToolBar.setAnchorColor(GREEN);
				basicToolBar.setWhat3Words("");
				createW3wLayer();
			} else {
				setActive(false);
				basicToolBar.setAnchorVisible(false);
				basicToolBar.setAnchorColor(RED);
			}
		}
	};
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:21,代碼來源:W3wTool.java

示例15: initializeWMTSFields

import com.google.gwt.event.logical.shared.ValueChangeHandler; //導入依賴的package包/類
public void initializeWMTSFields() {
	urlWMTSField.setEmptyText("http://...");
	nameWMTSField.setEmptyText(UIMessages.INSTANCE
			.lrasterdLayerNameField("WMTS"));
	formatWMTSField.setEmptyText("image/png, image/jpg...");
	tileMatrixSetField.setEmptyText("matrix set identifier");

	urlWMTSField.addValueChangeHandler(new ValueChangeHandler<String>() {
		@Override
		public void onValueChange(ValueChangeEvent<String> event) {
			if (!event.getValue().startsWith("http")) {
				showAlert("URL");
			}
		}
	});
}
 
開發者ID:geowe,項目名稱:sig-seguimiento-vehiculos,代碼行數:17,代碼來源:LoadRasterLayerDialog.java


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