Example usage for com.vaadin.ui HorizontalLayout HorizontalLayout

List of usage examples for com.vaadin.ui HorizontalLayout HorizontalLayout

Introduction

In this page you can find the example usage for com.vaadin.ui HorizontalLayout HorizontalLayout.

Prototype

public HorizontalLayout() 

Source Link

Document

Constructs an empty HorizontalLayout.

Usage

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getLogInButton(int i) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    com.vaadin.ui.Button button = new com.vaadin.ui.Button();
    button.setCaption("Get API Key");

    button.addClickListener(new ClickListener() {

        private static final long serialVersionUID = -1417363407758383092L;

        @Override/* w  w w  .j  ava 2 s .  co  m*/
        public void buttonClick(ClickEvent event) {
            LogInWindow sub = LogInWindow.getInstanz();

            if (!UI.getCurrent().getWindows().contains(sub))

                // Add it to the root component
                UI.getCurrent().addWindow(sub);
        }
    });

    box.addComponent(button);

    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getAudioView(SettingsAudio sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    com.vaadin.ui.Label label = new com.vaadin.ui.Label();
    label.setCaption(sB.getName());/*  w w  w. ja v  a2 s  .  c  o  m*/
    box.addComponent(label);

    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getStringView(final SettingString sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    box.setWidth(100, Unit.PERCENTAGE);// w  w w.ja v a  2 s.co m
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override
        public void textChange(TextChangeEvent event) {
            sB.setValue(event.getText());
        }
    });

    box.addComponent(input);
    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getEncryptedStringView(final SettingEncryptedString sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    box.setWidth(100, Unit.PERCENTAGE);//from   w ww.  ja v a  2  s .  co  m
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getEncryptedValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override
        public void textChange(TextChangeEvent event) {
            sB.setEncryptedValue(event.getText());
        }
    });

    box.addComponent(input);
    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getEnumView(SettingEnum<?> sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    com.vaadin.ui.Label label = new com.vaadin.ui.Label();
    label.setCaption(sB.getName());/*from  w  w w  .j a v  a  2s. c  om*/
    box.addComponent(label);

    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getFileView(final SettingFile sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    box.setWidth(100, Unit.PERCENTAGE);/*from  w  w  w. j a v a 2 s.  c o m*/
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override
        public void textChange(TextChangeEvent event) {
            sB.setValue(event.getText());
        }
    });

    box.addComponent(input);

    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getFolderView(final SettingFolder sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    box.setWidth(100, Unit.PERCENTAGE);/* w w  w . j av a  2 s.  com*/
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override
        public void textChange(TextChangeEvent event) {
            sB.setValue(event.getText());
        }
    });

    box.addComponent(input);
    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getFloatView(final SettingFloat sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override/*from   w  ww .  j ava 2 s.c  om*/
        public void textChange(TextChangeEvent event) {
            sB.setValue(Float.parseFloat(event.getText()));
        }
    });

    box.addComponent(input);
    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getDblView(final SettingDouble sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override// ww  w.  ja v  a 2 s.co m
        public void textChange(TextChangeEvent event) {
            sB.setValue(Double.parseDouble(event.getText()));
        }
    });

    box.addComponent(input);
    return box;
}

From source file:cb_server.SettingsWindow.java

License:Open Source License

private Component getIntView(final SettingInt sB, int backgroundChanger) {
    com.vaadin.ui.HorizontalLayout box = new HorizontalLayout();
    com.vaadin.ui.TextField input = new TextField(sB.getName(), String.valueOf(sB.getValue()));
    input.setWidth(50, Unit.PERCENTAGE);
    input.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = -634498493292006581L;

        @Override/*from w  w w.j  a v a2 s. co m*/
        public void textChange(TextChangeEvent event) {

            int newValue = Integer.parseInt(event.getText());
            sB.setValue(newValue);
        }
    });

    box.addComponent(input);
    return box;
}