Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
c34802ce
Commit
c34802ce
authored
Sep 30, 2016
by
Benedikt Zoennchen
Browse files
GUI-PostVis: make settings dialog scrollable
parent
4e0c4867
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereGui/src/org/vadere/gui/postvisualization/view/SettingsDialog.java
View file @
c34802ce
...
...
@@ -46,23 +46,29 @@ public class SettingsDialog extends JDialog {
"5dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu"
);
// rows
CellConstraints
cc
=
new
CellConstraints
();
getContentPane
().
setLayout
(
mainLayout
);
JPanel
mainPanel
=
new
JPanel
();
mainPanel
.
setLayout
(
mainLayout
);
JScrollPane
scrollPane
=
new
JScrollPane
(
mainPanel
);
scrollPane
.
setHorizontalScrollBarPolicy
(
JScrollPane
.
HORIZONTAL_SCROLLBAR_NEVER
);
scrollPane
.
setVerticalScrollBarPolicy
(
JScrollPane
.
VERTICAL_SCROLLBAR_AS_NEEDED
);
getContentPane
().
add
(
scrollPane
);
JLayeredPane
colorLayeredPane
=
new
JLayeredPane
();
JLayeredPane
additionalLayeredPane
=
new
JLayeredPane
();
colorLayeredPane
.
setBorder
(
BorderFactory
.
createTitledBorder
(
Messages
.
getString
(
"SettingsDialog.colors.border.text"
)));
getContent
Pane
()
.
add
(
colorLayeredPane
,
cc
.
xy
(
2
,
2
));
main
Pane
l
.
add
(
colorLayeredPane
,
cc
.
xy
(
2
,
2
));
additionalLayeredPane
.
setBorder
(
BorderFactory
.
createTitledBorder
(
Messages
.
getString
(
"SettingsDialog.additional.border.text"
)));
getContent
Pane
()
.
add
(
additionalLayeredPane
,
cc
.
xy
(
2
,
4
));
main
Pane
l
.
add
(
additionalLayeredPane
,
cc
.
xy
(
2
,
4
));
JButton
closeButton
=
new
JButton
(
Messages
.
getString
(
"SettingsDialog.btnClose.text"
));
JPanel
controlPanel
=
new
JPanel
();
controlPanel
.
setLayout
(
new
FlowLayout
(
FlowLayout
.
RIGHT
));
controlPanel
.
add
(
closeButton
);
closeButton
.
addActionListener
(
new
ActionCloseSettingDialog
(
this
));
getContentPane
().
add
(
controlPanel
,
cc
.
xyw
(
2
,
6
,
2
));
mainPanel
.
add
(
controlPanel
,
cc
.
xyw
(
2
,
6
,
2
));
// ######################################################################################
// Layout definition for sub panels
...
...
@@ -277,8 +283,9 @@ public class SettingsDialog extends JDialog {
});
additionalLayeredPane
.
add
(
chChowLogo
,
cc
.
xyw
(
2
,
24
,
5
));
scrollPane
.
setPreferredSize
(
new
Dimension
(
mainPanel
.
getPreferredSize
().
width
+
10
,
Math
.
min
(
mainPanel
.
getPreferredSize
().
height
,
Toolkit
.
getDefaultToolkit
().
getScreenSize
().
height
-
50
)));
pack
();
setResizable
(
fals
e
);
setResizable
(
tru
e
);
SwingUtils
.
centerComponent
(
this
);
setVisible
(
true
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment