com.vaadin.ui.Button.setHeight()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(148)

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

Button.setHeight介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

OnCreate(Bundle bundle) {
 //set content layout, etc up here

 //now adjust button sizes
 Button B = (Button) findViewById(R.id.somebutton);
 int someDimension = 50; //50pixels
 B.setWidth(someDimension);
 B.setHeight(someDimension);
}

代码示例来源:origin: com.haulmont.cuba/cuba-web

private void updateComponentHeight() {
  if (container == null)
    return;
  if (getHeight() >= 0) {
    container.setHeight(100, Unit.PERCENTAGE);
    fileNameButton.setHeight(100, Unit.PERCENTAGE);
    uploadButton.setHeight(100, Unit.PERCENTAGE);
    clearButton.setHeight(100, Unit.PERCENTAGE);
  } else {
    container.setHeightUndefined();
    fileNameButton.setHeightUndefined();
    uploadButton.setHeightUndefined();
    clearButton.setHeightUndefined();
  }
}

代码示例来源:origin: stackoverflow.com

inviteButton.setHeight(30);

代码示例来源:origin: stackoverflow.com

for(int i=0; i < layout.getChildCount(); i++)
{
  View v = layout.getChildAt(i);
  if (v instanceof Button) {
    Button b = (Button) v;
    b.setHeight(x);
  }
}

代码示例来源:origin: stackoverflow.com

private void setButtonSize(AlertDialog dialog) {
  Button button = dialog.getButton(AlertDialog.BUTTON_POSITIVE);
  int height = getResources().getDimensionPixelSize(R.dimen.alertdialog_button_height);
  int width  = getResources().getDimensionPixelSize(R.dimen.alertdialog_button_width);

  button.setHeight(height);
  button.setWidth(width);
}

代码示例来源:origin: stackoverflow.com

DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);

btnWidth = metrics.heightPixels/3 - 50;//gap
btnHeight = btnWidth;

Button b1 = (Button) findViewById(R.id.b1);
b1.setHeight(btnWidth);
b1.setWidth(btnWidth);

代码示例来源:origin: stackoverflow.com

Button bt=(Button)findViewById(R.id.button);
bt.setWidth(width);//screen width(fill_parent)
bt.setHeight(height/6);//1/6 of the screen height

代码示例来源:origin: stackoverflow.com

Button b = findViewById(R.id.button);
b.setHeight(b.getWidth() / 3);

代码示例来源:origin: com.vaadin/vaadin-server

resize.setData(false);
resize.setWidth("100%");
resize.setHeight("10px");
resize.setPrimaryStyleName("resize-button");
layout.addComponent(resize);

代码示例来源:origin: stackoverflow.com

final Button btn1 = (Button) findViewById(R.id.btn1);
final Button btn2 = (Button) findViewById(R.id.btn2);
final Button btn3 = (Button) findViewById(R.id.btn3);
final Button btn4 = (Button) findViewById(R.id.btn4);
ViewTreeObserver vto = btn1.getViewTreeObserver();
vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

  @Override
  public void onGlobalLayout() {
    btn1.setHeight(btn1.getWidth()); 
    btn2.setHeight(btn1.getWidth());    
    btn3.setHeight(btn1.getWidth());
    btn4.setHeight(btn1.getWidth());
  }
});

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6

@Override
public Component getUI() {
  Button logo = new NativeButton("Name", new Button.ClickListener() {
    private static final long serialVersionUID = 1L;
    @Override
    public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
      
    }
  });
  logo.setDescription("Home");
  logo.setDebugId("homeButton");
  //logo.setStyleName(BaseTheme.BUTTON_LINK);
  //logo.addStyleName("logo");
  logo.setHeight("50px");
  return logo;
}

代码示例来源:origin: stackoverflow.com

b.setHeight(100);//however high two columns are

代码示例来源:origin: org.activiti/activiti-explorer

protected Button addMenuButton(String type, String label, Resource icon, boolean active, float width) {
 Button button = new Button(label);
 button.addStyleName(type);
 button.addStyleName(ExplorerLayout.STYLE_MAIN_MENU_BUTTON);
 button.addStyleName(Reindeer.BUTTON_LINK);
 button.setHeight(54, UNITS_PIXELS);
 button.setIcon(icon);
 button.setWidth(width, UNITS_PIXELS);
 
 addComponent(button);
 setComponentAlignment(button, Alignment.TOP_CENTER);
 
 return button;
}

代码示例来源:origin: korpling/ANNIS

buttonLeft.setHeight("100%");
buttonLeft.addStyleName("left-button");
buttonLeft.setEnabled(false);
buttonRight.setHeight("100%");
buttonRight.addStyleName("right-button");

代码示例来源:origin: com.vaadin/vaadin-compatibility-server

resize.setData(new Boolean(false));
resize.setWidth("100%");
resize.setHeight("10px");
resize.setPrimaryStyleName("resize-button");
layout.addComponent(resize);

代码示例来源:origin: org.ikasan/ikasan-dashboard-jar

button.setHeight("30px");

相关文章