Skip to content
Snippets Groups Projects
Commit 9beb3d41 authored by Anian Bühler's avatar Anian Bühler
Browse files

added support for "Umlaute" and exception-handle for block-insert

parent a12a9acc
No related branches found
No related tags found
No related merge requests found
......@@ -149,7 +149,8 @@ public class BlockLink {
// the plug shouldn't be connected by the time we reach here. This
// exception will only be thrown if the plug is connected even
// after any insertion-esq links were broken above
throw new RuntimeException("trying to link a plug that's already connected somewhere.");
throw new RuntimeException("trying to link a plug that's already connected somewhere.");
}
// actually form the connection
......
......@@ -48,7 +48,13 @@ public class CommandRule implements LinkRule, WorkspaceListener {
}
link = BlockLink.getBlockLink(workspace, top, bottom, top.getAfterConnector(), bottom.getBeforeConnector());
link.connect();
try{
link.connect();
}catch (RuntimeException re) {
//added by letsgoING
//No Output needed -> it works
//System.out.println("catched Exeption: "+ re);
}
}
}
}
......
......@@ -381,7 +381,7 @@ public abstract class LabelWidget extends JComponent {
* BlockLabelTextField is a java JtextField that internally handles various events
* and provides the semantic to interface with the user. Unlike typical JTextFields,
* the blockLabelTextField allows clients to only enter certain keys board input.
* It also reacts to enters and escapse by delegating the KeyEvent to the parent
* It also reacts to enters and escape by delegating the KeyEvent to the parent
* RenderableBlock.
*/
private class BlockLabelTextField extends JTextField implements MouseListener, DocumentListener, FocusListener, ActionListener {
......@@ -397,7 +397,9 @@ public abstract class LabelWidget extends JComponent {
'G', 'H', 'J', 'K', 'L', 'Z', 'X', 'C', 'V', 'B', 'N', 'M',
'\'', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+',
'-', '=', '{', '}', '|', '[', ']', '\\', ' ',
':', '"', ';', '\'', '<', '>', '?', ',', '.', '/', '`', '~'};
':', '"', ';', '\'', '<', '>', '?', ',', '.', '/', '`', '~',
'ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü', 'ß'};
/** These Key inputs are processed by all this text field */
@SuppressWarnings("deprecation")
private final int[] validMasks = {KeyEvent.VK_BACK_SPACE,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment