* @see #BOLDWEIGHT_NORMAL
* @see #BOLDWEIGHT_BOLD
*/
-
public void setBoldweight(short boldweight)
{
font.setBoldWeight(boldweight);
}
+
+ /**
+ * sets the font to be bold or not
+ */
+ public void setBold(boolean bold)
+ {
+ if (bold)
+ font.setBoldWeight(BOLDWEIGHT_BOLD);
+ else
+ font.setBoldWeight(BOLDWEIGHT_NORMAL);
+ }
/**
* get the boldness to use
* @see #BOLDWEIGHT_NORMAL
* @see #BOLDWEIGHT_BOLD
*/
-
public short getBoldweight()
{
return font.getBoldWeight();
}
+
+ /**
+ * get if the font is bold or not
+ */
+ public boolean getBold()
+ {
+ return getBoldweight() == BOLDWEIGHT_BOLD;
+ }
/**
* set normal,super or subscript.
public short getIndex();
public void setBoldweight(short boldweight);
+ public void setBold(boolean bold);
public short getBoldweight();
-
-
+ public boolean getBold();
}
\ No newline at end of file