|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
package com.fr.design.mainframe.theme.edit.chart; |
|
|
|
|
|
|
|
|
|
import com.fine.theme.icon.LazyIcon; |
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
import com.fine.theme.utils.FineUIUtils; |
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
import com.fr.design.constants.LayoutConstants; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
@ -9,6 +11,7 @@ import com.fr.design.gui.ibutton.UIColorButton;
|
|
|
|
|
import com.fr.design.gui.ibutton.UIToggleButton; |
|
|
|
|
import com.fr.design.gui.icombobox.UIComboBox; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.itable.FineUITable; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
@ -24,6 +27,9 @@ import java.awt.Component;
|
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
import java.awt.Font; |
|
|
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Bjorn |
|
|
|
|
* @version 10.0 |
|
|
|
@ -67,8 +73,8 @@ public class ChartFontPane extends BasicPane {
|
|
|
|
|
Component[] components = new Component[]{ |
|
|
|
|
fontSizeComboBox, fontColor, italic, bold |
|
|
|
|
}; |
|
|
|
|
JPanel buttonPane = new JPanel(); |
|
|
|
|
buttonPane.add(GUICoreUtils.createFlowPane(components, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE)); |
|
|
|
|
JPanel buttonPane = new JPanel(new BorderLayout()); |
|
|
|
|
buttonPane.add(row(4, cell(fontSizeComboBox), cell(fontColor), cell(italic), cell(bold)).getComponent()); |
|
|
|
|
|
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
|
this.add(getContentPane(buttonPane), BorderLayout.CENTER); |
|
|
|
@ -77,11 +83,7 @@ public class ChartFontPane extends BasicPane {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected JPanel getContentPane(JPanel buttonPane) { |
|
|
|
|
double labelWidth = 90; |
|
|
|
|
double totalWidth = 190; |
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double[] rows = {p, p, p}; |
|
|
|
|
double[] columnSize = {labelWidth, totalWidth}; |
|
|
|
|
|
|
|
|
|
UILabel text = new UILabel(getUILabelText(), SwingConstants.LEFT); |
|
|
|
|
text.setToolTipText(getUILabelText()); |
|
|
|
|
Component[][] components = { |
|
|
|
@ -90,7 +92,7 @@ public class ChartFontPane extends BasicPane {
|
|
|
|
|
new Component[]{null, buttonPane} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createGapTableLayoutPane(components, rows, columnSize, 5, 10); |
|
|
|
|
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getUILabelText() { |
|
|
|
|