use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class NewFileFour method initComponents.
private void initComponents() {
accountList = new JList<>();
accountList.addMouseListener(new java.awt.event.MouseAdapter() {
@Override
public void mouseClicked(java.awt.event.MouseEvent evt) {
accountListMouseClicked(evt);
}
});
accountTree = new JTree();
accountTree.setModel(null);
helpPane = new JEditorPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("NewFileFour.txt"));
}
use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class NewFileOne method initComponents.
private void initComponents() {
helpPane = new JEditorPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("NewFileOne.txt"));
dbNameButton = new JButton("...");
dbNameButton.addActionListener(this);
overwriteLabel = new JLabel(rb.getString("Message.OverwriteDB"));
overwriteLabel.setIcon(UIManager.getIcon("OptionPane.warningIcon"));
overwriteLabel.setFont(overwriteLabel.getFont().deriveFont(Font.ITALIC));
typeCombo = new DataStoreTypeCombo();
typeCombo.addActionListener(this);
dbNameField.addCaretListener(e -> checkForOverwrite());
typeCombo.setSelectedItem(DataStoreType.BINARY_XSTREAM);
}
use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class PartialTwo method initComponents.
private void initComponents() {
table = new PartialTable(qAcc);
deleteButton = new JButton(rb.getString("Button.Delete"));
helpPane = new JTextPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("QifTwo.txt"));
addComponentListener(new ComponentAdapter() {
@Override
public void componentShown(ComponentEvent evt) {
refreshInfo();
}
});
deleteButton.addActionListener(this);
}
use of javax.swing.text.StyledEditorKit in project jgnash by ccavanaugh.
the class NewFileTwo method initComponents.
private void initComponents() {
helpPane = new JEditorPane();
helpPane.setEditable(false);
helpPane.setEditorKit(new StyledEditorKit());
helpPane.setBackground(getBackground());
helpPane.setText(TextResource.getString("NewFileTwo.txt"));
}
use of javax.swing.text.StyledEditorKit in project xsimilarity by iamxiatian.
the class About method createPanel.
public static JPanel createPanel() {
JPanel mainPanel = new JPanel();
mainPanel.setLayout(new BorderLayout());
JTextPane editorPane = new JTextPane();
editorPane.setEditable(false);
// 让长文本自动换行
editorPane.setEditorKit(new StyledEditorKit());
editorPane.setContentType("text/html");
try {
// 可以用html格式文件做你的帮助系统了
URL url = Resources.getResource("about.html");
editorPane.setPage(url);
} catch (IOException e1) {
editorPane.setText(e1.getMessage());
}
// editorPane.setText("<html><body>个人主页:<a href='xiatian.irm.cn'>http://xiatian.irm.cn/</a></body></html>");
mainPanel.add(new JScrollPane(editorPane), BorderLayout.CENTER);
return mainPanel;
}
Aggregations