mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
Merge branch 'master' of https://github.com/processing/processing.git into zh-languge
This commit is contained in:
@@ -425,7 +425,16 @@ public class PreferencesFrame {
|
||||
right = Math.max(right, toggleLeft + d.width);
|
||||
top += d.height + GUI_BETWEEN;
|
||||
|
||||
// [ ] Show import suggestions - PDE X
|
||||
|
||||
importSuggestionsBox =
|
||||
new JCheckBox(Language.text("preferences.suggest_imports"));
|
||||
pain.add(importSuggestionsBox);
|
||||
d = importSuggestionsBox.getPreferredSize();
|
||||
importSuggestionsBox.setBounds(left, top, d.width + 10, d.height);
|
||||
right = Math.max(right, left + d.width);
|
||||
top += d.height + GUI_BETWEEN;
|
||||
|
||||
// [ ] Increase maximum available memory to [______] MB
|
||||
|
||||
Container memoryBox = Box.createHorizontalBox();
|
||||
@@ -758,6 +767,8 @@ public class PreferencesFrame {
|
||||
Preferences.setBoolean("pdex.warningsEnabled", warningsCheckerBox.isSelected());
|
||||
Preferences.setBoolean("pdex.ccEnabled", codeCompletionBox.isSelected());
|
||||
Preferences.setBoolean("pdex.ccTriggerEnabled", codeCompletionTriggerBox.isSelected());
|
||||
Preferences.setBoolean("pdex.importSuggestEnabled", importSuggestionsBox.isSelected());
|
||||
|
||||
for (Editor editor : base.getEditors()) {
|
||||
editor.applyPreferences();
|
||||
}
|
||||
@@ -772,6 +783,7 @@ public class PreferencesFrame {
|
||||
codeCompletionBox.setSelected(Preferences.getBoolean("pdex.ccEnabled"));
|
||||
codeCompletionTriggerBox.setSelected(Preferences.getBoolean("pdex.ccTriggerEnabled"));
|
||||
codeCompletionTriggerBox.setEnabled(codeCompletionBox.isSelected());
|
||||
importSuggestionsBox.setSelected(Preferences.getBoolean("pdex.importSuggestEnabled"));
|
||||
deletePreviousBox.
|
||||
setSelected(Preferences.getBoolean("export.delete_target_folder")); //$NON-NLS-1$
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ preferences.show_warnings = Show warnings
|
||||
preferences.code_completion = Code completion
|
||||
preferences.trigger_with = Trigger with
|
||||
preferences.cmd_space = space
|
||||
preferences.suggest_imports = Suggest import statements
|
||||
preferences.increase_max_memory = Increase maximum available memory to
|
||||
preferences.delete_previous_folder_on_export = Delete previous folder on export
|
||||
preferences.hide_toolbar_background_image = Hide tab/toolbar background image
|
||||
|
||||
@@ -165,7 +165,9 @@ public class PFont implements PConstants {
|
||||
/** for subclasses that need to store metadata about the font */
|
||||
// protected HashMap<PGraphics, Object> cacheMap;
|
||||
|
||||
|
||||
/**
|
||||
* @nowebref
|
||||
*/
|
||||
public PFont() { } // for subclasses
|
||||
|
||||
|
||||
@@ -186,7 +188,7 @@ public class PFont implements PConstants {
|
||||
*
|
||||
* ( end auto-generated )
|
||||
*
|
||||
* @webref typography:pfont
|
||||
* @nowebref
|
||||
* @param font font the font object to create from
|
||||
* @param smooth smooth true to enable smoothing/anti-aliasing
|
||||
*/
|
||||
@@ -199,6 +201,7 @@ public class PFont implements PConstants {
|
||||
* Create a new image-based font on the fly. If charset is set to null,
|
||||
* the characters will only be created as bitmaps when they're drawn.
|
||||
*
|
||||
* @nowebref
|
||||
* @param charset array of all unicode chars that should be included
|
||||
*/
|
||||
public PFont(Font font, boolean smooth, char charset[]) {
|
||||
@@ -323,15 +326,18 @@ public class PFont implements PConstants {
|
||||
/**
|
||||
* Adds an additional parameter that indicates the font came from a file,
|
||||
* not a built-in OS font.
|
||||
*
|
||||
* @nowebref
|
||||
*/
|
||||
public PFont(Font font, boolean smooth, char charset[], boolean stream) {
|
||||
this(font, smooth, charset);
|
||||
this.stream = stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param input InputStream
|
||||
*/
|
||||
/**
|
||||
* @nowebref
|
||||
* @param input InputStream
|
||||
*/
|
||||
public PFont(InputStream input) throws IOException {
|
||||
DataInputStream is = new DataInputStream(input);
|
||||
|
||||
|
||||
@@ -680,6 +680,7 @@ public class PGraphics extends PImage implements PConstants {
|
||||
* as the first line of a subclass' constructor to properly set
|
||||
* the internal fields and defaults.
|
||||
*
|
||||
* @nowebref
|
||||
*/
|
||||
public PGraphics() {
|
||||
}
|
||||
|
||||
@@ -269,4 +269,4 @@ public class Engine {
|
||||
private void welcome() {
|
||||
System.out.println("processing.sound v.09 by Wilm Thoben");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ public class MethClaInterface
|
||||
System.loadLibrary("MethClaInterface");
|
||||
}
|
||||
// Functions I want
|
||||
|
||||
public native int[] mixPlay(int[] input, float[] amp);
|
||||
|
||||
|
||||
// Engine
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ import javax.swing.JScrollPane;
|
||||
import javax.swing.ListSelectionModel;
|
||||
import javax.swing.Painter;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.SwingWorker;
|
||||
import javax.swing.UIDefaults;
|
||||
import javax.swing.UIManager;
|
||||
import javax.swing.plaf.InsetsUIResource;
|
||||
@@ -326,12 +327,12 @@ public class CompletionPanel {
|
||||
}
|
||||
}
|
||||
|
||||
boolean mouseClickOnOverloadedMethods = false;
|
||||
if (completionSource == MOUSE_COMPLETION) {
|
||||
// The case of overloaded methods, displayed as 'foo(...)'
|
||||
// They have completion strings as 'foo('. See #2755
|
||||
if (completionString.endsWith("(")) {
|
||||
completionString = completionString.substring(0, completionString
|
||||
.length() - 1);
|
||||
mouseClickOnOverloadedMethods = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,6 +366,18 @@ public class CompletionPanel {
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
|
||||
if(mouseClickOnOverloadedMethods) {
|
||||
// See #2755
|
||||
SwingWorker<Object, Object> worker = new SwingWorker<Object, Object>() {
|
||||
protected Object doInBackground() throws Exception {
|
||||
editor.ta.fetchPhrase(null);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
worker.execute();
|
||||
}
|
||||
|
||||
return true;
|
||||
} catch (BadLocationException e1) {
|
||||
e1.printStackTrace();
|
||||
|
||||
@@ -360,7 +360,7 @@ public class TextArea extends JEditTextArea {
|
||||
* @param evt - the KeyEvent which triggered this method
|
||||
* @return
|
||||
*/
|
||||
private String fetchPhrase(KeyEvent evt) {
|
||||
public String fetchPhrase(KeyEvent evt) {
|
||||
|
||||
int off = getCaretPosition();
|
||||
log2("off " + off);
|
||||
|
||||
Reference in New Issue
Block a user