本文整理汇总了Java中com.vaadin.ui.DateField.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java DateField.setWidth方法的具体用法?Java DateField.setWidth怎么用?Java DateField.setWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.ui.DateField
的用法示例。
在下文中一共展示了DateField.setWidth方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: genDateField
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
public static <T> DateField genDateField(Binder<T> binder, String propertyId, final java.text.SimpleDateFormat dateFormat) {
DateField dateField = new DateField();
binder.bind(dateField, propertyId);
if (dateFormat != null) {
dateField.setDateFormat(dateFormat.toPattern());
}
dateField.setWidth("100%");
dateField.setResolution(DateResolution.DAY);
dateField.addStyleName(STYLENAME_GRIDCELLFILTER);
dateField.addStyleName(ValoTheme.DATEFIELD_TINY);
dateField.addValueChangeListener(e -> {
if (binder.isValid()) {
dateField.setComponentError(null);
}
});
return dateField;
}
示例2: LocalDateField
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
public LocalDateField(Boolean tiny) {
dateField = new DateField();
if (tiny){
dateField.addStyleName(ValoTheme.DATEFIELD_TINY);
}
dateField.setWidth(100,Unit.PERCENTAGE);
dateField.addValueChangeListener(e->showOrHideErrorDateField());
dateField.setImmediate(true);
}
示例3: initDueDateField
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
protected void initDueDateField() {
dueDateField = new DateField();
if (task.getDueDate() != null) {
dueDateField.setValue(task.getDueDate());
} else {
dueDateField.setValue(new Date());
}
dueDateField.setWidth(125, UNITS_PIXELS);
dueDateField.setResolution(DateField.RESOLUTION_DAY);
dueDateField.setImmediate(true);
}
示例4: bindDateField
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
public DateField bindDateField(String label, String member, String dateFormat, Resolution resolution)
{
DateField field = bindDateField(form, group, label, member, dateFormat, resolution);
field.setWidth(STANDARD_COMBO_WIDTH);
this.fieldList.add(field);
return field;
}
示例5: buildMainLayout
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
// common part: create layout
mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("580px");
mainLayout.setHeight("280px");
mainLayout.setMargin(false);
// top-level component properties
setWidth("580px");
setHeight("280px");
// clientField
clientField = new ComboBox();
clientField.setCaption("Cliente");
clientField.setImmediate(false);
clientField.setWidth("461px");
clientField.setHeight("-1px");
mainLayout.addComponent(clientField, "top:96.0px;left:19.0px;");
// codeField
codeField = new TextField();
codeField.setCaption("Código");
codeField.setImmediate(false);
codeField.setWidth("120px");
codeField.setHeight("-1px");
mainLayout.addComponent(codeField, "top:16.0px;left:20.0px;");
// observationField
observationField = new TextField();
observationField.setCaption("Observaciones");
observationField.setImmediate(false);
observationField.setWidth("540px");
observationField.setHeight("119px");
mainLayout.addComponent(observationField, "top:141.0px;left:20.0px;");
// offerRequestDateField
offerRequestDateField = new DateField();
offerRequestDateField.setCaption("Fecha Petición Oferta");
offerRequestDateField.setImmediate(false);
offerRequestDateField.setWidth("100.0%");
offerRequestDateField.setHeight("23px");
offerRequestDateField.setInvalidAllowed(false);
mainLayout.addComponent(offerRequestDateField,
"top:19.0px;right:19.0px;left:421.0px;");
// offerRequestStatusField
offerRequestStatusField = new ComboBox();
offerRequestStatusField.setCaption("Estado");
offerRequestStatusField.setImmediate(false);
offerRequestStatusField.setWidth("220px");
offerRequestStatusField.setHeight("-1px");
mainLayout.addComponent(offerRequestStatusField,
"top:58.0px;left:340.0px;");
// offerRequestTypeField
offerRequestTypeField = new ComboBox();
offerRequestTypeField.setCaption("Tipo");
offerRequestTypeField.setImmediate(false);
offerRequestTypeField.setWidth("300px");
offerRequestTypeField.setHeight("-1px");
mainLayout.addComponent(offerRequestTypeField,
"top:58.0px;left:20.0px;");
// hlSearchButtons
hlSearchButtons = buildHlSearchButtons();
mainLayout.addComponent(hlSearchButtons, "top:96.0px;left:484.0px;");
return mainLayout;
}
示例6: buildMainLayout
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
// common part: create layout
mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("520px");
mainLayout.setHeight("280px");
mainLayout.setMargin(true);
// top-level component properties
setWidth("520px");
setHeight("280px");
// alarmDateField
alarmDateField = new DateField();
alarmDateField.setCaption("Fecha alarma");
alarmDateField.setImmediate(false);
alarmDateField.setWidth("120px");
alarmDateField.setHeight("-1px");
alarmDateField.setInvalidAllowed(false);
alarmDateField.setResolution(DateField.RESOLUTION_SEC);
mainLayout.addComponent(alarmDateField, "top:17.0px;left:380.0px;");
// areaField
areaField = new TextField();
areaField.setCaption("Area trabajo");
areaField.setImmediate(false);
areaField.setWidth("160px");
areaField.setHeight("-1px");
mainLayout.addComponent(areaField, "top:17.0px;left:200.0px;");
// messageField
messageField = new TextField();
messageField.setCaption("Message");
messageField.setImmediate(false);
messageField.setWidth("480px");
messageField.setHeight("164px");
mainLayout.addComponent(messageField, "top:100.0px;left:20.0px;");
// organizationField
organizationField = new TextField();
organizationField.setCaption("Organización");
organizationField.setImmediate(false);
organizationField.setWidth("160px");
organizationField.setHeight("-1px");
mainLayout.addComponent(organizationField, "top:17.0px;left:20.0px;");
// alarmTypeField
alarmTypeField = new ComboBox();
alarmTypeField.setCaption("Tipo alarma");
alarmTypeField.setImmediate(false);
alarmTypeField.setWidth("180px");
alarmTypeField.setHeight("-1px");
mainLayout.addComponent(alarmTypeField, "top:60.0px;left:20.0px;");
// alarmStatusField
alarmStatusField = new ComboBox();
alarmStatusField.setCaption("Estado alarma");
alarmStatusField.setImmediate(false);
alarmStatusField.setWidth("180px");
alarmStatusField.setHeight("-1px");
mainLayout.addComponent(alarmStatusField, "top:60.0px;left:220.0px;");
return mainLayout;
}
示例7: buildMainLayout
import com.vaadin.ui.DateField; //导入方法依赖的package包/类
@AutoGenerated
private AbsoluteLayout buildMainLayout() {
// common part: create layout
mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("520px");
mainLayout.setHeight("360px");
mainLayout.setMargin(true);
// top-level component properties
setWidth("520px");
setHeight("360px");
// commentField
commentField = new TextField();
commentField.setCaption("Comentario");
commentField.setImmediate(false);
commentField.setWidth("480px");
commentField.setHeight("240px");
mainLayout.addComponent(commentField, "top:100.0px;left:20.0px;");
// feedbackDateField
feedbackDateField = new DateField();
feedbackDateField.setCaption("Fecha sugerencia");
feedbackDateField.setImmediate(false);
feedbackDateField.setWidth("160px");
feedbackDateField.setHeight("-1px");
feedbackDateField.setInvalidAllowed(false);
mainLayout.addComponent(feedbackDateField, "top:20.0px;left:340.0px;");
// invoiceField
invoiceField = new TextField();
invoiceField.setCaption("Número Factura");
invoiceField.setImmediate(false);
invoiceField.setWidth("140px");
invoiceField.setHeight("-1px");
mainLayout.addComponent(invoiceField, "top:17.0px;left:20.0px;");
// feedbackStatusField
feedbackStatusField = new ComboBox();
feedbackStatusField.setCaption("Estado");
feedbackStatusField.setImmediate(false);
feedbackStatusField.setWidth("280px");
feedbackStatusField.setHeight("-1px");
mainLayout.addComponent(feedbackStatusField, "top:60.0px;left:20.0px;");
// feedbackTypeField
feedbackTypeField = new ComboBox();
feedbackTypeField.setCaption("Tipo");
feedbackTypeField.setImmediate(false);
feedbackTypeField.setWidth("180px");
feedbackTypeField.setHeight("-1px");
mainLayout.addComponent(feedbackTypeField, "top:60.0px;left:320.0px;");
return mainLayout;
}