1 package cz
.cvut
.promod
.gui
.dialogs
.configurationChangeDialog
;
3 import cz
.cvut
.promod
.services
.ModelerSession
;
4 import cz
.cvut
.promod
.services
.componentFactoryService
.ComponentFactoryService
;
9 import com
.jgoodies
.forms
.factories
.Borders
;
12 * ProMod, master thesis project
13 * User: Petr Zverina, petr.zverina@gmail.com
14 * Date: 17:55:41, 12.12.2009
16 * Represents the view component for ConfigurationDiffDialog.
18 public class ConfigurationDiffDialogView
extends JDialog
{
20 private static final Dimension DIMENSION
= new Dimension(500, 450);
22 private final JLabel titleLabel
= ModelerSession
.getComponentFactoryService().createLabel(
23 ModelerSession
.getCommonResourceBundle().getString("modeler.configuration.message")
25 private final JLabel messageLabel
= ModelerSession
.getComponentFactoryService().createLabel(
26 ModelerSession
.getCommonResourceBundle().getString("modeler.configuration.message.detail")
29 protected final JTextArea diffTextArea
= ModelerSession
.getComponentFactoryService().createTextArea();
31 protected final JButton hideButton
= ModelerSession
.getComponentFactoryService().createButton(
32 ModelerSession
.getCommonResourceBundle().getString("modeler.configuration.hideButton"), null
35 public ConfigurationDiffDialogView(){
38 diffTextArea
.setLineWrap(true);
39 diffTextArea
.setWrapStyleWord(true);
41 diffTextArea
.setEditable(false);
46 private void initLayout() {
47 final JPanel panel
= ModelerSession
.getComponentFactoryService().createPanel();
49 panel
.setBorder(Borders
.createEmptyBorder(ComponentFactoryService
.DEFAULT_FORM_BORDER
));
51 panel
.setLayout(new BorderLayout());
53 final JPanel northPanel
= ModelerSession
.getComponentFactoryService().createPanel();
54 northPanel
.setBorder(Borders
.createEmptyBorder(ComponentFactoryService
.DEFAULT_FORM_BORDER
));
55 northPanel
.setLayout(new BorderLayout());
57 northPanel
.add(titleLabel
, BorderLayout
.NORTH
);
58 northPanel
.add(messageLabel
, BorderLayout
.SOUTH
);
60 panel
.add(northPanel
, BorderLayout
.NORTH
);
61 panel
.add(ModelerSession
.getComponentFactoryService().createScrollPane(diffTextArea
), BorderLayout
.CENTER
);
62 panel
.add(hideButton
, BorderLayout
.SOUTH
);
64 setLayout(new BorderLayout());
65 add(panel
, BorderLayout
.CENTER
);