use of javax.swing.border.LineBorder in project binnavi by google.
the class TypeEditorPanel method createControls.
private void createControls(final TypeManager typeManager, final String caption) {
setBounds(100, 100, 588, 529);
setLayout(new BorderLayout());
setBorder(new TitledBorder(new LineBorder(Color.LIGHT_GRAY, 1, true), caption));
contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
add(new TypeEditorSearchPanel(typesTree), BorderLayout.NORTH);
add(contentPanel, BorderLayout.CENTER);
contentPanel.setLayout(new BorderLayout(0, 0));
{
final JScrollPane scrollPane = new JScrollPane();
contentPanel.add(scrollPane, BorderLayout.CENTER);
{
typesTree.addMouseListener(new TypeEditorMouseHandler(owner, typesTree, typeManager, this));
typesTree.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, true), "delete_types_or_members");
typesTree.getActionMap().put("delete_types_or_members", new DeleteTypeOrMemberAction(owner, typeManager, this));
scrollPane.setViewportView(typesTree);
}
}
}
use of javax.swing.border.LineBorder in project jdk8u_jdk by JetBrains.
the class TestOldHangul method run.
private void run() {
Font ourFont = null;
// download from http://chem.skku.ac.kr/~wkpark/project/font/GSUB/UnbatangOdal/ and place in {user.home}/fonts/
final String fontName = "UnBatangOdal.ttf";
try {
ourFont = Font.createFont(Font.TRUETYPE_FONT, new java.io.File(new java.io.File(System.getProperty("user.home"), "fonts"), fontName));
ourFont = ourFont.deriveFont((float) 48.0);
} catch (Throwable t) {
t.printStackTrace();
System.err.println("Fail: " + t);
return;
}
JFrame frame = new JFrame(System.getProperty("java.version"));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
final JTextArea label = new JTextArea("(empty)");
label.setSize(400, 300);
label.setBorder(new LineBorder(Color.black));
label.setFont(ourFont);
final String str = "ᄊᆞᆷ ᄒᆞᆫ글 ᄀᆞᇹ ᄫᆞᆼ\n";
if (AUTOMATIC_TEST) {
/* run the test automatically (else, manually) */
label.setText(str);
} else {
JButton button = new JButton("Old Hangul");
button.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent actionEvent) {
label.setText(str);
}
});
panel.add(button);
}
panel.add(label);
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
}
use of javax.swing.border.LineBorder in project jdk8u_jdk by JetBrains.
the class Test4252164 method update.
private void update(int thickness) {
this.thickness += thickness;
this.rounded.setBorder(new LineBorder(Color.RED, this.thickness, true));
this.straight.setBorder(new LineBorder(Color.RED, this.thickness, false));
}
use of javax.swing.border.LineBorder in project jdk8u_jdk by JetBrains.
the class TestSinhalaChar method run.
private void run() {
JFrame frame = new JFrame("Test Character (no crash = PASS)");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
final JLabel label = new JLabel("(empty)");
label.setSize(400, 100);
label.setBorder(new LineBorder(Color.black));
label.setFont(new Font("Lucida Bright", Font.PLAIN, 12));
if (AUTOMATIC_TEST) {
/* run the test automatically (else, manually) */
label.setText(Character.toString('ෝ'));
} else {
JButton button = new JButton("Set Char x0DDD");
button.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent actionEvent) {
label.setText(Character.toString('ෝ'));
}
});
panel.add(button);
}
panel.add(label);
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
}
use of javax.swing.border.LineBorder in project jdk8u_jdk by JetBrains.
the class TestTibetan method run.
private void run() {
Font ourFont = null;
try {
//For best results: Font from: http://download.savannah.gnu.org/releases/free-tibetan/jomolhari/
// place in $(user.home)/fonts/
ourFont = Font.createFont(Font.TRUETYPE_FONT, new java.io.File(new java.io.File(System.getProperty("user.home"), "fonts"), "Jomolhari-alpha3c-0605331.ttf"));
//ourFont = new Font("serif",Font.PLAIN, 24);
ourFont = ourFont.deriveFont((float) 24.0);
} catch (Throwable t) {
t.printStackTrace();
System.err.println("Fail: " + t);
return;
}
JFrame frame = new JFrame(System.getProperty("java.version"));
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
final JTextArea label = new JTextArea("(empty)");
label.setSize(400, 300);
label.setBorder(new LineBorder(Color.black));
label.setFont(ourFont);
// TinTin.
final String str = "༄༅།། ཏིན་ཏིན་གྱི་དཔའ་རྩལ";
if (AUTOMATIC_TEST) {
/* run the test automatically (else, manually) */
label.setText(str);
} else {
JButton button = new JButton("Set Char x0DDD");
button.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent actionEvent) {
label.setText(str);
}
});
panel.add(button);
}
panel.add(label);
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
}
Aggregations