warningControlDecoration = new ControlDecoration( wText, SWT.CENTER | SWT.RIGHT ); Image warningImage = GUIResource.getInstance().getImageWarning(); warningControlDecoration.setImage( warningImage );
controlDecoration = new ControlDecoration( wText, SWT.CENTER | SWT.RIGHT, this ); Image image = GUIResource.getInstance().getImageVariable(); controlDecoration.setImage( image );
controlDecoration = new ControlDecoration( wText, SWT.CENTER | SWT.RIGHT, this ); Image image = GUIResource.getInstance().getImageVariable(); controlDecoration.setImage( image );
warningControlDecoration = new ControlDecoration( wText, SWT.CENTER | SWT.RIGHT ); Image warningImage = GUIResource.getInstance().getImageWarning(); warningControlDecoration.setImage( warningImage );
controlDecoration = new ControlDecoration( wBox, SWT.CENTER | SWT.LEFT ); Image image = GUIResource.getInstance().getImageVariable(); controlDecoration.setImage( image );
0 ).bottom( 100, 0 ).result() ); } else { ControlDecoration controlDecoration = new ControlDecoration( styledText, SWT.TOP | SWT.RIGHT ); controlDecoration.setImage( image ); controlDecoration
controlDecoration = new ControlDecoration( wCombo, SWT.CENTER | SWT.RIGHT, this ); controlDecoration.setImage( image ); controlDecoration.setDescriptionText( BaseMessages.getString( PKG, "TextVar.tooltip.InsertVariable" ) );
private void targetAdded(IObservable target) { Control control = findControl(target); if (control != null) targetDecorations.add(new TargetDecoration(target, new ControlDecoration(control, position, composite))); }
ControlDecorator(Control control) { this.decoration = new ControlDecoration(control, decorationPosition, form.getBody()); }
ControlDecorator(Control control) { this.decoration = new ControlDecoration(control, decorationPosition, form.getBody()); }
private void createParameterNameInput(Composite group) { Label l= new Label(group, SWT.NONE); l.setText(RefactoringMessages.ExtractClassWizard_field_name); final Text text= new Text(group, SWT.BORDER); fParameterNameDecoration= new ControlDecoration(text, SWT.TOP | SWT.LEAD); text.setText(fDescriptor.getFieldName()); text.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { fDescriptor.setFieldName(text.getText()); validateRefactoring(); } }); GridData gridData= new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalIndent= FieldDecorationRegistry.getDefault().getMaximumDecorationWidth(); text.setLayoutData(gridData); }
private void createParameterNameInput(Composite group) { Label l= new Label(group, SWT.NONE); l.setText(RefactoringMessages.ExtractClassWizard_field_name); final Text text= new Text(group, SWT.BORDER); fParameterNameDecoration= new ControlDecoration(text, SWT.TOP | SWT.LEAD); text.setText(fDescriptor.getFieldName()); text.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { fDescriptor.setFieldName(text.getText()); validateRefactoring(); } }); GridData gridData= new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalIndent= FieldDecorationRegistry.getDefault().getMaximumDecorationWidth(); text.setLayoutData(gridData); }
private void createClassNameInput(Composite result) { Label label= new Label(result, SWT.LEAD); label.setText(RefactoringMessages.ExtractClassWizard_label_class_name); final Text text= new Text(result, SWT.SINGLE | SWT.BORDER); fClassNameDecoration= new ControlDecoration(text, SWT.TOP | SWT.LEAD); text.setText(fDescriptor.getClassName()); text.selectAll(); text.setFocus(); text.addModifyListener(new ModifyListener() { @Override public void modifyText(ModifyEvent e) { fDescriptor.setClassName(text.getText()); validateRefactoring(); } }); GridData gridData= new GridData(GridData.FILL_HORIZONTAL); gridData.horizontalIndent= FieldDecorationRegistry.getDefault().getMaximumDecorationWidth(); text.setLayoutData(gridData); }
void updatePosition() { Control control = decoration.getControl(); decoration.dispose(); this.decoration = new ControlDecoration(control, decorationPosition, form.getBody()); update(); }
void updatePosition() { Control control = decoration.getControl(); decoration.dispose(); this.decoration = new ControlDecoration(control, decorationPosition, form.getBody()); update(); }
protected void createProductSection(Composite parent) { fProductButton = new Button(parent, SWT.RADIO); fProductButton.setText(PDEUIMessages.ProgramBlock_runProduct); fProductButton.addSelectionListener(fListener); fProductCombo = SWTFactory.createCombo(parent, SWT.DROP_DOWN, 1, TargetPlatform.getProducts()); fProductCombo.addSelectionListener(fListener); fProductCombo.addModifyListener(fListener); fProductComboDecoration = new ControlDecoration(fProductCombo, SWT.TOP | SWT.LEFT); FieldDecoration warningDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_WARNING); fProductComboDecoration.setDescriptionText(PDEUIMessages.ProgramBlock_productDecorationWarning0); fProductComboDecoration.setImage(warningDecoration.getImage()); }
public static void addRequiredDecoration(Control control) { FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration( FieldDecorationRegistry.DEC_REQUIRED); ControlDecoration controlDecoration = new ControlDecoration(control, SWT.LEFT | SWT.CENTER); controlDecoration.setDescriptionText(fieldDecoration.getDescription()); controlDecoration.setImage(fieldDecoration.getImage()); } }
protected Control createDialogArea(Composite parent) { Control createDialogArea = super.createDialogArea(parent); decorator = new ControlDecoration(getText(), SWT.TOP | SWT.LEFT); decorator.setDescriptionText(NetUIMessages.NonProxyHostsComposite_0); decorator.setImage(FieldDecorationRegistry.getDefault().getFieldDecoration( FieldDecorationRegistry.DEC_INFORMATION).getImage()); return createDialogArea; } public boolean close() {
private ControlDecoration createAssistedDecoratedCombo( final Composite parent, final IContentProposalProvider proposalProvider, final IContentProposalListener listener) { // FIXME: VERY ANNOYING! reported as 243991 in eclipse bugzilla // when typing, pressing arrow-down key opens combo box drop-down // instead of moving within autocompletion list (Mac 10.4&10.5, Eclipse // 3.4) final Combo combo = new Combo(parent, SWT.DROP_DOWN); final ControlDecoration decoration = new ControlDecoration(combo, SWT.BOTTOM | SWT.LEFT); final ContentAssistCommandAdapter proposal = new ContentAssistCommandAdapter( combo, new ComboContentAdapter(), proposalProvider, null, null, true); proposal .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); if (listener != null) proposal.addContentProposalListener(listener); return decoration; }
private void createUIFieldDecorationTemplate() { // Decorate the combo with the info image int bits = SWT.TOP | SWT.LEFT; fControlDecoration = new ControlDecoration(fFieldTemplateCombo.getControl(), bits); // Configure decoration // No margin fControlDecoration.setMarginWidth(0); // Custom hover tip text fControlDecoration.setDescriptionText(PDEUIMessages.SplashConfigurationSection_msgDecorationTemplateSupport); // Custom hover properties fControlDecoration.setShowHover(true); // Hover image to use FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_INFORMATION); fControlDecoration.setImage(contentProposalImage.getImage()); // Hide the decoration initially fControlDecoration.hide(); }