|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.fr.design.mainframe.share.ui.block; |
|
|
|
|
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
import com.fr.base.GraphHelper; |
|
|
|
|
import com.fr.base.iofile.attr.SharableAttrMark; |
|
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
@ -59,6 +60,7 @@ import java.awt.dnd.DnDConstants;
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.awt.font.FontRenderContext; |
|
|
|
|
import java.awt.font.LineMetrics; |
|
|
|
|
import java.awt.geom.Dimension2D; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
import java.util.UUID; |
|
|
|
@ -298,17 +300,17 @@ public class LocalWidgetBlock extends PreviewWidgetBlock<DefaultSharableWidget>
|
|
|
|
|
double canvasH = coverDim.getHeight(); |
|
|
|
|
|
|
|
|
|
g2d.setColor(new Color(0.0F, 0.0F, 0.0F, 0.4F)); |
|
|
|
|
GraphHelper.fillRect(g2d, canvasX, canvasY, canvasW, canvasH - 16); |
|
|
|
|
GraphHelper.fillRect(g2d, canvasX, canvasY, canvasW, canvasH); |
|
|
|
|
|
|
|
|
|
g2d.setColor(new Color(0.0F, 0.0F, 0.0F, 0.5F)); |
|
|
|
|
GraphHelper.fillRect(g2d, canvasX, canvasH - 16, canvasW, 16); |
|
|
|
|
|
|
|
|
|
String tipText = Toolkit.i18nText("Fine-Design_Share_Incompatible_Version_Tip"); |
|
|
|
|
Font tipFont = FRFont.getInstance().deriveFont(8F); |
|
|
|
|
Font tipFont = FRContext.getDefaultValues().getFRFont().deriveFont(8.0F); |
|
|
|
|
FontRenderContext frc = g2d.getFontRenderContext(); |
|
|
|
|
double tipTextWidth = GraphHelper.stringWidth(tipText, tipFont, frc); |
|
|
|
|
Dimension2D dim = GraphHelper.stringDimensionWithRotation(tipText, tipFont, 0, frc); |
|
|
|
|
double tipTextHeight = dim.getHeight(); |
|
|
|
|
LineMetrics metrics = tipFont.getLineMetrics(tipText, frc); |
|
|
|
|
double tipTextHeight = metrics.getHeight(); |
|
|
|
|
g2d.setColor(Color.WHITE); |
|
|
|
|
g2d.setFont(tipFont); |
|
|
|
|
GraphHelper.drawString(g2d, tipText, canvasX + (canvasW - tipTextWidth) / 2.0F, canvasY + canvasH - (16 - tipTextHeight) / 2.0F); |
|
|
|
|