List of usage examples for com.vaadin.server FontAwesome PLAY
FontAwesome PLAY
To view the source code for com.vaadin.server FontAwesome PLAY.
Click Source Link
From source file:org.jumpmind.vaadin.ui.sqlexplorer.DefaultButtonBar.java
License:Open Source License
protected void populate(MenuBar menuBar) { executeAtCursorButton = menuBar.addItem("", FontAwesome.PLAY, new Command() { private static final long serialVersionUID = 1L; @Override/*w w w . j a va 2 s. c o m*/ public void menuSelected(MenuItem selectedItem) { queryPanel.execute(false); } }); executeAtCursorButton.setDescription("Run sql under cursor (CTRL+ENTER)"); executeScriptButton = menuBar.addItem("", FontAwesome.FORWARD, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { queryPanel.execute(true); } }); executeScriptButton.setDescription("Run as script"); commitButton = menuBar.addItem("", FontAwesome.ARROW_CIRCLE_O_RIGHT, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { queryPanel.commit(); } }); commitButton.setStyleName("green"); commitButton.setDescription("Commit"); commitButton.setEnabled(false); rollbackButton = menuBar.addItem("", FontAwesome.ARROW_CIRCLE_O_LEFT, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { queryPanel.rollback(); } }); rollbackButton.setStyleName("red"); rollbackButton.setDescription("Rollback"); rollbackButton.setEnabled(false); historyButton = menuBar.addItem("", FontAwesome.SEARCH, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { new SqlHistoryDialog(settingsProvider, queryPanel).showAtSize(0.6); } }); historyButton.setDescription("Sql History"); historyButton.setEnabled(true); MenuItem optionsButton = menuBar.addItem("", FontAwesome.TASKS, null); optionsButton.setDescription("Options"); importButton = optionsButton.addItem("DB Import", FontAwesome.DOWNLOAD, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { new DbImportDialog(db.getPlatform()).showAtSize(0.6); } }); exportButton = optionsButton.addItem("DB Export", FontAwesome.UPLOAD, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { new DbExportDialog(db.getPlatform(), queryPanel).showAtSize(0.6); } }); fillButton = optionsButton.addItem("DB Fill", FontAwesome.BEER, new Command() { private static final long serialVersionUID = 1L; @Override public void menuSelected(MenuItem selectedItem) { new DbFillDialog(db.getPlatform(), queryPanel).showAtSize(0.6); } }); for (IDbMenuItem item : additionalMenuItems) { optionsButton.addItem(item.getCaption(), item.getIcon(), item.getCommand()); } }
From source file:org.lucidj.browser.AbstractCell.java
License:Apache License
public void setRunning(boolean visible, ComponentState state) { if (visible) { if (state != null) { task_state = state.getState(); if (task_state == ComponentState.ACTIVE || task_state == ComponentState.TERMINATED) { // Ready to run visible only with hover or selection running.removeStyleName("component-task-state-visible"); } else { // All other states are always visible running.addStyleName("component-task-state-visible"); }//w w w. j av a2s. co m String color = "inherit"; String html = "S" + String.valueOf(state.getState()); String title = "State " + String.valueOf(state.getState()); switch (task_state) // Also record the rendered state { case ComponentState.INIT: { html = FontAwesome.CLOCK_O.getHtml(); title = "Task awaiting initialization"; break; } case ComponentState.ABORTED: { color = "red"; html = "<span class='component-task-runnable'>" + FontAwesome.WARNING.getHtml() + "</span>"; title = "Task aborted, can try to run"; break; } case ComponentState.ACTIVE: { color = "green"; html = FontAwesome.PLAY.getHtml(); title = "Run task"; break; } case ComponentState.TERMINATED: { color = "green"; html = FontAwesome.PLAY.getHtml(); title = "Task finished, can run again"; break; } case ComponentState.INTERRUPTED: { color = "blue"; html = "<span class='component-task-runnable'>" + FontAwesome.PAUSE.getHtml() + "</span>"; title = "Task interrupted by user, can run again"; break; } case ComponentState.RUNNING: { color = "red"; html = FontAwesome.STOP.getHtml(); title = "Task running"; break; } } running.setValue("<span style='color:" + color + ";' title='" + title + "'>" + html + "</span>"); } else { running.setValue(""); } } running.setVisible(visible); }
From source file:views.WorkflowView.java
License:Open Source License
private void init() { viewContent.setWidth("100%"); viewContent.setMargin(new MarginInfo(true, false, false, false)); // select available workflows workflows = new VerticalLayout(); VerticalLayout workflowsContent = new VerticalLayout(); workflows.setMargin(new MarginInfo(false, true, true, false)); workflowsContent.addComponent(availableWorkflows); availableWorkflows.setSizeFull();//w w w .j a v a 2 s. com availableWorkflows.setDescription(WORKFKLOW_GRID_DESCRIPTION); // availableWorkflows.setWidth("100%"); workflows.setVisible(false); workflows.setCaption("Available Workflows"); workflows.setIcon(FontAwesome.EXCHANGE); workflows.addComponent(workflowsContent); workflows.setWidth(100.0f, Unit.PERCENTAGE); // submission submission = new VerticalLayout(); submission.setMargin(new MarginInfo(false, true, true, false)); submission.setCaption(SUBMISSION_CAPTION); submission.setIcon(FontAwesome.PLAY); submission.setWidth(100.0f, Unit.PERCENTAGE); submission.setVisible(false); // add sections to layout viewContent.addComponent(workflows); viewContent.addComponent(submission); this.addComponent(viewContent); addComponentListeners(); }