Package com.vaadin.ui

Examples of com.vaadin.ui.TabSheet$SelectedTabChangeEvent


    push(next);
  }

  @Override
  protected void doTabStart(LObject object) {
    TabSheet tab = new TabSheet();
    tab.setSizeFull();
    ((ILayout)parent).addFullComponent(tab);
    push(tab);
  }
View Full Code Here


public class UiTabsheet extends UiVaadinComposite {

  private TabSheet tabSheed;

  public void createUi(VaadinFormBuilder builder) {
    tabSheed = new TabSheet();
    builder.addComposite((LayoutComposite)getElement(), tabSheed);
  }
View Full Code Here

                }

                Component content = null;

                if (tabsVisible) {
                    TabSheet tabs = new TabSheet();
                    tabs.setSizeFull();
                    VerticalLayout l = new VerticalLayout();
                    l.addComponent(new Label(
                            "<h2>Subtitle</h2><p>Normal type for plain text. Etiam at risus et justo dignissim congue. Phasellus laoreet lorem vel dolor tempus vehicula.</p><p>Quisque ut dolor gravida, placerat libero vel, euismod. Etiam habebis sem dicantur magna mollis euismod. Nihil hic munitissimus habendi senatus locus, nihil horum? Curabitur est gravida et libero vitae dictum. Ullamco laboris nisi ut aliquid ex ea commodi consequat. Morbi odio eros, volutpat ut pharetra vitae, lobortis sed nibh.</p>",
                            ContentMode.HTML));
                    l.setMargin(true);
                    tabs.addTab(l, "Selected");
                    tabs.addTab(new Label("&nbsp;", ContentMode.HTML),
                            "Another");
                    tabs.addTab(new Label("&nbsp;", ContentMode.HTML),
                            "One more");
                    tabs.addStyleName("padded-tabbar");
                    tabs.addSelectedTabChangeListener(new SelectedTabChangeListener() {
                        @Override
                        public void selectedTabChange(
                                SelectedTabChangeEvent event) {
                            try {
                                Thread.sleep(600);
View Full Code Here

        VerticalLayout fields = new VerticalLayout();
        fields.setSpacing(true);
        fields.addComponent(m_name);
        fields.addComponent(m_description);

        TabSheet tabs = new TabSheet();
        tabs.setHeight("350px");
        tabs.setWidth("100%");
        tabs.setVisible(!factories.isEmpty());

        Map<String, Object> context = new HashMap<String, Object>();
        context.put("object", object);

        for (UIExtensionFactory factory : factories) {
            try {
                tabs.addTab(factory.create(context));
            }
            catch (Throwable ex) {
                // We ignore extension factories that throw exceptions
                // TODO: log this or something
                ex.printStackTrace();
View Full Code Here

    AbsoluteLayout musteriTemelBilgilerLayout = new AbsoluteLayout();
    AbsoluteLayout musteriAdresBilgilerLayout = new AbsoluteLayout();
    musteriIletisimBilgilerLayout = new AbsoluteLayout();
    telefonAlaniLayout = new VerticalLayout();

    final TabSheet tabSheet = new TabSheet();
    final TextField musteriVdn = new TextField("Vergi Dairesi No");
    final TextField musteriVd = new TextField("Vergi Dairesi");
    final TextField musteriAdi = new TextField("Firma Adi");
    final TextField musteriTuru = new TextField("Firma Türü");
    final TextField musteriTipi = new TextField("Firma Tipi");
    final TextField musteriSektor = new TextField("Firma Sektörü");
    final TextField musteriAdres = new TextField("Firma Adresi");
    final TextField musteriSemt = new TextField("Semt");
    musteriIlce = new ComboBox("İlçe");
    musteriIl = new ComboBox("İl");
    final ComboBox musteriUlke = new ComboBox("Ülke");
    final TextField musteriMail = new TextField("Mail Adresi");
    final TextField musteriWeb = new TextField("Firma Web Sayfasi");
    final TextArea musteriNot = new TextArea("Not");
    telefonEkleButton = new Button("+",this);

    final TextField musteriTelefon = new TextField("Telefon");
    final TextField musteriTelefonTuru = new TextField("Telefon Türü");
    kaydetButton = new Button("Kaydet",this);

    Form musteriTemelBilgilerForm = new Form();
    Form musteriAdresBilgilerForm = new Form();
    Form musteriIletisimBilgilerForm = new Form();

    musteriTemelBilgilerForm.setImmediate(true);
    musteriAdresBilgilerForm.setImmediate(true);
    musteriIletisimBilgilerForm.setImmediate(true);

    musteriTemelBilgilerLayout.setWidth("100%");
    musteriTemelBilgilerLayout.setHeight("460px");
    musteriAdresBilgilerLayout.setWidth("100%");
    musteriAdresBilgilerLayout.setHeight("460px");
    musteriIletisimBilgilerLayout.setWidth("100%");
    musteriIletisimBilgilerLayout.setHeight("360px");

    musteriVdn.setWidth("200px");
    musteriVd.setWidth("200px");
    musteriAdi.setWidth("200px");
    musteriTuru.setWidth("200px");
    musteriTipi.setWidth("200px");
    musteriSektor.setWidth("200px");
    musteriAdres.setWidth("200px");
    musteriSemt.setWidth("200px");
    musteriIlce.setWidth("200px");
    musteriIl.setWidth("200px");
    musteriUlke.setWidth("200px");
    musteriMail.setWidth("200px");
    musteriWeb.setWidth("200px");
    musteriNot.setWidth("200px");
    // musteriTelefon.setWidth("200px");
    musteriTelefonTuru.setWidth("200px");

    // temelbilgiler
    musteriTemelBilgilerLayout.addComponent(musteriVdn, "left : 30px ; top : 50px");
    musteriTemelBilgilerLayout.addComponent(musteriVd, "left : 30px ; top : 100px");
    musteriTemelBilgilerLayout.addComponent(musteriAdi, "left : 30px ; top : 150px");
    musteriTemelBilgilerLayout.addComponent(musteriTuru, "left : 30px ; top : 200px");
    musteriTemelBilgilerLayout.addComponent(musteriTipi, "left : 30px ; top : 250px");
    musteriTemelBilgilerLayout.addComponent(musteriSektor, "left : 30px ; top : 300px");
    musteriTemelBilgilerLayout.addComponent(musteriNot, "left : 30px ; top : 350px");

    // AdresBilgiler
    musteriAdresBilgilerLayout.addComponent(musteriAdres, "left : 30px ; top : 50px");
    musteriAdresBilgilerLayout.addComponent(musteriSemt, "left : 30px ; top : 100px");
    musteriAdresBilgilerLayout.addComponent(musteriIlce, "left : 30px ; top : 150px");
    musteriAdresBilgilerLayout.addComponent(musteriIl, "left : 30px ; top : 200px");
    musteriAdresBilgilerLayout.addComponent(musteriUlke, "left : 30px ; top : 250px");

    // iletişimbilgileri

    musteriIletisimBilgilerLayout.addComponent(musteriMail, "left : 30px ; top : 50px");
    musteriIletisimBilgilerLayout.addComponent(musteriWeb, "left : 30px ; top : 100px");
    musteriIletisimBilgilerLayout.addComponent(musteriTelefon, "left : 30px ; top : 150px");
    musteriIletisimBilgilerLayout.addComponent(musteriTelefonTuru, "left : 30px ; top : 200px");
    musteriIletisimBilgilerLayout.addComponent(telefonAlaniLayout, "left : 330px ; top : 35px");
    musteriIletisimBilgilerLayout.addComponent(telefonEkleButton, "left : 535px ; top : 48px");
    telefonAlaniLayout.addComponent(musteriTelefon);

    musteriTemelBilgilerForm.setLayout(musteriTemelBilgilerLayout);
    musteriAdresBilgilerForm.setLayout(musteriAdresBilgilerLayout);
    musteriIletisimBilgilerForm.setLayout(musteriIletisimBilgilerLayout);

    // layoutlar
    tabSheet.addTab(musteriTemelBilgilerForm, "Müşteri Temel Bilgiler");
    tabSheet.addTab(musteriAdresBilgilerForm, "Müşteri Adres Bilgiler");
    tabSheet.addTab(musteriIletisimBilgilerForm, "Müşteri İletişim Bilgiler");

   
   
   
    //  ------------------------------------------------
View Full Code Here

    @Override
    public void init() {
        final Window mainWindow = new Window("Custom Field Example");

        TabSheet tabsheet = new TabSheet();

        tabsheet.addTab(new CityFieldExample(), "Wrapping a Field", null);
        tabsheet.addTab(new ConversionExample(), "Conversions", null);
        tabsheet.addTab(new AddressFormExample(), "Address Form", null);
        tabsheet.addTab(new NestedFormExample(false), "Nested Forms", null);
        tabsheet.addTab(new NestedFormExample(true), "Embedded Form", null);
        tabsheet.addTab(new BooleanFieldExample(), "Boolean Field", null);

        mainWindow.addComponent(tabsheet);

        setMainWindow(mainWindow);
    }
View Full Code Here

    @Override
    public void init() {
        final Window mainWindow = new Window("Custom Field Example");

        TabSheet tabsheet = new TabSheet();

        tabsheet.addTab(new CityFieldExample(), "Wrapping a Field", null);
        tabsheet.addTab(new ConversionExample(), "Conversions", null);
        tabsheet.addTab(new AddressFormExample(), "Address Form", null);
        tabsheet.addTab(new NestedFormExample(false), "Nested Forms", null);
        tabsheet.addTab(new NestedFormExample(true), "Embedded Form", null);
        tabsheet.addTab(new BooleanFieldExample(), "Boolean Field", null);
        tabsheet.addTab(new BeanFieldExample(), "ID-Bean Conversions", null);

        mainWindow.addComponent(tabsheet);

        setMainWindow(mainWindow);
    }
View Full Code Here

    AbsoluteLayout urunTemelLayout = new AbsoluteLayout();
    AbsoluteLayout urunFiyatLayout = new AbsoluteLayout();
    AbsoluteLayout urunDigerLayout = new AbsoluteLayout();
    AbsoluteLayout urunResimLayout = new AbsoluteLayout();
   
    final TabSheet tabSheet = new TabSheet();
    final TextField urunKodu = new TextField("Ürün Kodu");
    final TextField urunAdi = new TextField("Ürün Adı");
    final TextField urunMarka = new TextField("Ürün Markası");
    final TextField urunKategori = new TextField("Ürün Kategorisi");
    final TextField urunModel = new TextField("Ürün Modeli");
    final TextField urunKdv = new TextField("KDV");
    final TextField urunStok = new TextField("Ürün Stok");
    final TextField urunAciklama = new TextField("Ürün Aciklama");
    final TextField urunAlisFiyati = new TextField("Ürün Alış Fiyatı");
    final TextField urunSatisFiyati = new TextField("Ürün Satış Fiyatı");
    final TextField urunBayiFiyati = new TextField("Ürün Bayi Fiyatı");
    final TextField urunOzelFiyati = new TextField("Ürün Özel Fiyati");
    final ComboBox urunAlisBirim = new ComboBox("Alış Birim");
    final ComboBox urunSatisBirim = new ComboBox("Satış birim");
    final ComboBox urunBayiBirim = new ComboBox("Bayii birim");
    final ComboBox urunOzelBirim = new ComboBox("Özel Birim");
    final TextField urunAdiIng = new TextField("Ürün İngilizce Adı");
    //final TextField urunResim = new TextField("Resim");
    final TextField urunOzellik = new TextField("Ürün Özellikleri");
    final TextField urunTeknikOzellik = new TextField("Ürün Teknik Özellikleri");
    final TextField urunAciklamaIng = new TextField("Ürün Açıkama (İngilizce)");
    Button kaydetButton = new Button("Kaydet");
    Button silButton = new Button("Sil");
  
    birimler[0]="TL";
    birimler[1]="USD";
    birimler[2]="EURO";
    birimler[3]="GBP";
    for (int i = 0; i < birimler.length; i++) {
      urunAlisBirim.addItem(birimler[i]);
      urunSatisBirim.addItem(birimler[i]);
      urunBayiBirim.addItem(birimler[i]);
      urunOzelBirim.addItem(birimler[i]);
    }
   
    urunAlisBirim.setValue("TL");
    urunSatisBirim.setValue("TL");
    urunBayiBirim.setValue("TL");
    urunOzelBirim.setValue("TL");
   
    urunAlisBirim.setNullSelectionAllowed(false);
    urunSatisBirim.setNullSelectionAllowed(false);
    urunBayiBirim.setNullSelectionAllowed(false);
    urunOzelBirim.setNullSelectionAllowed(false);
   
   
    final Form urunFiyatForm = new Form();
    final Form urunDigerForm = new Form();
    final Form urunTemelForm = new Form();
    final Form urunResimForm = new Form();

    urunFiyatForm.setImmediate(true);
    urunDigerForm.setImmediate(true);
    urunTemelForm.setImmediate(true);
    urunResimForm.setImmediate(true);

    urunTemelLayout.setCaption("Ürün Ekleme");
    urunTemelLayout.setWidth("100%");
    urunTemelLayout.setHeight("460px");
    urunFiyatLayout.setCaption("Ürün Ekleme");
    urunFiyatLayout.setWidth("100%");
    urunFiyatLayout.setHeight("460px");
    urunDigerLayout.setCaption("Ürün Ekleme");
    urunDigerLayout.setWidth("100%");
    urunDigerLayout.setHeight("460px");
    urunResimLayout.setCaption("Ürün Ekleme");
    urunResimLayout.setWidth("100%");
    urunResimLayout.setHeight("460px");

    urunAdi.setWidth("200px");
    urunAdiIng.setWidth("200px");
    urunKodu.setWidth("200px");
    urunMarka.setWidth("200px");
    urunKategori.setWidth("200px");
    urunKdv.setWidth("200px");
    urunStok.setWidth("200px");
    urunAdi.setImmediate(true);
    urunAlisFiyati.setWidth("200px");
    urunSatisFiyati.setWidth("200px");
    urunAlisBirim.setWidth("70px");
    urunSatisBirim.setWidth("70px");
    urunModel.setWidth("200px");
    urunBayiBirim.setWidth("70px");
    urunBayiFiyati.setWidth("200px");
    urunOzelBirim.setWidth("70px");
    urunOzelFiyati.setWidth("200px");
    urunTeknikOzellik.setWidth("200px");
    urunOzellik.setWidth("200px");
    urunAciklama.setWidth("200px");
    urunAciklamaIng.setWidth("200px");
 

    // temel
    urunTemelLayout.addComponent(urunKodu, "left: 30px; top: 50px;");
    urunTemelLayout.addComponent(urunAdi, "left: 30px; top: 100px;");
    urunTemelLayout.addComponent(urunAdiIng, "left: 30px; top: 150px;");
    urunTemelLayout.addComponent(urunMarka, "left: 30px; top: 200px;");
    urunTemelLayout.addComponent(urunKategori, "left: 30px; top: 250px;");
    urunTemelLayout.addComponent(urunModel, "left:30px; top: 300px");
    // fiyat
    urunFiyatLayout.addComponent(urunKdv, "left: 190px; top: 300px;");
    urunFiyatLayout.addComponent(urunAlisFiyati, "left: 30px; top: 50px;");
    urunFiyatLayout.addComponent(urunAlisBirim, "left: 350px; top: 50px;");
    urunFiyatLayout.addComponent(urunSatisFiyati, "left : 30px; top: 100px;");
    urunFiyatLayout.addComponent(urunSatisBirim, "left : 350px; top: 100px;");
    urunFiyatLayout.addComponent(urunOzelFiyati, "left : 30px; top: 150px;");
    urunFiyatLayout.addComponent(urunOzelBirim, "left : 350px; top:150px");
    urunFiyatLayout.addComponent(urunBayiFiyati, "left:30px; top:200px");
    urunFiyatLayout.addComponent(urunBayiBirim, "left : 350px; top:200px");
    // diger
    urunDigerLayout.addComponent(urunTeknikOzellik, "left : 30px ; top : 50px");
    urunDigerLayout.addComponent(urunOzellik, "left : 30px ; top : 100px");
    urunDigerLayout.addComponent(urunAciklama, "left : 30px ; top : 150px");
    urunDigerLayout.addComponent(urunAciklamaIng, "left : 30px ; top : 200px");
    // resim
 
   
    urunTemelForm.setLayout(urunTemelLayout);
    // layoutlar
    tabSheet.addTab(urunTemelForm, "Ürün Temel Bilgiler");
    tabSheet.addTab(urunFiyatLayout, "Ürün Fiyat Bilgiler");
    tabSheet.addTab(urunDigerLayout, "Ürün Diğer Bilgiler");
    tabSheet.addTab(urunResimLayout, "Resim Bilgiler");
    addComponent(tabSheet);
    addComponent(kaydetButton);
    addComponent(silButton);
   
   
View Full Code Here

    Label slogan = new Label("Vehicles...");
    slogan.setStyleName("slogan");
    mainLayout.addComponent(slogan);

    final TabSheet mainTabs = new TabSheet();
    mainTabs.setSizeFull();
    mainLayout.addComponent(mainTabs);
    mainLayout.setExpandRatio(mainTabs, 1);

    final VerticalLayout reservationTab = new VerticalLayout();
    reservationTab.setWidth("100%");
    mainTabs.addTab(reservationTab, "Make reservation", null);

    resourcePanel = new ResourceSelectorPanel("Resources");
    resourcePanel.setResourceContainer(db.getResources(null));
    resourcePanel.addListener(
        ResourceSelectorPanel.SelectedResourcesChangedEvent.class,
        this, "selectedResourcesChanged");
    reservationTab.addComponent(resourcePanel);

    HorizontalLayout reservationLayout = new HorizontalLayout();
    final Panel reservationPanel = new Panel("Reservation",
        reservationLayout);
    reservationPanel.addStyleName(Panel.STYLE_LIGHT);
    reservationLayout.setMargin(true);
    reservationTab.addComponent(reservationPanel);

    final VerticalLayout infoLayout = new VerticalLayout();
    infoLayout.setSpacing(true);
    infoLayout.setSizeUndefined();
    infoLayout.setMargin(false, true, false, false);
    reservationPanel.addComponent(infoLayout);
    resourceName = new Label("From the list above");
    resourceName.setCaption("Choose resource");
    infoLayout.addComponent(resourceName);
    description = new TextField();
    description.setWidth("250px");
    description.setRows(5);
    infoLayout.addComponent(description);
    reservationButton = new Button("Make reservation", this,
        "makeReservation");
    infoLayout.addComponent(reservationButton);
    infoLayout.setComponentAlignment(reservationButton,
        Alignment.MIDDLE_CENTER);

    map = new GoogleMap();
    map.setWidth("250px");
    map.setHeight("250px");
    map
        .setItemMarkerHtmlPropertyId(ReservationsDB.Resource.PROPERTY_ID_NAME);
    map
        .setItemMarkerXPropertyId(ReservationsDB.Resource.PROPERTY_ID_LOCATIONX);
    map
        .setItemMarkerYPropertyId(ReservationsDB.Resource.PROPERTY_ID_LOCATIONY);
    map.setContainerDataSource(db.getResources(null));
    infoLayout.addComponent(map);

    final Calendar from = Calendar.getInstance();
    from.add(Calendar.HOUR, 1);
    from.set(Calendar.MINUTE, 0);
    from.set(Calendar.SECOND, 0);
    from.set(Calendar.MILLISECOND, 0);
    reservedFrom = new CalendarField("From");
    reservedFrom.setMinimumDate(from.getTime());
    reservedFrom.setValue(from.getTime());
    reservedFrom.setImmediate(true);
    initCalendarFieldPropertyIds(reservedFrom);
    reservationPanel.addComponent(reservedFrom);

    final Label arrowLabel = new Label("&raquo;");
    arrowLabel.setContentMode(Label.CONTENT_XHTML);
    arrowLabel.setStyleName("arrow");
    reservationPanel.addComponent(arrowLabel);

    final Calendar to = Calendar.getInstance();
    to.setTime(from.getTime());
    to.add(Calendar.MILLISECOND, (int) DEFAULT_GAP_MILLIS);
    reservedTo = new CalendarField("To");
    reservedTo.setMinimumDate(to.getTime());
    reservedTo.setValue(to.getTime());
    reservedTo.setImmediate(true);
    initCalendarFieldPropertyIds(reservedTo);
    reservationPanel.addComponent(reservedTo);

    reservedFrom.addListener(new ValueChangeListener() {
      public void valueChange(ValueChangeEvent event) {
        final Date fd = (Date) reservedFrom.getValue();
        if (fd == null) {
          reservedTo.setValue(null);
          reservedTo.setEnabled(false);
          refreshSelectedResources(true);
          return;
        } else {
          reservedTo.setEnabled(true);
        }
        reservedTo.setMinimumDate(new Date(fd.getTime()
            + DEFAULT_GAP_MILLIS));
        final Calendar to = Calendar.getInstance();
        to.setTime(fd);
        to.add(Calendar.MILLISECOND, (int) currentGapMillis);
        reservedTo.setValue(to.getTime());
        refreshSelectedResources(true);
      }
    });
    reservedTo.addListener(new ValueChangeListener() {
      public void valueChange(ValueChangeEvent event) {
        final Date from = (Date) reservedFrom.getValue();
        final Date to = (Date) reservedTo.getValue();
        currentGapMillis = to.getTime() - from.getTime();
        if (currentGapMillis <= 0) {
          final Calendar t = Calendar.getInstance();
          t.setTime(from);
          t.add(Calendar.MILLISECOND, (int) DEFAULT_GAP_MILLIS);
          reservedTo.setValue(t.getTime());
        }
        refreshSelectedResources(true);
      }
    });

    allTable = new Table();
    allTable.setSizeFull();
    allTable.setColumnCollapsingAllowed(true);
    allTable.setColumnReorderingAllowed(true);
    mainTabs.addTab(allTable, "All reservations", null);
    mainTabs.addListener(new TabSheet.SelectedTabChangeListener() {
      public void selectedTabChange(SelectedTabChangeEvent event) {
        refreshReservations();
      }
    });
View Full Code Here

        VerticalLayout fields = new VerticalLayout();
        fields.setSpacing(true);
        fields.addComponent(m_name);
        fields.addComponent(m_description);

        TabSheet tabs = new TabSheet();
        tabs.setHeight("350px");
        tabs.setWidth("100%");
        tabs.setVisible(!factories.isEmpty());

        Map<String, Object> context = new HashMap<String, Object>();
        context.put("object", object);
        populateContext(context);

        for (UIExtensionFactory factory : factories) {
            try {
                tabs.addTab(factory.create(context));
            }
            catch (Throwable ex) {
                // We ignore extension factories that throw exceptions
                // TODO: log this or something
                ex.printStackTrace();
View Full Code Here

TOP

Related Classes of com.vaadin.ui.TabSheet$SelectedTabChangeEvent

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.