本文整理了Java中javax.swing.JTextArea.setFocusable()
方法的一些代码示例,展示了JTextArea.setFocusable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.setFocusable()
方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:setFocusable
暂无
代码示例来源:origin: jersey/jersey
messagesArea.setRows(5);
messagesArea.setWrapStyleWord(true);
messagesArea.setFocusable(false);
jScrollPane2.setViewportView(messagesArea);
代码示例来源:origin: geotools/geotools
/**
* Retourne une étiquette pour la composante spécifiée. Le texte de l'étiquette pourra
* éventuellement être distribué sur plusieurs lignes.
*
* @param owner Composante pour laquelle on construit une étiquette. L'étiquette aura la même
* largeur que {@code owner}.
* @param text Texte à placer dans l'étiquette.
*/
public static JComponent getMultilineLabelFor(final JComponent owner, final String text) {
final JTextArea label = new JTextArea(text);
final Dimension size = owner.getPreferredSize();
size.height = label.getMaximumSize().height;
label.setMaximumSize(size);
label.setWrapStyleWord(true);
label.setLineWrap(true);
label.setEditable(false);
label.setFocusable(false);
label.setOpaque(false);
label.setBorder(null); // Certains L&F placent une bordure.
LookAndFeel.installColorsAndFont(
label, "Label.background", "Label.foreground", "Label.font");
return label;
}
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
area.setWrapStyleWord(true);
area.setEditable(false);
area.setFocusable(true);
area.getAccessibleContext().setAccessibleName(NbBundle.getMessage(NotifyDescriptor.class, "ACN_NotifyDescriptor_MessageJTextArea")); // NOI18N
area.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(NotifyDescriptor.class, "ACD_NotifyDescriptor_MessageJTextArea")); // NOI18N
代码示例来源:origin: stackoverflow.com
JTextArea textArea = new JTextArea(...);
textArea.setFocusable( false );
代码示例来源:origin: zgqq/mah
private void initBottom() {
content.setLineWrap(true);
content.setEditable(false);
content.setFocusable(false);
content.setFont(font);
mainWindow.add(content);
}
代码示例来源:origin: zgqq/mah
private void initTop() {
title.setFont(font);
title.setEditable(false);
title.setFocusable(false);
title.setLineWrap(true);
mainWindow.add(title);
}
代码示例来源:origin: stackoverflow.com
JTextArea ta = new JTextArea("A JTextArea containing a long text");
ta.setLineWrap(true);
ta.setWrapStyleWord(true);
ta.setOpaque(false);
ta.setEditable(false);
ta.setFocusable(false);
代码示例来源:origin: net.sf.taverna.t2.workbench/contextual-views-impl
private JTextArea createTextArea(final Class<?> c, final String value) {
classToCurrentValueMap.put(c, value);
JTextArea area = new JTextArea(value);
area.setFocusable(true);
area.addFocusListener(new TextAreaFocusListener(area, c));
area.setColumns(DEFAULT_AREA_WIDTH);
area.setLineWrap(true);
area.setWrapStyleWord(true);
classToAreaMap.put(c, area);
logger.info("Adding to map " + c.getCanonicalName() + "("
+ c.hashCode() + ") to " + area.hashCode());
return area;
}
代码示例来源:origin: stackoverflow.com
JTextArea ta = new JTextArea(1, 20);
ta.setText("Enter the name of the repo and the name of the owner of that repo to search for open issues.");
ta.setWrapStyleWord(true);
ta.setLineWrap(true);
ta.setBorder(null);
ta.setFont(UIManager.getFont("Label.font"));
ta.setOpaque(false);
ta.setFocusable(false);
ta.setEditable(false);
//JLabel lblTop1 = new JLabel("<html>Enter the name of the repo and the name of the owner of that repo to search for open issues", JLabel.CENTER);
//JLabel lblTop2 = new JLabel("owner of that repo to search for open issues.\n", JLabel.CENTER);
//...
//panTopTop.add(lblTop1);
//panTopBottom.add(lblTop2);
GridBagConstraints gbc = new GridBagConstraints();
gbc.gridwidth = GridBagConstraints.REMAINDER;
panTop.add(ta, gbc);
代码示例来源:origin: org.nuiton.jaxx/jaxx-runtime-swing-widget
protected void createDescription() {
description = new javax.swing.JTextArea();
$objectMap.put("description", description);
description.setName("description");
description.setColumns(15);
description.setLineWrap(true);
description.setWrapStyleWord(true);
description.setFocusable(false);
if (description.getFont() != null) description.setFont(description.getFont().deriveFont((float) 10));
description.setEditable(false);
description.setRows(3);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-config
protected void createDescription() {
$objectMap.put("description", description = new JTextArea());
description.setName("description");
description.setColumns(15);
description.setLineWrap(true);
description.setWrapStyleWord(true);
description.setEditable(false);
if (description.getFont() != null) {
description.setFont(description.getFont().deriveFont((float) 10));
}
description.setFocusable(false);
description.setRows(3);
}
代码示例来源:origin: io.ultreia.java4all.jaxx/jaxx-widgets-config
protected void createDescription() {
$objectMap.put("description", description = new JTextArea());
description.setName("description");
description.setColumns(15);
description.setLineWrap(true);
description.setWrapStyleWord(true);
description.setEditable(false);
if (description.getFont() != null) {
description.setFont(description.getFont().deriveFont((float) 10));
}
description.setFocusable(false);
description.setRows(3);
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets-config
protected void createDescription() {
$objectMap.put("description", description = new JTextArea());
description.setName("description");
description.setColumns(15);
description.setLineWrap(true);
description.setWrapStyleWord(true);
description.setEditable(false);
if (description.getFont() != null) {
description.setFont(description.getFont().deriveFont((float) 10));
}
description.setFocusable(false);
description.setRows(3);
}
代码示例来源:origin: MrCrayfish/ModelCreator
private static JScrollPane getScrollableMessage()
{
String message = "Thank you for downloading my program. I hope it encourages" + " you to create awesome models. If you do create something awesome, I" + " would love to see it. You can post your screenshots to me via Twitter" + " or Facebook. If you are unsure how to use anything works, hover your " + "mouse over the component and it will tell you what it does." + "\n\n" + "I've put a lot of work into this program, so if you are " + "feeling generous, you can donate by clicking the button below. Thank you!" + "";
JTextArea textArea = new JTextArea(message);
textArea.setEditable(false);
textArea.setCursor(null);
textArea.setFocusable(false);
textArea.setBorder(null);
textArea.setOpaque(false);
textArea.setLineWrap(true);
textArea.setWrapStyleWord(true);
JScrollPane scrollPane = new JScrollPane(textArea);
scrollPane.setBorder(null);
return scrollPane;
}
代码示例来源:origin: Vhati/Slipstream-Mod-Manager
public void addTextRow( String text ) {
gridC.fill = GridBagConstraints.HORIZONTAL;
gridC.weighty = 0.0;
gridC.gridwidth = GridBagConstraints.REMAINDER;
gridC.gridx = 0;
gridC.anchor = GridBagConstraints.WEST;
JTextArea textArea = new JTextArea( text );
textArea.setBackground( null );
textArea.setEditable( false );
textArea.setBorder( null );
textArea.setLineWrap( true );
textArea.setWrapStyleWord( true );
textArea.setFocusable( false );
textArea.setFont( UIManager.getFont( "Label.font" ) );
this.add( textArea, gridC );
gridC.gridy++;
}
代码示例来源:origin: thorikawa/GlassRemote
public InfoPanel() {
setPreferredSize(new Dimension(WIDTH, HEIGHT));
GroupLayout layout = new GroupLayout(this);
layout.setAutoCreateContainerGaps(true);
layout.setAutoCreateGaps(true);
setLayout(layout);
textArea = new JTextArea();
textArea.setBounds(5, 5, 630, 30);
textArea.setEditable(false);
textArea.setFocusable(false);
layout.setHorizontalGroup(layout.createParallelGroup().addComponent(textArea));
layout.setVerticalGroup(layout.createSequentialGroup().addComponent(textArea));
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
public void setExecutandoPrograma(boolean executandoPrograma)
{
this.executandoPrograma = executandoPrograma;
if (!executandoPrograma)
{
((DocumentoConsole) console.getDocument()).setLendo(false);
console.setEditable(false);
console.setFocusable(false);
}
atualizarItensMenuConsole();
}
代码示例来源:origin: GoldenGnu/jeveassets
private void showExportTap() {
cardLayout.show(jContent, AccountImportCard.SHARE_EXPORT.name());
jPrevious.setEnabled(true);
jNext.setEnabled(true);
jNext.setText(DialoguesAccount.get().ok());
try {
String value = esiOwner.getCallbackURL().name() + " " + esiOwner.getRefreshToken();
String code = new String(Base64.getUrlEncoder().encode(value.getBytes(StandardCharsets.UTF_8)), "UTF-8").replace("=", "");
jExport.setText(code);
jExport.setFocusable(true);
jExportClipboard.setEnabled(true);
jExportFile.setEnabled(true);
} catch (UnsupportedEncodingException ex) {
jExport.setText(DialoguesAccount.get().shareExportFail());
jExport.setFocusable(false);
jExportClipboard.setEnabled(false);
jExportFile.setEnabled(false);
}
}
代码示例来源:origin: UNIVALI-LITE/Portugol-Studio
@Override
public void solicitaEntrada(final TipoDado tipoDado, final Armazenador armazenador) throws InterruptedException
{
SwingUtilities.invokeLater(() ->
{
AbaConsole.this.selecionar();
setLendo(true);
abaCodigoFonte.exibirPainelSaida();
DocumentoConsole.this.armazenador = armazenador;
DocumentoConsole.this.tipoDado = tipoDado;
console.setEditable(true);
console.setFocusable(true);
console.getCaret().setVisible(true);
console.setCaretPosition(console.getText().length());
console.requestFocusInWindow();
agendarPopupLeia();
});
}
代码示例来源:origin: com.l2fprod.common/l2fprod-common-directorychooser
public ChooseDirectory() {
setLayout(new PercentLayout(PercentLayout.VERTICAL, 3));
if (System.getProperty("javawebstart.version") != null) {
JTextArea area = new JTextArea(RESOURCE.getString("message.webstart"));
LookAndFeelTweaks.makeMultilineLabel(area);
area.setFocusable(false);
add(area);
}
final JButton button = new JButton(RESOURCE.getString("selectDirectory"));
add(button);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
selectDirectory(button, null);
}
});
}
内容来源于网络,如有侵权,请联系作者删除!