|
|
@ -28,6 +28,7 @@ public class PolyComponetsBar extends JToolBar { |
|
|
|
private static Color FOLDER_PANE_BACKGROUND = new Color(214, 223, 247); |
|
|
|
private static Color FOLDER_PANE_BACKGROUND = new Color(214, 223, 247); |
|
|
|
private BaseChartNameID[] typeName = BaseChartGetter.getStaticAllChartBaseNames(); |
|
|
|
private BaseChartNameID[] typeName = BaseChartGetter.getStaticAllChartBaseNames(); |
|
|
|
private SerIcon[] serIcons; |
|
|
|
private SerIcon[] serIcons; |
|
|
|
|
|
|
|
private static final int MAX_BAR_NUM = 15; |
|
|
|
|
|
|
|
|
|
|
|
public PolyComponetsBar() { |
|
|
|
public PolyComponetsBar() { |
|
|
|
setOrientation(SwingConstants.VERTICAL); |
|
|
|
setOrientation(SwingConstants.VERTICAL); |
|
|
@ -35,10 +36,10 @@ public class PolyComponetsBar extends JToolBar { |
|
|
|
setFloatable(false); |
|
|
|
setFloatable(false); |
|
|
|
setBackground(UIConstants.NORMAL_BACKGROUND); |
|
|
|
setBackground(UIConstants.NORMAL_BACKGROUND); |
|
|
|
setLayout(FRGUIPaneFactory.create1ColumnGridLayout()); |
|
|
|
setLayout(FRGUIPaneFactory.create1ColumnGridLayout()); |
|
|
|
serIcons = new SerIcon[typeName.length + 1]; |
|
|
|
serIcons = new SerIcon[typeName.length < MAX_BAR_NUM ? typeName.length : MAX_BAR_NUM + 1]; |
|
|
|
serIcons[0] = new SerIcon(PolyECBlock.class, Inter.getLocText("Poly-Report_Block"), "Poly-Report_Block"); |
|
|
|
serIcons[0] = new SerIcon(PolyECBlock.class, Inter.getLocText("Poly-Report_Block"), "Poly-Report_Block"); |
|
|
|
this.add(serIcons[0]); |
|
|
|
this.add(serIcons[0]); |
|
|
|
for (int i = 0, len = typeName.length; i < len; i++) { |
|
|
|
for (int i = 0, len = typeName.length; i < len && i < MAX_BAR_NUM; i++) { |
|
|
|
BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID()); |
|
|
|
BaseChart[] rowChart = BaseChartGetter.getStaticChartTypes(typeName[i].getPlotID()); |
|
|
|
serIcons[i + 1] = new SerIcon(rowChart[0], Inter.getLocText(typeName[i].getName()), typeName[i].getName()); |
|
|
|
serIcons[i + 1] = new SerIcon(rowChart[0], Inter.getLocText(typeName[i].getName()), typeName[i].getName()); |
|
|
|
this.add(serIcons[i + 1]); |
|
|
|
this.add(serIcons[i + 1]); |
|
|
|