diff --git a/src/main/java/edu/mit/blocks/codeblockutil/LabelWidget.java b/src/main/java/edu/mit/blocks/codeblockutil/LabelWidget.java index ba2d67c8f9c9e772bfc8b16c76a2fabeb9273cae..08340eeedb1aa7cc8967dd29abaf73059a9e19d3 100644 --- a/src/main/java/edu/mit/blocks/codeblockutil/LabelWidget.java +++ b/src/main/java/edu/mit/blocks/codeblockutil/LabelWidget.java @@ -472,7 +472,8 @@ public abstract class LabelWidget extends JComponent { * either perform some action that should be triggered by * that key or */ - protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) { + @SuppressWarnings("deprecation") + protected boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) { if (isNumber) { if (e.getKeyChar() == '-' && canProcessNegativeSign()) { return super.processKeyBinding(ks, e, condition, pressed); diff --git a/src/main/java/edu/mit/blocks/renderable/BlockLabel.java b/src/main/java/edu/mit/blocks/renderable/BlockLabel.java index f1ecbd5d802864247a8d3bbd9dc1e327b2982c11..70eae135546c8f36b52ab3a9b1e5c87ddc5e1128 100644 --- a/src/main/java/edu/mit/blocks/renderable/BlockLabel.java +++ b/src/main/java/edu/mit/blocks/renderable/BlockLabel.java @@ -300,6 +300,8 @@ public class BlockLabel implements MouseListener, MouseMotionListener, KeyListen text = text + " handleNetwork"; } else if(workspace.getEnv().getBlock(blockID).getGenusName().toUpperCase().contains("DATA_TO_SEND")){ text = text + " isDataToSend"; + } else if(workspace.getEnv().getBlock(blockID).getGenusName().toUpperCase().contains("SET_INTERVAL")){ + text = text + " setInterval"; } else if(workspace.getEnv().getBlock(blockID).getGenusName().toUpperCase().contains("PUBLISH_ONCHANGE")){ text = text + " publishOnChange"; } else if(workspace.getEnv().getBlock(blockID).getGenusName().toUpperCase().contains("PUBLISH")){ @@ -311,7 +313,10 @@ public class BlockLabel implements MouseListener, MouseMotionListener, KeyListen } workspace.getEnv().getBlock(blockID).setBlockLabel(text); - } else { + }else if(workspace.getEnv().getBlock(blockID).getGenusName().toUpperCase().startsWith("CONSTANT")){ + workspace.getEnv().getBlock(blockID).setBlockLabel(text.toUpperCase()); + }else { + workspace.getEnv().getBlock(blockID).setBlockLabel(text); } }