Browse Source

REPORT-14057 10.0日文国际化问题处理=>列表面板顶部工具条显示问题

bugfix/10.0
plough 6 years ago
parent
commit
2c120dfff1
  1. 28
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

28
designer-base/src/main/java/com/fr/design/gui/controlpane/UIControlPane.java

@ -6,11 +6,10 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itoolbar.UIToolBarUI; import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -23,7 +22,6 @@ import javax.swing.JSplitPane;
import javax.swing.border.EmptyBorder; import javax.swing.border.EmptyBorder;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor; import java.awt.Cursor;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.FlowLayout; import java.awt.FlowLayout;
@ -159,14 +157,22 @@ abstract class UIControlPane extends JControlPane {
} }
protected JPanel getLeftTopPane(UIToolbar topToolBar) { protected JPanel getLeftTopPane(UIToolbar topToolBar) {
double p = TableLayout.PREFERRED; UILabel addItemLabel = new UILabel(getAddItemText());
double f = TableLayout.FILL; UIComponentUtils.setLineWrap(addItemLabel);
double[] columnSize = {p, f, isNewStyle() ? TOP_TOOLBAR_WIDTH : TOP_TOOLBAR_WIDTH_SHORT};
double[] rowSize = {TOP_TOOLBAR_HEIGHT}; topToolBar.setPreferredSize(
Component[][] components = new Component[][]{ new Dimension(
new Component[]{new UILabel(getAddItemText()), new JPanel(), topToolBar}, isNewStyle() ? TOP_TOOLBAR_WIDTH : TOP_TOOLBAR_WIDTH_SHORT,
}; TOP_TOOLBAR_HEIGHT
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); ));
JPanel toolBarPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
toolBarPane.add(topToolBar, BorderLayout.NORTH);
JPanel leftTopPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
leftTopPane.add(toolBarPane, BorderLayout.EAST);
leftTopPane.add(addItemLabel, BorderLayout.CENTER);
return leftTopPane;
} }
/** /**

Loading…
Cancel
Save