Package com.vaadin.ui

Examples of com.vaadin.ui.AbsoluteLayout$ComponentPosition


        return null;
    }

    @Override
    protected void setup() {
        AbsoluteLayout layout = new AbsoluteLayout();
        setTheme("tests-tickets");
        layout.setStyleName("cyan");
        layout.setWidth("1000px");
        layout.setHeight("500px");

        layout.addComponent(new Label("Hello World"));

        Button button = new Button("Centered button,z-index:10;");
        button.setSizeFull();
        layout.addComponent(button,
                "top:40%;bottom:40%;right:20%;left:20%;z-index:10;");

        Label label = new Label(
                "Exotic positioned label. Fullsize, top:100px; left:2cm; right: 3.5in; bottom:12.12mm ");
        label.setStyleName("yellow");
        label.setSizeFull();
        layout.addComponent(label,
                "top:100px; left:2cm; right: 3.5in; bottom:12.12mm");

        label = new Label("fullize, bottom:80%;left:80%;");
        label.setStyleName("green");
        label.setSizeFull();
        layout.addComponent(label, "bottom:80%;left:80%;");

        label = new Label("bottomright");
        label.setSizeUndefined();
        label.setStyleName("green");
        layout.addComponent(label, "bottom:0px; right:0px;");

        getLayout().setSizeFull();
        getLayout().addComponent(layout);

        getMainWindow().addWindow(new EditorWindow(layout));
View Full Code Here


        });
        addComponent(required);
        addComponent(createWrappedTextField(new GridLayout(2, 1)));
        addComponent(createWrappedTextField(new VerticalLayout()));
        addComponent(createWrappedTextField(new HorizontalLayout()));
        AbsoluteLayout al = new AbsoluteLayout();
        al.setWidth("400px");
        al.setHeight("100px");
        addComponent(createWrappedTextField(al));
        addComponent(createWrappedTextField(new CssLayout()));
    }
View Full Code Here

        assertEquals("caption-tab2", layout.getTab(1).getCaption());
    }

    @Test
    public void inflate_absoluteLayout() {
        AbsoluteLayout layout = (AbsoluteLayout) inflater
                .inflate(getXml("absolutelayout.xml"));

        Button button = (Button) layout.getComponentIterator().next();

        // check position attributes
        assertEquals(20, layout.getPosition(button).getTopValue(), 0);
        assertEquals(10, layout.getPosition(button).getLeftValue(), 0);
        assertEquals(Unit.PIXELS, layout.getPosition(button).getTopUnits());
        assertEquals(Unit.PERCENTAGE, layout.getPosition(button).getLeftUnits());
    }
View Full Code Here

    @Override
    public Object getValueAs(String value, Class<?> valueType,
            Component component) {
        if (component.getParent() instanceof AbsoluteLayout) {
            AbsoluteLayout outerInstance = (AbsoluteLayout) component
                    .getParent();
            try {
                // ComponentPosition is an inner class that requires
                // an instance of the outer class as a parameter.
                ComponentPosition position = ((ComponentPosition) valueType
View Full Code Here

        return c;
    }

    /** Create new AbsoluteLayout and add it to current component container. */
    public AbsoluteLayout absolutelayout() {
        AbsoluteLayout c = new AbsoluteLayout();
        c.setImmediate(true);
        add(c);
        return c;
    }
View Full Code Here

    /**
     * Create new AbsoluteLayout with given caption and add it to current
     * component container.
     */
    public AbsoluteLayout absolutelayout(String caption) {
        AbsoluteLayout c = absolutelayout();
        c.setCaption(caption);
        return c;
    }
View Full Code Here

        }

        @AutoGenerated
        private AbsoluteLayout buildMainLayout() {
            // common part: create layout
            mainLayout = new AbsoluteLayout();
            mainLayout.setImmediate(false);
            mainLayout.setWidth("100%");
            mainLayout.setHeight("100%");

            // top-level component properties
View Full Code Here

  ComboBox musteriIlce;
   Object firmaIlId;
  Object firmaIlceId;
 
  public NewMusteriUi() {
    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");
View Full Code Here

public class NewUrunUi extends VerticalLayout{
  private  final String [] birimler = new String[4];
 
  public NewUrunUi() {

    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");
View Full Code Here

    Button okButton = new Button("Tahsilat Planı Oluştur");

    odemeWindow.setModal(true);
    odemeWindow.setWidth("360px");
    odemeWindow.setHeight("400px");
    final AbsoluteLayout layout = new AbsoluteLayout();
    layout.setWidth("360px");
    layout.setHeight("310px");
    final TextField toplamTutar = new TextField("Toplam Tutar", "0.0");
    final ComboBox birimBox = new ComboBox();
    birimBox.addItem("TL");
    birimBox.addItem("DOLAR");
    birimBox.addItem("EURO");
    birimBox.addItem("GB");
    birimBox.setNullSelectionAllowed(false);
    birimBox.setImmediate(false);
    birimBox.setValue("TL");
   
    vadeField = new TextField("Vade Sayısı","0");
    faizField = new TextField("Faiz Oranı","0");
    final PopupDateField datetime = new PopupDateField("İlk Ödeme Tarihi");
    datetime.setValue(new java.util.Date());
    datetime.setResolution(PopupDateField.RESOLUTION_DAY);
    datetime.setImmediate(true);
    final ComboBox odemeTuruBox = new ComboBox("Ödeme Türü");
    odemeTuruBox.setImmediate(true);
    odemeTuruBox.setNullSelectionAllowed(false);
    odemeTuruBox.addItem("Açık Hesap");
    odemeTuruBox.addItem("Nakit");
    odemeTuruBox.addItem("Banka Havalesi");
    odemeTuruBox.addItem("Kredi Kartı");
    odemeTuruBox.addItem("Çek");
    odemeTuruBox.addItem("Senet");
    odemeTuruBox.addItem("Diğer");
    odemeTuruBox.setValue("Açık Hesap");
   
    Button vazgecButton = new Button("Vazgeç");
    birimBox.setWidth("75px");
    layout.addComponent(toplamTutar, "left:10px; top:20px");
    layout.addComponent(birimBox, "left:210px; top:20px");
    layout.addComponent(vadeField, "left:10px; top:70px");
    layout.addComponent(faizField, "left:10px; top:120px");
    layout.addComponent(datetime, "left:10px; top:170px");
    layout.addComponent(odemeTuruBox, "left:10px; top:220px");
    layout.addComponent(okButton, "left:10px; top:270px");
    layout.addComponent(vazgecButton, "left:210px; top:270px");
   
    vazgecButton.addListener(new ClickListener() {
     
      public void buttonClick(ClickEvent event) {
        app.removeWindows(odemeWindow)
View Full Code Here

TOP

Related Classes of com.vaadin.ui.AbsoluteLayout$ComponentPosition

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.