本文整理汇总了Java中com.google.gwt.uibinder.client.UiConstructor类的典型用法代码示例。如果您正苦于以下问题:Java UiConstructor类的具体用法?Java UiConstructor怎么用?Java UiConstructor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UiConstructor类属于com.google.gwt.uibinder.client包,在下文中一共展示了UiConstructor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ImagesView
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public ImagesView() {
// Init the image list grid.
initImagesGrid();
initWidget(uiBinder.createAndBindUi(this));
// Calendar.
calendar.setWidth("1800px");
calendar.setHeight("900px");
calendar.setDays(7);
calendarPanel.add(calendar);
// Buttons handler.
allImagesButton.addClickHandler(allImagesButtonClickHandler);
calendarButton.addClickHandler(calendarButtonClickHandler);
refreshButton.addClickHandler(refreshButtonClickHandler);
refreshButton.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);
// Calendar appointment open handler.
calendar.addOpenHandler(appointmentOpenHandler);
}
示例2: KieContainersNavigator
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public KieContainersNavigator() {
initWidget(uiBinder.createAndBindUi(this));
breadcrumb.addNavigationBreadCrumbEventHandler(navigationBreadCrumbEventHandler);
newContainerButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
final List<KieImage> acceptedImages = KieContainersNavigator.this.getAcceptedImages();
final KieImage image = acceptedImages != null && !acceptedImages.isEmpty() ? acceptedImages.get(0) : null;
final String dbmsImage = KieLastStep.getDbms(context);
final KieImageType dbmsImageType = dbmsImage != null ? KieImageTypeManager.getImageTypeById(dbmsImage) : null;
final String tag = KieAppVersionStep.getTag(context);
KieContainersNavigator.this.fireEvent(new CreateContainerEvent(image, tag, dbmsImageType));
}
});
}
示例3: DropDownImageListEditorView
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public DropDownImageListEditorView() {
initWidget(Binder.BINDER.createAndBindUi(this));
currentTypeImage = new Image();
caret = new InlineLabel();
caret.addStyleName( "caret" );
caret.setVisible( true);
dropDownAnchor.add( currentTypeImage );
dropDownAnchor.add( caret );
dropDownAnchor.setEnabled( true );
currentTypeImageTooltip = new Tooltip(dropDown);
currentTypeImageTooltip.setContainer("body");
currentTypeImageTooltip.setShowDelayMs(100);
currentTypeImage.addClickHandler(e -> currentTypeImageTooltip.hide());
caret.addClickHandler(e -> currentTypeImageTooltip.hide());
helpPanel.add(currentTypeImageTooltip);
}
示例4: InputField
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public InputField(eInputType type, String placeholder, String labelColorOnFocus,
String labelColorOnBlur) {
labelColorOnFocus_ = labelColorOnFocus;
labelColorOnBlur_ = labelColorOnBlur;
initWidget(uiBinder_.createAndBindUi(this));
String inputId = DOM.createUniqueId();
// Setup input
input.setId(inputId);
input.setName(inputId);
input.setPropertyString("placeholder", placeholder);
input.setPropertyString("type", type.name());
// Setup label
label.setHtmlFor(inputId);
label.setInnerText(placeholder + ":");
if (!hasPlaceholderSupport()) {
input.removeClassName("jsHideLabel");
}
}
示例5: IconButtonTemplate
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public IconButtonTemplate() {
Label label = new Label();
initWidget(label);
label.addClickHandler(this);
label.addMouseOverHandler(this);
label.addMouseOutHandler(this);
label.addMouseUpHandler(this);
label.addMouseDownHandler(this);
}
示例6: TextButton
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
/**
* Creates a {@link TextButton} with the given text, style and logic.
*
* @param text The text that the button should have.
* @param style The style that the button should have.
* @param tooltip The tooltip for this button.
*/
@UiConstructor
public TextButton(String text, TextButtonStyle style, String tooltip) {
this.style = style;
initWidget(binder.createAndBindUi(this));
addStyleName(style.getStyleName());
setText(text);
setTooltip(tooltip);
boldStyle = new StyleAxis(getElement());
cursorStyle = new StyleAxis(getElement());
fullWidthStyle = new StyleAxis(getElement());
cursorStyle.setStyle(res.css().cursorPointer());
}
示例7: MyMenuItem
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public MyMenuItem(String text, ImageResource res) {
super(SafeHtmlUtils.fromString(text));
ImageResourceRenderer renderer = new ImageResourceRenderer();
setHTML(renderer.render(res).asString() + " " + text);
}
示例8: KieContainersExplorer
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public KieContainersExplorer() {
containerList = new CellTable<KieContainer>(KEY_PROVIDER);
containerList.setWidth("100%", true);
// Do not refresh the headers and footers every time the data is updated.
containerList.setAutoHeaderRefreshDisabled(true);
containerList.setAutoFooterRefreshDisabled(true);
// Attach a column sort handler to the ListDataProvider to sort the list.
ColumnSortEvent.ListHandler<KieContainer> sortHandler = new ColumnSortEvent.ListHandler<KieContainer>(containersProvider.getList());
containerList.addColumnSortHandler(sortHandler);
// Create a Pager to control the table.
SimplePager.Resources pagerResources = GWT.create(SimplePager.Resources.class);
pager = new SimplePager(SimplePager.TextLocation.CENTER, pagerResources, false, 0, true);
pager.setDisplay(containerList);
// Add a selection model so we can select cells.
final SelectionModel<KieContainer> selectionModel = new MultiSelectionModel<KieContainer>(KEY_PROVIDER);
containerList.setSelectionModel(selectionModel,
DefaultSelectionEventManager.<KieContainer>createCheckboxManager());
// Initialize the columns.
initTableColumns(selectionModel, sortHandler);
// Add the CellList to the adapter in the database.
addDataDisplay(containerList);
initWidget(uiBinder.createAndBindUi(this));
}
示例9: KieLogsActions
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public KieLogsActions() {
initWidget(uiBinder.createAndBindUi(this));
refreshButton.setUrl(Images.INSTANCE.reloadIconBlue().getSafeUri());
refreshButton.addClickHandler(refreshClickHandler);
playButton.setUrl(Images.INSTANCE.playIconData().getSafeUri());
playButton.addClickHandler(playClickHandler);
stopButton.setUrl(Images.INSTANCE.stopIconData().getSafeUri());
stopButton.addClickHandler(stopClickHandler);
updateButtonsSize();
}
示例10: NavigationDateItemView
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public NavigationDateItemView() {
initWidget(uiBinder.createAndBindUi(this));
mainPanel.setVisible(false);
image.setUrl(Images.INSTANCE.calendarEmptyIcon().getSafeUri());
image.setSize(ICON_SIZE + "px", ICON_SIZE + "px");
}
示例11: MaterialDropDown
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
/**
* Add a list item selection when button, link, icon button pressed.
*
* @param activator data-activates attribute name of your dropdown activator.
*/
@UiConstructor
public MaterialDropDown(String activator) {
this();
this.activator = activator;
getElement().setId(this.activator);
}
示例12: CategoryBarChart
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public CategoryBarChart(String name, double width, double height) {
super(name);
this.categoryBars = new HashMap<String, BarDetails>();
this.width = width;
this.height = height;
}
示例13: PropertiesTextArea
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public PropertiesTextArea() {
this(new MySuggestOracle(), new OwnTextArea());
textArea.setInstantValueChangeHandler(new InstantValueChangeHandler() {
@Override
public void onValueChange(String value) {
if (gridElement != null) {
gridElement.setPanelAttributes(getValue());
}
activePanel.redraw();
}
});
}
示例14: ImageButton
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public ImageButton(Image img) {
add(img);
this.img = img;
this.disabledImg = img;
setStyleName("image-Button");
}
示例15: MapEditorView
import com.google.gwt.uibinder.client.UiConstructor; //导入依赖的package包/类
@UiConstructor
public MapEditorView() {
initWidget(Binder.BINDER.createAndBindUi(this));
addButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
presenter.addEntry();
}
});
}