more space for prefs dialog on linux, also fix ctrl-, problem

This commit is contained in:
benfry
2007-09-26 09:48:36 +00:00
parent d35ff9cc25
commit 87715edddd
3 changed files with 22 additions and 9 deletions

View File

@@ -93,6 +93,7 @@ public class EditorListener {
* Called by JEditTextArea inside processKeyEvent(). Note that this
* won't intercept actual characters, because those are fired on
* keyTyped().
* @return true if the event has been handled (to remove it from the queue)
*/
public boolean keyPressed(KeyEvent event) {
// don't do things if the textarea isn't editable
@@ -504,11 +505,20 @@ public class EditorListener {
//static final int CTRL_ALT = ActionEvent.ALT_MASK |
// Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
/*
public boolean keyTyped(KeyEvent event) {
char c = event.getKeyChar();
int code = event.getKeyCode();
if ((event.getModifiers() & KeyEvent.CTRL_MASK) != 0) {
// on linux, ctrl-comma (prefs) being passed through to the editor
if (c == KeyEvent.VK_COMMA) {
event.consume();
return true;
}
}
return false;
/*
if ((event.getModifiers() & CMD_ALT) == CMD_ALT) {
if (code == KeyEvent.VK_LEFT) {
//if (c == '[') {
@@ -521,8 +531,9 @@ public class EditorListener {
}
}
return false;
*/
}
*/
/**

View File

@@ -223,7 +223,8 @@ public class Preferences {
new JCheckBox("Use multiple .jar files when exporting applets");
pain.add(exportSeparateBox);
d = exportSeparateBox.getPreferredSize();
exportSeparateBox.setBounds(left, top, d.width, d.height);
// adding +10 because ubuntu + jre 1.5 truncating items
exportSeparateBox.setBounds(left, top, d.width + 10, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;
@@ -234,7 +235,7 @@ public class Preferences {
new JCheckBox("Prompt for name when opening or creating a sketch");
pain.add(sketchPromptBox);
d = sketchPromptBox.getPreferredSize();
sketchPromptBox.setBounds(left, top, d.width, d.height);
sketchPromptBox.setBounds(left, top, d.width + 10, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;
@@ -244,7 +245,7 @@ public class Preferences {
sketchCleanBox = new JCheckBox("Delete empty sketches on Quit");
pain.add(sketchCleanBox);
d = sketchCleanBox.getPreferredSize();
sketchCleanBox.setBounds(left, top, d.width, d.height);
sketchCleanBox.setBounds(left, top, d.width + 10, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;
@@ -339,7 +340,7 @@ public class Preferences {
externalEditorBox = new JCheckBox("Use external editor");
pain.add(externalEditorBox);
d = externalEditorBox.getPreferredSize();
externalEditorBox.setBounds(left, top, d.width, d.height);
externalEditorBox.setBounds(left, top, d.width + 10, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;
@@ -349,7 +350,7 @@ public class Preferences {
checkUpdatesBox = new JCheckBox("Check for updates on startup");
pain.add(checkUpdatesBox);
d = checkUpdatesBox.getPreferredSize();
checkUpdatesBox.setBounds(left, top, d.width, d.height);
checkUpdatesBox.setBounds(left, top, d.width + 10, d.height);
right = Math.max(right, left + d.width);
top += d.height + GUI_BETWEEN;

View File

@@ -1642,8 +1642,9 @@ public class JEditTextArea extends JComponent
switch(evt.getID()) {
case KeyEvent.KEY_TYPED:
//if ((editorListener != null) && !editorListener.keyTyped(evt)) {
inputHandler.keyTyped(evt);
if ((editorListener != null) && !editorListener.keyTyped(evt)) {
inputHandler.keyTyped(evt);
}
break;
case KeyEvent.KEY_PRESSED:
if ((editorListener != null) && !editorListener.keyPressed(evt)) {