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

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

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

List.setBackground介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

public void setBackground (Color color) {
  super.setBackground(color);
  background = color;
  if (text != null) text.setBackground(color);
  if (list != null) list.setBackground(color);
  if (arrow != null) arrow.setBackground(color);
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
public void setBackground (Color color) {
  super.setBackground(color);
  background = color;
  if (text != null) text.setBackground(color);
  if (list != null) list.setBackground(color);
  if (arrow != null) arrow.setBackground(color);
}
/**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
public void setBackground (Color color) {
  super.setBackground(color);
  background = color;
  if (text != null) text.setBackground(color);
  if (list != null) list.setBackground(color);
  if (arrow != null) arrow.setBackground(color);
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
public void setBackground (Color color) {
  super.setBackground(color);
  background = color;
  if (text != null) text.setBackground(color);
  if (list != null) list.setBackground(color);
  if (arrow != null) arrow.setBackground(color);
}
/**

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

public void setBackground (Color color) {
 super.setBackground(color);
 background = color;
 if (text != null) text.setBackground(color);
 if (list != null) list.setBackground(color);
 if (arrow != null) arrow.setBackground(color);
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
public void setBackground (Color color) {
  super.setBackground(color);
  background = color;
  if (text != null) text.setBackground(color);
  if (list != null) list.setBackground(color);
  if (arrow != null) arrow.setBackground(color);
}
/**

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

void createPopup(String[] items, int selectionIndex) {
  // create shell and list
  popup = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  int style = getStyle ();
  int listStyle = SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL;
  if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
  if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
  if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
  list = new List (popup, listStyle);
  if (font != null) list.setFont (font);
  if (foreground != null) list.setForeground (foreground);
  if (background != null) list.setBackground (background);

  int [] popupEvents = {SWT.Close, SWT.Paint};
  for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
  int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);

  if (items != null) list.setItems (items);
  if (selectionIndex != -1) list.setSelection (selectionIndex);
}
/**

代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui

void createPopup(String[] items, int selectionIndex) {    
  // create shell and list
  popup = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  int style = getStyle ();
  int listStyle = SWT.SINGLE | SWT.V_SCROLL;
  if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
  if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
  if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
  list = new List (popup, listStyle);
  if (font != null) list.setFont (font);
  if (foreground != null) list.setForeground (foreground);
  if (background != null) list.setBackground (background);
  
  int [] popupEvents = {SWT.Close, SWT.Paint, SWT.Deactivate};
  for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
  int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.Dispose};
  for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);
  
  if (items != null) list.setItems (items);
  if (selectionIndex != -1) list.setSelection (selectionIndex);
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

void createPopup(String[] items, int selectionIndex) {
  // create shell and list
  popup = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  int style = getStyle ();
  int listStyle = SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL;
  if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
  if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
  if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
  list = new List (popup, listStyle);
  if (font != null) list.setFont (font);
  if (foreground != null) list.setForeground (foreground);
  if (background != null) list.setBackground (background);

  int [] popupEvents = {SWT.Close, SWT.Paint};
  for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
  int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);

  if (items != null) list.setItems (items);
  if (selectionIndex != -1) list.setSelection (selectionIndex);
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

void createPopup(String[] items, int selectionIndex) {
  // create shell and list
  popup = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  int style = getStyle ();
  int listStyle = SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL;
  if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
  if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
  if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
  list = new List (popup, listStyle);
  if (font != null) list.setFont (font);
  if (foreground != null) list.setForeground (foreground);
  if (background != null) list.setBackground (background);

  int [] popupEvents = {SWT.Close, SWT.Paint};
  for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
  int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);

  if (items != null) list.setItems (items);
  if (selectionIndex != -1) list.setSelection (selectionIndex);
}
/**

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void createPopup(String[] items, int selectionIndex) {		
  // create shell and list
  popup = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  int style = getStyle ();
  int listStyle = SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL;
  if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
  if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
  if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
  list = new List (popup, listStyle);
  if (font != null) list.setFont (font);
  if (foreground != null) list.setForeground (foreground);
  if (background != null) list.setBackground (background);

  int [] popupEvents = {SWT.Close, SWT.Paint};
  for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
  int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);

  if (items != null) list.setItems (items);
  if (selectionIndex != -1) list.setSelection (selectionIndex);
}
/**

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

void createPopup(String[] items, int selectionIndex) {
  // create shell and list
  popup = new Shell (getShell (), SWT.NO_TRIM | SWT.ON_TOP);
  int style = getStyle ();
  int listStyle = SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL;
  if ((style & SWT.FLAT) != 0) listStyle |= SWT.FLAT;
  if ((style & SWT.RIGHT_TO_LEFT) != 0) listStyle |= SWT.RIGHT_TO_LEFT;
  if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT;
  list = new List (popup, listStyle);
  if (font != null) list.setFont (font);
  if (foreground != null) list.setForeground (foreground);
  if (background != null) list.setBackground (background);

  int [] popupEvents = {SWT.Close, SWT.Paint};
  for (int i=0; i<popupEvents.length; i++) popup.addListener (popupEvents [i], listener);
  int [] listEvents = {SWT.MouseUp, SWT.Selection, SWT.Traverse, SWT.KeyDown, SWT.KeyUp, SWT.FocusIn, SWT.FocusOut, SWT.Dispose};
  for (int i=0; i<listEvents.length; i++) list.addListener (listEvents [i], listener);

  if (items != null) list.setItems (items);
  if (selectionIndex != -1) list.setSelection (selectionIndex);
}
/**

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

list.setBackground( background );

代码示例来源:origin: org.eclipse/org.eclipse.datatools.connectivity.ui

((List)parent.getChildren()[i]).setBackground(bg);
((List)parent.getChildren()[i]).setEnabled(enabled);

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

listPlugins = new org.eclipse.swt.widgets.List(cList, SWT.V_SCROLL);
listPlugins.setLayoutData(Utils.getFilledFormData());
listPlugins.setBackground(cList.getBackground());
listPlugins.setForeground(cList.getForeground());
listPlugins.addSelectionListener(new SelectionListener() {

相关文章

微信公众号

最新文章

更多

List类方法