public List getModelChildren() {
		List modelChildren;
		if (getModel() instanceof PaletteContainer)
			modelChildren = new ArrayList(
					((PaletteContainer) getModel()).getChildren());
		else
			return Collections.EMPTY_LIST;

		PaletteEntry prevVisibleEntry = null;
		for (Iterator iter = modelChildren.iterator(); iter.hasNext();) {
			PaletteEntry entry = (PaletteEntry) iter.next();
			if (!entry.isVisible())
				// not visible
				iter.remove();
			else if (entry instanceof PaletteSeparator
					&& prevVisibleEntry == null)
				// first visible item in a group is a separator, don't need it
				iter.remove();
			else if (entry instanceof PaletteSeparator
					&& prevVisibleEntry instanceof PaletteSeparator)
				// previous visible entry was a separator, don't need it
				iter.remove();
			else
				prevVisibleEntry = entry;
		}
		// check to see if last visible entry was a separator, and thus should
		// be hidden
		if (prevVisibleEntry instanceof PaletteSeparator)
			modelChildren.remove(prevVisibleEntry);

		return modelChildren;
	}