Examples of PaletteEntry


Examples of org.eclipse.gef.palette.PaletteEntry

    public void setVisible( boolean isVisible ) {
        super.setVisible(isVisible);
        PaletteContainer parent = getParent();
        boolean doubleCheck = false;
        FREE: for( Object child : parent.getChildren() ){
            PaletteEntry entry = (PaletteEntry) child;
            if( entry.isVisible() ){
                doubleCheck = true;
                break FREE; // yes I just did that to be funny
            }
        }
        parent.setVisible(doubleCheck);
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

        }
    }
    private ToolEntry findToolEntry( PaletteContainer container, String id ) {
        if( id == null ) return null;
        for( Object item : container.getChildren() ) {
            PaletteEntry entry = (PaletteEntry) item;
            if( entry instanceof ToolEntry ){
                if( id.equals( entry.getId() )){
                    return (ToolEntry) entry;
                }
            }
            else if( entry instanceof PaletteContainer){
                ToolEntry find = findToolEntry((PaletteContainer) entry, id);
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

    private PaletteGroup createCategory(String categoryName) {
        PaletteGroup controls = new PaletteGroup(categoryName);
        controls.setId(categoryName);
        for (ElementTypeDefinition type : JpdlVersionRegistry.getPaletteEntriesFor(jpdlVersion, categoryName).values()) {
            PaletteEntry entry = createEntry(type);
            if (entry != null) {
                controls.add(entry);
            }
        }
        return controls;
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

        String imageName = info.getAttribute("icon");
        ImageDescriptor iconSmall = SharedImages.getImageDescriptor("icons/" + notation + "/palette/" + imageName, true);
        if (iconSmall == null) {
            return null;
        }
        PaletteEntry entry = null;
        if ("node".equals(type)) {
            entry = new CreationToolEntry(label, null, factory, iconSmall, null);
        }
        if ("connection".equals(type)) {
            entry = new ConnectionCreationToolEntry(label, null, factory, iconSmall, null);
        }
        entry.setId(id);
        return entry;
    }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

   */
  public static void save(DesignerPaletteRoot paletteRoot) {
    IPersistentPreferenceStore prefs = getPreferenceStore();

    for (Iterator it=paletteRoot.getChildren().iterator();it.hasNext();){
      PaletteEntry entry = (PaletteEntry)it.next();
      if (entry instanceof TaglibPaletteDrawer){
        TaglibPaletteDrawer pd = (TaglibPaletteDrawer)entry;
        prefs.putValue(PREFS_TAGLIBHIDE_PREFIX + pd.getURI(), Boolean.toString(! pd.isVisible()));
      }
    }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

      if (parentElement instanceof DesignerPaletteRoot){
        List libs = new ArrayList();
        List children = ((DesignerPaletteRoot)parentElement).getChildren();       
        if (!children.isEmpty()) {
          for (Iterator it=children.iterator();it.hasNext();){
            PaletteEntry entry = (PaletteEntry)it.next();
            if (entry instanceof TaglibPaletteDrawer)
              libs.add(entry);
          }
          if (!libs.isEmpty())
            return libs.toArray();
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

   *
   * @see org.eclipse.gef.ui.palette.customize.PaletteCustomizerDialog#setActiveEntry(org.eclipse.gef.palette.PaletteEntry)
   */
  protected void setActiveEntry(PaletteEntry entry) {
    //remove listener on previous entry before adding to new entry
    PaletteEntry pre = getSelectedPaletteEntry();
    if (pre != null) {
      pre.removePropertyChangeListener(applyButtonUpdater);
    } else {
      getButton(APPLY_ID).setEnabled(false);
    }
   
    if (entry != null)
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

      if (_profile.defines(type)) {
        final PaletteDrawer g = _groups.get(type.getGroup());
        final ImageDescriptor ico = EditUIPlugin.getImageDescriptor("/icons/" //$NON-NLS-1$
          + _profile.getIcon(type) + ".png"); //$NON-NLS-1$
        final ObjectCreationFactory fac = new ObjectCreationFactory(type);
        final PaletteEntry entry = new CombinedTemplateCreationEntry(type.name(), "", fac, //$NON-NLS-1$
          fac, ico, ico);
        g.add(entry);
      }
    return drawers;
  }
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

        return drawer;
    }
   
    public PaletteEntry createConnectionEntry() {
        final ElementConnectionFactory normalConnectionFactory = new ConnectionWrapperFactory();
        PaletteEntry tool = new ConnectionCreationToolEntry(
            "Connection Creation",
            "Creating connections",
            new CreationFactory() {
                public Object getNewObject() {
                    return normalConnectionFactory.createElementConnection();
View Full Code Here

Examples of org.eclipse.gef.palette.PaletteEntry

        return drawer;
    }
   
    public PaletteEntry createConnectionEntry() {
        final ElementConnectionFactory normalConnectionFactory = new ConnectionWrapperFactory();
        PaletteEntry tool = new ConnectionCreationToolEntry(
            "Sequence Flow",
            "Creating connections",
            new CreationFactory() {
                public Object getNewObject() {
                    return normalConnectionFactory.createElementConnection();
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.