|
|
|
@ -1,15 +1,13 @@
|
|
|
|
|
package com.fr.design.chartx.data; |
|
|
|
|
|
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.SwingConstants; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author shine |
|
|
|
@ -46,13 +44,7 @@ public class DataLayoutHelper {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static JPanel createDataLayoutPane(Component[][] components) { |
|
|
|
|
int len = components.length; |
|
|
|
|
double p = TableLayout.PREFERRED; |
|
|
|
|
double[] columnSize = {DataLayoutHelper.LABEL_WIDTH, DataLayoutHelper.WIDTH}; |
|
|
|
|
double[] rowSize = new double[len]; |
|
|
|
|
Arrays.fill(rowSize, p); |
|
|
|
|
|
|
|
|
|
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); |
|
|
|
|
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[] {1.2, 3}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static JPanel createDataLayoutPane(String label, Component component) { |
|
|
|
|