Line 32... |
Line 32... |
32 |
import org.openconcerto.erp.preferences.GestionPieceCommercialePanel;
|
32 |
import org.openconcerto.erp.preferences.GestionPieceCommercialePanel;
|
33 |
import org.openconcerto.erp.preferences.ImpressionGestCommPreferencePanel;
|
33 |
import org.openconcerto.erp.preferences.ImpressionGestCommPreferencePanel;
|
34 |
import org.openconcerto.erp.preferences.MailRelancePreferencePanel;
|
34 |
import org.openconcerto.erp.preferences.MailRelancePreferencePanel;
|
35 |
import org.openconcerto.erp.preferences.ModeReglementDefautPrefPanel;
|
35 |
import org.openconcerto.erp.preferences.ModeReglementDefautPrefPanel;
|
36 |
import org.openconcerto.erp.preferences.NumerotationPreferencePanel;
|
36 |
import org.openconcerto.erp.preferences.NumerotationPreferencePanel;
|
- |
|
37 |
import org.openconcerto.erp.preferences.PayPalPreferencePanel;
|
37 |
import org.openconcerto.erp.preferences.PayeGlobalPreferencePanel;
|
38 |
import org.openconcerto.erp.preferences.PayeGlobalPreferencePanel;
|
38 |
import org.openconcerto.erp.preferences.SauvegardeEnLignePreferencePanel;
|
39 |
import org.openconcerto.erp.preferences.SauvegardeEnLignePreferencePanel;
|
39 |
import org.openconcerto.erp.preferences.SauvegardeFichierPreferencePanel;
|
40 |
import org.openconcerto.erp.preferences.SauvegardeFichierPreferencePanel;
|
40 |
import org.openconcerto.erp.preferences.SocietePreferencePanel;
|
41 |
import org.openconcerto.erp.preferences.SocietePreferencePanel;
|
41 |
import org.openconcerto.erp.preferences.TemplatePreferencePanel;
|
42 |
import org.openconcerto.erp.preferences.TemplatePreferencePanel;
|
Line 49... |
Line 50... |
49 |
import java.util.Map.Entry;
|
50 |
import java.util.Map.Entry;
|
50 |
|
51 |
|
51 |
import javax.swing.tree.DefaultMutableTreeNode;
|
52 |
import javax.swing.tree.DefaultMutableTreeNode;
|
52 |
|
53 |
|
53 |
public class ComptaPrefTreeNode extends DefaultMutableTreeNode {
|
54 |
public class ComptaPrefTreeNode extends DefaultMutableTreeNode {
|
54 |
public ComptaPrefTreeNode() {
|
55 |
public ComptaPrefTreeNode(final ModuleManager moduleManager) {
|
55 |
super(" Préférences");
|
56 |
super(" Préférences");
|
56 |
|
57 |
|
57 |
// Globale
|
58 |
// Globale
|
58 |
final PrefTreeNode nsGlobale = new PrefTreeNode(EmptyPreferencePanel.class, "Globales", new String[] {}, true);
|
59 |
final PrefTreeNode nsGlobale = new PrefTreeNode(EmptyPreferencePanel.class, "Globales", new String[] {}, true);
|
59 |
// Poste
|
60 |
// Poste
|
Line 118... |
Line 119... |
118 |
nsGlobale.add(new PrefTreeNode(GenerationDocGlobalPreferencePanel.class, "Génération des Documents", new String[] { "documents" }));
|
119 |
nsGlobale.add(new PrefTreeNode(GenerationDocGlobalPreferencePanel.class, "Génération des Documents", new String[] { "documents" }));
|
119 |
nsGlobale.add(new PrefTreeNode(GestionClientPreferencePanel.class, "Gestion des clients", new String[] { "client", "service" }));
|
120 |
nsGlobale.add(new PrefTreeNode(GestionClientPreferencePanel.class, "Gestion des clients", new String[] { "client", "service" }));
|
120 |
nsGlobale.add(new PrefTreeNode(GestionCommercialeGlobalPreferencePanel.class, "Gestion des piéces commericales", new String[] { "transfert", "numéro" }));
|
121 |
nsGlobale.add(new PrefTreeNode(GestionCommercialeGlobalPreferencePanel.class, "Gestion des piéces commericales", new String[] { "transfert", "numéro" }));
|
121 |
nsGlobale.add(new PrefTreeNode(MailRelancePreferencePanel.class, "Email de relance", new String[] { "relance", "mail" }));
|
122 |
nsGlobale.add(new PrefTreeNode(MailRelancePreferencePanel.class, "Email de relance", new String[] { "relance", "mail" }));
|
122 |
|
123 |
|
- |
|
124 |
// PayPal
|
- |
|
125 |
final PrefTreeNode nPayPall = new PrefTreeNode(PayPalPreferencePanel.class, "PayPal", new String[] { "paypal", "facture" });
|
- |
|
126 |
nsGlobale.add(nPayPall);
|
- |
|
127 |
|
123 |
// Impression
|
128 |
// Impression
|
124 |
final PrefTreeNode nPrint = new PrefTreeNode(EmptyPreferencePanel.class, "Impression", new String[] { "Impressions" });
|
129 |
final PrefTreeNode nPrint = new PrefTreeNode(EmptyPreferencePanel.class, "Impression", new String[] { "Impressions" });
|
125 |
final PrefTreeNode nPrintGestComm = new PrefTreeNode(ImpressionGestCommPreferencePanel.class, "Gestion commerciale", new String[] { "impression" });
|
130 |
final PrefTreeNode nPrintGestComm = new PrefTreeNode(ImpressionGestCommPreferencePanel.class, "Gestion commerciale", new String[] { "impression" });
|
126 |
final PrefTreeNode nPrintPaye = new PrefTreeNode(ImpressionPayePreferencePanel.class, "Paye", new String[] { "impression" });
|
131 |
final PrefTreeNode nPrintPaye = new PrefTreeNode(ImpressionPayePreferencePanel.class, "Paye", new String[] { "impression" });
|
127 |
final PrefTreeNode nPrintCompta = new PrefTreeNode(ImpressionComptaPreferencePanel.class, "Comptabilité", new String[] { "impression" });
|
132 |
final PrefTreeNode nPrintCompta = new PrefTreeNode(ImpressionComptaPreferencePanel.class, "Comptabilité", new String[] { "impression" });
|
Line 155... |
Line 160... |
155 |
|
160 |
|
156 |
// Mail
|
161 |
// Mail
|
157 |
final PrefTreeNode nMail = new PrefTreeNode(EmailNode.class, "EMail", new String[] { "email", "mail", "courriel" });
|
162 |
final PrefTreeNode nMail = new PrefTreeNode(EmailNode.class, "EMail", new String[] { "email", "mail", "courriel" });
|
158 |
nsPoste.add(nMail);
|
163 |
nsPoste.add(nMail);
|
159 |
|
164 |
|
- |
|
165 |
|
160 |
// add preferences for modules
|
166 |
// add preferences for modules
|
161 |
for (final AbstractModule module : ModuleManager.getInstance().getRunningModules().values()) {
|
167 |
for (final AbstractModule module : moduleManager.getRunningModules().values()) {
|
162 |
for (final Entry<Boolean, List<ModulePreferencePanelDesc>> e : module.getPrefDescriptorsByLocation().entrySet()) {
|
168 |
for (final Entry<Boolean, List<ModulePreferencePanelDesc>> e : module.getPrefDescriptorsByLocation(moduleManager.getRoot()).entrySet()) {
|
163 |
final DefaultMutableTreeNode node = e.getKey() ? nsPoste : nsGlobale;
|
169 |
final DefaultMutableTreeNode node = e.getKey() ? nsPoste : nsGlobale;
|
164 |
final List<ModulePreferencePanelDesc> descs = e.getValue();
|
170 |
final List<ModulePreferencePanelDesc> descs = e.getValue();
|
165 |
if (descs.size() > 1) {
|
171 |
if (descs.size() > 1) {
|
166 |
// if there's more than one panel, create an additional level
|
172 |
// if there's more than one panel, create an additional level
|
167 |
final DefaultMutableTreeNode moduleNode = new PrefTreeNode(EmptyPreferencePanel.class, module.getName(), new String[] { module.getName() });
|
173 |
final DefaultMutableTreeNode moduleNode = new PrefTreeNode(EmptyPreferencePanel.class, module.getName(), new String[] { module.getName() });
|