38 |
|
|
39 |
package javax.swing.plaf.basic; |
package javax.swing.plaf.basic; |
40 |
|
|
41 |
import javax.swing.*; |
import java.awt.Color; |
42 |
import javax.swing.plaf.*; |
import java.awt.Dimension; |
43 |
import java.awt.*; |
import java.awt.Font; |
44 |
|
import java.awt.FontMetrics; |
45 |
|
import java.awt.Graphics; |
46 |
|
import java.awt.Insets; |
47 |
|
import java.awt.Rectangle; |
48 |
|
import java.beans.PropertyChangeEvent; |
49 |
|
import java.beans.PropertyChangeListener; |
50 |
|
import javax.swing.JComponent; |
51 |
|
import javax.swing.JLabel; |
52 |
|
import javax.swing.SwingUtilities; |
53 |
|
import javax.swing.plaf.ComponentUI; |
54 |
|
import javax.swing.plaf.LabelUI; |
55 |
|
|
56 |
public class BasicLabelUI extends LabelUI |
public class BasicLabelUI extends LabelUI |
57 |
|
implements PropertyChangeListener |
58 |
{ |
{ |
59 |
int gap = 3; |
int gap = 3; |
|
|
|
60 |
Color foreground; |
Color foreground; |
61 |
|
|
62 |
|
|
63 |
public static ComponentUI createUI(final JComponent c) { |
public static ComponentUI createUI(final JComponent c) { |
64 |
return new BasicLabelUI(); |
return new BasicLabelUI(); |
65 |
} |
} |
66 |
|
|
67 |
|
|
68 |
public void installUI(final JComponent c) { |
public void installUI(final JComponent c) { |
69 |
super.installUI(c); |
super.installUI(c); |
192 |
|
|
193 |
g.drawLine(0,0,100,100); |
g.drawLine(0,0,100,100); |
194 |
|
|
195 |
BasicGraphicsUtils.drawString(g, |
BasicGraphicsUtils.drawString(g, text, 0, 0 /*textRect.x*/, 0 /*textRect.y*/); |
|
text, |
|
|
0, |
|
|
0,//textRect.x, |
|
|
0);//textRect.y); |
|
196 |
} |
} |
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
|
|
198 |
|
public void propertyChange (PropertyChangeEvent event) |
199 |
|
{ |
200 |
|
throw new Error ("Not implemented"); |
201 |
|
} |
202 |
|
} |