Interface IMainFrame

All Known Implementing Classes:
AbstractListQuotationPanel, BiblioBrolMainFrame, BrolDevAllRibbonMainFrame, BrolEidRibbonMainFrame, BrolMainFrame, BrolMetersMainFrame, BrolRibbonMainFrame, EducaBrolAdminFrame, EducaBrolAdminRibbonFrame, EducaBrolFrame, EducaBrolRibbonFrame, EducaBrolTeacherFrame, EducaBrolTeacherRibbonFrame, EidMainFrame, ExaminationsListQuotationPanel, FinderMainFrame, FinderRibbonMainFrame, FontViewerRibbonMainFrame, MediaBrolMainFrame, MediabrolRibbonMainFrame, MReporterMainFrame, NavigabrolRibbonMainFrame, RenamerMainFrame, StudentsListAVGPanel, StudentsListQuotationPanel, StudentsListTimeChartPanel

public interface IMainFrame
Defines some methods needed by the most of main JFrames in the BrolDev applications.
May be used like that :
 private void showPanel(CardsEnum card) {
        JPanel currentPanel;
        
        switch (card) {
        case ONE_ITEM:
        
                if (onePanel == null) {
                        // Creates the panel the first time
                        onePanel = new OnePanel();
                        // Adds the panel
                        cardsPanel.add(onePanel, card.name());
                }
                
                statusBar.setViewName("One panel");
                currentPanel = onePanel;
                break;
                
        case ANOTHER_ITEM:
        
                if (anotherPanel == null) {
                        // Creation of the panel the first time
                        anotherPanel = new AnotherPanel();
                        // Adds the panel
                        cardsPanel.add(anotherPanel, card.name());
                }
                
                statusBar.setViewName("Another panel");
                currentPanel = anotherPanel;
                break;
                
        default:
        
                // The home panel is created and added to the card panel
                // at the frame initialization.
                currentPanel = homePanel;
                statusBar.setViewName("Home");
                break;
        }
 
        if (currentPanel != homePanel) {
                // do some stuff on the panel
        }
        cardsPanelLayout.show(cardsPanel, card.name());
 }
 
Since:
1.0 Jan 12, 2009, 1.0
Version:
%I%, %G%
Author:
Steph GAUDRY
  • Method Details