Examples of ImageHyperlink


Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

        }
    }

    private void addRemoveFieldAction(Composite constraintComposite,
                                      final int row) {
        ImageHyperlink delLink = addImage( constraintComposite,
                                           "icons/delete_item_small.gif" );
        delLink.setToolTipText( "Remove this field action" );

        delLink.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
                                                    SWT.YES | SWT.NO | SWT.ICON_WARNING );
                dialog.setMessage( "Remove this item?" );
                dialog.setText( "Remove this item?" );
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

        toolkit.paintBordersFor( constraintComposite );
    }

    private void addMoreOptionsAction() {
        ImageHyperlink link = addImage( parent,
                                        "icons/new_item.gif" );

        link.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                RuleDialog popup = new AddNewFieldConstraintDialog( parent.getShell(),
                                                                    toolkit,
                                                                    getModeller(),
                                                                    pattern,
                                                                    parentPattern != null );
                popup.open();
            }

            public void linkEntered(HyperlinkEvent e) {
            }

            public void linkExited(HyperlinkEvent e) {
            }
        } );
        link.setToolTipText( "Add a field to this condition, or bind a varible to this fact." );
    }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

        } );
        link.setToolTipText( "Add a field to this condition, or bind a varible to this fact." );
    }

    private void addDeleteAction() {
        ImageHyperlink delWholeLink = addImage( parent,
                                                "icons/delete_obj.gif" );
        delWholeLink.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
                                                    SWT.YES | SWT.NO | SWT.ICON_WARNING );
                dialog.setMessage( "Remove this ENTIRE condition, " + "and all the field constraints that belong to it." );
                dialog.setText( "Remove this entire condition?" );
                if ( dialog.open() == SWT.YES ) {
                    if ( parentPattern == null ) {
                        if ( getModeller().getModel().removeLhsItem( index ) ) {
                            getModeller().reloadLhs();
                        } else {
                            showMessage( "Can't remove that item as it is used in the action part of the rule." );
                        }
                    } else {
                        deleteBindedFact();
                    }
                    getModeller().setDirty( true );
                }
            }

            public void linkEntered(HyperlinkEvent e) {
            }

            public void linkExited(HyperlinkEvent e) {
            }
        } );
        delWholeLink.setToolTipText( "Remove this condition." );
    }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

                         row,
                         "icons/delete_obj.gif",
                         nested );

        // button "add"
        ImageHyperlink link = addImage( constraintComposite,
                                        "icons/new_item.gif" );
        link.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                RuleDialog popup = new AddCompositeConstraintOptionDialog( parent.getShell(),
                                                                           getModeller(),
                                                                           constraint,
                                                                           pattern );
                popup.open();
            }

            public void linkEntered(HyperlinkEvent e) {
            }

            public void linkExited(HyperlinkEvent e) {
            }
        } );

        link.setToolTipText( "Add fields to this constriant." );

        addNestedElements( constraintComposite,
                           constraint );
    }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

                                 final SingleFieldConstraint c,
                                 boolean showBinding,
                                 Object data) {
        if ( !c.isBound() ) {
            if ( bindable && showBinding ) {
                ImageHyperlink link = addImage( constraintComposite,
                                                "icons/new_item.gif" );
                link.addHyperlinkListener( new IHyperlinkListener() {
                    public void linkActivated(HyperlinkEvent e) {
                        RuleDialog popup = new AssignFieldVariableDialog( parent.getShell(),
                                                                          toolkit,
                                                                          getModeller(),
                                                                          c,
                                                                          pattern );
                        popup.open();
                    }

                    public void linkEntered(HyperlinkEvent e) {
                    }

                    public void linkExited(HyperlinkEvent e) {
                    }
                } );

                link.setToolTipText( "Bind the field called [" + c.getFieldName() + "] to a variable." );
                link.setLayoutData( data );
            } else {
                toolkit.createLabel( constraintComposite,
                                     "" );
            }
        } else {
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

                                   pattern );
    }

    private void addConnectiveAction(Composite constraintComposite,
                                     final SingleFieldConstraint c) {
        ImageHyperlink link = addImage( constraintComposite,
                                        "icons/add_connective.gif" );
        link.setToolTipText( "Add more options to this fields values." );
        link.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                c.addNewConnective();
                getModeller().reloadLhs();
                getModeller().setDirty( true );
            }

            public void linkEntered(HyperlinkEvent e) {
            }

            public void linkExited(HyperlinkEvent e) {
            }
        } );

        link.setLayoutData( new GridData( GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING ) );
    }
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

    private void addNestedConstraintDeleteAction(Composite constraintComposite,
                                                 final CompositeFieldConstraint parentConstraint,
                                                 final int row,
                                                 String iconRef) {
        ImageHyperlink delLink = addImage( constraintComposite,
                                           iconRef );
        // "icons/delete_obj.gif");
        delLink.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
                                                    SWT.YES | SWT.NO | SWT.ICON_WARNING );
                dialog.setMessage( "Remove this (nested) restriction." );
                dialog.setText( "Remove this item from nested constraint?" );
View Full Code Here

Examples of org.eclipse.ui.forms.widgets.ImageHyperlink

    }

    private void addRemoveFieldAction(Composite constraintComposite,
                                      final int currentRow,
                                      String iconRef) {
        ImageHyperlink delLink = addImage( constraintComposite,
                                           iconRef );
        delLink.setToolTipText( "Remove this fieldconstraint" );
        delLink.addHyperlinkListener( new IHyperlinkListener() {
            public void linkActivated(HyperlinkEvent e) {
                MessageBox dialog = new MessageBox( Display.getCurrent().getActiveShell(),
                                                    SWT.YES | SWT.NO | SWT.ICON_WARNING );
                dialog.setMessage( "Remove this item?" );
                dialog.setText( "Remove this item?" );
                if ( dialog.open() == SWT.YES ) {
                    pattern.removeConstraint(currentRow);
                    getModeller().reloadLhs();
                    getModeller().setDirty( true );
                }
            }

            public void linkEntered(HyperlinkEvent e) {
            }

            public void linkExited(HyperlinkEvent e) {
            }
        } );
        delLink.setLayoutData( new GridData( GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_BEGINNING ) );
    }
View Full Code Here

Examples of org.vietspider.ui.widget.ImageHyperlink

    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    gridLayout.marginWidth = 0;
    popup.setLayout(gridLayout);
   
    add = new ImageHyperlink(popup, SWT.CENTER);
    ImageLoader imageLoader = new ImageLoader();
    addNormal = imageLoader.load(popup.getDisplay(), "add2.png");
    addDown = imageLoader.load(popup.getDisplay(), "add3.png");
    add.setImage(addNormal);
    add.addHyperlinkListener(new HyperlinkAdapter(){
View Full Code Here

Examples of org.vietspider.ui.widget.ImageHyperlink

    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    gridLayout.marginWidth = 0;
    popup.setLayout(gridLayout);

    add = new ImageHyperlink(popup, SWT.CENTER);
    ImageLoader imageLoader = new ImageLoader();
    addNormal = imageLoader.load(popup.getDisplay(), "add2.png");
    addDown = imageLoader.load(popup.getDisplay(), "add3.png");
    add.setImage(addNormal);
    add.addHyperlinkListener(new HyperlinkAdapter(){
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.