public void create( Composite parent ) { list = new List( parent, SWT.BORDER | SWT.V_SCROLL ); list.addListener( SWT.Selection, new Listener() { public void handleEvent( Event event ) { refreshObject();
wProcessor.setLayoutData( fdProcessor ); wProcessor.setItems( ProcessorType.getDescriptions() ); wProcessor.addListener( SWT.Selection, new Listener() { @Override public void handleEvent( Event e ) {
GridDataFactory.swtDefaults().grab(true, false).applyTo(websiteLink); themeSelectionList.addListener(SWT.Selection, new Listener() { public void handleEvent(Event event) { updateDetails(colorThemeManager.getTheme(
public void addListener(Listener listener) { listBox.addListener( SWT.Selection, listener ); }
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener);
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener);
addListener( SWT.Selection, typedListener ); addListener( SWT.DefaultSelection, typedListener );
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener(listener); addListener(SWT.Selection,typedListener); addListener(SWT.DefaultSelection,typedListener);
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener);
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener);
storageSelection.addListener(SWT.Selection, pageCompletedListener);
lstLanguage.addListener(SWT.Selection, new Listener() { @Override public void handleEvent(Event e) {
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); } /**
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); } /**