Revision 5814
trunk/frameworks/_fwAndami/src/com/iver/andami/preferences/GenericDlgPreferences.java | ||
---|---|---|
204 | 204 |
DefaultMutableTreeNode node = (DefaultMutableTreeNode) |
205 | 205 |
jTreePlugins.getLastSelectedPathComponent(); |
206 | 206 |
|
207 |
if (node == null) return; |
|
208 |
activePreference = (IPreference) node.getUserObject(); |
|
209 |
jLabelBigTitle.setText(activePreference.getTitle()); |
|
210 |
JPanel prefPanel = activePreference.getPanel(); |
|
211 |
jLabelBigTitle.setIcon(activePreference.getIcon()); |
|
212 |
jPanelContainer.removeAll(); |
|
213 |
jPanelContainer.add(prefPanel); |
|
214 |
prefPanel.setVisible(true); |
|
215 |
repaint(); |
|
207 |
if (node == null) return; |
|
208 |
setActivePage((IPreference) node.getUserObject()); |
|
216 | 209 |
} |
217 | 210 |
}); |
218 | 211 |
jTreePlugins.putClientProperty("JTree.linestyle", "Angled"); |
... | ... | |
447 | 440 |
return jPanelContainer; |
448 | 441 |
} |
449 | 442 |
|
443 |
/** |
|
444 |
* |
|
445 |
*/ |
|
446 |
public void setActivePage(IPreference page) { |
|
447 |
activePreference = page; |
|
448 |
jLabelBigTitle.setText(activePreference.getTitle()); |
|
449 |
JPanel prefPanel = activePreference.getPanel(); |
|
450 |
jLabelBigTitle.setIcon(activePreference.getIcon()); |
|
451 |
jPanelContainer.removeAll(); |
|
452 |
jPanelContainer.add(prefPanel); |
|
453 |
prefPanel.setVisible(true); |
|
454 |
repaint(); |
|
455 |
} |
|
450 | 456 |
|
457 |
|
|
451 | 458 |
} // @jve:decl-index=0:visual-constraint="10,10" |
Also available in: Unified diff