Example usage for com.google.gwt.user.client.ui Label Label

List of usage examples for com.google.gwt.user.client.ui Label Label

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui Label Label.

Prototype

public Label() 

Source Link

Document

Creates an empty label.

Usage

From source file:com.bramosystems.oss.player.core.client.skin.VolumeControl.java

License:Apache License

/**
 * Constructs <code>VolumeControl</code>.  This constructor is provided for complete CSS styling
 * support.  An horizontal slider of height {@code sliderHeight} is
 * displayed when this control is clicked on.
 *
 * <p>The slider popup panel has a fixed width of 50px.
 *
 * @param sliderHeight the height of the volume slider control.
 * @since 1.2//w w  w  .  ja  va 2  s.c o  m
 */
public VolumeControl(int sliderHeight) {
    super.initWidget(new Label());
    initVolumeControl(sliderHeight);
}

From source file:com.calclab.emite.widgets.client.login.LoginWidget.java

License:Open Source License

public LoginWidget() {
    setStylePrimaryName("emite-LoginWidget");
    this.isConnected = false;
    this.onLogin = new Event2<String, String>("widgets:login:onLogin");
    this.onLogout = new Event0("widgets:login:onLogout");
    this.jid = new TextBox();
    this.password = new PasswordTextBox();
    this.button = new Button("login", new ClickHandler() {
        public void onClick(final ClickEvent event) {
            if (isConnected) {
                onLogout.fire();/* w ww. j  av a 2 s .co  m*/
            } else {
                onLogin.fire(jid.getText(), password.getText());
            }
        }
    });
    this.status = new Label();
    this.error = new Label("errors here!");
    error.addStyleDependentName("error");

    add(error);
    add(jid);
    add(password);
    add(button);
    add(status);
}

From source file:com.calclab.emite.widgets.client.logout.LogoutWidget.java

License:Open Source License

public LogoutWidget() {
    setStylePrimaryName("emite-LogoutWidget");
    this.onLogout = new Event0("widgets:logout:onLogout");
    this.label = new Label();
    this.button = new Button("logout", new ClickHandler() {
        public void onClick(final ClickEvent event) {
            onLogout.fire();//from   www  .j a  v a 2 s.  c  om
        }
    });
    add(label);
    add(button);
}

From source file:com.calclab.emite.widgets.comenta.client.ComentaWidget.java

License:Open Source License

public ComentaWidget() {
    this.onSetProperties = new Event<Map<String, String>>("comenta:onSetProperty");
    this.onMessage = new Event<String>("comenta:onMessage");

    this.status = new Label();
    this.output = new HTML();
    this.scroll = new ScrollPanel(output);
    this.input = new TextArea();
    input.addKeyPressHandler(new KeyPressHandler() {
        public void onKeyPress(final KeyPressEvent event) {
            if (event.getNativeEvent().getKeyCode() == 13) {
                onMessage.fire(input.getText().trim());
                input.setText(null);/*from   w w  w  .ja  v  a2 s  . c  om*/
                input.setCursorPos(1);
                input.setFocus(true);
            }
        }
    });

    initLayout();
}

From source file:com.calclab.emite.widgets.comenta.client.ComentaWidget.java

License:Open Source License

private void initLayout() {
    final int width = 300;
    final int height = 300;
    this.setPixelSize(width, height);
    this.setStylePrimaryName("emite-widgets-Comenta");

    final Label top = new Label();
    add(top, 0, 0);//w w  w.j  a v a  2 s . com
    top.setPixelSize(width, 30);
    top.setStylePrimaryName("top");
    add(status, 10, 10);
    status.setPixelSize(width, 35);

    final Label middle = new Label();
    add(middle, 0, 31);
    middle.setPixelSize(width, height - 85);
    middle.setStylePrimaryName("middle");
    add(scroll, 0, 32);
    scroll.setPixelSize(width, height - 85);

    final Label bottom = new Label();
    add(bottom, 0, height - 51);
    bottom.setPixelSize(width, 51);
    bottom.setStylePrimaryName("bottom");
    add(input, 10, height - 43);
    input.setPixelSize(width - 20, 30);
}

From source file:com.calclab.emite.widgets.habla.client.HablaWidget.java

License:Open Source License

public HablaWidget() {
    this.onSetProperties = new Event<Map<String, String>>("comenta:onSetProperty");
    this.onMessage = new Event<String>("comenta:onMessage");

    this.status = new Label();
    this.output = new HTML();
    this.input = new TextArea();
    input.addKeyPressHandler(new KeyPressHandler() {
        public void onKeyPress(final KeyPressEvent event) {
            if (event.getNativeEvent().getKeyCode() == 13) {
                onMessage.fire(input.getText());
                input.setText("");
                input.setFocus(true);//from  w  w  w . ja  v  a  2  s  .co m
            }
        }
    });

    initLayout();
}

From source file:com.calclab.emite.widgets.habla.client.HablaWidget.java

License:Open Source License

private void initLayout() {
    final int width = 300;
    final int height = 300;
    this.setPixelSize(width, height);
    this.setStylePrimaryName("emite-widgets-Comenta");

    final Label top = new Label();
    add(top, 0, 0);/*from   w w w.  j  a va 2  s. c om*/
    top.setPixelSize(width, 30);
    top.setStylePrimaryName("top");
    add(status, 10, 10);
    status.setPixelSize(width, 35);

    final Label middle = new Label();
    add(middle, 0, 31);
    middle.setPixelSize(width, height - 85);
    middle.setStylePrimaryName("middle");
    add(output, 0, 32);
    output.setPixelSize(100, 100);

    final Label bottom = new Label();
    add(bottom, 0, height - 51);
    bottom.setPixelSize(width, 51);
    bottom.setStylePrimaryName("bottom");
    add(input, 10, height - 43);
    input.setPixelSize(width - 20, 30);
}

From source file:com.calclab.emiteuimodule.client.dialog.MultiChatPanel.java

License:Open Source License

private Toolbar createInputToolBar() {
    final Toolbar inputToolbar = new Toolbar();
    emoticonButton = new ToolbarButton();
    emoticonButton.setIcon("images/smile.gif");
    emoticonButton.setCls("x-btn-icon x-btn-focus");
    emoticonButton.setTooltip(i18n.t("Insert a emoticon"));
    emoticonButton.addListener(new ButtonListenerAdapter() {
        @Override/*from  w  ww  .j av  a 2 s .  c  o m*/
        public void onClick(final Button button, final EventObject e) {
            showEmoticonPalette(e.getXY()[0], e.getXY()[1]);
        }
    });
    emoticonButton.setId(EMOTICON_BUTTON_ID);
    inputToolbar.addButton(emoticonButton);
    inputToolbar.addSeparator();
    bottomChatNotification = new Label();
    inputToolbar.addElement(bottomChatNotification.getElement());
    inputToolbar.addFill();
    bottomInfoMessage = new Label();
    bottomInfoMessage.setStyleName("emite-bottom-message");
    inputToolbar.addElement(bottomInfoMessage.getElement());
    bottomInfoMessage.setVisible(false);
    return inputToolbar;
}

From source file:com.calclab.emiteuimodule.client.dialog.MultiChatPanelInfoTab.java

License:Open Source License

public MultiChatPanelInfoTab(final String title) {
    setAttribute("enableDragDrop", true, true);
    setAttribute("enableDrop", true, true);
    setTitle(title, "info-icon");
    setBorder(true);/*  ww w  .j  av  a2  s.  c  o  m*/
    setHeader(false);
    setClosable(false);
    infoLabel = new Label();
    infoLabel.ensureDebugId(INFO_LABEL_ID);
    add(infoLabel);
    setPaddings(7);
}

From source file:com.cgxlib.xq.client.plugins.widgets.LabelWidgetFactory.java

License:Apache License

public Label create(Element e) {
    Label label = new Label();
    label.setText(e.getInnerText());/* www  . j av  a 2s.  c o  m*/
    WidgetsUtils.replaceOrAppend(e, label);
    return label;
}