Package org.eclipse.jst.pagedesigner.dtresourceprovider

Examples of org.eclipse.jst.pagedesigner.dtresourceprovider.IDTSkin


    currentButton.setText(DialogsMessages.getString("WPEPropertyPage.Current.Button")); //$NON-NLS-1$
    currentButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        String nsURI = getCurrentNSURI();
        IStructuredSelection selection = (IStructuredSelection)skinsTable.getSelection();
        IDTSkin dtSkin = (IDTSkin)selection.getFirstElement();
        if (dtSkin != null) {
          localCurrentSkinMap.put(nsURI, dtSkin);
          skinsTable.refresh();
          updateButtons();
        }
View Full Code Here


  @Override
  protected void performDefaults() {
    List<TaglibData> taglibDataList = getTaglibDataList();
    for (TaglibData taglibData: taglibDataList) {
      String nsURI = taglibData.getNSURI();
      IDTSkin defaultDTSkin = DTSkinManager.getInstance(project).getDefaultSkin(nsURI);
      localCurrentSkinMap.put(nsURI, defaultDTSkin);
    }
    skinsTable.refresh();
    updateButtons();
    super.performDefaults();
View Full Code Here

  @Override
  public boolean performOk() {
    Set keys = localCurrentSkinMap.keySet();
    for (Object key: keys) {
      String nsURI = (String)key;
      IDTSkin dtSkin = localCurrentSkinMap.get(nsURI);
      DTSkinManager.getInstance(project).setCurrentSkin(nsURI, dtSkin);
    }
    EditorUtil.refreshAllWPEDesignViewers();
    return super.performOk();
  }
View Full Code Here

    EditorUtil.refreshAllWPEDesignViewers();
    return super.performOk();
  }

  private IDTSkin getLocalCurrentSkin() {
    IDTSkin localCurrentSkin = null;
    String nsURI = getCurrentNSURI();
    localCurrentSkin = localCurrentSkinMap.get(nsURI);
    if (localCurrentSkin == null) {
      localCurrentSkin = DTSkinManager.getInstance(project).getCurrentSkin(nsURI);
    }
View Full Code Here

    if (skinsTable != null) {
      IStructuredSelection selection = (IStructuredSelection)skinsTable.getSelection();
      if (selection != null) {
        Object selectedObject = selection.getFirstElement();
        if (selectedObject instanceof IDTSkin) {
          IDTSkin localCurrentSkin = getLocalCurrentSkin();
          if ((IDTSkin)selectedObject != localCurrentSkin) {
            currentButtonEnabled = true;
          }
        }
      }
View Full Code Here

        new MenuItem(menu, SWT.SEPARATOR);
      }
      for (TaglibData taglibData: taglibDataList) {
        String nsURI = taglibData.getNSURI();
        DTSkinManager dtSkinManager = DTSkinManager.getInstance(project);
        IDTSkin currentDTSkin = dtSkinManager.getCurrentSkin(nsURI);
        MenuItem menuItem = new MenuItem(menu, SWT.CASCADE);
        menuItem.setText(taglibData.getName());
        Menu skinMenu = new Menu(menuItem);
        menuList.add(skinMenu);
        menuItem.setMenu(skinMenu);
View Full Code Here

    }
    for (TaglibData taglibData: taglibDataList) {
      String nsURI = taglibData.getNSURI();
      MenuManager newMgr = new MenuManager(taglibData.getName());
      DTSkinManager dtSkinManager = DTSkinManager.getInstance(project);
      IDTSkin currentDTSkin = dtSkinManager.getCurrentSkin(nsURI);
      List<IDTSkin> dtSkins = dtSkinManager.getSkins(nsURI);
      for (IDTSkin dtSkin: dtSkins) {
        newMgr.add(new ChangeCurrentSkinAction(nsURI, dtSkin, dtSkin == currentDTSkin));
      }
      parent.appendToGroup(IWorkbenchActionConstants.MB_ADDITIONS, newMgr);
View Full Code Here

     * (non-Javadoc)
     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
     */
    public void widgetSelected(SelectionEvent event) {
      String nsURI = (String)event.widget.getData(DATAKEY_NSURI);
      IDTSkin dtSkin = (IDTSkin)event.widget.getData(DATAKEY_DTSKIN);
      DTSkinManager.getInstance(project).setCurrentSkin(nsURI, dtSkin);
      EditorUtil.refreshAllWPEDesignViewers();
    }
View Full Code Here

     * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
     */
    public String getText(Object element) {
      String text = null;
      if (element instanceof IDTSkin) {
        IDTSkin dtSkin = (IDTSkin)element;
        text = dtSkin.getName();
        if (dtSkin == getLocalCurrentSkin()) {
          text += " "  + DialogsMessages.getString("WPEPropertyPage.Skins.Item.Current"); //$NON-NLS-1$ //$NON-NLS-2$
        }
      }
      return text;
View Full Code Here

    currentButton.setText(DialogsMessages.getString("WPEPropertyPage.Current.Button")); //$NON-NLS-1$
    currentButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent event) {
        String nsURI = getCurrentNSURI();
        IStructuredSelection selection = (IStructuredSelection)skinsTable.getSelection();
        IDTSkin dtSkin = (IDTSkin)selection.getFirstElement();
        if (dtSkin != null) {
          localCurrentSkinMap.put(nsURI, dtSkin);
          skinsTable.refresh();
          updateButtons();
        }
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.dtresourceprovider.IDTSkin

Copyright © 2018 www.massapicom. 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.