Example #1
0
 public void updateSelectedTab(JPanelTab pan)
 {
     if (ChangeSelectedTabEvent != null)
     {
         ChangeSelectedTabEvent(this, pan);
     }
 }
Example #2
0
        public void addTab(JPanelTab tab)
        {
            int index = nextIndex();
            int t = getNextTabY(index, tab.getTab().NormalImage().Height);
            if (index == 0)
            {
                tabPage.Size = new Size(tab.getTab().NormalImage().Width, Height);
            }

            var pic = new JImageTab
                          {
                              BackColor = Color.Transparent,
                              Image = tab.getTab().NormalImage(),
                              NormalImage = tab.getTab().NormalImage(),
                              EnterImage = tab.getTab().EnterImage(),
                              PressedImage = tab.getTab().PressedImage(),
                              ActiveImage = tab.getTab().ActiveImage(),
                              Size = tab.getTab().NormalImage().Size
                          };

            pic.BackColor = Color.Transparent;
            pic.Location = new Point(tabPage.Location.X, t);
            tabPage.Controls.Add(pic);

            tab.initialize(pic, this);

            _pages.Add(index, tab);
        }
Example #3
0
        private void jTabbedPane1_ChangeSelectedTabEvent(JTabbedPane parent, JPanelTab tab)
        {
            if (tab is IGamePanel)
            {
                RConfig.Instance.ActiveGame = ((IGamePanel) tab).getGame();
            }

            if (CheckInstalled(true))
            {
                UpdateStatusLabel("");
            }
        }
Example #4
0
 public bool isSelected(JPanelTab p)
 {
     return _tabbedPane.SelectedTab == p;
 }