Examples of HyperlinkGroup


Examples of org.eclipse.ui.forms.HyperlinkGroup

        GridData gd = new GridData();
        gd.horizontalSpan = 3;
        gd.horizontalAlignment = SWT.END;
        _refresh.setLayoutData(gd);
       
        HyperlinkGroup group = new HyperlinkGroup(getShell().getDisplay());
       
        for (TaskStatus status : _beans) {
            Label label = new Label(this, SWT.None);
            label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            ImageHyperlink link = new ImageHyperlink(this, SWT.None);
            link.addHyperlinkListener(this);
            link.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            group.add(link);
            Label image = new Label(this, SWT.None);
            image.setText("");
            image.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
            Map<String,Control> controlSet = new HashMap<String,Control>();
            controlSet.put(LABEL_CONTROL, label);
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

        updateDomainCombo(_selectedRuntime);
        dialogChanged(e);
      }
    });

    HyperlinkGroup linkGroup = new HyperlinkGroup(_container.getDisplay());
    ImageHyperlink linkCreateNewRuntime = new ImageHyperlink(_container, SWT.NONE);
    linkCreateNewRuntime.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_RUNTIME_ADD));
    linkGroup.add(linkCreateNewRuntime);
    linkCreateNewRuntime.setText("create new WGA Runtime Project");
    linkCreateNewRuntime.addHyperlinkListener(new HyperlinkAdapter() {

      @Override
      public void linkActivated(HyperlinkEvent e) {
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

                dialogChanged();
            }

        });

        HyperlinkGroup linkGroup = new HyperlinkGroup(_container.getDisplay());
        ImageHyperlink linkCreateNewRuntime = new ImageHyperlink(_container, SWT.NONE);
        linkGroup.add(linkCreateNewRuntime);
        linkCreateNewRuntime.setText("configure WGA distributions");
        linkCreateNewRuntime.addHyperlinkListener(new HyperlinkAdapter() {

            @Override
            public void linkActivated(HyperlinkEvent e) {
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

        txtName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        factory.createCheckBox(subform, "Auto creation:", "Enabled", "autoCreate");

        Label lblActions = new Label(subform, SWT.NONE);
        lblActions.setText("Actions:");
        HyperlinkGroup actionGroup = new HyperlinkGroup(Display.getCurrent());
        Hyperlink defineMetas = new Hyperlink(subform, SWT.NONE);
        defineMetas.setText("add properties...");
        defineMetas.addHyperlinkListener(new IHyperlinkListener() {           
            public void linkExited(HyperlinkEvent e) {
            }
           
            public void linkEntered(HyperlinkEvent e) {              
            }
           
            public void linkActivated(HyperlinkEvent e) {
                handleAddMetaDataDefinition();               
            }
        });
        actionGroup.add(defineMetas);
       
        Label lbl = new Label(subform, SWT.NONE);
        Hyperlink defineItems = new Hyperlink(subform, SWT.NONE);
        defineItems.setText("add item definition...");
        defineItems.addHyperlinkListener(new IHyperlinkListener() {
           
            public void linkExited(HyperlinkEvent e) {
            }
           
            public void linkEntered(HyperlinkEvent e) {
            }
           
            public void linkActivated(HyperlinkEvent e) {
                handleAddItemDefinition();               
            }
        });
        actionGroup.add(defineItems);
       
        WGContentTypeDefinitionModel contentTypeDefinitionModel = new WGContentTypeDefinitionModel();
        contentTypeDefinitionModel.addListener(new BeanChangedListener<WGContentTypeDefinition>() {
            public void changed(WGContentTypeDefinition bean) {
                _treeViewer.refresh(bean, true);
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

        txtContentTypeName.setData("contentTypeName");
        txtContentTypeName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
        Label lblActions = new Label(parentInfo, SWT.NONE);
        lblActions.setText("Actions:");
        HyperlinkGroup parentActionGroup = new HyperlinkGroup(Display.getCurrent());
        Hyperlink defineMetas = new Hyperlink(parentInfo, SWT.NONE);
        defineMetas.setText("add properties...");
        defineMetas.addHyperlinkListener(new IHyperlinkListener() {
           
            public void linkExited(HyperlinkEvent e) {
                // TODO Auto-generated method stub
               
            }
           
            public void linkEntered(HyperlinkEvent e) {
                // TODO Auto-generated method stub
               
            }
           
            public void linkActivated(HyperlinkEvent e) {
                handleAddMetaDataDefinition();               
            }
        });
        parentActionGroup.add(defineMetas);
        Label lbl = new Label(parentInfo, SWT.NONE);
        Hyperlink defineItems = new Hyperlink(parentInfo, SWT.NONE);
        defineItems.setText("add item definition...");
        defineItems.addHyperlinkListener(new IHyperlinkListener() {
           
            public void linkExited(HyperlinkEvent e) {
                // TODO Auto-generated method stub
               
            }
           
            public void linkEntered(HyperlinkEvent e) {
                // TODO Auto-generated method stub
               
            }
           
            public void linkActivated(HyperlinkEvent e) {
                handleAddItemDefinition();               
            }

        });
        parentActionGroup.add(defineItems);
        return parentInfo;
    }
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

      registerField("defaultItemEncoding", _comboDefaultTMLOutputEncoding);
     
      _comboDesignEncoding = factory.createCombo(sectionClient, "Design encoding:", "designEncoding");
      registerField("designEncoding", _comboDesignEncoding);
     
      HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());     
      factory.addFiller(sectionClient);
      ImageHyperlink linkEnforceEncoding = new ImageHyperlink(sectionClient, SWT.None);
      linkEnforceEncoding.setText("Enforce design encoding");
      final Shell fShell = getSite().getShell();
      linkEnforceEncoding.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        if (_editor.isDirty()) {
          MessageDialog.openInformation(fShell, "Save changes", "Please save your changes on this design first.");
          return;
        }
        boolean result = MessageDialog.openQuestion(fShell, "Enforce design encoding", "Enforcing design encoding will change encoding resource settings and perform a revalidation of the design. Continue?");
        if (result) {
          try {
            new WGADesignStructureHelper(_model.getDesignContainer()).enforceDesignEncoding();
            RunValidation.call(_model.getDesignContainer(), fShell);
          } catch (CoreException e1) {
            WorkbenchUtils.showErrorDialog(Plugin.getDefault(), fShell, "Error", "Enforce design encoding failed.", e1);
          }         
        }
      }
    });   
      group.add(linkEnforceEncoding);
     
//      _comboDefaultExpressionLanguage = factory.createCombo(sectionClient, "Default Expression Language:", "expressionDefault");
//      registerField("expressionDefault", _comboDefaultExpressionLanguage);
     
      _chkMultiLanguageContent = factory.createCheckBox(sectionClient, "Multi Language Content", "Enabled", "multiLanguageContent");
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

        section.setClient(sectionClient);
        GridLayout sectionLayout = new GridLayout();                                     
        sectionLayout.numColumns = 1;
        sectionClient.setLayout(sectionLayout);
       
        final HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());
       
        final IEditorPart fEditor = editor;
       
    IMenuService ms = (IMenuService)editor.getSite().getService(IMenuService.class);
    ContributionManager manager = new ContributionManager() {

      public void update(boolean force) {
        IContributionItem[] items = getItems();
        for (IContributionItem item : items) {
          if (item instanceof MenuManager) {
            final MenuManager menu = (MenuManager) item;
            ImageHyperlink link = new ImageHyperlink(sectionClient, SWT.None);
            link.setText(menu.getMenuText());           
            if (menu.getImageDescriptor() != null) {
              link.setImage(menu.getImageDescriptor().createImage());
            }
            link.addHyperlinkListener(new HyperlinkAdapter() {
              public void linkActivated(HyperlinkEvent e) {
                IHandlerService handlerService = (IHandlerService) fEditor.getSite().getService(IHandlerService.class);
                if (handlerService != null) {
                  try {
                    handlerService.executeCommand(menu.getId(), null);
                  } catch (Exception ex) {
                    WorkbenchUtils.showErrorDialog(Plugin.getDefault(), fEditor.getSite().getShell(), "Execution of hyperlink failed", "Unable to execute hyperlink command '" + menu.getId() + "'.", ex);
                  }
                }
              }
            });   
            group.add(link);
          }
        }           
      }

     
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

//      public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
//        handleConfigureWGADistributions();
//      }
//    });
     
    HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());     
      ImageHyperlink linkConfigureDistributions = new ImageHyperlink(sectionClient, SWT.None);
      linkConfigureDistributions.setText("Configure distributions ...");
      linkConfigureDistributions.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        handleConfigureWGADistributions();
      }
    });   
      group.add(linkConfigureDistributions);
     
      //factory.createCheckBox(sectionClient, "Output TML-Warnings on server console:", "enabled", "outputTMLWarningsOnConsole");
      //factory.addFiller(sectionClient);
//      factory.createCheckBox(sectionClient, "TML-Script debugger:", "enabled", "tmlScriptDebuggerEnabled");
//      factory.addFiller(sectionClient);
//     
//      factory.createCheckBox(sectionClient, "Java debugging:", "enabled", "javaDebuggerEnabled");
//      factory.addFiller(sectionClient);
     
    group = new HyperlinkGroup(sectionClient.getDisplay());     
      ImageHyperlink linkConfigureGlobalRuntimePreferences = new ImageHyperlink(sectionClient, SWT.None);
      linkConfigureGlobalRuntimePreferences.setText("Configure global runtime settings ...");
      linkConfigureGlobalRuntimePreferences.addHyperlinkListener(new HyperlinkAdapter() {
      public void linkActivated(HyperlinkEvent e) {
        openGeneralPreferencesPage();
      }
    });   
      group.add(linkConfigureGlobalRuntimePreferences);
     
     
      // libraries section
      section = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.COMPACT);
    section.setText("Tomcat libraries");
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

        }
      }
       
      });

      HyperlinkGroup group = new HyperlinkGroup(sectionClient.getDisplay());
     
      _linkOpenAdminPage = new Hyperlink(sectionClient, SWT.NONE);
      _linkOpenAdminPage.setText("Open Admin Page");
      _linkOpenAdminPage.addHyperlinkListener(new HyperlinkAdapter() {

      @Override
      public void linkActivated(HyperlinkEvent e) {
        OpenWGAAdminPage.call(_model.getWgaRuntime());
      }
       
      });     
      Label filler = new Label(sectionClient, SWT.NONE);
     
//      _linkOpenContentManager = new Hyperlink(sectionClient, SWT.NONE);
//      _linkOpenContentManager.setText("Open Content Manager");     
//      _linkOpenContentManager.addHyperlinkListener(new HyperlinkAdapter() {
//        @Override
//      public void linkActivated(HyperlinkEvent e) {
//          OpenContentManager.call(_model.getWgaRuntime());
//      }
//      });
     
      group.add(_linkOpenAdminPage);
     
      TomcatUtils.getInstance().addListener(this);
     
      //group.add(_linkOpenContentManager);
   
    // web app section
        _webAppSection = toolkit.createSection(form.getBody(), Section.DESCRIPTION|Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED);
        _webAppSection.setText("Web Applications");

    List<WebApplication> apps = retrieveWebApplications();
    WGAConfiguration config = null;
    try {
      config = _model.getWgaRuntime().retrieveWGAConfig(false);
    } catch (Exception e2) {
      WGADesignerPlugin.getDefault().logError("Unable to read wga configuration." , e2);
    }
    _webAppModel = new WebApplicationsModel(apps, config);
   
    // register as runtime listener to refresh web app model on wga config changes
    _model.getWgaRuntime().addListener(this);
   
    ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
    ToolBar toolbar = toolBarManager.createControl(_webAppSection);
  
    Action action1 = new Action("refresh", WGADesignerPlugin.getDefault().getImageRegistry().getDescriptor(WGADesignerPlugin.IMAGE_REFRESH)) {
      public void run() {
        refreshWebApplications();       
      }


    };
    toolBarManager.add(action1);

    toolBarManager.update(true);
    _webAppSection.setTextClient(toolbar);



    sectionClient = toolkit.createComposite(_webAppSection);
    _webAppSection.setClient(sectionClient);
        sectionLayout = new GridLayout();
        sectionLayout.verticalSpacing  =0;
        sectionLayout.numColumns = 2;
        sectionClient.setLayout(sectionLayout);

       
        HyperlinkGroup generalHyperLinkGroup = new HyperlinkGroup(sectionClient.getDisplay());
     
      _linkCreateWebApp = new ImageHyperlink(sectionClient, SWT.NONE);
      _linkCreateWebApp.setText("Create new web application");     
      _linkCreateWebApp.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_WGA_DESIGN_ADD));
      _linkCreateWebApp.addHyperlinkListener(new HyperlinkAdapter() {

      @Override
      public void linkActivated(HyperlinkEvent e) {
        try {
          WorkbenchUtils.openWizard(WGADesignerPlugin.getDefault().getWorkbench(), ResourceIDs.WIZARD_NEW_WGA_DESIGN, new SingleStructuredSelection(_model.getWgaRuntime().getProject()));
        } catch (CoreException e1) {
          WorkbenchUtils.showErrorDialog(WGADesignerPlugin.getDefault(), getSite().getShell(), "Unable to open wizard 'New WGADesign'", e1);
        }
      }
       
      });
     
           
      generalHyperLinkGroup.add(_linkCreateWebApp);
      filler = new Label(sectionClient, SWT.NONE);
     
 
     
     
       
        _tblWebApplications = new EditableTableControl<WebApplication>(sectionClient, SWT.NONE,SWT.BORDER|SWT.FULL_SELECTION) {

      @Override
      protected boolean isButtonAreaNeeded() {
        return false;
      }
         
     
        };
       
       
       
       
        GridData tblGridData = new GridData(GridData.FILL_BOTH);     
        tblGridData.minimumHeight = 200;
        tblGridData.verticalSpan = 5;
        _tblWebApplications.setLayoutData(tblGridData);
       
        String[] columnNames = new String[] { "Key", "Title", "Domain", "Design" };       
        _tblWebApplications.init(columnNames, _webAppModel);       
       
        Composite tableActionsContainer = new Composite(sectionClient, SWT.NONE);
        tableActionsContainer.setLayout(new GridLayout(1, false));
        tableActionsContainer.setLayoutData(new GridData(SWT.BEGINNING));
       
        GridData linkGridData = new GridData(SWT.BEGINNING);
        linkGridData.verticalAlignment = SWT.TOP;
        Label lblOpenIn = new Label(tableActionsContainer, SWT.NONE);
        lblOpenIn.setLayoutData(GridDataFactory.copyData(linkGridData));
        lblOpenIn.setText("open selected web application in ...");
       
       
        Hyperlink openInBrowser = new Hyperlink(tableActionsContainer, SWT.NONE);
        openInBrowser.setLayoutData(GridDataFactory.copyData(linkGridData));
        openInBrowser.setText("Browser");
        openInBrowser.addHyperlinkListener(new HyperlinkAdapter() {
          @Override
      public void linkActivated(HyperlinkEvent e) {
            handleOpenInBrowser();
          }
        });
       
        Hyperlink openInDesignEditor = new Hyperlink(tableActionsContainer, SWT.NONE);
        openInDesignEditor.setLayoutData(GridDataFactory.copyData(linkGridData));
        openInDesignEditor.setText("Design Editor");
        openInDesignEditor.addHyperlinkListener(new HyperlinkAdapter() {
          @Override
      public void linkActivated(HyperlinkEvent e) {
            handleOpenInDesignEditor();
          }
        });
       
        Hyperlink openInContentManager = new Hyperlink(tableActionsContainer, SWT.NONE);
        openInContentManager.setLayoutData(GridDataFactory.copyData(linkGridData));
      openInContentManager.setText("Content Manager");
      openInContentManager.addHyperlinkListener(new HyperlinkAdapter() {
          @Override
      public void linkActivated(HyperlinkEvent e) {
            handleOpenInContentManager();
          }
        });
     
      Hyperlink openInAdminClient = new Hyperlink(tableActionsContainer, SWT.NONE);
      openInAdminClient.setLayoutData(GridDataFactory.copyData(linkGridData));
      openInAdminClient.setText("Admin Client");
      openInAdminClient.addHyperlinkListener(new HyperlinkAdapter() {
          @Override
      public void linkActivated(HyperlinkEvent e) {
            handleOpenInAdminClient();
          }
        });
     
      generalHyperLinkGroup.add(openInBrowser);
      generalHyperLinkGroup.add(openInDesignEditor);
      generalHyperLinkGroup.add(openInContentManager);
      generalHyperLinkGroup.add(openInAdminClient);
       
      Label seperator = new Label(tableActionsContainer, SWT.SEPARATOR | SWT.HORIZONTAL);
      seperator.setLayoutData(new GridData(SWT.FILL));
     

        ImageHyperlink exportWebApplication = new ImageHyperlink(tableActionsContainer, SWT.NONE);     
        exportWebApplication.setText("Export web application");
        exportWebApplication.addHyperlinkListener(new HyperlinkAdapter() {
            @Override
            public void linkActivated(HyperlinkEvent e) {
                handleExportWebApplication();
            }
        });
        exportWebApplication.setImage(WGADesignerPlugin.getDefault().getImageRegistry().get(WGADesignerPlugin.IMAGE_EXPORT_WGA_DESIGN));       
        generalHyperLinkGroup.add(exportWebApplication);       
     
      /*
        Menu webApplicationsPopup = new Menu(_tblWebApplications.getTable());
        _tblWebApplications.getTable().setMenu(webApplicationsPopup);
       
View Full Code Here

Examples of org.eclipse.ui.forms.HyperlinkGroup

        super(null, PopupDialog.INFOPOPUP_SHELLSTYLE, true, false, false, false, false, null, null);
        this.controlAttachment = controlAttachment;
        this.messages = messages;
        this.part = part;

        this.hyperlinkGroup = new HyperlinkGroup(controlAttachment.getDisplay());
        this.hyperlinkGroup.setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_ALWAYS);

    }
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.