public void addPanel(String caption, Component comp) { int pos = pages.size(); NotebookPage np = new NotebookPage(); np.setImageResolver(imgres); np.comp = comp; np.label = caption; np.hidden = false; np.poly = null; np.color = Color.gray; np.name = Integer.toString(pos); if (curIndex < 0) curIndex = pos; pages.addElement(np); oobj.add(np.name, np.comp); repaint(); }
public void setImage(int pos, String image) { NotebookPage np = (NotebookPage) pages.elementAt(pos); np.setImage(image); repaint(); }
public void setVisible(int pos, boolean vis) { NotebookPage np = (NotebookPage) pages.elementAt(pos); np.hidden = !vis; layout(); repaint(); }
public void setColor(int pos, Color color) { NotebookPage np = (NotebookPage) pages.elementAt(pos); np.color = color; repaint(); }