Examples of NativeButton


Examples of com.vaadin.ui.NativeButton

        button = new Button("Huge");
        button.addStyleName("huge");
        row.addComponent(button);

        NativeButton nbutton = new NativeButton("Native");
        row.addComponent(nbutton);

        h1 = new Label("Links");
        h1.addStyleName("h1");
        addComponent(h1);
View Full Code Here

Examples of com.vaadin.ui.NativeButton

        });

        for (int i = 0; i < 100; i++) {
            Item item = table.addItem("Row " + i);
            item.getItemProperty(COL1).setValue(
                    new NativeButton("Row " + i + " native", this));
        }

        addComponent(table);
        addComponent(log);
View Full Code Here

Examples of com.vaadin.ui.NativeButton

                                settingsMenu.addItem("Test de Inversor", perfil);
                                settingsMenu.addSeparator();
                                settingsMenu.addItem("Mi Cuenta", cmd);
                                addComponent(settings);

                                Button exit = new NativeButton("Exit");
                                exit.addStyleName("icon-cancel");
                                exit.setDescription("Sign Out");
                                addComponent(exit);
                                exit.addClickListener(new ClickListener() {
                                    @Override
                                    public void buttonClick(ClickEvent event) {
                                        buildLoginView(true);
                                    }
                                });
                            }
                        });
                    }
                });
                // Content
                addComponent(content);
                content.setSizeFull();
                content.addStyleName("view-content");
                setExpandRatio(content, 1);
            }

        });

        menu.removeAllComponents();

        for (final String view : new String[] { "dashboard", "Cartera",
                "Especies" }) {
            Button b = new NativeButton(view.substring(0, 1).toUpperCase()
                    + view.substring(1).replace('-', ' '));
            if(view.equals("Cartera")){
              b.addStyleName("icon-transactions");
            }else{
              if(view.equals("Especies"))
                b.addStyleName("icon-sales");
              else{
                 b.addStyleName("icon-" + view);
              }
            }
//            b.addStyleName("icon-" + view);
            b.addClickListener(new ClickListener() {
                /**
         *
         */
        private static final long serialVersionUID = -5785295456511540486L;

View Full Code Here

Examples of de.nordakademie.cerca.button.NativeButton

    mySensorPort.setISensorPort(0, new LightSensorStub());
   
    NativeSensorPort sensorPort = NativeSensorPort.getInstance();
    sensorPort.setBehaviour(mySensorPort);
   
    NativeButton nBtn = NativeButton.getInstance();
    nBtn.setBehaviour(new MyButton());
   
    // calling native LeJOS methods
//    int voltage = Battery.getVoltageMilliVolt();
//    System.out.println("Voltage: " + voltage);
   
View Full Code Here

Examples of de.nordakademie.cerca.button.NativeButton

    return 0;
  }

  @Test
  public void getButtonsTest() {
    NativeButton button = NativeButton.getInstance();
    button.setBehaviour(this);
    // getButtons() can only be called via readButtons() since modifier is
    // private
    assertEquals(0, Button.readButtons());
  }
View Full Code Here

Examples of de.nordakademie.cerca.button.NativeButton

  public static void main(String[] args) throws InterruptedException {
    // implementing customized behaviour
    NativeLCD lcd = NativeLCD.getInstance();
    lcd.setBehaviour(new MyLCD());
   
    NativeButton btn = NativeButton.getInstance();
    MyButton myBtn = new MyButton();
    btn.setBehaviour(myBtn);
   
    myBtn.setButtons(8);
   
    System.out.println("Buttons: " + getBits(myBtn.getButtons()));
   
View Full Code Here

Examples of de.nordakademie.cerca.button.NativeButton

    assertEquals(15, btnStub.getButtons());
  }

  @Test
  public void testButtonStubInCercaContext() {
    NativeButton nativeBtn = NativeButton.getInstance();
    nativeBtn.setBehaviour(btnStub);

    assertEquals(0, Button.readButtons());
    btnStub.pressEscapeButton();
    assertEquals(Button.ID_ESCAPE, Button.readButtons());
  }
View Full Code Here

Examples of de.nordakademie.cerca.button.NativeButton

   */
  public void testWithZPilot() throws InterruptedException{
   
    NativeMotorPort nativeMotorPort = NativeMotorPort.getInstance();
    NativeBattery nativeBattery = NativeBattery.getInstance();
    NativeButton nativeButton = NativeButton.getInstance();
    NativeLCD nativeLcd = NativeLCD.getInstance();
    NativeSensorPort nativeSensor = NativeSensorPort.getInstance();
   
    //Verhalten f�r die Cerca Instanzen setzen
    NativeMotorPortStub motorportStub = new NativeMotorPortStub();
    nativeMotorPort.setBehaviour(motorportStub);   
    NativeBatteryStub batteryStub = new NativeBatteryStub();
    nativeBattery.setBehaviour(batteryStub);   
    NativeButtonStub btnStub = new NativeButtonStub();
    nativeButton.setBehaviour(btnStub);     
    NativeLcdStub lcdStub = new NativeLcdStub();
    nativeLcd.setBehaviour(lcdStub);   
    NativeSensorPortStub sensorPortStub = new NativeSensorPortStub();
    nativeSensor.setBehaviour(sensorPortStub);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.