Package de.yaams.maker.helper.gui

Examples of de.yaams.maker.helper.gui.YToolBar


    if (favorit == null) {
      init();
    }

    // create
    final YToolBar toolbar = new YToolBar();

    // add or del?
    boolean add = true;
    for (BasisListElement b : favorit) {

      // get it
      final YFavorit fav = (YFavorit) b;

      // check it
      if (fav.getTab() != null && fav.getTab().equals(tab.getId())) {
        add = false;

        // add remove
        toolbar.add(YFactory.tb(I18N.t("Tab aus den Favoriten löschen"), "fav_del", new AE() {

          @Override
          public void run() {
            // delete it
            if (del(fav)) {
              toolbar.getLeft().getComponent(0).setEnabled(false);
            }
          }
        }));

        break;
      }
    }

    if (add) {
      // add add
      toolbar.add(YFactory.tb(I18N.t("Tab als Favorit hinzufügen"), "fav_add", new AE() {

        @Override
        public void run() {
          add(tab);
          toolbar.getLeft().getComponent(0).setEnabled(false);
        }
      }));
    }

    // add config
    toolbar.add(YFactory.tb(I18N.t("Favoriten konfiguren"), "fav_opts", new AE() {

      @Override
      public void run() {
        YaFrame.open(TabEvent.buildParameter(HomeTab.OPTIONS, null, JavaHelper.createHashString("select", "fav")));

      }
    }));

    toolbar.addSeparator();

    // add favoriten
    for (BasisListElement b : favorit) {

      // get it
      final YFavorit fav = (YFavorit) b;

      toolbar.add(YFactory.tb(fav.getTitle(), fav.getIcon(), new AE() {

        @Override
        public void run() {
          YaFrame.open(fav.getTab(), fav);

        }
      }));
    }

    toolbar.addSeparator();

    return toolbar;
  }
View Full Code Here


   */
  public YaFrame() {
    super(YAamsCore.NAME);

    // init components
    toolbarLeft = new YToolBar();
    toolbarRight = new YToolBar();

    tabs = new ArrayList<TabEvent>();

    pane = new DocumentPane();
    pane.setRearrangeAllowed(true);
View Full Code Here

    super(new BorderLayout());

    size = 32;

    // build toolbar
    YToolBar y = new YToolBar();
    y.add(YFactory.b("16", null, new AE() {

      @Override
      public void run() {
        size = 16;
        repaint();

      }
    }));
    y.add(YFactory.b("32", null, new AE() {

      @Override
      public void run() {
        size = 32;
        repaint();
View Full Code Here

   * @param showInfo
   * @param showConfig
   */
  public YSimpleList() {
    super(new BorderLayout());
    toolbar = new YToolBar();
    model = new DefaultListModel();
    offSet = 0;
    itemsPerSite = -1;
    tmpSelectedIndex = -1;
    list = new JList(model);
View Full Code Here

  /**
   * @param arg0
   */
  public YBCB() {
    super(new BorderLayout());
    right = new YToolBar();
  }
View Full Code Here

    mapEventAdapter.addListener(pourButton);
    mapEventAdapter.addListener(eyedButton);
    mapEventAdapter.addListener(marqueeButton);
    mapEventAdapter.addListener(objectMoveButton);

    YToolBar toolBar = new YToolBar();
    // toolBar.setFloatable(true);
    toolBar.add(moveButton);
    toolBar.add(paintButton);
    toolBar.add(eraseButton);
    toolBar.add(pourButton);
    toolBar.add(eyedButton);
    toolBar.add(marqueeButton);
    // toolBar.add(Box.createRigidArea(new Dimension(5, 5)));
    // toolBar.add(objectAddButton);
    // toolBar.add(objectRemoveButton);
    // toolBar.add(objectMoveButton);
    toolBar.add(Box.createRigidArea(new Dimension(0, 5)));
    toolBar.add(new TButton(zoomInAction));
    toolBar.add(new TButton(zoomOutAction));
    toolBar.add(Box.createRigidArea(new Dimension(5, 5)));
    toolBar.add(Box.createGlue());

    brushPreview = new BrushPreview();
    mapEventAdapter.addListener(brushPreview);
    toolBar.add(brushPreview);

    return toolBar;
  }
View Full Code Here

  /**
   * Helpermethod to install support, for select an tile
   */
  protected YMapView installToolbar() {
    // set toolbar
    YToolBar bar = YFactory.installZoomlevel(new YToolBar(), view);

    add(bar, BorderLayout.NORTH);

    // get it
    return this;
View Full Code Here

    add(scrollPane, BorderLayout.CENTER);
    add(statusPane, BorderLayout.PAGE_END);

    // Set up the menu bar.
    actions = createActionTable(textPane);
    YToolBar toolbar = new YToolBar();
    createEditMenu(toolbar);
    createStyleMenu(toolbar);
    add(toolbar, BorderLayout.NORTH);

    // Add some key bindings.
View Full Code Here

    // set content
    imagepanel.setBorder(BorderFactory.createEmptyBorder());
    imagepanel.add(new JScrollPane(image), BorderLayout.CENTER);

    // set toolbar
    bar = YFactory.installZoomlevel(new YToolBar(), this);
    bar.addSeparator();

    bar.add(YFactory.tb(I18N.t("Info about the file"), "info", new AE() {

      @Override
View Full Code Here

TOP

Related Classes of de.yaams.maker.helper.gui.YToolBar

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.