Browse Source

REPORT-2897 9.0设计器修改

缩放条部分视觉png
master
MoMeak 7 years ago
parent
commit
e1f026dc7c
  1. BIN
      designer_base/src/com/fr/design/images/data/source/hoverDown20.png
  2. BIN
      designer_base/src/com/fr/design/images/data/source/hoverUp20.png
  3. BIN
      designer_base/src/com/fr/design/images/data/source/normalDown20.png
  4. BIN
      designer_base/src/com/fr/design/images/data/source/normalUp20.png
  5. 45
      designer_base/src/com/fr/design/mainframe/JSliderPane.java

BIN
designer_base/src/com/fr/design/images/data/source/hoverDown20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

BIN
designer_base/src/com/fr/design/images/data/source/hoverUp20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

BIN
designer_base/src/com/fr/design/images/data/source/normalDown20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

BIN
designer_base/src/com/fr/design/images/data/source/normalUp20.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

45
designer_base/src/com/fr/design/mainframe/JSliderPane.java

@ -44,8 +44,8 @@ public class JSliderPane extends JPanel {
private static final int TWO_HUNDRED = 200; private static final int TWO_HUNDRED = 200;
private static final int THREE_HUNDRED = 300; private static final int THREE_HUNDRED = 300;
private static final int FOUR_HUNDRED = 400; private static final int FOUR_HUNDRED = 400;
private static final int DIALOG_WIDTH = 150; private static final int DIALOG_WIDTH = 157;
private static final int DIALOG_HEIGHT = 200; private static final int DIALOG_HEIGHT = 192;
private static final int SLIDER_WIDTH = 220; private static final int SLIDER_WIDTH = 220;
private static final int SLIDER_HEIGHT = 20; private static final int SLIDER_HEIGHT = 20;
private static final int SHOWVALBUTTON_WIDTH = 40; private static final int SHOWVALBUTTON_WIDTH = 40;
@ -167,8 +167,24 @@ public class JSliderPane extends JPanel {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p, p};
UILabel upLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce"));
upLabel.setOpaque(false);
JPanel septPane = new JPanel(new BorderLayout());
JSeparator sept = new JSeparator();
sept.setBackground(new Color(232,232,233));
septPane.add(sept,BorderLayout.NORTH);
septPane.setBorder(BorderFactory.createEmptyBorder(2, 5, 1, 5));
twoHundredButton.setBackground(BACK_COLOR);
oneHundredButton.setBackground(BACK_COLOR);
SevenFiveButton.setBackground(BACK_COLOR);
fiveTenButton.setBackground(BACK_COLOR);
twoFiveButton.setBackground(BACK_COLOR);
selfAdaptButton.setBackground(BACK_COLOR);
customButton.setBackground(BACK_COLOR);
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{upLabel, null},
new Component[]{septPane, null},
new Component[]{twoHundredButton, null}, new Component[]{twoHundredButton, null},
new Component[]{oneHundredButton, null}, new Component[]{oneHundredButton, null},
new Component[]{SevenFiveButton, null}, new Component[]{SevenFiveButton, null},
@ -178,6 +194,7 @@ public class JSliderPane extends JPanel {
new Component[]{customButton, createSpinnerPanel()} new Component[]{customButton, createSpinnerPanel()}
}; };
dialogContentPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, LayoutConstants.VGAP_MEDIUM, 0); dialogContentPanel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, LayoutConstants.VGAP_MEDIUM, 0);
dialogContentPanel.setBackground(BACK_COLOR);
} }
private JPanel createSpinnerPanel() { private JPanel createSpinnerPanel() {
@ -186,6 +203,7 @@ public class JSliderPane extends JPanel {
UILabel percent = new UILabel("%"); UILabel percent = new UILabel("%");
percent.setFont(new Font("SimSun", Font.PLAIN, FONT_SIZE)); percent.setFont(new Font("SimSun", Font.PLAIN, FONT_SIZE));
spinnerPanel.add(percent); spinnerPanel.add(percent);
spinnerPanel.setBackground(BACK_COLOR);
return spinnerPanel; return spinnerPanel;
} }
@ -414,27 +432,14 @@ class JSliderPaneUI extends BasicSliderUI {
class PopupPane extends JPopupMenu { class PopupPane extends JPopupMenu {
private JComponent contentPane; private JComponent contentPane;
private static final int UPLABEL_HEIGHT = 25;
private static final int DIALOG_WIDTH = 157; private static final int DIALOG_WIDTH = 157;
private static final int DIALOG_HEIGHT = 200; private static final int DIALOG_HEIGHT = 192;
private static final int UPLABEL_WIDTH = 300;
private JComponent centerPane;
private UILabel upLabel;
PopupPane(JButton b, JPanel dialogContentPanel) { PopupPane(JButton b, JPanel dialogContentPanel) {
contentPane = new JPanel(new BorderLayout()); this.add(dialogContentPanel, BorderLayout.CENTER);
centerPane = new JPanel(new BorderLayout());
upLabel = new UILabel(" " + Inter.getLocText("FR-Designer_Scale_EnlargeOrReduce"));
upLabel.setOpaque(true);
upLabel.setPreferredSize(new Dimension(UPLABEL_WIDTH, UPLABEL_HEIGHT));
upLabel.setBackground(Color.LIGHT_GRAY);
upLabel.setBorder(new MatteBorder(0, 0, 1, 0, Color.gray));
centerPane.add(dialogContentPanel, BorderLayout.NORTH);
contentPane.add(upLabel, BorderLayout.NORTH);
contentPane.add(centerPane, BorderLayout.CENTER);
this.add(contentPane, BorderLayout.CENTER);
this.setPreferredSize(new Dimension(DIALOG_WIDTH, DIALOG_HEIGHT)); this.setPreferredSize(new Dimension(DIALOG_WIDTH, DIALOG_HEIGHT));
this.setOpaque(false); this.setBackground(new Color(245,245,247));
// this.setOpaque(false);
} }

Loading…
Cancel
Save