/** * Sets the widget font. * <p> * When new font is null, the font reverts * to the default system font for the widget. * * @param font the new font (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setFont (Font font) { list.setFont(font); } /**
/** * Sets the widget font. * <p> * When new font is null, the font reverts * to the default system font for the widget. * * @param font the new font (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setFont (Font font) { list.setFont(font); } /**
/** * Sets the widget font. * <p> * When new font is null, the font reverts * to the default system font for the widget. * * @param font the new font (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setFont (Font font) { list.setFont(font); } /**
/** * Sets the widget font. * <p> * When new font is null, the font reverts * to the default system font for the widget. * * @param font the new font (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setFont (Font font) { list.setFont(font); } /**
/** * Sets the widget font. * <p> * When new font is null, the font reverts * to the default system font for the widget. * * @param font the new font (or null) * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setFont (Font font) { list.setFont(font); } /**
public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } public void setForeground (Color color) {
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } public void setForeground (Color color) {
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
protected Composite createDropDownDialogArea(Composite parent) { Composite composite = createComposite(parent); createWrappingLabel(composite, TeamUIMessages.DefaultUIFileModificationValidator_2); org.eclipse.swt.widgets.List fileList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); GridData data = new GridData (); data.heightHint = 75; data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; fileList.setLayoutData(data); fileList.setFont(parent.getFont()); for (int i = 0; i < files.length; i++) { fileList.add(files[i].getFullPath().toString()); } return composite; }
@Override protected Composite createDropDownDialogArea(Composite parent) { Composite composite = createComposite(parent); createWrappingLabel(composite, TeamUIMessages.DefaultUIFileModificationValidator_2); org.eclipse.swt.widgets.List fileList = new org.eclipse.swt.widgets.List(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); GridData data = new GridData (); data.heightHint = 75; data.horizontalAlignment = GridData.FILL; data.grabExcessHorizontalSpace = true; fileList.setLayoutData(data); fileList.setFont(parent.getFont()); for (int i = 0; i < files.length; i++) { fileList.add(files[i].getFullPath().toString()); } return composite; }
/** * Returns this field editor's list control. * * @param parent the parent control * @return the list control */ public List getListControl(Composite parent) { if (list == null) { list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL); list.setFont(parent.getFont()); list.addSelectionListener(getSelectionListener()); list.addDisposeListener(event -> list = null); } else { checkParent(list, parent); } return list; }
/** * Returns this field editor's list control. * * @param parent the parent control * @return the list control */ public List getListControl(Composite parent) { if (list == null) { list = new List(parent, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL); list.setFont(parent.getFont()); list.addSelectionListener(getSelectionListener()); list.addDisposeListener(event -> list = null); } else { checkParent(list, parent); } return list; }
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); } /**
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); } /**
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); } /**
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); } /**
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); } /**