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