mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Make JBLabel copyable: JavaDoc
This commit is contained in:
@@ -190,11 +190,20 @@ public class JBLabel extends JLabel implements AnchorableComponent {
|
||||
public void updateUI() {
|
||||
super.updateUI();
|
||||
if (myEditorPane != null) {
|
||||
//init inner components again (if any) to provide proper colors when LAF is being changed
|
||||
setCopyable(false);
|
||||
setCopyable(true);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* In 'copyable' mode JBLabel has the same appearance but user can select text with mouse and copy it to clipboard with standard shortcut.
|
||||
* @return 'this' (the same instance)
|
||||
*/
|
||||
//
|
||||
// By default JBLabel is NOT copyable
|
||||
// This method re
|
||||
public JBLabel setCopyable(boolean copyable) {
|
||||
if (copyable ^ myEditorPane != null) {
|
||||
if (myEditorPane == null) {
|
||||
|
||||
Reference in New Issue
Block a user