|
|
|
@ -19,6 +19,7 @@ import com.fr.form.ui.Label;
|
|
|
|
|
import com.fr.form.ui.container.WParameterLayout; |
|
|
|
|
|
|
|
|
|
import com.fr.general.Background; |
|
|
|
|
import com.fr.general.act.BorderPacker; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.Constants; |
|
|
|
|
import com.fr.stable.core.PropertyChangeAdapter; |
|
|
|
@ -91,8 +92,13 @@ public class XLabel extends XWidgetCreator {
|
|
|
|
|
Label label = (Label) data; |
|
|
|
|
Dimension size = this.getSize(); |
|
|
|
|
//先画背景,再画标题
|
|
|
|
|
if (toData().getBackground() != null) { |
|
|
|
|
toData().getBackground().paint(g, new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight())); |
|
|
|
|
Background background = label.getBackground(); |
|
|
|
|
if (background != null) { |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|
Composite oldComposite = g2d.getComposite(); |
|
|
|
|
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP, label.getBackgroundOpacity())); |
|
|
|
|
background.paint(g, new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight())); |
|
|
|
|
g2d.setComposite(oldComposite); |
|
|
|
|
} |
|
|
|
|
if (label.getWidgetValue() != null) { |
|
|
|
|
Graphics2D g2d = (Graphics2D) g.create(); |
|
|
|
|