List of usage examples for com.vaadin.ui.themes ValoTheme BUTTON_BORDERLESS
String BUTTON_BORDERLESS
To view the source code for com.vaadin.ui.themes ValoTheme BUTTON_BORDERLESS.
Click Source Link
From source file:org.lucidj.iconlist.renderer.IconListRenderer.java
License:Apache License
private AbstractComponent create_icon(Map<String, Object> component) { String icon_title = (String) component.get("iconTitle"); if (icon_title == null) { icon_title = "No title"; }// w w w . j a va2 s. co m Resource icon_resource = iconHelper.getIcon((String) component.get("iconUrl"), 32); Button button_icon = new Button(icon_title); button_icon.setIcon(icon_resource); button_icon.addStyleName(ValoTheme.BUTTON_BORDERLESS); button_icon.addStyleName(ValoTheme.BUTTON_SMALL); button_icon.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP); button_icon.addStyleName("x-icon-button"); button_icon.addStyleName("icon-size-32"); button_icon.addClickListener(this); button_icon.setWidthUndefined(); button_caption_wrap(button_icon); // Put the component in a D&D wrapper and allow dragging it final DragAndDropWrapper icon_dd_wrap = new DragAndDropWrapper(button_icon); icon_dd_wrap.setDragStartMode(DragAndDropWrapper.DragStartMode.COMPONENT); // Set the wrapper to wrap tightly around the component icon_dd_wrap.setSizeUndefined(); icon_dd_wrap.setData(component); // Set ID for drag-drop AND on the Label for double-click if (component.containsKey("entryId")) { String entryId = (String) component.get("entryId"); icon_dd_wrap.setId(entryId); button_icon.setId(entryId); } // Component data is the map itself button_icon.setData(component); // Remember this association component_to_vaadin.put(component, icon_dd_wrap); return (icon_dd_wrap); }
From source file:org.opencms.ui.apps.CmsDefaultAppButtonProvider.java
License:Open Source License
/** * Creates an icon button.<p>//from w w w . ja v a2s. c om * * @param name the name * @param description the description * @param icon the icon * @param buttonStyle the button style * * @return the created button */ public static Button createIconButton(String name, String description, Resource icon, String buttonStyle) { Button button = new Button(name); button.setIcon(icon, name); button.setDescription(description); button.addStyleName(OpenCmsTheme.APP_BUTTON); button.addStyleName(ValoTheme.BUTTON_BORDERLESS); button.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP); button.addStyleName(buttonStyle); return button; }
From source file:org.opencms.ui.apps.CmsFileExplorer.java
License:Open Source License
/** * Initializes the app specific toolbar buttons.<p> * * @param context the UI context/*w ww . j a va2 s . co m*/ */ private void initToolbarButtons(I_CmsAppUIContext context) { m_publishButton = context.addPublishButton(new I_CmsUpdateListener<String>() { public void onUpdate(List<String> updatedItems) { updateAll(false); } }); m_newButton = CmsToolBar.createButton(FontOpenCms.WAND, CmsVaadinUtils.getMessageText(Messages.GUI_NEW_RESOURCE_TITLE_0)); if (CmsAppWorkplaceUi.isOnlineProject()) { m_newButton.setEnabled(false); m_newButton.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_TOOLBAR_NOT_AVAILABLE_ONLINE_0)); } m_newButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { onClickNew(); } }); context.addToolbarButton(m_newButton); m_uploadButton = new CmsUploadButton(FontOpenCms.UPLOAD, "/"); m_uploadButton.addStyleName(ValoTheme.BUTTON_BORDERLESS); m_uploadButton.addStyleName(OpenCmsTheme.TOOLBAR_BUTTON); if (CmsAppWorkplaceUi.isOnlineProject()) { m_uploadButton.setEnabled(false); m_uploadButton .setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_TOOLBAR_NOT_AVAILABLE_ONLINE_0)); } else { m_uploadButton.setDescription(CmsVaadinUtils.getMessageText(Messages.GUI_UPLOAD_BUTTON_TITLE_0)); } m_uploadButton.addUploadListener(new I_UploadListener() { public void onUploadFinished(List<String> uploadedFiles) { updateAll(true); } }); context.addToolbarButton(m_uploadButton); }
From source file:org.opencms.ui.apps.scheduler.CmsJobMainView.java
License:Open Source License
/** * Creates a new instance.<p>/*from w w w. j av a 2s.c om*/ * * @param context the app context. */ public CmsJobMainView(I_CmsAppUIContext context) { m_appContext = context; CmsVaadinUtils.readAndLocalizeDesign(this, CmsVaadinUtils.getWpMessagesForCurrentLocale(), null); m_jobTable.setJobEditHandler(this); m_buttonAddJob.addStyleName(ValoTheme.BUTTON_ICON_ALIGN_TOP); m_buttonAddJob.addStyleName(ValoTheme.BUTTON_BORDERLESS); m_buttonAddJob.setIcon(new ExternalResource(OpenCmsTheme.getImageLink("scheduler/scheduler_big_add.png"))); m_buttonAddJob.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { CmsScheduledJobInfo jobInfo = new CmsScheduledJobInfo(); jobInfo.setContextInfo(new CmsContextInfo()); editJob(jobInfo, CmsVaadinUtils.getMessageText(org.opencms.ui.Messages.GUI_SCHEDULER_TITLE_CREATE_0)); } }); }
From source file:org.opencms.ui.components.CmsToolBar.java
License:Open Source License
/** * Creates a properly styled toolbar button.<p> * * @param icon the button icon// w ww . j a v a 2s. c om * @param title the button title, will be used for the tooltip * @param alwaysShow <code>true</code> to prevent the button to be folded into a sub menu for small screens * * @return the button */ public static Button createButton(Resource icon, String title, boolean alwaysShow) { Button button = new Button(icon); button.setDescription(title); button.addStyleName(ValoTheme.BUTTON_BORDERLESS); button.addStyleName(OpenCmsTheme.TOOLBAR_BUTTON); if (alwaysShow) { button.addStyleName(OpenCmsTheme.REQUIRED_BUTTON); } return button; }
From source file:org.opencms.ui.sitemap.CmsSitemapTreeNodeOpener.java
License:Open Source License
/** * Creates a new instance.<p<// w ww . j av a2 s . c o m */ public CmsSitemapTreeNodeOpener() { super(); addStyleName("opencms-font-icon"); addStyleName("o-sitemap-tree-opener"); addStyleName(ValoTheme.BUTTON_BORDERLESS); addStyleName(OpenCmsTheme.BUTTON_UNPADDED); setStyleOpen(false); }
From source file:org.opencms.ui.util.table.CmsTableUtil.java
License:Open Source License
/** * Creates an icon button.<p>//from ww w . j a v a 2 s . co m * * @param icon the resource for the icon * @param caption the caption * * @return the created button */ public static Button createIconButton(Resource icon, String caption) { Button button = new Button(); button.addStyleName(OpenCmsTheme.BUTTON_TABLE_ICON); button.addStyleName(ValoTheme.BUTTON_BORDERLESS); button.setIcon(icon); button.setDescription(caption); return button; }