|
|
@ -3,10 +3,7 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package com.fr.design.style.color; |
|
|
|
package com.fr.design.style.color; |
|
|
|
|
|
|
|
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
import java.awt.Cursor; |
|
|
|
|
|
|
|
import java.awt.GridLayout; |
|
|
|
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
import java.awt.event.MouseAdapter; |
|
|
|
import java.awt.event.MouseAdapter; |
|
|
@ -72,9 +69,21 @@ public class ColorSelectPane extends TransparentPane implements ColorSelectable |
|
|
|
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); |
|
|
|
JPanel centerPane = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane(); |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 第一行,1个取色按钮 + 7个最近使用的颜色
|
|
|
|
|
|
|
|
JPanel row1Pane = new JPanel(FRGUIPaneFactory.createBorderLayout()); |
|
|
|
|
|
|
|
row1Pane.setBorder(BorderFactory.createEmptyBorder(8, 8, 0, 0)); |
|
|
|
|
|
|
|
row1Pane.setPreferredSize(new Dimension(135, 24)); // 宽度为 16 * 8 + 7
|
|
|
|
|
|
|
|
centerPane.add(row1Pane); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 取色按钮
|
|
|
|
|
|
|
|
PickColorButton pickColorButton = new PickColorButton(this, PickColorButton.IconType.ICON16, true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
row1Pane.add(pickColorButton, BorderLayout.WEST); |
|
|
|
|
|
|
|
|
|
|
|
// 最近使用
|
|
|
|
// 最近使用
|
|
|
|
UsedColorPane pane = new UsedColorPane(1, 8, ColorSelectConfigManager.getInstance().getColors(),this); |
|
|
|
UsedColorPane usedColorPane = new UsedColorPane(1, 7, ColorSelectConfigManager.getInstance().getColors(),this); |
|
|
|
centerPane.add(pane.getPane()); |
|
|
|
usedColorPane.getPane().setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 8)); |
|
|
|
|
|
|
|
row1Pane.add(usedColorPane.getPane()); |
|
|
|
|
|
|
|
|
|
|
|
JPanel menuColorPane1 = new JPanel(); |
|
|
|
JPanel menuColorPane1 = new JPanel(); |
|
|
|
centerPane.add(menuColorPane1); |
|
|
|
centerPane.add(menuColorPane1); |
|
|
|