Search in sources :

Example 1 with ValidatePanel

use of org.nhindirect.policy.tools.policyvalidate.ValidatePanel in project nhin-d by DirectProject.

the class EditorPanel method initUI.

protected void initUI() {
    setLayout(new BorderLayout());
    setBorder(new CompoundBorder(new SoftBevelBorder(BevelBorder.LOWERED), new EmptyBorder(5, 5, 5, 5)));
    policyText = new JTextArea();
    policyText.setLineWrap(true);
    policyText.setWrapStyleWord(true);
    policyText.setEditable(true);
    final JScrollPane scrollPane = new JScrollPane(policyText);
    scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
    scrollPane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
    fileNameLabel = new JLabel("*New File*");
    final JPanel reportPanel = new JPanel(new BorderLayout());
    reportPanel.add(fileNameLabel, BorderLayout.NORTH);
    reportPanel.add(scrollPane, BorderLayout.CENTER);
    //this.add(reportPanel, BorderLayout.CENTER);
    validatePanel = new ValidatePanel();
    validatePanel.setFeedMode(PolicyLexicon.SIMPLE_TEXT_V1, policyText.getDocument());
    final JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, reportPanel, validatePanel);
    splitPane.setDividerLocation(400);
    this.add(splitPane, BorderLayout.CENTER);
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) JTextArea(javax.swing.JTextArea) ValidatePanel(org.nhindirect.policy.tools.policyvalidate.ValidatePanel) BorderLayout(java.awt.BorderLayout) SoftBevelBorder(javax.swing.border.SoftBevelBorder) JLabel(javax.swing.JLabel) CompoundBorder(javax.swing.border.CompoundBorder) EmptyBorder(javax.swing.border.EmptyBorder) JSplitPane(javax.swing.JSplitPane)

Aggregations

BorderLayout (java.awt.BorderLayout)1 JLabel (javax.swing.JLabel)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 JSplitPane (javax.swing.JSplitPane)1 JTextArea (javax.swing.JTextArea)1 CompoundBorder (javax.swing.border.CompoundBorder)1 EmptyBorder (javax.swing.border.EmptyBorder)1 SoftBevelBorder (javax.swing.border.SoftBevelBorder)1 ValidatePanel (org.nhindirect.policy.tools.policyvalidate.ValidatePanel)1