diff --git a/content/api_el/environment/images/ide.gif b/content/api_el/environment/images/ide.gif new file mode 100644 index 000000000..2508b3d12 Binary files /dev/null and b/content/api_el/environment/images/ide.gif differ diff --git a/content/api_el/environment/index.html b/content/api_el/environment/index.html new file mode 100644 index 000000000..71e41d386 --- /dev/null +++ b/content/api_el/environment/index.html @@ -0,0 +1,937 @@ +

Περιβάλλον (IDE). Το Περιβάλλον Processing περιλαμβάνει έναν επεξεργαστή κειμένου, έναν μεταφραστή και ένα παράθυρο προβολής. Δίνει τη δυνατότητα δημιουργίας λογισμικού μέσα σε ένα προσεχτικά σχεδιασμένο σύνολο περιορισμών.

+ + +

+ Περίληψη
+ + Processing Development Environment (PDE)
+ Προτιμήσεις
+ Σχέδια και Σχεδιοθήκη
+
Διεκπεραιωτές
+ Συντεταγμένες
+ Καρτέλες, Πολλαπλά Αρχεία, Κλάσεις
+ Προγραμματιστικές Λειτουργίες
+ Προσθήκη Βιβλιοθηκών, Εργαλείων, Λειτουργιών
+ Εξαγωγή
+ +

+ + + + + +
+ Top Περίληψη +
+ +

+ Το Processing Development Environment (PDE) (Προγραμματιστικό Περιβάλλον + Processing) διευκολύνει τη συγγραφή προγραμμάτων Processing. Τα + προγράμματα γράφονται στον Επεξεργαστή Κειμένου και ξεκινούν αν πατήσετε + το πλήκτρο Εκτέλεσης. Στην Processing ένα πρόγραμμα λέγεται Σχέδιο. Τα + Σχέδια αποθηκεύονται στη Σχεδιοθήκη, η οποία είναι ένας φάκελος στον + υπολογιστή σας. Είναι εύκολο να ανοίξετε τα Σχέδια αν πατήσετε στο + κουμπί Άνοιγμα. +

+ +

+ Τα Σχέδια μπορούν να αναπαραστήσουν δισδιάστατα και τρισδιάστατα + γραφικά. Ο προεπιλεγμένος διεκπεραιωτής είναι για τη σχεδίαση + δισδιάστατων γραφικών. Ο διεκπεραιωτής P3D δίνει τη δυνατότητα + αναπαράστασης τρισδιάστατων γραφικών, ο οποίος συμπεριλαμβάνει έλεγχο + για την κάμερα, τον φωτισμό και απόδοση επιφανειών. Ο διεκπεραιωτής P2D + είναι ένας γρήγορος, αλλά λιγότερο ακριβής διεκπεραιωτής για την + αναπαράσταση δισδιάστατων γραφικών. Και ο P2D και ο P3D υποστηρίζουν + επιτάχυνση από το υλικό αν ο υπολογιστής σας έχει μια κάρτα γραφικών που + είναι συμβατή με OpenGL. +

+ +

+ Οι δυνατότητες της Processing επεκτείνονται με Βιβλιοθήκες + και Εργαλεία. Οι βιβλιοθήκες δίνουν τη δυνατότητα στα Σχέδια να + κάνουν πράγματα πέρα από τον βασικό κώδικα της + Processing. Υπάρχουν εκατοντάδες βιβλιοθήκες οι οποίες διατίθενται από + την κοινότητα της Processing που μπορούν να προστεθούν στα σχέδιά σας + και να δώσουν νέες δυνατότητες όπως αναπαραγωγή ήχων, υπολογιστική όραση + και προχωρημένη 3D γεωμετρία. Τα εργαλεία επεκτείνουν το PDE για τη + διευκόλυνση της δημιουργίας των Σχεδίων με την παροχή διεπαφών για + εργασίες όπως επιλογή χρωμάτων. +

+ +

+ Η Processing έχει διαφορετικές προγραμματιστικές λειτουργίες + για να κάνει δυνατή την ανάπτυξη Σχεδίων σε διαφορετικές πλατφόρμες και + τον προγραμματισμό με άλλους τρόπους. Οι τρέχουσες προεπιλεγμένες + προγραμματιστικές λειτουργίες είναι η Java και + η Πειραματική. Άλλες προγραμματιστικές λειτουργίες όπως + Javascript και Android, προστίθενται με την επιλογή + <<Προσθήκη Κατάστασης...>> από το μενού στην πάνω δεξιά γωνία του PDE. +

+ + + + + + +
+ Top + Προγραμματιστικό Περιβάλλον Processing (PDE) +
+ +

+ Το Προγραμματιστικό Περιβάλλον Processing (PDE) αποτελείται από έναν + απλό επεξεργαστή κειμένου για την συγγραφή κώδικα, μία περιοχή + ειδοποιήσεων, μία κονσόλα κειμένου, καρτέλες για την διαχείριση αρχείων, + μία εργαλειοθήκη με κουμπιά για συνηθισμένες ενέργειες και μία σειρά από + μενού. Οι επιλογές των μενού αλλάζουν από λειτουργία σε λειτουργία. Η + προεπιλεγμένη λειτουργία Java επεξηγείται εδώ. +

+ + + +

+
+ IDE screenshot +
+

+ +

+ Τα προγράμματα στην Processing λέγονται σχέδια. Τα σχέδια αυτά γράφονται + στον επεξεργαστή κειμένου ο οποίος έχει δυνατότητες για + αντιγραφή/επικόλληση και αναζήτηση/αντικατάσταση κειμένου. Η περιοχή + ειδοποιήσεων δίνει πληροφορίες στην αποθήκευση και εξαγωγή και επίσης + εμφανίζει σφάλματα. Η κονσόλα εμφανίζει κείμενο από τα σχέδια της + Processing συμπεριλαμβανομένου ολοκληρωμένα μηνύματα σφαλμάτων και + κείμενο από τα σχέδια με τις συναρτήσεις print() και println(). (Έχετε + κατά νου ότι η κονσόλα δουλεύει καλά για περιστασιακά μηνύματα, αλλά δεν + έχει σχεδιαστεί για υψηλής ταχύτητας, πραγματικού-χρόνου έξοδο.) +

+ +

+ Τα κουμπιά στην εργαλειοθήκη μπορούν να εκτελέσουν και να τερματίσουν + προγράμματα: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 Εκτέλεση
+ Εκτελεί το Σχέδιο. Σε λειτουργία Java, μεταγλωττίζει τον κώδικα και + ανοίγει ένα καινούριο παράθυρο. + +
 Τερματισμός
+ Τερματίζει ένα σχέδιο που εκτελείται. +
+ +

+ Επιπλέον εντολές υπάρχουν στα έξι μενού: Αρχείο, Επεξεργασία, Σχέδιο, + Αποσφαλμάτωση, Εργαλεία, Βοήθεια. Τα μενού αντιλαμβάνονται το + περιεχόμενο, το οποίο σημαίνει ότι μόνο τα αντικείμενα που έχουν σχέση + με την εργασία που εκτελείται εκείνη τη στιγμή θα είναι διαθέσιμα. +

+ +
Αρχείο
+ + +
Edit
+ + + + +
Sketch
+ + + + + +
Tools
+ + + + + +
Help
+ + + + + + + + +
+ Top Preferences +
+ +

+ The Processing Development Environment (PDE) is highly configurable. The most common + preferences can be modified in the Preferences window, located in the File menu on + Windows and Linux and in the Processing menu on Mac Os X. The full list of preferences + are stored in the "preferences.txt" file. This file can be opened and edited directly + only when Processing is not running. You can find the location of this file on your + computer by reading the bottom-left corner of the Preferences window. +

+ + + + + + + +
+ Top Sketches and Sketchbook +
+ +

+ All Processing projects are called sketches. Each sketch has its own folder. The main file + for each sketch has the same name as the folder and is found inside. For example, if the + sketch is named "Sketch_123", the folder for the sketch will be called "Sketch_123" and the + main file will be called "Sketch_123.pde". The PDE file extension is an acronym for the + Processing Development Environment.

+

+ +

+ Processing sketches can be stored anywhere on your computer, but by default they are + stored in the sketchbook, which will be in different places on your computer or network + depending if you use PC, Mac, or Linux and how the preferences are set. To locate this + folder, select the "Preferences" option from the File menu (or from the "Processing" menu + on the Mac) and look for the "Sketchbook location". +

+ +

+ A sketch folder sometimes contains other folders for media files and other code. + When a font or image is added to a sketch by selecting "Add File..." from the Sketch menu, + a "data" folder is created. Files may also be added to your Processing sketch by dragging + them into the text editor. Image and sound files dragged into the application window will + automatically be added to the current sketch's "data" folder. All images, fonts, sounds, + and other data files loaded in the sketch must be in this folder. +

+ + + + +
+ Top Renderers +
+ +

+ Processing has three built-in renderers. The default renderer is for drawing two-dimensional + shapes. P2D is a faster, but less accurate renderer for drawing two-dimensional + shapes. P3D is for three-dimensional geometry, it can also control + the camera, lighting, and materials. The P2D and P3D renderers are accelerated if + your computer has an OpenGL compatible graphics card. +

+ +

+ The renderer used for each sketch is specified through the size() function. + If a renderer is not explicitly defined in size(), it uses the default renderer. + For example, the following program: +

+ +
void setup() {
+  size(200, 200);
+}
+
+void draw() {
+  background(204);
+  line(width/2, height/2, mouseX, mouseY);
+}
+
+ +

+ To change the renderer, add a third parameter to size(). For example: +

+ +
void setup() {
+  size(200, 200, P2D);
+}
+
+void draw() {
+  background(204);
+  line(width/2, height/2, mouseX, mouseY);
+}
+
+ +

+ A large effort has been made to make the Processing renderers behave similarly across + the different renderers, but there are currently some inconsistencies that are explained + in the reference. +

+ +

For more information, see the size() reference entry. + + + + + +

Top + Coordinates
+ +

+ Processing uses a Cartesian coordinate system with the origin in the upper-left + corner. If your sketch is 320 pixels wide and 240 pixels high, coordinate + (0, 0) is the upper-left pixel and coordinate (320, 240) is in the lower-right. + The last visible pixel in the lower-right corner of the screen is at position + (319, 239) because pixels are drawn to the right and below the coordinate. +

+ +

+ +

+ +

+ Using the three-dimension coordinate system of P3D, the z-coordinate is zero at the + surface of the image, with negative z-values moving back in space. When drawing in + 3D, the camera is positioned in the center of the screen. +

+ + + + + + +
+ Top Tabs, Multiple Files, and Classes +
+ +

+ It can be inconvenient to write a long program within a single file. + When Processing sketches grow to hundreds or thousands of lines, breaking them + into modular units helps manage the different parts. Processing manages files with + the Sketchbook and each sketch can have multiple files that are managed with tabs. +

+ +

+ The arrow button to the right of the tabs in the Processing Development Environment + is used to manage these files. Click this button to reveal options to create a new tab, + rename the current tab, and delete the current tab. If a project has more than one tab, + they can also be hidden and revealed. Hiding a tab temporarily removes that code + from the sketch (it will not be compiled with the sketch when you press Run). +

+ +

+ Tabs are intended for more advanced users, and for this reason, the menu that + controls the tabs is intentionally made less prominent. +

+ +

+ + + + +
+ Advanced
+
+ When a program with multiple tabs is run, the code is grouped together and the + classes in other tabs become inner classes. Because they're inner classes, they + cannot have static variables. Simply place the "static" variable outside the class + itself to do the same thing (it need not be explicitly named "static" once you list + it in this manner). If you don't want code to be an inner class, you can also create + a tab with a .java suffix, which means it will be interpreted as straight java code. + It is also not possible to use static classes in separate tabs. If you do this, + however, you'll need to pass the PApplet object to that object in that tab in order + to get PApplet functions like line(), loadStrings() or saveFrame() to work.
+
+

+ + + + +
+ Top Programming Modes +
+ +

+ Processing has different programming modes to make it possible to deploy sketches + on different platforms and program in different ways. The current default programming modes + are Java and Experimental. Other programming modes, such as JavaScript and + Android, are added by selecting "Add Mode..." from the menu in the upper-right + corner of the PDE. +

+ + + + + + +
Java Mode
+ +

+ This mode makes it possible to write short programs to draw to the screen, but also + enables complex Java programs as well. It's can be used simply by beginners, but + it scales to professional Java software development. Sketches written in this mode can + be exported as Java Applications to run on Linux, Mac OS X, and Windows operating + systems. +

+ +

+ + + + +
+ Advanced
+
+ Java files with the extension .java can be included with a Java mode sketch. + They may be created directly in the PDE or copied into the sketch folder through + the "Add File..." item in the Sketch menu or dragged into the text editor. It's possible + to write any Java code in files with the .java extension. In fact, complete Java code + can be written from inside the Processing Environment by subclassing PApplet like this: + +
+
+public class MyDemo extends PApplet {
+   	
+ + This is for advanced developers only and is not really recommended. Using this technique + means that any additional tabs will no longer be inner classes, meaning you'll have to + do extra work to make them communicate properly with the host PApplet. It is not necessary + to use this technique just to get features of the Java language. Advanced developers can + also program with Processing in another Java Editor if higher-level code editing and + tools are needed. We've documented how to use + Processing + in Eclipse, but core.jar can be used as a part of any Java project. +
+

+ +
Experimental Mode
+ +

+ This is a prototype of a potential future version of the Processing Development Environment. + It includes features to check for errors in the code while it's written, to follow variables + as they change, to debug a program with break points, and more. +

+ + + + +
JavaScript Mode
+ +

+ Sketches written in this mode can be exported to run inside web browsers using + HTML5 and WebGL. This mode is documented on the + JavaScript page of the Processing Wiki. To add this mode, click on the mode + button in the upper-right corner of the PDE and select "Add Mode..." +

+ +
Android Mode
+ +

+ Sketches written in this mode can be exported to run on Android phones and tablets. + This mode is documented on the + Processing for Android page of the Processing Wiki. To add this mode, click on + the mode button in the upper-right corner of the PDE and select "Add Mode..." +

+ + + + + + + + + + + +
+ Top Adding Libraries, Tools, and Modes +
+ +

+ Processing 2.0 includes a set of new features to make it easier to install, update, and + remove Libraries, Tools, and Modes. +

+ +

+ Add contributed libraries by selecting "Add Library..." from the "Import Library..." + submenu within the Sketch menu. Not all available libraries have been converted to + show up in "Add Library...". If a library isn't there, it will need to be installed + manually. Follow the + How to Install a Contributed Library instructions on the Processing + Wiki for more information. +

+ +

+ Add contributed tools by selecting "Add Tool..." from the Tools menu to select a Tool + to download. +

+ +

+ Add contributed modes by selecting "Add Mode..." from the Mode menu in the upper-right + corner of the PDE. +

+ + + + + +
+ TopExport +
+ +

+ The Export information and + Tips page on the Processing Wiki covers the details of exporting Applications from Java mode. +

+ +

+ Exporting from JavaScript mode is discussed on the + JavaScript page of the Processing Wiki. +

+ +

+ Exporting from Android mode is discussed on the + Android page of the Processing Wiki. +

+