public JFrame createFrame() { SQLElement element = Configuration.getInstance().getDirectory().getElement("SAISIE_ACHAT"); ListeGestCommEltPanel panel = new ListeGestCommEltPanel(element); panel.setAddVisible(true); IListFrame frame = new IListFrame(panel); IListTotalPanel total = new IListTotalPanel( frame.getPanel().getListe(), Arrays.asList( element.getTable().getField("MONTANT_HT"), element.getTable().getField("MONTANT_TTC"))); GridBagConstraints c = new DefaultGridBagConstraints(); c.gridy = 3; c.weightx = 0; c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.EAST; frame.getPanel().add(total, c); // Date panel Map<IListe, SQLField> map = new HashMap<IListe, SQLField>(); map.put(frame.getPanel().getListe(), element.getTable().getField("DATE")); IListFilterDatePanel datePanel = new IListFilterDatePanel(map, IListFilterDatePanel.getDefaultMap()); c.gridy = 4; c.anchor = GridBagConstraints.CENTER; c.weighty = 0; datePanel.setFilterOnDefault(); frame.getPanel().add(datePanel, c); return frame; }
public JFrame createFrame() { final JFrame frame = new JFrame("Commandes clients"); // Actions frame.getContentPane().add(createAllOrderPanel()); final SQLElement eltCmd = Configuration.getInstance().getDirectory().getElement("COMMANDE_CLIENT"); FrameUtil.setBounds(frame); final File file = IListFrame.getConfigFile(eltCmd, frame.getClass()); if (file != null) new WindowStateManager(frame, file).loadState(); return frame; }