summaryrefslogtreecommitdiffstats
path: root/src/cppcheckplus/outlookpanel/MyOutlookSplitListener.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cppcheckplus/outlookpanel/MyOutlookSplitListener.java')
-rw-r--r--src/cppcheckplus/outlookpanel/MyOutlookSplitListener.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cppcheckplus/outlookpanel/MyOutlookSplitListener.java b/src/cppcheckplus/outlookpanel/MyOutlookSplitListener.java
new file mode 100644
index 0000000..b65e706
--- /dev/null
+++ b/src/cppcheckplus/outlookpanel/MyOutlookSplitListener.java
@@ -0,0 +1,33 @@
1
2package cppcheckplus.outlookpanel;
3
4import java.awt.Dimension;
5import java.awt.Point;
6import java.awt.event.MouseEvent;
7import javax.swing.JComponent;
8
9import cppcheckplus.control.MyHeader;
10import cppcheckplus.control.MyListSplitListener;
11
12public class MyOutlookSplitListener extends MyListSplitListener
13{
14 public MyOutlookSplitListener(MyHeader header)
15 {
16 super(header);
17 }
18
19 public void mouseDragged(MouseEvent e)
20 {
21 if (!header.isShrinked() && lastPoint != null)
22 {
23 JComponent parent = (JComponent)header.getParent();
24 Dimension size = parent.getPreferredSize();
25 Point thisPoint = e.getPoint();
26 int xMovement = thisPoint.x - lastPoint.x;
27 size.width += xMovement;
28 size.width = Math.max(size.width, 37);
29 parent.setPreferredSize(size);
30 header.revalidateParent();
31 }
32 }
33}