com.google.gwt.user.datepicker.client.DateBox Java Examples

The following examples show how to use com.google.gwt.user.datepicker.client.DateBox. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UTCDateBoxImplHtml4.java    From gwt-traction with Apache License 2.0 5 votes vote down vote up
public UTCDateBoxImplHtml4() {
    handlerManager = new HandlerManager(this);
    datebox = new DateBox();
    datebox.addValueChangeHandler(new ValueChangeHandler<Date>() {

        @Override
        public void onValueChange(ValueChangeEvent<Date> event) {
            // pass this event onto our handlers after converting
            // the value
            fireValueChangeEvent(UTCDateBox.date2utc(event.getValue()));
        }
    });
}
 
Example #2
Source File: AdminView.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public DateBox getProgStartDate(){
	return progStartDate;
}
 
Example #3
Source File: AdminView.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public DateBox getProgEndDate(){
	return progEndDate;
}
 
Example #4
Source File: AdminView.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public DateBox getDataStartDate(){
	return dataStartDate;
}
 
Example #5
Source File: AdminView.java    From EasyML with Apache License 2.0 4 votes vote down vote up
public DateBox getDataEndDate(){
	return dataEndDate;
}
 
Example #6
Source File: HistoryPopupPanel.java    From EasyML with Apache License 2.0 4 votes vote down vote up
/**
 * 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");
}
 
Example #7
Source File: UTCDateBox.java    From gwt-traction with Apache License 2.0 4 votes vote down vote up
public DateBox getDateBox() {
    return impl.getDateBox();
}
 
Example #8
Source File: UTCDateBoxImplHtml4.java    From gwt-traction with Apache License 2.0 4 votes vote down vote up
@Override
public void setDateFormat(DateTimeFormat dateFormat) {
    datebox.setFormat(new DateBox.DefaultFormat(dateFormat));
}
 
Example #9
Source File: UTCDateBoxImplHtml4.java    From gwt-traction with Apache License 2.0 4 votes vote down vote up
@Override
public DateBox getDateBox() {
    return datebox;
}
 
Example #10
Source File: UTCDateBoxImplHtml5.java    From gwt-traction with Apache License 2.0 4 votes vote down vote up
@Override
public DateBox getDateBox() {
    return null;
}
 
Example #11
Source File: UTCDateBox.java    From gwt-traction with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new UTCDateBox
 * 
 * @deprecated Use {@link UTCDateBox#UTCDateBox(DateTimeFormat)}
 *             instead. DatePicker and DateBox.Format are now
 *             ignored.
 */
@Deprecated
public UTCDateBox(DatePicker picker, long date, DateBox.Format format) {
    this();
    impl.setValue(date);
}
 
Example #12
Source File: UTCDateBoxImpl.java    From gwt-traction with Apache License 2.0 2 votes vote down vote up
/**
 * Returns the DateBox (if any) that this implementation uses. For
 * HTML5, this will return null. This was only added to make my
 * r52 tree compile and I don't intend to check it in.
 */
public DateBox getDateBox();