Package com.vaadin.terminal

Examples of com.vaadin.terminal.ThemeResource


     * @param iconName
     *            the base name of the icon to use, it will be appended with '.png'.
     * @return a {@link Resource} denoting the icon.
     */
    protected ThemeResource createIconResource(String iconName) {
        return new ThemeResource("icons/" + iconName.toLowerCase() + ".png");
    }
View Full Code Here


    this.setImmediate(true);
    this.addComponent(menuB);
    menuB.setWidth("100%");

    account.setIcon(new ThemeResource("icon.png"));

    DAOFactory df = DAOFactory.getInstance();
    UserDAO userDao = df.getUserDAO();
    ResourceDAO resourceDao = df.getResourceDAO();
    try {
View Full Code Here

    GridLayout gridLayout = new GridLayout(1, 2);
    gridLayout.setWidth("100%");
    gridLayout.setHeight("100%");

    Embedded em = new Embedded("", new ThemeResource("images/bookmark-icon-logo.png"));
    Label label = new Label("Bookmark Manager - Version 1.0");
    label.setSizeFull();

    gridLayout.addComponent(em, 0, 0);
    gridLayout.setComponentAlignment(em, Alignment.MIDDLE_CENTER);
View Full Code Here

 
  @Override
  public void initializeComponents() {
    final GridLayout grid = new GridLayout(3, 1);

    Embedded em = new Embedded("", new ThemeResource("images/bookmark-icon-logo.png"));
    grid.addComponent(em, 0, 0);
    grid.setComponentAlignment(em, Alignment.MIDDLE_CENTER);

    Label labelLogo = new Label("Bookmark Manager");
    labelLogo.setStyleName("logolabel");
View Full Code Here

  }

  private void createMenu() {
    getMenuBar().setWidth("100%");
    final MenuBar.MenuItem menuNew = getMenuBar().addItem(bundle.getString("menu.new"), null);
    menuNew.setIcon(new ThemeResource("icons/16/document.png"));

    menuNew.setIcon(new ThemeResource("icons/16/document.png"));
    menuNew.addItem(bundle.getString("menu.new.bookmark"), menuCommand);
    menuNew.addItem(bundle.getString("menu.new.category"), menuCommand);

    final MenuBar.MenuItem menuHelp = getMenuBar().addItem(bundle.getString("menu.help"), null);
    menuHelp.addItem(bundle.getString("menu.help.about"), null);
    menuHelp.setIcon(new ThemeResource("icons/16/help.png"));
  }
View Full Code Here

      verticalLayout.setMargin(true);
      verticalLayout.setSpacing(true);

      table = new Table();
      table.addContainerProperty("Bundle Symbolic Name", String.class,
            new ThemeResource("icons/bundle.png"));
      table.addContainerProperty("Version", String.class, null);
      table.addContainerProperty("State", String.class, null);
      table.addContainerProperty("Active", CheckBox.class, null);
      table.setWidth("100%");
      table.setPageLength(8);
View Full Code Here

    margin.addComponent(tabSheet);
    mainLayout.addComponent(margin);
    mainLayout.setExpandRatio(margin, 1);

    for (IViewContribution viewContribution : viewContributions) {
      tabSheet.addTab(viewContribution.getView(this), viewContribution.getName(), new ThemeResource(
          viewContribution.getIcon()));
    }

    for (IActionContribution actionContribution : actionContributions) {
      addActionContribution(actionContribution);
View Full Code Here

  public void bindViewContribution(IViewContribution viewContribution) {
    logger.debug("bindViewContribution()");
    viewContributions.add(viewContribution);
    if (initialized) {
      tabSheet.addTab(viewContribution.getView(this), viewContribution.getName(), new ThemeResource(
          viewContribution.getIcon()));
    }
  }
View Full Code Here

  }

  private void addActionContribution(final IActionContribution actionContribution) {
    final Application application = this;
    Button button = new Button(actionContribution.getText());
    button.setIcon(new ThemeResource(actionContribution.getIcon()));
    button.addListener(new ClickListener() {
      private static final long serialVersionUID = 1L;

      @Override
      public void buttonClick(ClickEvent event) {
        actionContribution.execute(application);
      }
    });
    getToolbar().addComponent(button);
    buttonActionMap.put(actionContribution, button);

    @SuppressWarnings("serial")
    MenuItem menuItem = actionMenu.addItem(actionContribution.getText(), new Command() {
      @Override
      public void menuSelected(MenuItem selectedItem) {
        actionContribution.execute(application);
      }
    });
    menuItem.setIcon(new ThemeResource(actionContribution.getIcon()));
    menuActionMap.put(actionContribution, menuItem);
  }
View Full Code Here

 
  protected Resource image;
  protected ClickListener clickListener;
  public ThemeImageColumnGenerator(String imageName) {
    image = new ThemeResource(imageName);
  }
View Full Code Here

TOP

Related Classes of com.vaadin.terminal.ThemeResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.