347 |
// Document changed. |
// Document changed. |
348 |
modelChanged(); |
modelChanged(); |
349 |
} |
} |
350 |
else if (event.getPropertyName().equals("enabled")) |
else if (event.getPropertyName().equals("enabled") |
351 |
|
|| event.getPropertyName().equals("editable")) |
352 |
{ |
{ |
353 |
updateComponentColors(); |
updateComponentColors(); |
354 |
} |
} |
1085 |
*/ |
*/ |
1086 |
void updateComponentColors() |
void updateComponentColors() |
1087 |
{ |
{ |
1088 |
|
if (textComponent.isEditable()) |
1089 |
|
textComponent.setBackground(background); |
1090 |
|
else |
1091 |
|
textComponent.setBackground(inactiveBackground); |
1092 |
|
|
1093 |
if (textComponent.isEnabled()) |
if (textComponent.isEnabled()) |
1094 |
{ |
textComponent.setForeground(foreground); |
|
textComponent.setForeground(foreground); |
|
|
textComponent.setBackground(background); |
|
|
} |
|
1095 |
else |
else |
1096 |
{ |
textComponent.setForeground(inactiveForeground); |
|
textComponent.setForeground(inactiveForeground); |
|
|
textComponent.setBackground(inactiveBackground); |
|
|
} |
|
1097 |
} |
} |
1098 |
} |
} |