show hover text when the mouse is over the 'debug' button

This commit is contained in:
Ben Fry
2015-09-20 15:46:30 -04:00
parent 8cb8bc300d
commit 9cbc1a79f4
3 changed files with 9 additions and 6 deletions

View File

@@ -27,6 +27,7 @@ import java.util.ArrayList;
import java.util.List;
import javax.swing.Box;
import javax.swing.JLabel;
import processing.app.Language;
import processing.app.ui.Editor;
@@ -109,7 +110,8 @@ public class JavaToolbar extends EditorToolbar {
}
public void addModeButtons(Box box) {
@Override
public void addModeButtons(Box box, JLabel label) {
EditorButton debugButton = new EditorButton(mode, "/lib/toolbar/debug",
Language.text("toolbar.debug")) {
@@ -122,6 +124,7 @@ public class JavaToolbar extends EditorToolbar {
if (((JavaEditor) editor).isDebuggerEnabled()) {
debugButton.setSelected(true);
}
debugButton.setRolloverLabel(label);
box.add(debugButton);
addGap(box);
}