Line 1... |
Line 1... |
1 |
/*
|
1 |
/*
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3 |
*
|
3 |
*
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
4 |
* Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
|
5 |
*
|
5 |
*
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
9 |
* language governing permissions and limitations under the License.
|
9 |
* language governing permissions and limitations under the License.
|
Line 121... |
Line 121... |
121 |
if (col.getValueClass().equals(String.class)) {
|
121 |
if (col.getValueClass().equals(String.class)) {
|
122 |
col.setRenderer(new DefaultTableCellRenderer() {
|
122 |
col.setRenderer(new DefaultTableCellRenderer() {
|
123 |
@Override
|
123 |
@Override
|
124 |
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) {
|
124 |
public Component getTableCellRendererComponent(final JTable table, final Object value, final boolean isSelected, final boolean hasFocus, final int row, final int column) {
|
125 |
final JLabel res = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
125 |
final JLabel res = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
|
126 |
final boolean isCurrentUser = ITableModel.getLine(table.getModel(), row).getRow().getID() == UserManager.getUserID();
|
126 |
final boolean isCurrentUser = ITableModel.getLine(table.getModel(), row).getRowAccessor().getID() == UserManager.getUserID();
|
127 |
final int targetStyle = isCurrentUser ? Font.BOLD : Font.PLAIN;
|
127 |
final int targetStyle = isCurrentUser ? Font.BOLD : Font.PLAIN;
|
128 |
if ((res.getFont().getStyle() & targetStyle) == 0) {
|
128 |
if ((res.getFont().getStyle() & targetStyle) == 0) {
|
129 |
res.setFont(res.getFont().deriveFont(targetStyle));
|
129 |
res.setFont(res.getFont().deriveFont(targetStyle));
|
130 |
}
|
130 |
}
|
131 |
return res;
|
131 |
return res;
|
Line 517... |
Line 517... |
517 |
|
517 |
|
518 |
private void updateEncrypted() {
|
518 |
private void updateEncrypted() {
|
519 |
final String pass = String.valueOf(this.getPassField().getPassword());
|
519 |
final String pass = String.valueOf(this.getPassField().getPassword());
|
520 |
final String dbPass = Boolean.getBoolean(LEGACY_PASSWORDS) ? '"' + pass + '"' : pass;
|
520 |
final String dbPass = Boolean.getBoolean(LEGACY_PASSWORDS) ? '"' + pass + '"' : pass;
|
521 |
this.encryptedPass.setText(Login.encodePassword(dbPass));
|
521 |
this.encryptedPass.setText(Login.encodePassword(dbPass));
|
- |
|
522 |
System.err.println("UserCommonSQLElement.UserSQLComponent.updateEncrypted() encode:"+dbPass+":"+this.encryptedPass.getText());
|
522 |
}
|
523 |
}
|
523 |
|
524 |
|
524 |
private boolean checkValidityPassword() {
|
525 |
private boolean checkValidityPassword() {
|
525 |
final boolean b = String.valueOf(this.getPassField().getPassword()).equalsIgnoreCase(String.valueOf(this.getPassFieldConfirm().getPassword()));
|
526 |
final boolean b = String.valueOf(this.getPassField().getPassword()).equalsIgnoreCase(String.valueOf(this.getPassFieldConfirm().getPassword()));
|
526 |
this.panelWarning.setVisible(!b);
|
527 |
this.panelWarning.setVisible(!b);
|