Examples of indexOfComponent()


Examples of javax.swing.JTabbedPane.indexOfComponent()

//                      setCaption(gf, mcat.getString(msgSet, msgNumber));
                        Caption.set(gf, mcat.getString(msgSet, msgNumber));
                    }
                    if ((gf.getParent() != null) && (gf.getParent() instanceof JTabbedPane)) {
                        JTabbedPane jt = (JTabbedPane) comp.getParent();
                        int index = jt.indexOfComponent(comp);
                        if (index != -1) {
                            jt.setTitleAt(index, mcat.getString(msgSet, msgNumber, jt.getTitleAt(index)));
                        }
                    }
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

//                      setCaption(gf, mcat.getString(msgSet, msgNumber));
                        Caption.set(gf, mcat.getString(msgSet, msgNumber));
                    }
                    if ((gf.getParent() != null) && (gf.getParent() instanceof JTabbedPane)) {
                        JTabbedPane jt = (JTabbedPane) comp.getParent();
                        int index = jt.indexOfComponent(comp);
                        if (index != -1) {
                            jt.setTitleAt(index, mcat.getString(msgSet, msgNumber, jt.getTitleAt(index)));
                        }
                    }
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

         * TabFolder
         */
        if (comp instanceof JTabbedPane) {
          JTabbedPane tp = (JTabbedPane)comp;
          // NB: Do not use getSelectedIndex() because the index has already changed at this point
          int index = tp.indexOfComponent(oldComp);
          s.push(new TabFocus(tp, index));
        }
        /*
         * TextField
         */
 
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

         * TabFolder
         */
        if (comp instanceof JTabbedPane) {
          JTabbedPane tp = (JTabbedPane)comp;
          // NB: Do not use getSelectedIndex() because the index has already changed at this point
          int index = tp.indexOfComponent(oldComp);
          s.push(new TabFocus(tp, index));
        }
        /*
         * TextField
         */
 
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

   
    // workaround to update icon of tab
    Component c = getParent();
      if (c instanceof JTabbedPane) {
        JTabbedPane tab = (JTabbedPane) c;
        int index = tab.indexOfComponent(this);
        tab.setIconAt(index, icon);
      }
  }

  @Override
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

      // CraigM:23/07/2008 - Changed to JComponent as a JScrollPane can have captions too
      JComponent panel = (JComponent)this._component;
      panel.putClientProperty("qq_caption", this.caption.toString());
      if (panel.getParent() instanceof JTabbedPane){
        JTabbedPane tp = (JTabbedPane)panel.getParent();
        int index = tp.indexOfComponent(panel);
        tp.setTitleAt(index, caption.toString());
      }
      else if (panel instanceof GridField) {
        ((GridField)panel).setCaption(caption);
      }
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

      return ((RadioList)comp).getCaption();
    }
    JPanel panel = (JPanel)comp;
    if (panel.getParent() instanceof JTabbedPane) {
      JTabbedPane tp = (JTabbedPane)panel.getParent();
      int index = tp.indexOfComponent(panel);
      return index >=  0 ? new TextData(tp.getTitleAt(index)) : new TextData("");
    }
    else {
      Border border =  panel.getBorder();
      if (border instanceof TitledBorder) {
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

//                      setCaption(gf, mcat.getString(msgSet, msgNumber));
                        Caption.set(gf, mcat.getString(msgSet, msgNumber));
                    }
                    if ((gf.getParent() != null) && (gf.getParent() instanceof JTabbedPane)) {
                        JTabbedPane jt = (JTabbedPane) comp.getParent();
                        int index = jt.indexOfComponent(comp);
                        if (index != -1) {
                            jt.setTitleAt(index, mcat.getString(msgSet, msgNumber, jt.getTitleAt(index)));
                        }
                    }
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

      return ((RadioList)comp).getCaption();
    }
    JPanel panel = (JPanel)comp;
    if (panel.getParent() instanceof JTabbedPane) {
      JTabbedPane tp = (JTabbedPane)panel.getParent();
      int index = tp.indexOfComponent(panel);
      return index >=  0 ? new TextData(tp.getTitleAt(index)) : new TextData("");
    }
    else {
      Border border =  panel.getBorder();
      if (border instanceof TitledBorder) {
View Full Code Here

Examples of javax.swing.JTabbedPane.indexOfComponent()

      // CraigM:23/07/2008 - Changed to JComponent as a JScrollPane can have captions too
      JComponent panel = (JComponent)this._component;
      panel.putClientProperty("qq_caption", this.caption.toString());
      if (panel.getParent() instanceof JTabbedPane){
        JTabbedPane tp = (JTabbedPane)panel.getParent();
        int index = tp.indexOfComponent(panel);
        tp.setTitleAt(index, caption.toString());
      }
      else if (panel instanceof GridField) {
        ((GridField)panel).setCaption(caption);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.