public PaletteElement createElement(String type, String name) {
    String prefix = type + "." + name;
    String command = getResourceString(prefix + ".command");
    String caption = getResourceString(prefix + ".caption");

    Icon icon = IconLoader.getInstance().getIcon(getResourceString(prefix + ".icon"));
    PaletteElement element = new PaletteElement(icon, caption, command, this, type);
    if (name.equals("derivation")) element.setEnabled(false);
    element.setToolTipText(getResourceString(prefix + ".tooltip"));

    elementMap.put(name, element);
    // content.add(element);
    // content.add(PaletteAccordion.getSpacer(0,1));
    return element;
  }
  private void createTitle() {
    title = new JPanel();

    title.addMouseListener(
        new MouseAdapter() {
          public void mousePressed(MouseEvent me) {
            parent.setOpenPalette(name);
          }
        });

    title.setLayout(new BorderLayout());

    Icon icon = IconLoader.getInstance().getIcon(IconType.PALETTE_CLOSED);
    nameLabel = new JLabel(name, icon, JLabel.LEFT);
    title.add(nameLabel, BorderLayout.CENTER);

    title.setMaximumSize(new Dimension(32767, 24));
    Dimension size = new Dimension(200, 24);
    title.setSize(size);
    title.setPreferredSize(size);

    this.add(title, BorderLayout.NORTH);
  }
 public void setUnselectedLayout() {
   title.setBorder(PaletteAccordion.getUnselectedPaletteBorder());
   title.setBackground(PaletteAccordion.getUnselectedPaletteBackground());
   Icon icon = IconLoader.getInstance().getIcon(IconType.PALETTE_CLOSED);
   nameLabel.setIcon(icon);
 }