com.google.gwt.dom.client.Style.setFontWeight()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(65)

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

Style.setFontWeight介绍

[英]Sets the font-weight CSS property.
[中]设置字体权重CSS属性。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

@Override
public StylesBuilder fontWeight(FontWeight value) {
 delegate.assertCanAddStyleProperty().setFontWeight(value);
 return this;
}

代码示例来源:origin: kaaproject/kaa

scope.getElement().getStyle().setFontWeight(FontWeight.NORMAL);
int horizontalMargin = 15;
scope.getElement().getStyle().setMarginLeft(horizontalMargin, Unit.PX);
versionLabel.addStyleName(Utils.kaaAdminStyle.bAppContentTitle());
versionLabel.getElement().getStyle().setFontSize(16, Unit.PX);
versionLabel.getElement().getStyle().setFontWeight(FontWeight.NORMAL);
version = new IntegerListBox();
version.getElement().getStyle().setPadding(5, Unit.PX);

代码示例来源:origin: org.jboss.errai/errai-bus

titleBarLabel.getElement().getStyle().setFontWeight(Style.FontWeight.BOLDER);
titleBarLabel.getElement().getStyle().setColor("white");

代码示例来源:origin: org.kie.uberfire/kie-uberfire-widgets-core-client

/**
 * Is the page the currently displayed page. Note WizardPageTitles are
 * unaware of other WizardPageTitles and hence a mediator class needs to
 * control the setting of the "current page" and de-selecting other previous
 * "current pages".
 * @param isSelected
 */
public void setPageSelected( final boolean isSelected ) {
  lblTitle.getElement().getStyle().setFontWeight( isSelected ? FontWeight.BOLD : FontWeight.NORMAL );
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

@Override
public StylesBuilder fontWeight(FontWeight value) {
 delegate.assertCanAddStyleProperty().setFontWeight(value);
 return this;
}

代码示例来源:origin: net.wetheinter/gwt-user

@Override
public StylesBuilder fontWeight(FontWeight value) {
 delegate.assertCanAddStyleProperty().setFontWeight(value);
 return this;
}

代码示例来源:origin: GwtMaterialDesign/gwt-material

@Override
public void setFontWeight(FontWeight fontWeight) {
  getElement().getStyle().setFontWeight(fontWeight);
}

代码示例来源:origin: com.github.gwtmaterialdesign/gwt-material

@Override
public void setFontWeight(FontWeight fontWeight) {
  getElement().getStyle().setFontWeight(fontWeight);
}

代码示例来源:origin: stephenh/tessell

@Override
public void setFontWeight(final FontWeight value) {
 element.getStyle().setFontWeight(value);
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

private void doDeselect() {
  if (!selected) {
    panel.getElement().getStyle().setBorderColor("#000000");
    heading.getElement().getStyle().setFontWeight(Style.FontWeight.NORMAL);
  }
}

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

private void doSelect() {
  panel.getElement().getStyle().setBorderColor("#0000FF");
  heading.getElement().getStyle().setFontWeight(Style.FontWeight.BOLD);
}

代码示例来源:origin: fr.lteconsulting/hexa.core

private void ensureCurPar()
  {
    if( currentParagraph == null )
    {
      currentParagraph = DOM.createSpan();
      div.appendChild( currentParagraph );

      for( Entry<String, String> e : curSet.entrySet() )
      {
        if( e.getKey().equals( "color" ) )
          currentParagraph.getStyle().setColor( e.getValue() );
        else if( e.getKey().equals( "weight" ) )
          currentParagraph.getStyle().setFontWeight( FontWeight.valueOf( e.getValue() ) );
        else
          currentParagraph.getStyle().setProperty( e.getKey(), e.getValue() );
      }
    }
  }
}

代码示例来源:origin: ltearno/hexa.tools

private void ensureCurPar()
  {
    if( currentParagraph == null )
    {
      currentParagraph = DOM.createSpan();
      div.appendChild( currentParagraph );

      for( Entry<String, String> e : curSet.entrySet() )
      {
        if( e.getKey().equals( "color" ) )
          currentParagraph.getStyle().setColor( e.getValue() );
        else if( e.getKey().equals( "weight" ) )
          currentParagraph.getStyle().setFontWeight( FontWeight.valueOf( e.getValue() ) );
        else
          currentParagraph.getStyle().setProperty( e.getKey(), e.getValue() );
      }
    }
  }
}

代码示例来源:origin: fr.lteconsulting/hexa.core

public Object addGroup( String display, String name, Object parent )
{
  int row = display != null ? table.getRowCount() : -1;
  // create the new group
  GroupInfo parentInfo = (GroupInfo) parent;
  GroupInfo info = new GroupInfo( name, parentInfo, row );
  // display the new group
  if( display != null && row >= 0 )
  {
    table.setHTML( row, 0, display );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
    table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD );
  }
  return info;
}

代码示例来源:origin: ltearno/hexa.tools

public Object addGroup( String display, String name, Object parent )
{
  int row = display != null ? table.getRowCount() : -1;
  // create the new group
  GroupInfo parentInfo = (GroupInfo) parent;
  GroupInfo info = new GroupInfo( name, parentInfo, row );
  // display the new group
  if( display != null && row >= 0 )
  {
    table.setHTML( row, 0, display );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
    table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX );
    table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD );
  }
  return info;
}

代码示例来源:origin: ltearno/hexa.tools

public Object addField( String display, String name, FieldType fieldType, Widget fieldWidget, Object parent )
{
  int row = table.getRowCount();
  // create the new field
  GroupInfo parentInfo = (GroupInfo) parent;
  FieldInfo info = new FieldInfo( name, parentInfo, row, fieldType, fieldWidget );
  // Display the new field
  if( display != null )
  {
    HTMLStream stream = new HTMLStream();
    stream.addRight( new HTML( display ) );
    stream.clFl();
    table.setWidget( row, 0, stream );
  }
  table.setWidget( row, 1, info.widget );
  table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
  table.getCellFormatter().getElement( row, 1 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
  table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD );
  return info;
}

代码示例来源:origin: fr.lteconsulting/hexa.core

public Object addField( String display, String name, FieldType fieldType, Widget fieldWidget, Object parent )
{
  int row = table.getRowCount();
  // create the new field
  GroupInfo parentInfo = (GroupInfo) parent;
  FieldInfo info = new FieldInfo( name, parentInfo, row, fieldType, fieldWidget );
  // Display the new field
  if( display != null )
  {
    HTMLStream stream = new HTMLStream();
    stream.addRight( new HTML( display ) );
    stream.clFl();
    table.setWidget( row, 0, stream );
  }
  table.setWidget( row, 1, info.widget );
  table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
  table.getCellFormatter().getElement( row, 1 ).getStyle().setVerticalAlign( VerticalAlign.TOP );
  table.getCellFormatter().getElement( row, 0 ).getStyle().setFontWeight( FontWeight.BOLD );
  return info;
}

代码示例来源:origin: fr.lteconsulting/hexa.core

void applyStyle( Element element )
{
  element.getStyle().setPadding( 5, Unit.PX );
  element.getStyle().setBorderColor( "black" );
  element.getStyle().setBorderStyle( BorderStyle.SOLID );
  element.getStyle().setBorderWidth( 1, Unit.PX );
  element.getStyle().setProperty( "fontFamily", "Arial Unicode MS,Arial,sans-serif" );
  element.getStyle().setFontSize( 12, Unit.PT );
  element.getStyle().setFontStyle( FontStyle.NORMAL );
  element.getStyle().setFontWeight( FontWeight.NORMAL );
}

代码示例来源:origin: ltearno/hexa.tools

void applyStyle( Element element )
{
  element.getStyle().setPadding( 5, Unit.PX );
  element.getStyle().setBorderColor( "black" );
  element.getStyle().setBorderStyle( BorderStyle.SOLID );
  element.getStyle().setBorderWidth( 1, Unit.PX );
  element.getStyle().setProperty( "fontFamily", "Arial Unicode MS,Arial,sans-serif" );
  element.getStyle().setFontSize( 12, Unit.PT );
  element.getStyle().setFontStyle( FontStyle.NORMAL );
  element.getStyle().setFontWeight( FontWeight.NORMAL );
}

代码示例来源:origin: org.jbpm/jbpm-gwt-form-api

public FieldSetPanel() {
  super();
  Style divStyle = getElement().getStyle();
  Style lgndStyle = legend.getStyle();
  divStyle.setBorderWidth(2, Unit.PX);
  divStyle.setBorderStyle(BorderStyle.SOLID);
  divStyle.setMarginTop(0.5, Unit.EM);
  divStyle.setMarginBottom(0.5, Unit.EM);
  divStyle.setMarginRight(0, Unit.PX);
  divStyle.setMarginLeft(0, Unit.PX);
  divStyle.setPaddingTop(0, Unit.PX);
  divStyle.setPaddingBottom(0, Unit.PX);
  divStyle.setPaddingRight(0.5, Unit.EM);
  divStyle.setPaddingLeft(0.5, Unit.EM);
  lgndStyle.setFontSize(100.0, Unit.PCT);
  lgndStyle.setFontWeight(FontWeight.NORMAL);
  lgndStyle.setMarginTop(-0.5, Unit.EM);
  lgndStyle.setMarginRight(0, Unit.PX);
  lgndStyle.setMarginLeft(0, Unit.PX);
  lgndStyle.setMarginBottom(0, Unit.PX);
  lgndStyle.setBackgroundColor("white");
  lgndStyle.setColor("black");
  lgndStyle.setFloat(Style.Float.LEFT);
  lgndStyle.setPaddingTop(0, Unit.PX);
  lgndStyle.setPaddingBottom(0, Unit.PX);
  lgndStyle.setPaddingRight(2, Unit.PX);
  lgndStyle.setPaddingLeft(2, Unit.PX);
  getElement().appendChild(legend);
}

相关文章

微信公众号

最新文章

更多

Style类方法