org.gwtbootstrap3.client.ui.Heading类的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(9.5k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中org.gwtbootstrap3.client.ui.Heading类的一些代码示例,展示了Heading类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Heading类的具体详情如下:
包路径:org.gwtbootstrap3.client.ui.Heading
类名称:Heading

Heading介绍

[英]Represents a Heading tag, has an optional subtext.

Bootstrap's Documentation

Typography

Usage in UiBinder

Usage in Java

Heading h1 = new Heading(1, "Heading Text"); 
h1.setSubText("Subtext Text"); // optional

[中]表示标题标记,具有可选的子文本。
####Bootstrap的文档
Typography
####UiBinder中的用法
####Java中的用法

Heading h1 = new Heading(1, "Heading Text"); 
h1.setSubText("Subtext Text"); // optional

代码示例

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

/**
 * Creates a Heading with the passed in size and text.
 *
 * @param size size of the heading
 * @param text text for the heading
 */
public Heading(final HeadingSize size, final String text) {
  this(size);
  setText(text);
}

代码示例来源:origin: org.uberfire/uberfire-simple-docks-client

private void createTitle(String titleString) {
  title = new Heading(HeadingSize.H3,
            titleString);
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

/**
   * {@inheritDoc}
   */
  @Override
  protected void onAttach() {
    super.onAttach();

    // Adding styles to the heading depending on the parent
    if (getParent() != null) {
      if (getParent() instanceof LinkedGroupItem) {
        addStyleName(Styles.LIST_GROUP_ITEM_HEADING);
      } else if (getParent() instanceof PanelHeader) {
        addStyleName(Styles.PANEL_TITLE);
      } else if (getParent() instanceof MediaBody) {
        addStyleName(Styles.MEDIA_HEADING);
      }
    }
  }
}

代码示例来源:origin: org.uberfire/uberfire-widgets-security-management

@Override
public UserEditor.View setUsername(final String username) {
  userTitle.setText(username);
  userTitle.setTitle(username);
  return this;
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

@Override
public void setTitle(final String title) {
  heading.setText(title);
  if (heading.getParent() == null) {
    add(heading);
  }
}

代码示例来源:origin: org.uberfire/uberfire-widgets-security-management

final Heading heading = new Heading(titleSize);
heading.setText(title);
heading.addStyleName(style.entityListTitle());
groupPanel.add(heading);

代码示例来源:origin: kiegroup/appformer

private void createLink(final SocialUser follower,
            final ParameterizedCommand<String> command) {
  username.setText(follower.getName());
  if (command != null) {
    username.addDomHandler(new ClickHandler() {
                  @Override
                  public void onClick(ClickEvent event) {
                    command.execute(follower.getUserName());
                  }
                },
                ClickEvent.getType());
    username.addDomHandler(new MouseOverHandler() {
                  @Override
                  public void onMouseOver(MouseOverEvent event) {
                    username.getElement().getStyle().setCursor(Style.Cursor.POINTER);
                  }
                },
                MouseOverEvent.getType());
  }
}

代码示例来源:origin: org.drools/drools-wb-workitems-editor-client

public WorkItemDefinitionElementsBrowser() {
  final Heading label = new Heading( HeadingSize.H4, WorkItemsEditorConstants.INSTANCE.BrowserTitle() );
  label.getElement().getStyle().setTextAlign( Style.TextAlign.CENTER );
  label.addStyleName( ColumnSize.MD_12.getCssName() );
  container.add( new Row() {{
    add( label );
  }} );
  container.add( new Row() {{
    add( elements );
  }} );
  //Images
  container.add( new Row() {{
    add( imagesList );
  }} );
  imagesList.setVisibleItemCount( 1 );
  imagesList.setSelectedIndex( 0 );
  imagesList.addChangeHandler( new ChangeHandler() {
    public void onChange( ChangeEvent event ) {
      elementSelected( imagesList.getItemText( imagesList.getSelectedIndex() ),
               imagesList.getValue( imagesList.getSelectedIndex() ) );
    }
  } );
  initWidget( container );
}

代码示例来源:origin: org.jbpm/jbpm-console-ng-generic-client

public CalendarPicker() {
  currentDate = new Date();
  viewType = ViewType.DAY;
  calendarPanel.addStyleName( ColumnSize.MD_2.getCssName() );
  calendarPanel.addStyleName( ColumnOffset.MD_1.getCssName() );
  calendarLabel = new Heading( HeadingSize.H4 );
  iconLabel = new Heading( HeadingSize.H4 );
  iconLabel.addStyleName( ColumnSize.MD_2.getCssName() );
  iconPanel.add( iconLabel );
  controlsLabel = new Heading( HeadingSize.H4 );
  controlsPanel.add( controlsLabel );
  calendarIcon = new Anchor();
  previousButton = new Button();
  nextButton = new Button();
  todayButton = new Button();
  initWidget( mainPanel );
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3-extras

private void setupRootGallery() {
  galleryRoot = new Div();
  galleryRoot.getElement().setId("blueimp-gallery");
  galleryRoot.getElement().setClassName("blueimp-gallery");
  galleryRoot.getElement().setAttribute("data-use-bootstrap-modal", "false");
  Div slides = new Div();
  slides.getElement().setClassName("slides");
  galleryRoot.add(slides);
  title = new Heading(HeadingSize.H3);
  title.getElement().setClassName("title");
  galleryRoot.add(title);
  prev = new Anchor("");
  prev.getElement().setClassName("prev");
  prev.setIcon(IconType.CARET_LEFT);
  galleryRoot.add(prev);
  next = new Anchor("");
  next.getElement().setClassName("next");
  next.setIcon(IconType.CARET_RIGHT);
  galleryRoot.add(next);
  close = new Anchor("");
  close.getElement().setClassName("close");
  close.setIcon(IconType.CLOSE);
  galleryRoot.add(close);
  indicator = new OrderedList();
  indicator.getElement().setClassName("indicator");
  galleryRoot.add(indicator);
}

代码示例来源:origin: kiegroup/appformer

static PanelHeader createPanelHeader(final PropertyEditorCategory category,
                   final PanelGroup propertyMenu,
                   PanelCollapse panelCollapse) {
  final Heading heading = new Heading(HeadingSize.H4);
  final Anchor anchor = GWT.create(Anchor.class);
  anchor.setText(category.getName());
  anchor.setDataToggle(Toggle.COLLAPSE);
  anchor.setDataParent(propertyMenu.getId());
  anchor.setDataTargetWidget(panelCollapse);
  anchor.addStyleName("collapsed");
  heading.add(anchor);
  final PanelHeader header = GWT.create(PanelHeader.class);
  header.add(heading);
  return header;
}

代码示例来源:origin: org.uberfire/uberfire-social-activities-client

@Override
  public void onMouseOver(MouseOverEvent event) {
    username.getElement().getStyle().setCursor(Style.Cursor.POINTER);
  }
},

代码示例来源:origin: org.uberfire/uberfire-simple-docks-client

private void setupCSS() {
  if (position == UberfireDockPosition.SOUTH) {
    titlePanel.addStyleName(CSS.CSS().dockExpandedContentPanelSouth());
    title.addStyleName(CSS.CSS().dockExpandedLabelSouth());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonSouth());
    collapse.setIcon(IconType.CHEVRON_DOWN);
  } else if (position == UberfireDockPosition.WEST) {
    title.addStyleName(CSS.CSS().dockExpandedLabelWest());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonWest());
    collapse.setIcon(IconType.CHEVRON_LEFT);
  } else if (position == UberfireDockPosition.EAST) {
    title.addStyleName(CSS.CSS().dockExpandedLabelEast());
    collapse.addStyleName(CSS.CSS().dockExpandedButtonEast());
    collapse.setIcon(IconType.CHEVRON_RIGHT);
  }
  setupDockContentSize();
}

代码示例来源:origin: gwtbootstrap3/gwtbootstrap3

/**
 * Sets the subtext for the heading (wrapped in a Small tag).
 * <p/>
 * When using the setter for this, the subtext will be added after the text
 *
 * @param subText the subtext of the heading
 */
@Override
public void setSubText(final String subText) {
  // Force a space between the heading and the subText
  this.subText.setText(" " + subText);
  add(this.subText);
}

代码示例来源:origin: kiegroup/appformer

@Override
public UserEditor.View setUsername(final String username) {
  userTitle.setText(username);
  userTitle.setTitle(username);
  return this;
}

代码示例来源:origin: kiegroup/appformer

final Heading heading = new Heading(titleSize);
heading.setText(title);
heading.addStyleName(style.entityListTitle());
groupPanel.add(heading);

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3

@Override
public void setTitle(final String title) {
  heading.setText(title);
  if (heading.getParent() == null) {
    add(heading);
  }
}

代码示例来源:origin: org.uberfire/uberfire-social-activities-client

private void createLink(final SocialUser follower,
            final ParameterizedCommand<String> command) {
  username.setText(follower.getName());
  if (command != null) {
    username.addDomHandler(new ClickHandler() {
                  @Override
                  public void onClick(ClickEvent event) {
                    command.execute(follower.getUserName());
                  }
                },
                ClickEvent.getType());
    username.addDomHandler(new MouseOverHandler() {
                  @Override
                  public void onMouseOver(MouseOverEvent event) {
                    username.getElement().getStyle().setCursor(Style.Cursor.POINTER);
                  }
                },
                MouseOverEvent.getType());
  }
}

代码示例来源:origin: kiegroup/drools-wb

public WorkItemDefinitionElementsBrowser() {
  final Heading label = new Heading( HeadingSize.H4, WorkItemsEditorConstants.INSTANCE.BrowserTitle() );
  label.getElement().getStyle().setTextAlign( Style.TextAlign.CENTER );
  label.addStyleName( ColumnSize.MD_12.getCssName() );
  container.add( new Row() {{
    add( label );
  }} );
  container.add( new Row() {{
    add( elements );
  }} );
  //Images
  container.add( new Row() {{
    add( imagesList );
  }} );
  imagesList.setVisibleItemCount( 1 );
  imagesList.setSelectedIndex( 0 );
  imagesList.addChangeHandler( new ChangeHandler() {
    public void onChange( ChangeEvent event ) {
      elementSelected( imagesList.getItemText( imagesList.getSelectedIndex() ),
               imagesList.getValue( imagesList.getSelectedIndex() ) );
    }
  } );
  initWidget( container );
}

代码示例来源:origin: org.gwtbootstrap3/gwtbootstrap3-extras

private void setupRootGallery() {
  galleryRoot = new Div();
  galleryRoot.getElement().setId("blueimp-gallery");
  galleryRoot.getElement().setClassName("blueimp-gallery");
  galleryRoot.getElement().setAttribute("data-use-bootstrap-modal", "false");
  Div slides = new Div();
  slides.getElement().setClassName("slides");
  galleryRoot.add(slides);
  title = new Heading(HeadingSize.H3);
  title.getElement().setClassName("title");
  galleryRoot.add(title);
  prev = new Anchor("");
  prev.getElement().setClassName("prev");
  prev.setIcon(IconType.CARET_LEFT);
  galleryRoot.add(prev);
  next = new Anchor("");
  next.getElement().setClassName("next");
  next.setIcon(IconType.CARET_RIGHT);
  galleryRoot.add(next);
  close = new Anchor("");
  close.getElement().setClassName("close");
  close.setIcon(IconType.CLOSE);
  galleryRoot.add(close);
  indicator = new OrderedList();
  indicator.getElement().setClassName("indicator");
  galleryRoot.add(indicator);
}

相关文章