@@ -131,7 +131,7 @@ public abstract class Editor extends JFrame implements RunnerListener {
131131 protected CopyAsHtmlAction copyAsHtmlAction ;
132132 protected PasteAction pasteAction ;
133133 /** Menu Actions updated on the opening of the edit menu. */
134- protected List <UpdatableAction > editMenuUpdatable = new ArrayList <UpdatableAction >();
134+ protected List <UpdatableAction > editMenuUpdatable = new ArrayList <>();
135135
136136 /** The currently selected tab's undo manager */
137137 private UndoManager undo ;
@@ -144,8 +144,8 @@ public abstract class Editor extends JFrame implements RunnerListener {
144144 // true if inserting text, false if removing text
145145 private boolean isInserting ;
146146 // maintain caret position during undo operations
147- private final Stack <Integer > caretUndoStack = new Stack <Integer >();
148- private final Stack <Integer > caretRedoStack = new Stack <Integer >();
147+ private final Stack <Integer > caretUndoStack = new Stack <>();
148+ private final Stack <Integer > caretRedoStack = new Stack <>();
149149
150150 private FindReplace find ;
151151 JMenu toolsMenu ;
@@ -1069,7 +1069,7 @@ public void actionPerformed(ActionEvent e) {
10691069
10701070 sketchMenu .addMenuListener (new MenuListener () {
10711071 // Menu Listener that populates the menu only when the menu is opened
1072- List <JMenuItem > menuList = new ArrayList <JMenuItem >();
1072+ List <JMenuItem > menuList = new ArrayList <>();
10731073
10741074 @ Override
10751075 public void menuSelected (MenuEvent event ) {
@@ -3162,14 +3162,14 @@ public void statusToolTip(JComponent comp, String message, boolean error) {
31623162 bgColorError = mode .getColor ("errors.selection.error.bgcolor" );
31633163 }
31643164
3165- Color bgColor = error ? //text.startsWith(Language.text("editor.status.error")) ?
3166- bgColorError : bgColorWarning ;
3167- String content = "<html>" +
3168- "<div style='margin: -3 -3 -3 -3; padding: 3 3 3 3; " +
3165+ Color bgColor = error ? bgColorError : bgColorWarning ;
3166+ String css =
3167+ "margin: -3 -3 -3 -3; padding: 3 3 3 3; " +
31693168 "background: #" + PApplet .hex (bgColor .getRGB (), 8 ).substring (2 ) + ";" +
31703169 "font-family: " + font .getFontName () + ", sans-serif;" +
3171- "font-size: " + font .getSize () + "px;'>" + message + "</div></html>" ;
3172- //System.out.println(content);
3170+ "font-size: " + Toolkit .zoom (font .getSize ()) + "px;" ;
3171+ String content =
3172+ "<html> <div style='" + css + "'>" + message + "</div> </html>" ;
31733173 comp .setToolTipText (content );
31743174 }
31753175
0 commit comments