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.blackducksoftware.tools.commonframework.core.gwt.ui.StandardLoginScreen.java

License:Open Source License

/**
 * Builds the error label./* w  w  w .j  av  a  2 s  .  c o m*/
 *
 * @return the label
 */
private Label buildErrorLabel() {
    Label errorLabel = new Label();
    errorLabel.setStyleName("error-Label");
    errorLabel.setVisible(false);
    errorLabel.setSize("459px", "64px");
    return errorLabel;
}

From source file:com.blackducksoftware.tools.commonframework.core.gwt.ui.StandardLoginScreen.java

License:Open Source License

/**
 * Builds the title label.//w w w .  ja va  2 s .  c o  m
 *
 * @param title
 *            the title
 * @return the label
 */
private Label buildTitleLabel(String title) {
    Label titleLabel = new Label();
    titleLabel.setStyleName("appTitle");
    titleLabel.setVisible(true);
    titleLabel.setSize("459px", "64px");
    titleLabel.setText(title);
    return titleLabel;
}

From source file:com.bradrydzewski.gwt.calendar.client.monthview.AppointmentWidget.java

License:Open Source License

/**
 * Creates an <code>AppointmentWidget</code> with a reference to the provided
 * <code>appointment</code>.
 *
 * @param appointment The appointment to be displayed through this panel
 *                    widget/*from  w  w w.  j av  a2 s .  com*/
 */
public AppointmentWidget(Appointment appointment) {
    this.appointment = appointment;
    Label titleLabel = new Label();
    titleLabel.getElement().setInnerHTML(this.appointment.getTitle());
    this.add(titleLabel);
}

From source file:com.brainz.wokhei.client.about.AboutModulePart.java

/**
 * @param i/*ww  w . j av a2 s  . c om*/
 * @return
 */
private Widget getWhiteSpace(int i) {
    Label whiteSpace = new Label();
    whiteSpace.setWidth(i + "px");
    whiteSpace.setHeight(i + "px");
    return whiteSpace;
}

From source file:com.brainz.wokhei.client.about.AboutModulePart.java

private Label addMenuItem(Panel menu, final String title, final Panel panel, final String token) {
    Label menuItem = new Label();
    menuItem.setStyleName("labelButton");
    menuItem.addStyleName("menuItem");

    menuItem.setText(title);//from   w  ww .  j av  a 2s.  co  m
    menuItem.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
            _title.setText(title);
            hideAllPanels();
            panel.setVisible(true);
            _text.setVisible(false);
            History.newItem(token, false);
            applyCufon();
        }
    });

    menu.add(menuItem);

    return menuItem;

}

From source file:com.brainz.wokhei.client.about.AboutModulePart.java

/**
 * @return/*from w  w w.j a  v  a  2 s .  c  o m*/
 */
private Label addMenuItem(Panel menu, final String title, final String text, final String token) {
    Label menuItem = new Label();
    menuItem.setStyleName("labelButton");
    menuItem.addStyleName("menuItem");

    menuItem.setText(title);
    menuItem.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
            _title.setText(title);
            _text.setHTML(text);
            hideAllPanels();
            _text.setVisible(true);
            History.newItem(token, false);
            applyCufon();
        }
    });

    menu.add(menuItem);

    return menuItem;
}

From source file:com.brainz.wokhei.client.home.OrderBrowserModulePart.java

/**
 * @param i/*from www . j  ava 2  s .  c  o  m*/
 * @return
 */
private Widget getNewWhiteSpace(Integer i) {
    Label whiteSpace = new Label();
    whiteSpace.setWidth(i.toString() + "px");
    return whiteSpace;
}

From source file:com.brainz.wokhei.client.home.OrderBrowserModulePart.java

private void setupDescriptionsPanel() {
    //0. clear descPanel
    _orderDescriptionsPanel.clear();//from   ww  w. ja  v a  2s. com
    _descriptionsArrowsPanel.clear();

    // 1. create label to hold description
    _descriptionLabel = new Label();
    _descriptionLabel.setStyleName("logoTagsDateLabel");

    //set text to latest description
    //size dovrebbe essere -1 perche parte da zero e +1 perche oltre alla revisione c' una descrizione dell'ordine originale
    //quindi alla fine ne -1 ne +1
    final int size = _currentOrder.getRevisionCounter();
    _descriptionLabel.setText(Arrays.asList(_currentOrder.getDescriptions()).get(size));

    //set index
    _currentDescIndex = size;

    // 2. create up arrow and down arrow to show prev/next description and set arrows visibility
    //instatiate buttons
    _upArrow = new Label();
    _upArrow.addStyleName("descUp");
    _upArrow.addStyleName("labelButton");

    _downArrow = new Label();
    _downArrow.setStyleName("descDown");
    _downArrow.addStyleName("labelButton");

    _upArrow.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
            _descriptionLabel.setText(Arrays.asList(_currentOrder.getDescriptions()).get(++_currentDescIndex));
            setUpDownArrowsVisibility(size);
        }
    });

    _downArrow.addClickHandler(new ClickHandler() {

        public void onClick(ClickEvent event) {
            _descriptionLabel.setText(Arrays.asList(_currentOrder.getDescriptions()).get(--_currentDescIndex));
            setUpDownArrowsVisibility(size);
        }
    });

    // 3. fill-up the panel with the stuff
    _orderDescriptionsPanel.setWidth("150px");
    _orderDescriptionsPanel.add(_descriptionLabel);
    _descriptionsArrowsPanel.add(_upArrow);
    _descriptionsArrowsPanel.add(_downArrow);

    // 4. set arrows visibility
    setUpDownArrowsVisibility(size);
}

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

License:Apache License

/**
 * Constructs <code>CSSSeekBar</code> of the specified height.
 *
 * @param height the height of the seek bar in pixels
 *//* w  w  w.j  a  v  a  2  s  .c o  m*/
public CSSSeekBar(int height) {
    super(height);
    playing = new Label();
    playing.setHeight(height + "px");
    playing.addMouseUpHandler(this);

    loading = new Label();
    loading.setHeight(height + "px");
    loading.addMouseUpHandler(this);

    playing.setStyleName("playing");
    loading.setStyleName("loading");

    initSeekBar(loading, playing);
    setStylePrimaryName("player-CSSSeekBar");
}

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

License:Apache License

private void initVolumeControl(int sliderHeight) {
    addDomHandler(new ClickHandler() {

        @Override//from  w  w w.  ja v a  2s  .  c o  m
        public void onClick(ClickEvent event) {
            showVolumeSlider();
        }
    }, ClickEvent.getType());

    volume = new Label();
    volume.addMouseUpHandler(this);
    volume.setStyleName("volume");

    track = new Label();
    track.addMouseUpHandler(this);
    track.setStyleName("track");

    seekTrack = new AbsolutePanel();

    volumePanel = new PopupPanel(true);
    volumePanel.setStyleName("");
    volumePanel.setWidget(seekTrack);
    volumePanel.setStylePrimaryName("player-VolumeControl");

    String sizze = String.valueOf(sliderHeight) + "px";
    seekTrack.setSize("50px", sizze);
    track.setSize("50px", sizze);
    volume.setHeight(sizze);
    volumePanel.setWidth("50px");

    seekTrack.add(track, 0, 0);
    seekTrack.add(volume, 0, 0);

    setVolume(0);
}