diff options
Diffstat (limited to 'devel/charva/files/patch-java_src_charvax_swing_JLabel.java')
-rw-r--r-- | devel/charva/files/patch-java_src_charvax_swing_JLabel.java | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/devel/charva/files/patch-java_src_charvax_swing_JLabel.java b/devel/charva/files/patch-java_src_charvax_swing_JLabel.java index 8abd344b235a..65704b0143c5 100644 --- a/devel/charva/files/patch-java_src_charvax_swing_JLabel.java +++ b/devel/charva/files/patch-java_src_charvax_swing_JLabel.java @@ -1,47 +1,47 @@ ---- java/src/charvax/swing/JLabel.java.orig Sat Dec 17 15:27:30 2005 -+++ java/src/charvax/swing/JLabel.java Mon Jan 29 09:39:30 2007 +--- java/src/charvax/swing/JLabel.java.orig 2016-06-20 12:40:44 UTC ++++ java/src/charvax/swing/JLabel.java @@ -20,6 +20,7 @@ - package charvax.swing;
-
- import charva.awt.Dimension;
-+import charva.awt.Font;
- import charva.awt.Insets;
- import charva.awt.Point;
- import charva.awt.Toolkit;
-@@ -79,6 +80,10 @@ public class JLabel
- // Draw the border if it exists
- super.draw();
-
-+ int attrib = 0;
-+ if (_bold)
-+ attrib |= Toolkit.A_BOLD;
-+
- /* Get the absolute origin of this component.
- */
- Point origin = getLocationOnScreen();
-@@ -98,7 +103,7 @@ public class JLabel
- buf.setLength(_width); // truncate
-
- int colorpair = getCursesColor();
-- term.addString(buf.toString(), 0, colorpair);
-+ term.addString(buf.toString(), attrib, colorpair);
- }
-
- /**
-@@ -169,10 +174,16 @@ public class JLabel
- return "JLabel: [" + getText() + "]";
- }
-
-+ public void setFont(Font font_) {
-+ _bold = ((font_.getStyle() & Font.BOLD) != 0);
-+ }
-+
- //====================================================================
- // INSTANCE VARIABLES
-
- private String _labeltext;
- private int _width;
-+
-+ protected boolean _bold = false;
-
- }
+ package charvax.swing; + + import charva.awt.Dimension; ++import charva.awt.Font; + import charva.awt.Insets; + import charva.awt.Point; + import charva.awt.Toolkit; +@@ -79,6 +80,10 @@ public class JLabel + // Draw the border if it exists + super.draw(); + ++ int attrib = 0; ++ if (_bold) ++ attrib |= Toolkit.A_BOLD; ++ + /* Get the absolute origin of this component. + */ + Point origin = getLocationOnScreen(); +@@ -98,7 +103,7 @@ public class JLabel + buf.setLength(_width); // truncate + + int colorpair = getCursesColor(); +- term.addString(buf.toString(), 0, colorpair); ++ term.addString(buf.toString(), attrib, colorpair); + } + + /** +@@ -169,10 +174,16 @@ public class JLabel + return "JLabel: [" + getText() + "]"; + } + ++ public void setFont(Font font_) { ++ _bold = ((font_.getStyle() & Font.BOLD) != 0); ++ } ++ + //==================================================================== + // INSTANCE VARIABLES + + private String _labeltext; + private int _width; + ++ protected boolean _bold = false; ++ + } |