@Override public void keyPressed( KeyEvent e ) { // ESC --> Don't change tree item... if ( e.keyCode == SWT.ESC ) { text.dispose(); } // ENTER --> Save changes... if ( e.character == SWT.CR ) { String newname = text.getText(); if ( renameTransformation( fname, newname, frepdir ) ) { ti.setText( newname ); } text.dispose(); } } } );
@Override public void keyPressed( KeyEvent e ) { // ESC --> Don't change tree item... if ( e.keyCode == SWT.ESC ) { text.dispose(); } // ENTER --> Save changes... if ( e.character == SWT.CR ) { String newname = text.getText(); if ( renameJob( fname, newname, frepdir ) ) { ti.setText( newname ); } text.dispose(); } } } );
@Override public void keyPressed( KeyEvent e ) { // ESC --> Don't change tree item... if ( e.keyCode == SWT.ESC ) { text.dispose(); } // ENTER --> Save changes... if ( e.character == SWT.CR ) { String newname = text.getText(); if ( renameUser( name, newname ) ) { ti.setText( newname ); } text.dispose(); } } } );
@Override public void keyPressed( KeyEvent e ) { // ESC --> Don't change tree item... if ( e.keyCode == SWT.ESC ) { text.dispose(); } // ENTER --> Save changes... if ( e.character == SWT.CR ) { String newname = text.getText(); if ( renameJob( name, repdir, newname ) ) { ti.setText( newname ); } text.dispose(); } } } );
@Override public void keyPressed( KeyEvent e ) { // ESC --> Don't change tree item... if ( e.keyCode == SWT.ESC ) { text.dispose(); } // ENTER --> Save changes... if ( e.character == SWT.CR ) { String newname = text.getText(); if ( renameDirectory( repdir, name, newname ) ) { ti.setText( newname ); } text.dispose(); } } } );
@Override public void focusLost( FocusEvent arg0 ) { // Focus is lost: apply changes String newname = text.getText(); if ( renameDatabase( name, newname ) ) { ti.setText( newname ); } text.dispose(); } } );
@Override public void focusLost( FocusEvent arg0 ) { // Focus is lost: apply changes. String newname = text.getText(); if ( renameTransformation( fname, newname, frepdir ) ) { ti.setText( newname ); } text.dispose(); } } );
@Override public void focusLost( FocusEvent arg0 ) { // Focus is lost: apply changes String newname = text.getText(); if ( renameUser( name, newname ) ) { ti.setText( newname ); } text.dispose(); } } );
@Override public void focusLost( FocusEvent arg0 ) { // Focus is lost: apply changes String newname = text.getText(); if ( renameDirectory( repdir, name, newname ) ) { ti.setText( newname ); } text.dispose(); } } );
@Override public void focusLost( FocusEvent arg0 ) { // Focus is lost: apply changes String newname = text.getText(); if ( renameJob( fname, newname, frepdir ) ) { ti.setText( newname ); } text.dispose(); } } );
@Override public void focusLost( FocusEvent arg0 ) { // Focus is lost: apply changes String newname = text.getText(); if ( renameJob( name, repdir, newname ) ) { ti.setText( newname ); } text.dispose(); } } );
public void handleEvent(final Event e) { switch (e.type) { case SWT.FocusOut: item.setText(column, text.getText()); text.dispose(); break; case SWT.Traverse: switch (e.detail) { case SWT.TRAVERSE_RETURN: item.setText(column, text.getText()); // FALL THROUGH case SWT.TRAVERSE_ESCAPE: text.dispose(); e.doit = false; } break; } } };
@Override public void keyPressed( KeyEvent e ) { // ESC --> Don't change tree item... if ( e.keyCode == SWT.ESC ) { text.dispose(); } // ENTER --> Save changes... if ( e.character == SWT.CR ) { if ( ti.getText().equals( name ) ) { // Only if the name wasn't changed already. String newname = text.getText(); if ( renameDatabase( name, newname ) ) { ti.setText( newname ); } text.dispose(); } } } } );
@Override public void widgetSelected(SelectionEvent e) { if (currentText) { imageType.setEnabled(true); textType.setEnabled(false); if (text != null && !text.isDisposed()) { text.setVisible(false); text.dispose(); } label = new Label(grpValue, SWT.NONE); label.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); label.setAlignment(SWT.CENTER); tranformImage(imageType, label); currentText = false; } } });
protected void tableItemSelected() { TableItem[] items = table.getSelection(); if(status != Status.Normal) addModifyTextListener(); if(items.length > 0 && currentItem != items[0]){ switch(status){ case Normal: break; case Add: refresh(); editListener.getText().dispose(); break; case Adding: add(); editListener.getText().dispose(); break; } currentItem = items[0]; status = Status.Normal; } statusChanged(); }
private void internalDispose() { if (text_ != null) text_.dispose(); text_ = null; }
@Override protected Text doCreateFilterText(Composite parent) { // Overridden so the text gets create using the toolkit if we have one Text parentText = super.doCreateFilterText(parent); if (fToolkit != null) { int style = parentText.getStyle(); parentText.dispose(); return fToolkit.createText(parent, null, style); } return parentText; }
protected Text doCreateFilterText(Composite actParent) { // Overridden so the text gets create using the toolkit if we have one Text parentText = super.doCreateFilterText(actParent); if (fToolkit != null) { int style = parentText.getStyle(); parentText.dispose(); return fToolkit.createText(actParent, null, style); } return parentText; }
@Override protected Text doCreateFilterText(Composite parent) { int borderStyle = toolkit.getBorderStyle(); toolkit.setBorderStyle(SWT.NONE); // we don't want Forms border around tree filter Text temp = super.doCreateFilterText(parent); int style = temp.getStyle(); temp.dispose(); fEntryFilter = new FormEntry(parent, toolkit, null, style); toolkit.setBorderStyle(borderStyle); // restore Forms border settings setBackground(toolkit.getColors().getBackground()); return fEntryFilter.getText(); }