diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 01d0e81..d55840d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,21 +7,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -89,8 +77,8 @@
-
-
+
+
@@ -127,7 +115,6 @@
@@ -198,7 +186,6 @@
-
@@ -223,7 +210,9 @@
+
+
@@ -262,12 +251,17 @@
+
+
+
+
+
+
+
-
-
@@ -1056,7 +1050,8 @@
-
+
+
@@ -1068,9 +1063,8 @@
-
-
-
+
+
@@ -1091,6 +1085,7 @@
+
@@ -1249,13 +1244,6 @@
-
-
-
-
-
-
-
@@ -1289,21 +1277,10 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -1311,13 +1288,6 @@
-
-
-
-
-
-
-
@@ -1350,15 +1320,6 @@
-
-
-
-
-
-
-
-
-
@@ -1366,7 +1327,6 @@
-
@@ -1374,7 +1334,6 @@
-
@@ -1382,7 +1341,6 @@
-
@@ -1402,10 +1360,6 @@
-
-
-
-
@@ -1421,7 +1375,6 @@
-
@@ -1437,10 +1390,6 @@
-
-
-
-
@@ -1448,7 +1397,6 @@
-
@@ -1456,7 +1404,6 @@
-
@@ -1464,14 +1411,6 @@
-
-
-
-
-
-
-
-
@@ -1492,7 +1431,6 @@
-
@@ -1501,8 +1439,8 @@
-
-
+
+
@@ -1515,34 +1453,46 @@
-
+
+
+
-
+
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
diff --git a/src/com/devbaltasarq/pooi/core/AppInfo.java b/src/com/devbaltasarq/pooi/core/AppInfo.java
index 0031305..cdaa846 100644
--- a/src/com/devbaltasarq/pooi/core/AppInfo.java
+++ b/src/com/devbaltasarq/pooi/core/AppInfo.java
@@ -13,7 +13,7 @@ public class AppInfo {
public static final String Name = "Pooi";
public static final String Email = "jbgarcia@uvigo.es";
public static final String Author = "Baltasar GarcĂa Perez-Schofield";
- public static final String Version = "2.0 20180116";
+ public static final String Version = "2.1 20180118";
public static final String License = "MIT License: https://opensource.org/licenses/MIT";
public static final String SessionFileExt = ".txt";
public static final String ScriptFileExt = ".poi";
diff --git a/src/com/devbaltasarq/pooi/ui/Canvas.java b/src/com/devbaltasarq/pooi/ui/Canvas.java
index a624987..8a1b7a2 100644
--- a/src/com/devbaltasarq/pooi/ui/Canvas.java
+++ b/src/com/devbaltasarq/pooi/ui/Canvas.java
@@ -8,6 +8,8 @@
* Created by baltasarq on 27/04/16.
*/
public class Canvas extends JPanel {
+ public static final boolean BOLD = true;
+
/** Creates a new canvas with the specified dimensions
* @param width The width of the drawing area.
* @param height The height of the drawing area.
@@ -139,11 +141,27 @@ public void circle(int x, int y, int r, boolean filled)
* @param str the vector of chars containing the string.
*/
public void print(int x, int y, String str)
+ {
+ print( x, y, str, false );
+ }
+
+ /**
+ * Draws a string in the graphic window
+ * @param x the x coordinate of the starting point
+ * @param y the y coordinate of the starting point
+ * @param str the vector of chars containing the string.
+ */
+ public void print(int x, int y, String str, boolean isBold)
{
if ( str != null ) {
final Graphics grfs = canvas.getGraphics();
+ Font font = this.getFont();
+
+ if ( isBold ) {
+ font = font.deriveFont( Font.BOLD );
+ }
- grfs.setFont( this.getFont() );
+ grfs.setFont( font );
grfs.setColor( this.getColor() );
grfs.drawChars( str.toCharArray(), 0, str.length(), x, y );
}
diff --git a/src/com/devbaltasarq/pooi/ui/ObjectBox.java b/src/com/devbaltasarq/pooi/ui/ObjectBox.java
index d1cb95b..b055ba7 100644
--- a/src/com/devbaltasarq/pooi/ui/ObjectBox.java
+++ b/src/com/devbaltasarq/pooi/ui/ObjectBox.java
@@ -139,7 +139,7 @@ public void draw(Canvas canvas, int x, int y)
canvas.setColor( Color.blue );
// Name
- canvas.print( posX, posY, this.infoLines[ 0 ] );
+ canvas.print( posX, posY, this.infoLines[ 0 ], Canvas.BOLD );
posX += 10;
posY += cr;