/** * Creates a button with no caption. */ public Button() { super(Document.get().createPushButtonElement()); setStyleName("gwt-Button"); }
/** * Creates a button with no caption. */ public Button() { super(Document.get().createPushButtonElement()); setStyleName("gwt-Button"); }
/** * Creates a button with no caption. */ public Button() { super(Document.get().createPushButtonElement()); setStyleName("gwt-Button"); }
public Button addDeleteButton() { // used for collection subforms deleteButton = Optional.of(new Button()); deleteButton.get().setHTML(ButtonWithIcon.TEMPLATES.withIcon(Icons.INSTANCE.remove())); deleteButton.get().setStyleName("btn btn-default btn-xs pull-right"); this.panel.add(deleteButton.get()); return deleteButton.get(); }
/** * Builds the login button. * * @return the button */ private Button buildLoginButton() { Button loginButton = new Button("Send"); loginButton.setStyleName("gwt-Login-Button"); loginButton.setText("Login"); loginButton.setSize("166px", "44px"); loginButton.addStyleName("sendButton"); return loginButton; }
private void initializeButtons() { sendButton = new Button(); sendButton.setText("Send"); sendButton.setStyleName( BUTTON_STYLE ); sendButton.addClickHandler( new ClickHandler() { cancelButton.setStyleName( BUTTON_STYLE ); cancelButton.addClickHandler( new ClickHandler() {
private void addCloseToTab(final TabPanelEntry tab) { final Button close = new Button("×"); close.setStyleName("close"); close.addStyleName(WorkbenchResources.INSTANCE.CSS().tabCloseButton()); close.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { final WorkbenchPartPresenter.View partToDeselect = tabInvertedIndex.get(tab); panelManager.closePlace(partToDeselect.getPresenter().getDefinition().getPlace()); } }); tab.getTabWidget().addToAnchor(close); }
private void addCloseToTab(final TabPanelEntry tab) { final Button close = new Button("×"); close.setStyleName("close"); close.addStyleName(WorkbenchResources.INSTANCE.CSS().tabCloseButton()); close.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { final WorkbenchPartPresenter.View partToDeselect = tabInvertedIndex.get(tab); panelManager.closePlace(partToDeselect.getPresenter().getDefinition().getPlace()); } }); tab.getTabWidget().addToAnchor(close); }
private Button createClearButton() { final Button clearButton = new Button(); clearButton.setHTML(ButtonWithIcon.TEMPLATES.withIcon(Icons.INSTANCE.remove())); clearButton.setStyleName("btn btn-default btn-xs pull-right"); clearButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { for (int i = 0; i < boxPanel.getWidgetCount(); i++) { Widget widget = boxPanel.getWidget(i); if (widget instanceof CheckBox) { CheckBox checkBox = (CheckBox) widget; if (checkBox.getValue() != null && checkBox.getValue()) { checkBox.setValue(false, true); } } } } }); clearButton.setVisible(false); return clearButton; }
private void applystyles(final Button button, final boolean buttonEnable) { button.setStyleName(VButton.CLASSNAME); button.addStyleName(getStyle("tiny")); button.addStyleName(getStyle("borderless-colored")); button.addStyleName(getStyle("button-no-border")); button.addStyleName(getStyle("action-type-padding")); if (buttonEnable) { return; } button.addStyleName("v-disabled"); }
private void applystyles(final Button button, final boolean buttonEnable) { button.setStyleName(VButton.CLASSNAME); button.addStyleName(getStyle("tiny")); button.addStyleName(getStyle("borderless-colored")); button.addStyleName(getStyle("button-no-border")); button.addStyleName(getStyle("action-type-padding")); if (buttonEnable) { return; } button.addStyleName("v-disabled"); }
private static void applyStyles(final Button button, final boolean buttonDisabled, final String additionalStyle) { button.setStyleName(VButton.CLASSNAME); button.addStyleName(getStyle("tiny")); button.addStyleName(getStyle("borderless")); button.addStyleName(getStyle("button-no-border")); button.addStyleName(getStyle("action-type-padding")); button.addStyleName(getStyle(additionalStyle)); if (buttonDisabled) { button.addStyleName("v-disabled"); } }
private static void applyStyles(final Button button, final boolean buttonDisabled, final String additionalStyle) { button.setStyleName(VButton.CLASSNAME); button.addStyleName(getStyle("tiny")); button.addStyleName(getStyle("borderless")); button.addStyleName(getStyle("button-no-border")); button.addStyleName(getStyle("action-type-padding")); button.addStyleName(getStyle(additionalStyle)); if (buttonDisabled) { button.addStyleName("v-disabled"); } }
public void construct() { closeButton.addStyleDependentName("dialog"); closeButton.setVisible(false); headerPanel.appendChild(closeButton.getElement()); addDomHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { Element target = event.getNativeEvent().getEventTarget().cast(); if (closeButton.getElement().isOrHasChild(target)) { callback.onCloseFired(); } } }, ClickEvent.getType()); headerPanel.addClassName(CLASSNAME_HEADER); descriptionPanel.addStyleName(ClASSNAME_DESCRIPTION); wideButton.setStyleName(CLASSNAME_WIDEBUTTON); setWideIcon(); helpButton.setStyleName(CLASSNAME_HELPBUTTON); toolbarEl.addClassName(CLASSNAME_HEADER_TOOLBAR); getElement().appendChild(headerPanel); caption.addClassName("title"); headerPanel.appendChild(caption); add(wideButton, headerPanel); add(helpButton, headerPanel); headerPanel.appendChild(toolbarEl); descriptionPanel.setVisible(false); add(descriptionPanel); }
nextResultBtn.setStyleName(NEXT_RESULT_BTN_STYLE); nextResultBtn.setVisible(false); nextResultBtn.addClickHandler(new ClickHandler() { prevResultBtn.setStyleName(PREV_RESULT_BTN_STYLE); prevResultBtn.setVisible(false); prevResultBtn.addClickHandler(new ClickHandler() { backBtn.setStyleName(BACK_TO_RESULTS_BTN_STYLE); backBtn.addClickHandler(new ClickHandler() {
protected void injectButton(final ControlContainer container) { ViewExtension extension = clientContext.getModelSupport().findExtension(model.getExtensions(), ViewExtension.class); String action = extension.getAction(); if (StringUtilsShared.isBlank(action)) { action = model.getLabel(); } Button submit = new Button(action); submit.setStyleName("btn btn-default"); submit.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { handleSubmit(container); } }); // For search we want the button to be at the end of the input fields // If we got the css correct for the panel holding the attributes it would not be necessary // to try and find the panel. ComplexPanel p1 = (ComplexPanel)view.getWidget(); ComplexPanel p2 = (ComplexPanel)p1.getWidget(1); ComplexPanel p3 = (ComplexPanel)p2.getWidget(1); ComplexPanel p4 = (ComplexPanel)p3.getWidget(2); p4.add(submit); }
submit.setStyleName("btn btn-default"); submit.addClickHandler(new ClickHandler()