|
|
|
@ -1,42 +1,6 @@
|
|
|
|
|
package com.fr.design.file; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.awt.AWTEvent; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Font; |
|
|
|
|
import java.awt.GradientPaint; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
import java.awt.Toolkit; |
|
|
|
|
import java.awt.event.AWTEventListener; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.awt.event.MouseEvent; |
|
|
|
|
import java.awt.event.MouseListener; |
|
|
|
|
import java.awt.event.MouseMotionListener; |
|
|
|
|
import java.awt.geom.Arc2D; |
|
|
|
|
import java.awt.geom.GeneralPath; |
|
|
|
|
import java.awt.geom.Line2D; |
|
|
|
|
import java.awt.geom.Path2D; |
|
|
|
|
import java.awt.geom.RoundRectangle2D; |
|
|
|
|
import java.io.File; |
|
|
|
|
import java.util.logging.Level; |
|
|
|
|
|
|
|
|
|
import javax.swing.Action; |
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.ButtonModel; |
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
import javax.swing.JComponent; |
|
|
|
|
import javax.swing.JMenu; |
|
|
|
|
import javax.swing.JMenuItem; |
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JSeparator; |
|
|
|
|
import javax.swing.plaf.basic.BasicMenuItemUI; |
|
|
|
|
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.base.GraphHelper; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
@ -55,6 +19,14 @@ import com.fr.stable.Constants;
|
|
|
|
|
import com.fr.stable.ProductConstants; |
|
|
|
|
import com.fr.stable.project.ProjectConstants; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.plaf.basic.BasicMenuItemUI; |
|
|
|
|
import java.awt.*; |
|
|
|
|
import java.awt.event.*; |
|
|
|
|
import java.awt.geom.*; |
|
|
|
|
import java.io.File; |
|
|
|
|
import java.util.logging.Level; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Author : daisy |
|
|
|
|
* Date: 13-8-5 |
|
|
|
@ -159,7 +131,6 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
* 关闭掉当前已打开文件列表中指定的文件 |
|
|
|
|
* |
|
|
|
|
* @param file 指定的文件 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
public void closeFileTemplate(FILE file) { |
|
|
|
|
for (JTemplate<?, ?> temp : openedTemplate) { |
|
|
|
@ -274,6 +245,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 刷新打开模板 |
|
|
|
|
* |
|
|
|
|
* @param history 模板 |
|
|
|
|
*/ |
|
|
|
|
public void refreshOpenedTemplate(java.util.List<JTemplate<?, ?>> history) { |
|
|
|
@ -396,6 +368,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
g2d.draw(new Line2D.Double((float) templateStartX, getHeight() - 1, (float) maxWidth + LIST_BUTTON_WIDTH, getHeight() - 1)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void paintDefaultBackground(Graphics2D g2d) { |
|
|
|
|
//画默认背景
|
|
|
|
|
g2d.setPaint(new GradientPaint(1, 1, UIConstants.SHADOW_GREY, 1, getHeight() - 1, UIConstants.SHADOW_GREY)); |
|
|
|
@ -646,6 +619,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 点击 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mouseClicked(MouseEvent e) { |
|
|
|
@ -653,6 +627,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 按下 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mousePressed(MouseEvent e) { |
|
|
|
@ -711,6 +686,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 关闭模板 |
|
|
|
|
* |
|
|
|
|
* @param specifiedTemplate 模板 |
|
|
|
|
*/ |
|
|
|
|
public void closeSpecifiedTemplate(JTemplate<?, ?> specifiedTemplate) { |
|
|
|
@ -752,6 +728,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 关闭模板 |
|
|
|
|
* |
|
|
|
|
* @param closedTemplate 模板 |
|
|
|
|
*/ |
|
|
|
|
public void closeFormat(JTemplate closedTemplate) { |
|
|
|
@ -806,6 +783,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 鼠标释放 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mouseReleased(MouseEvent e) { |
|
|
|
@ -813,6 +791,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 鼠标进入 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mouseEntered(MouseEvent e) { |
|
|
|
@ -852,6 +831,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 鼠标离开 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mouseExited(MouseEvent e) { |
|
|
|
@ -863,6 +843,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 鼠标拖拽 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mouseDragged(MouseEvent e) { |
|
|
|
@ -870,6 +851,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 鼠标移动 |
|
|
|
|
* |
|
|
|
|
* @param e 鼠标事件 |
|
|
|
|
*/ |
|
|
|
|
public void mouseMoved(MouseEvent e) { |
|
|
|
@ -903,6 +885,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 加入值 |
|
|
|
|
* |
|
|
|
|
* @param key 键 |
|
|
|
|
* @param value 值 |
|
|
|
|
*/ |
|
|
|
@ -911,6 +894,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 动作 |
|
|
|
|
* |
|
|
|
|
* @param e 事件 |
|
|
|
|
*/ |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|