|
@@ -32,16 +32,18 @@ import com.dmdirc.addons.ui_swing.components.inputfields.SwingInputHandler;
|
32
|
32
|
import com.dmdirc.addons.ui_swing.components.inputfields.TextAreaInputField;
|
33
|
33
|
import com.dmdirc.addons.ui_swing.components.text.TextLabel;
|
34
|
34
|
import com.dmdirc.ui.interfaces.InputWindow;
|
|
35
|
+
|
35
|
36
|
import java.awt.Color;
|
36
|
37
|
import java.awt.event.KeyEvent;
|
37
|
38
|
import java.util.Date;
|
38
|
|
-import javax.swing.JLabel;
|
39
|
39
|
|
|
40
|
+import javax.swing.JLabel;
|
40
|
41
|
import javax.swing.JPanel;
|
41
|
42
|
import javax.swing.JScrollPane;
|
42
|
43
|
import javax.swing.KeyStroke;
|
43
|
44
|
import javax.swing.event.DocumentEvent;
|
44
|
45
|
import javax.swing.event.DocumentListener;
|
|
46
|
+
|
45
|
47
|
import net.miginfocom.swing.MigLayout;
|
46
|
48
|
|
47
|
49
|
/**
|
|
@@ -57,13 +59,13 @@ public class TopicDisplayPane extends JPanel implements DocumentListener {
|
57
|
59
|
*/
|
58
|
60
|
private static final long serialVersionUID = 1;
|
59
|
61
|
/** Parent topic pane. */
|
60
|
|
- private ChannelSettingsDialog parent;
|
|
62
|
+ private final ChannelSettingsDialog parent;
|
61
|
63
|
/** Associated channel. */
|
62
|
|
- private Channel channel;
|
|
64
|
+ private final Channel channel;
|
63
|
65
|
/** Channel window. */
|
64
|
|
- private InputWindow channelWindow;
|
|
66
|
+ private final InputWindow channelWindow;
|
65
|
67
|
/** the maximum length allowed for a topic. */
|
66
|
|
- private int topicLengthMax;
|
|
68
|
+ private final int topicLengthMax;
|
67
|
69
|
/** label showing the number of characters left in a topic.*/
|
68
|
70
|
private JLabel topicLengthLabel;
|
69
|
71
|
/** Topic text entry text area. */
|
|
@@ -82,6 +84,8 @@ public class TopicDisplayPane extends JPanel implements DocumentListener {
|
82
|
84
|
*/
|
83
|
85
|
public TopicDisplayPane(final Channel channel,
|
84
|
86
|
final ChannelSettingsDialog parent, final InputWindow channelWindow) {
|
|
87
|
+ super();
|
|
88
|
+
|
85
|
89
|
this.channel = channel;
|
86
|
90
|
this.parent = parent;
|
87
|
91
|
this.topicLengthMax = channel.getServer().getParser().getMaxTopicLength();
|
|
@@ -99,6 +103,7 @@ public class TopicDisplayPane extends JPanel implements DocumentListener {
|
99
|
103
|
topicLengthLabel = new JLabel();
|
100
|
104
|
topicText = new TextAreaInputField(100, 4);
|
101
|
105
|
topicWho = new TextLabel();
|
|
106
|
+ topicWho.setOpaque(false);
|
102
|
107
|
|
103
|
108
|
topicText.setLineWrap(true);
|
104
|
109
|
topicText.setWrapStyleWord(true);
|