OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Compare Revisions

Regard whitespace Rev 180 → Rev 181

/trunk/Modules/Module Extension Builder/src/org/openconcerto/modules/extensionbuilder/translation/field/AllTableListPanel.java
32,9 → 32,9
@Override
public void itemSelected(Object item) {
if (item != null) {
tableTranslationPanel.setRightPanel(new JScrollPane(new TableTranslationEditorPanel(extension, (String) item)));
this.tableTranslationPanel.setRightPanel(new JScrollPane(new TableTranslationEditorPanel(this.extension, (String) item)));
} else {
tableTranslationPanel.setRightPanel(new JPanel());
this.tableTranslationPanel.setRightPanel(new JPanel());
}
 
}
/trunk/Modules/Module Extension Builder/src/org/openconcerto/modules/extensionbuilder/translation/field/TableTranslationEditorPanel.java
64,13 → 64,13
c.fill = GridBagConstraints.BOTH;
final JSeparator sep = new JSeparator(JSeparator.VERTICAL);
this.add(sep, c);
hideableComponents.add(sep);
this.hideableComponents.add(sep);
c.gridheight = 1;
c.weightx = 1;
c.gridx++;
c.fill = GridBagConstraints.NONE;
final LocaleSelector comboLang2 = new LocaleSelector();
hideableComponents.add(comboLang2);
this.hideableComponents.add(comboLang2);
comboLang2.setLocale(Locale.ENGLISH);
this.add(comboLang2, c);
// Singular
81,10 → 81,10
this.add(new JLabel("Singulier", SwingConstants.RIGHT), c);
c.gridx++;
 
this.add(textSingular1, c);
this.add(this.textSingular1, c);
c.gridx += 2;
hideableComponents.add(textSingular2);
this.add(textSingular2, c);
this.hideableComponents.add(this.textSingular2);
this.add(this.textSingular2, c);
 
// Plural
c.gridx = 0;
92,10 → 92,10
c.weightx = 0;
this.add(new JLabel("Pluriel", SwingConstants.RIGHT), c);
c.gridx++;
this.add(textPlural1, c);
this.add(this.textPlural1, c);
c.gridx += 2;
hideableComponents.add(textPlural2);
this.add(textPlural2, c);
this.hideableComponents.add(this.textPlural2);
this.add(this.textPlural2, c);
 
// Fields
c.gridx = 0;
111,7 → 111,7
c.gridx = 2;
c.fill = GridBagConstraints.BOTH;
final JSeparator sep2 = new JSeparator(JSeparator.VERTICAL);
hideableComponents.add(sep2);
this.hideableComponents.add(sep2);
this.add(sep2, c);
 
c.fill = GridBagConstraints.HORIZONTAL;
122,14 → 122,14
this.add(new JLabel(fName, SwingConstants.RIGHT), c);
c.gridx++;
final JTextField t1 = new JTextField();
map1.put(fName, t1);
fieldsMap.put(t1, fName);
this.map1.put(fName, t1);
this.fieldsMap.put(t1, fName);
this.add(t1, c);
c.gridx += 2;
final JTextField t2 = new JTextField();
hideableComponents.add(t2);
fieldsMap.put(t2, fName);
map2.put(fName, t2);
this.hideableComponents.add(t2);
this.fieldsMap.put(t2, fName);
this.map2.put(fName, t2);
this.add(t2, c);
c.gridy++;
}
189,22 → 189,22
}
 
});
for (final JTextField textField : map1.values()) {
for (final JTextField textField : this.map1.values()) {
textField.getDocument().addDocumentListener(new SimpleDocumentListener() {
 
@Override
public void changedUpdate(DocumentEvent e, String text) {
extension.setFieldTranslation(tableName, fieldsMap.get(textField), comboLang1.getLocale(), text);
extension.setFieldTranslation(tableName, TableTranslationEditorPanel.this.fieldsMap.get(textField), comboLang1.getLocale(), text);
}
 
});
}
for (final JTextField textField : map2.values()) {
for (final JTextField textField : this.map2.values()) {
textField.getDocument().addDocumentListener(new SimpleDocumentListener() {
 
@Override
public void changedUpdate(DocumentEvent e, String text) {
extension.setFieldTranslation(tableName, fieldsMap.get(textField), comboLang2.getLocale(), text);
extension.setFieldTranslation(tableName, TableTranslationEditorPanel.this.fieldsMap.get(textField), comboLang2.getLocale(), text);
}
 
});
215,11 → 215,11
private void updateUIFrom(Extension extension, String tableName, Object l1, Object l2) {
if (l1 != null) {
final String lang = l1.toString();
updateUI(extension, tableName, lang, textSingular1, textPlural1, map1);
updateUI(extension, tableName, lang, this.textSingular1, this.textPlural1, this.map1);
}
if (l2 != null) {
final String lang = l2.toString();
updateUI(extension, tableName, lang, textSingular2, textPlural2, map2);
updateUI(extension, tableName, lang, this.textSingular2, this.textPlural2, this.map2);
}
 
}
/trunk/Modules/Module Extension Builder/src/org/openconcerto/modules/extensionbuilder/translation/field/FieldTranslation.java
21,19 → 21,19
}
 
public String getTableName() {
return tableName;
return this.tableName;
}
 
public String getFieldName() {
return fieldName;
return this.fieldName;
}
 
public String getLabel() {
return label;
return this.label;
}
 
public String getDocumentation() {
return documentation;
return this.documentation;
}
 
public void setDocumentation(String documentation) {
/trunk/Modules/Module Extension Builder/src/org/openconcerto/modules/extensionbuilder/translation/field/TableTranslation.java
14,7 → 14,7
}
 
public String getTableName() {
return tableName;
return this.tableName;
}
 
public void setSingular(String singular) {
22,7 → 22,7
}
 
public String getSingular() {
return singular;
return this.singular;
}
 
public void setPlural(String plural) {
30,6 → 30,6
}
 
public String getPlural() {
return plural;
return this.plural;
}
}
/trunk/Modules/Module Extension Builder/src/org/openconcerto/modules/extensionbuilder/translation/field/TableTranslationPanel.java
10,20 → 10,20
 
public TableTranslationPanel(Extension extension) {
super(extension);
split.setDividerLocation(250);
this.split.setDividerLocation(250);
}
 
public void setRightPanel(JComponent p) {
super.setRightPanel(p);
split.setDividerLocation(250);
this.split.setDividerLocation(250);
}
 
@Override
public JComponent createLeftComponent() {
return new AllTableListPanel(extension, this);
return new AllTableListPanel(this.extension, this);
}
 
public void select(TableDescritor tableDescriptor) {
((AllTableListPanel) leftComponent).selectItem(tableDescriptor);
((AllTableListPanel) this.leftComponent).selectItem(tableDescriptor);
}
}