Ignore:
Timestamp:
2017-11-25T00:10:36+01:00 (6 years ago)
Author:
Don-vip
Message:

see #15550 - better (?) resizing of note tooltips

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JMultilineLabel.java

    r11452 r13157  
    4646     */
    4747    public JMultilineLabel(String text, boolean allBold) {
     48        this(text, allBold, false);
     49    }
     50
     51    /**
     52     * Constructs a normal label but adds HTML tags if not already done so.
     53     * Supports both newline characters (<code>\n</code>) as well as the HTML
     54     * <code>&lt;br&gt;</code> to insert new lines.
     55     *
     56     * Use setMaxWidth to limit the width of the label.
     57     * @param text The text to display
     58     * @param allBold If {@code true}, makes all text to be displayed in bold
     59     * @param focusable indicates whether this label is focusable
     60     * @since 13157
     61     */
     62    public JMultilineLabel(String text, boolean allBold, boolean focusable) {
    4863        JosmEditorPane.makeJLabelLike(this, allBold);
    4964        String html = text.trim().replaceAll("\n", "<br>");
     
    5166            html = "<html>" + html + "</html>";
    5267        }
    53         setFocusable(false);
     68        setFocusable(focusable);
    5469        super.setText(html);
    5570    }
Note: See TracChangeset for help on using the changeset viewer.