Exemple #1
0
  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();
  }
Exemple #2
0
 public void setImage(int pos, String image) {
   NotebookPage np = (NotebookPage) pages.elementAt(pos);
   np.setImage(image);
   repaint();
 }
Exemple #3
0
 public void setVisible(int pos, boolean vis) {
   NotebookPage np = (NotebookPage) pages.elementAt(pos);
   np.hidden = !vis;
   layout();
   repaint();
 }
Exemple #4
0
 public void setColor(int pos, Color color) {
   NotebookPage np = (NotebookPage) pages.elementAt(pos);
   np.color = color;
   repaint();
 }