borders around components

pull/53/head
Zlatin Balevsky 2020-11-04 21:40:46 +00:00
parent 5d7ccce8fc
commit 031b278000
No known key found for this signature in database
GPG Key ID: A72832072D525E41
2 changed files with 13 additions and 11 deletions

View File

@ -580,6 +580,8 @@ COLLECTION=Collection
## New message window ## New message window
RECIPIENTS=Recipients RECIPIENTS=Recipients
RECIPIENTS_TITLE=Drag and drop recipients from your contacts
SEND=Send SEND=Send
MESSAGE_VERB=Message MESSAGE_VERB=Message
ATTACHMENT_DROP_TABLE_TITLE=You can drag files or collections from your library and attach to this message. MESSAGE_NOUN=Message
ATTACHMENT_DROP_TABLE_TITLE=You can drag files or collections from your library and attach to this message

View File

@ -18,6 +18,7 @@ import javax.swing.ListModel
import javax.swing.SwingConstants import javax.swing.SwingConstants
import javax.swing.TransferHandler import javax.swing.TransferHandler
import javax.swing.TransferHandler.TransferSupport import javax.swing.TransferHandler.TransferSupport
import javax.swing.border.TitledBorder
import com.muwire.core.InfoHash import com.muwire.core.InfoHash
import com.muwire.core.SharedFile import com.muwire.core.SharedFile
@ -62,28 +63,27 @@ class NewMessageView {
borderLayout() borderLayout()
panel(constraints : BorderLayout.NORTH) { panel(constraints : BorderLayout.NORTH) {
borderLayout() borderLayout()
panel(constraints : BorderLayout.NORTH) { panel(constraints : BorderLayout.NORTH, border : titledBorder(title : trans("RECIPIENTS_TITLE"),
label(text : trans("RECIPIENTS")) border : etchedBorder(), titlePosition : TitledBorder.TOP)) {
scrollPane { borderLayout()
scrollPane(constraints : BorderLayout.CENTER) {
widget(recipientsList) widget(recipientsList)
} }
} }
panel(constraints : BorderLayout.SOUTH) { panel(constraints : BorderLayout.SOUTH, border : titledBorder(title : trans("SUBJECT"),
border : etchedBorder(), titlePosition : TitledBorder.TOP)) {
borderLayout() borderLayout()
label(text : trans("SUBJECT"), constraints : BorderLayout.WEST)
subjectField = textField(constraints : BorderLayout.CENTER) subjectField = textField(constraints : BorderLayout.CENTER)
} }
} }
panel(constraints : BorderLayout.CENTER) { panel(constraints : BorderLayout.CENTER) {
splitPane(orientation : JSplitPane.VERTICAL_SPLIT, continuousLayout : true, dividerLocation : 300) { splitPane(orientation : JSplitPane.VERTICAL_SPLIT, continuousLayout : true, dividerLocation : 300) {
scrollPane { scrollPane(border : titledBorder(title : trans("MESSAGE_NOUN"), border : etchedBorder(), titlePosition : TitledBorder.TOP)) {
bodyArea = textArea(editable : true, rows : 10, columns : 50) bodyArea = textArea(editable : true, rows : 10, columns : 50)
} }
panel { panel (border : titledBorder(title : trans("ATTACHMENT_DROP_TABLE_TITLE"),
border : etchedBorder(), titlePosition : TitledBorder.TOP)) {
borderLayout() borderLayout()
panel(constraints : BorderLayout.NORTH) {
label(text : trans("ATTACHMENT_DROP_TABLE_TITLE"))
}
scrollPane(constraints : BorderLayout.CENTER) { scrollPane(constraints : BorderLayout.CENTER) {
attachmentsTable = table(autoCreateRowSorter : true, rowHeight : rowHeight) { attachmentsTable = table(autoCreateRowSorter : true, rowHeight : rowHeight) {
tableModel(list : model.attachments) { tableModel(list : model.attachments) {