|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.fr.van.chart.designer.component; |
|
|
|
package com.fr.van.chart.designer.component; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
import com.fr.design.constants.KeyWords; |
|
|
|
import com.fr.design.constants.KeyWords; |
|
|
|
import com.fr.design.gui.autocomplete.AutoCompletion; |
|
|
|
import com.fr.design.gui.autocomplete.AutoCompletion; |
|
|
@ -13,11 +14,8 @@ import com.fr.design.gui.itextfield.UITextField; |
|
|
|
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; |
|
|
|
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.RSyntaxTextArea; |
|
|
|
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; |
|
|
|
import com.fr.design.gui.syntax.ui.rsyntaxtextarea.SyntaxConstants; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
|
|
|
import com.fr.design.utils.gui.UIComponentUtils; |
|
|
|
import com.fr.design.utils.gui.UIComponentUtils; |
|
|
|
import com.fr.plugin.chart.base.VanChartHtmlLabel; |
|
|
|
import com.fr.plugin.chart.base.VanChartHtmlLabel; |
|
|
|
import com.fr.van.chart.designer.style.VanChartStylePane; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JComponent; |
|
|
|
import javax.swing.JPanel; |
|
|
|
import javax.swing.JPanel; |
|
|
@ -63,18 +61,13 @@ public class VanChartHtmlLabelPane extends JPanel { |
|
|
|
UIComponentUtils.setLineWrap(useHtml); |
|
|
|
UIComponentUtils.setLineWrap(useHtml); |
|
|
|
useHtml.addChangeListener(e -> checkWidthAndHeightPane()); |
|
|
|
useHtml.addChangeListener(e -> checkWidthAndHeightPane()); |
|
|
|
widthAndHeightPane = createWidthAndHeightPane(); |
|
|
|
widthAndHeightPane = createWidthAndHeightPane(); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
|
|
|
double[] columnSize = {f}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p, p}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{createJSContentPane()}, |
|
|
|
new Component[]{createJSContentPane()}, |
|
|
|
new Component[]{useHtml}, |
|
|
|
new Component[]{useHtml}, |
|
|
|
new Component[]{null, null}, |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
JPanel contentPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
JPanel contentPane = FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1}); |
|
|
|
|
|
|
|
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
this.add(contentPane, BorderLayout.NORTH); |
|
|
|
this.add(contentPane, BorderLayout.NORTH); |
|
|
@ -152,17 +145,12 @@ public class VanChartHtmlLabelPane extends JPanel { |
|
|
|
checkHeight(); |
|
|
|
checkHeight(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
|
|
|
double f = TableLayout.FILL; |
|
|
|
|
|
|
|
double[] columnSize = {p, f}; |
|
|
|
|
|
|
|
double[] rowSize = {p, p, p}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
new Component[]{isCustomWidth, customWidth}, |
|
|
|
new Component[]{isCustomWidth, customWidth}, |
|
|
|
new Component[]{isCustomHeight, customHeight}, |
|
|
|
new Component[]{isCustomHeight, customHeight}, |
|
|
|
new Component[]{null, null} |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void checkWidth() { |
|
|
|
private void checkWidth() { |
|
|
|