/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package eric.restrict; import eric.GUI.palette.PaletteManager; import eric.JZirkelCanvas; import java.awt.Font; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.ArrayList; import javax.swing.JCheckBox; import rene.gui.Global; import rene.zirkel.ZirkelCanvas; /** * * @author erichake */ public class RestrictPanelIconsLineTitle extends RestrictPanelLine { private String name; private ArrayList icons=new ArrayList(); public RestrictPanelIconsLineTitle(String nme, String label) { super(label); name=nme; addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setSelectedIcons(isSelected()); } }); initState(); } public void initState() { ZirkelCanvas zc=JZirkelCanvas.getCurrentZC(); if (zc!=null) { setSelected(!zc.isHiddenItem(name)); if (!isSelected()) { setSelectedIcons(false); } } } public void initIconsState() { for (int i=0; i