org.eclipse.swt.widgets.Button.getGrayed()方法的使用及代码示例

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

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

Button.getGrayed介绍

[英]Returns true if the receiver is grayed, and false otherwise. When the widget does not have the CHECK style, return false.
[中]如果接收器为灰色,则返回true,否则返回false。当小部件没有CHECK样式时,返回false。

代码示例

代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin

if (!includeButton.getGrayed())
if (includeButton.getGrayed())

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07

private static void writeGrayed( final Button button ) throws IOException {
  Boolean newValue = Boolean.valueOf( button.getGrayed() );
  String prop = PROP_GRAYED;
  if( WidgetLCAUtil.hasChanged( button, prop, newValue, Boolean.FALSE ) ) {
   JSWriter writer = JSWriter.getWriterFor( button );
   writer.set( prop, newValue );
  }
 }
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt.q07

void preserveValues( final Button button ) {
 IWidgetAdapter adapter = WidgetUtil.getAdapter( button );
 adapter.preserve( PROP_GRAYED, Boolean.valueOf( button.getGrayed() ) );
 ButtonLCAUtil.preserveValues( button );
}

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public void widgetSelected(SelectionEvent e) {
  Button button = (Button) e.widget;
  Tag tag = (Tag) button.getData("Tag");
  if (button.getGrayed()) {
    button.setGrayed(false);
    button.setSelection(!button.getSelection());
    button.getParent().redraw();
  }
  boolean doTag = button.getSelection();
  trigger.tagButtonTriggered(tag, doTag);
  button.getParent().redraw();
  button.getParent().update();
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

@Override
public void preserveValues( Button button ) {
 preserveProperty( button, PROP_TEXT, button.getText() );
 preserveProperty( button, PROP_IMAGE, button.getImage() );
 preserveProperty( button, PROP_SELECTION, Boolean.valueOf( button.getSelection() ) );
 preserveProperty( button, PROP_GRAYED, Boolean.valueOf( button.getGrayed() ) );
 preserveProperty( button, PROP_ALIGNMENT, getAlignment( button ) );
 preserveProperty( button, PROP_BADGE, getBadge( button ) );
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.rwt

@Override
public void renderChanges( Button button ) throws IOException {
 ControlLCAUtil.renderChanges( button );
 WidgetLCAUtil.renderCustomVariant( button );
 renderText( button );
 renderMnemonicIndex( button );
 renderProperty( button, PROP_IMAGE, button.getImage(), null );
 renderProperty( button, PROP_ALIGNMENT, getAlignment( button ), DEFAULT_ALIGNMENT );
 renderProperty( button, PROP_SELECTION, button.getSelection(), false );
 renderProperty( button, PROP_GRAYED, button.getGrayed(), false );
 renderProperty( button, PROP_BADGE, getBadge( button ), null );
 renderListenSelection( button );
 renderClientListeners( button );
}

相关文章

Button类方法