Exemplo n.º 1
0
 private HorizontalLayout createPanelLayout(
     final String msg, final AbstractTextField textField, final String textValue) {
   HorizontalLayout msgLayout = new HorizontalLayout();
   msgLayout.setSpacing(true);
   Label msgLabel = new Label(msg);
   msgLabel.setWidth("65px");
   textField.setWidth("150px");
   msgLayout.addComponent(msgLabel);
   msgLayout.addComponent(textField);
   textField.setValue(textValue);
   return msgLayout;
 }
Exemplo n.º 2
0
  public void attachComponent(final AbstractTextField component) {
    focusListeners.put(
        component,
        new FocusListener() {
          @Override
          public void focus(FocusEvent event) {
            focusedTextField = (AbstractTextField) event.getComponent();
            if (isFloatingWindow) {
              if (keyboardWindow == null) keyboardWindow = getWindow();

              if (keyboardWindow.getParent() == null) component.getUI().addWindow(keyboardWindow);
              keyboardWindow.setVisible(true);
            }
          }
        });

    component.addFocusListener(focusListeners.get(component));
  }
Exemplo n.º 3
0
 public void dettachComponent(final AbstractTextField component) {
   if (focusListeners.containsKey(component)) {
     component.removeFocusListener(focusListeners.get(component));
     focusListeners.remove(component);
   }
 }