OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 144 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 144 Rev 149
Line 28... Line 28...
28
    private static final String KEY_FOOTER_PANEL = "footer-panel";
28
    private static final String KEY_FOOTER_PANEL = "footer-panel";
29
    private static final String KEY_CHILDREN_FRAME = "children-frame";
29
    private static final String KEY_CHILDREN_FRAME = "children-frame";
30
 
30
 
31
    private Boolean active = false;
31
    private Boolean active = false;
32
    private LightUIPanel titlePanel = null;
32
    private LightUIPanel titlePanel = null;
-
 
33
    private LightUIPanel contentPanel;
33
    private LightUIPanel footerPanel = new LightUIPanel(this.getId() + ".footer.panel");
34
    private LightUIPanel footerPanel = new LightUIPanel(this.getId() + ".footer.panel");
34
 
35
 
35
    private List<LightUIFrame> childrenFrame;
36
    private List<LightUIFrame> childrenFrame;
36
 
37
 
37
    // Init from json constructor
38
    // Init from json constructor
Line 43... Line 44...
43
    public LightUIFrame(final LightUIFrame frame) {
44
    public LightUIFrame(final LightUIFrame frame) {
44
        super(frame);
45
        super(frame);
45
        this.active = frame.active;
46
        this.active = frame.active;
46
        this.titlePanel = frame.titlePanel;
47
        this.titlePanel = frame.titlePanel;
47
        this.childrenFrame = frame.childrenFrame;
48
        this.childrenFrame = frame.childrenFrame;
48
 
-
 
-
 
49
        this.contentPanel = frame.contentPanel;
49
        this.setFooterPanel(frame.footerPanel);
50
        this.setFooterPanel(frame.footerPanel);
50
    }
51
    }
51
 
52
 
52
    /**
53
    /**
53
     * Creation of an instance of a frame, this one is initialized with an empty main panel
54
     * Creation of an instance of a frame, this one is initialized with an empty main panel
Line 55... Line 56...
55
     * @param id Id of the frame
56
     * @param id Id of the frame
56
     */
57
     */
57
    public LightUIFrame(final String id) {
58
    public LightUIFrame(final String id) {
58
        super(id);
59
        super(id);
59
        this.setType(TYPE_FRAME);
60
        this.setType(TYPE_FRAME);
60
 
-
 
61
        this.childrenFrame = new ArrayList<LightUIFrame>();
61
        this.childrenFrame = new ArrayList<>();
62
        this.addChild(new LightUIPanel(this.getId() + ".main.panel"));
62
        this.contentPanel = new LightUIPanel(this.getId() + ".main.panel");
-
 
63
        this.addChild(contentPanel);
63
        this.footerPanel.setParent(this);
64
        this.footerPanel.setParent(this);
64
        this.footerPanel.setFillHeight(false);
65
        this.footerPanel.setFillHeight(false);
65
        this.footerPanel.setHeight(50);
66
        this.footerPanel.setHeight(50);
66
 
-
 
67
        this.createTitlePanel();
67
        this.createTitlePanel();
68
    }
68
    }
69
 
69
 
-
 
70
    public LightUIPanel getContentPanel() {
-
 
71
        return this.contentPanel;
-
 
72
    }
-
 
73
 
-
 
74
    public void setContentPanel(LightUIPanel contentPanel) {
-
 
75
        this.contentPanel = contentPanel;
-
 
76
        this.addChild(contentPanel);
-
 
77
    }
-
 
78
 
70
    public LightUIPanel createTitlePanel(final String title) {
79
    public LightUIPanel createTitlePanel(final String title) {
71
        this.createTitlePanel();
80
        this.createTitlePanel();
72
        final LightUILabel titleLabel = new LightUILabel(this.titlePanel.getId() + ".label", title, true);
81
        final LightUILabel titleLabel = new LightUILabel(this.titlePanel.getId() + ".label", title, true);
73
        titleLabel.setVerticalAlignement(VALIGN_CENTER);
82
        titleLabel.setVerticalAlignement(VALIGN_CENTER);
74
        this.titlePanel.getLastLine().addChild(titleLabel);
83
        this.titlePanel.getLastLine().addChild(titleLabel);
Line 84... Line 93...
84
 
93
 
85
    public LightUIPanel getTitlePanel() {
94
    public LightUIPanel getTitlePanel() {
86
        return this.titlePanel;
95
        return this.titlePanel;
87
    }
96
    }
88
 
97
 
-
 
98
    public void setTitlePanel(LightUIPanel titlePanel) {
-
 
99
        titlePanel.setId(this.getId() + ".title.panel");
-
 
100
        this.titlePanel = titlePanel;
-
 
101
    }
-
 
102
 
89
    public LightUIPanel getFooterPanel() {
103
    public LightUIPanel getFooterPanel() {
90
        return this.footerPanel;
104
        return this.footerPanel;
91
    }
105
    }
92
 
106
 
93
    /**
107
    /**