本文整理汇总了Java中org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type类的典型用法代码示例。如果您正苦于以下问题:Java Type类的具体用法?Java Type怎么用?Java Type使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Type类属于org.kaaproject.avro.ui.gwt.client.widget.AlertPanel包,在下文中一共展示了Type类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: BaseViewImpl
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type; //导入依赖的package包/类
public BaseViewImpl(boolean useDetailsPanel) {
errorPanel = new AlertPanel(Type.ERROR);
sandboxStyle = Utils.sandboxStyle;
avroUiStyle = Utils.avroUiStyle;
initWidget(createAndBindUi());
setTitle(getViewTitle());
if (useDetailsPanel) {
detailsPanel = new VerticalPanel();
detailsPanel.setWidth("100%");
detailsPanel.addStyleName(sandboxStyle.contentPanel());
ScrollPanel scroll = new ScrollPanel();
scroll.setWidth("100%");
scroll.add(detailsPanel);
centerPanel.setWidget(scroll);
}
initCenterPanel();
clearError();
}
示例2: BaseListViewImpl
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type; //导入依赖的package包/类
/**
* Instantiates a new BaseListViewImpl.
*/
public BaseListViewImpl(boolean editable) {
this.editable = editable;
initAddButton();
errorPanel = new AlertPanel(Type.ERROR);
kaaAdminStyle = Utils.kaaAdminStyle;
avroUiStyle = Utils.avroUiStyle;
initWidget(createAndBindUi());
grid = createGrid();
dockPanel.add(grid);
titleLabel.setText(titleString());
addButton.setVisible(editable);
clearError();
}
示例3: MainViewImpl
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type; //导入依赖的package包/类
public MainViewImpl() {
errorPanel = new AlertPanel(Type.ERROR);
infoPanel = new AlertPanel(Type.INFO);
avroUiSandboxStyle = Utils.avroUiSandboxStyle;
initWidget(uiBinder.createAndBindUi(this));
detailsTable.setWidth("95%");
detailsTable.getElement().getStyle().setPaddingTop(0, Unit.PX);
detailsTable.setCellPadding(0);
detailsTable.getColumnFormatter().setWidth(0, "50%");
detailsTable.getColumnFormatter().setWidth(1, "50%");
detailsTable.getFlexCellFormatter().setColSpan(0, 0, 2);
schemaConstructorView = new FormConstructorViewImpl();
CaptionPanel schemaConstructorPanel = new CaptionPanel(Utils.constants.schemaConstructor());
schemaConstructorPanel.add(schemaConstructorView);
detailsTable.setWidget(1, 0, schemaConstructorPanel);
recordConstructorView = new FormConstructorViewImpl();
CaptionPanel recordConstructorPanel = new CaptionPanel(Utils.constants.recordConstructor());
recordConstructorPanel.add(recordConstructorView);
detailsTable.setWidget(1, 1, recordConstructorPanel);
clearMessages();
}
示例4: constructAlertWidget
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type; //导入依赖的package包/类
private Widget constructAlertWidget(final AlertField field, List<HandlerRegistration> handlerRegistrations) {
final AlertPanel alertPanel = new AlertPanel(Type.ERROR);
alertPanel.getElement().getStyle().setMargin(5, Unit.PX);
if (field.getValue() != null) {
alertPanel.setMessage(field.getValue());
alertPanel.setVisible(true);
} else {
alertPanel.setMessage("");
alertPanel.setVisible(false);
}
final ValueChangeListener listener = new ValueChangeListener() {
private static final long serialVersionUID = -4935107365199693997L;
@Override
public void onValueChanged(Object value) {
if (value != null) {
alertPanel.setMessage(value.toString());
alertPanel.setVisible(true);
} else {
alertPanel.setMessage("");
alertPanel.setVisible(false);
}
}
};
field.addTransientValueChangeListener(listener);
HandlerRegistration handlerRegistration = new HandlerRegistration() {
@Override
public void removeHandler() {
field.removeTransientValueChangeListener(listener);
}
};
handlerRegistrations.add(handlerRegistration);
return alertPanel;
}
示例5: LoginView
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type; //导入依赖的package包/类
/**
* Instantiates a new LoginView.
*/
public LoginView() {
errorPanel = new AlertPanel(Type.ERROR);
infoPanel = new AlertPanel(Type.INFO);
kaaAdminStyle = Utils.kaaAdminStyle;
initWidget(uiBinder.createAndBindUi(this));
loginTitle.getElement().setInnerSafeHtml(
SafeHtmlUtils.fromSafeConstant(Utils.messages.loginTitle()));
usernameBox = new TextBox();
usernameBox.setName("j_username");
usernameBox.setWidth("100%");
passwordBox = new PasswordTextBox();
passwordBox.setName("j_password");
passwordBox.setWidth("100%");
Label loginLabel = new Label(Utils.constants.username());
loginTable.setWidget(0, 0, loginLabel);
loginTable.setWidget(0, 1, usernameBox);
Label passwordLabel = new Label(Utils.constants.password());
loginTable.setWidget(1, 0, passwordLabel);
loginTable.setWidget(1, 1, passwordBox);
forgotPasswordLabel = new Label(Utils.constants.forgotPassword());
forgotPasswordLabel.addStyleName(Utils.kaaAdminStyle.linkLabel());
loginTable.setWidget(2, 0, forgotPasswordLabel);
loginTable.getFlexCellFormatter().setWidth(0, 0, "130px");
loginTable.getFlexCellFormatter()
.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_RIGHT);
loginTable.getFlexCellFormatter()
.setHorizontalAlignment(1, 0, HasHorizontalAlignment.ALIGN_RIGHT);
loginTable.getFlexCellFormatter()
.setHorizontalAlignment(2, 0, HasHorizontalAlignment.ALIGN_RIGHT);
loginTable.getFlexCellFormatter()
.setColSpan(2, 0, 2);
loginButton = new Button(Utils.constants.login());
loginButton.addStyleName(Utils.kaaAdminStyle.loginButton());
loginTable.setWidget(3, 2, loginButton);
loginButton.getElement().getStyle().setMarginTop(15, Unit.PX);
loginForm.setWidget(loginTable);
loginForm.setAction("");
}
示例6: BaseDetailsViewImpl
import org.kaaproject.avro.ui.gwt.client.widget.AlertPanel.Type; //导入依赖的package包/类
/**
* Instantiates a new BaseDetailsViewImpl.
*/
public BaseDetailsViewImpl(boolean create, boolean editable) {
this.create = create;
this.editable = editable;
errorPanel = new AlertPanel(Type.ERROR);
kaaAdminStyle = Utils.kaaAdminStyle;
avroUiStyle = Utils.avroUiStyle;
initWidget(uiBinder.createAndBindUi(this));
constructTopPanel();
getTitileLabelWidget().setText(Utils.constants.title());
getSaveButtonWidget().setText(Utils.constants.save());
getCancelButtonWidget().setText(Utils.constants.cancel());
requiredFieldsNoteLabel.getElement().setInnerSafeHtml(
SafeHtmlUtils.fromSafeConstant(Utils.messages
.requiredFieldsNote(Utils.avroUiStyle
.requiredField())));
if (create) {
getTitileLabelWidget().setText(getCreateTitle());
getCancelButtonWidget().setVisible(true);
} else {
getTitileLabelWidget().setText(getViewTitle());
getBackButtonPanelWidget().setVisible(true);
}
subTitleLabel.setText(getSubTitle());
updateSaveButton(false, false);
detailsTable.getColumnFormatter().setWidth(0, "200px");
detailsTable.getColumnFormatter().setWidth(1, "300px");
if (!create) {
detailsTable.getColumnFormatter().setWidth(2, "300px");
}
getSaveButtonWidget().addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
updateSaveButton(false, false);
hasChanged = false;
}
});
getSaveButtonWidget().setVisible(editable);
requiredFieldsNoteLabel.setVisible(editable);
initDetailsTable();
clearError();
}