|
|
@ -29,12 +29,8 @@ import javax.swing.BorderFactory; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
import javax.swing.SwingUtilities; |
|
|
|
|
|
|
|
import java.awt.*; |
|
|
|
import java.beans.IntrospectionException; |
|
|
|
import java.beans.IntrospectionException; |
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Cursor; |
|
|
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
|
|
|
import java.awt.Rectangle; |
|
|
|
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -228,7 +224,8 @@ public class XChartEditor extends XBorderStyleWidgetCreator { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 渲染Painter |
|
|
|
* 渲染Painter |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void paint(Graphics g) { |
|
|
|
@Override |
|
|
|
|
|
|
|
public void paintForeground(Graphics2D g) { |
|
|
|
Dimension size = getSize(); |
|
|
|
Dimension size = getSize(); |
|
|
|
PaddingMargin margin = toData().getMargin(); |
|
|
|
PaddingMargin margin = toData().getMargin(); |
|
|
|
designerEditor.paintEditor(g, size, margin); |
|
|
|
designerEditor.paintEditor(g, size, margin); |
|
|
@ -237,7 +234,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator { |
|
|
|
int verticalMargin = margin != null ? margin.getTop() + margin.getBottom() : 0; |
|
|
|
int verticalMargin = margin != null ? margin.getTop() + margin.getBottom() : 0; |
|
|
|
coverPanel.setSize(size.width - horizonMargin, size.height - verticalMargin); |
|
|
|
coverPanel.setSize(size.width - horizonMargin, size.height - verticalMargin); |
|
|
|
} |
|
|
|
} |
|
|
|
super.paint(g); |
|
|
|
super.paintForeground(g); |
|
|
|
if (isEditing) { |
|
|
|
if (isEditing) { |
|
|
|
g.setColor(INNER_BORDER_COLOR); |
|
|
|
g.setColor(INNER_BORDER_COLOR); |
|
|
|
GraphHelper.draw(g, new Rectangle(0, 0, getWidth(), getHeight()), Constants.LINE_MEDIUM); |
|
|
|
GraphHelper.draw(g, new Rectangle(0, 0, getWidth(), getHeight()), Constants.LINE_MEDIUM); |
|
|
|