示例#1
0
  @Override
  public void insertTab(String title, Icon icon, Component component, String tip, int index) {
    super.insertTab(title, icon, component, tip, index);

    if (!parentFrame.isTabCloseButtonEnabled()) return;

    MDITabTitle newComponent = new MDITabTitle(parentFrame, this, title, icon, component);
    setTabComponentAt(indexOfComponent(component), newComponent);
  }
示例#2
0
 /** Regular paint method from <code>Component</code> class. */
 public void paint(Graphics g) {
   if (getTabCount() == 0) {
     // if there are no tabs in tabbed pane, draw a fillRect for
     // entire area of tabbed pane so as to reflect the background
     // that of the desktop pane which is used along with this tabbed
     // pane in MDIFrame class.
     g.setColor(parentFrame.getDektopPane().getBackground());
     g.fillRect(0, 0, getWidth(), getHeight());
   } else {
     super.paint(g);
   }
 }
示例#3
0
 /** Method called after MDI creation. */
 public void afterMDIcreation(MDIFrame frame) {
   MDIFrame.addStatusComponent(new Clock());
 }