javax.swing.JTextArea.setAlignmentX()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(263)

本文整理了Java中javax.swing.JTextArea.setAlignmentX()方法的一些代码示例,展示了JTextArea.setAlignmentX()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextArea.setAlignmentX()方法的具体详情如下:
包路径:javax.swing.JTextArea
类名称:JTextArea
方法名:setAlignmentX

JTextArea.setAlignmentX介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

txtRandomPacks.setAlignmentX(Component.LEFT_ALIGNMENT);
pnlRandomPacks.add(txtRandomPacks);
JButton btnSelectRandomPacks = new JButton();

代码示例来源:origin: stackoverflow.com

JLabel label = new JLabel(...);
JTextArea textArea = new JTextArea(...);
textArea.setAlignmentX(0.0f);
JPanel panel = new BoxLayout(...);
panel.add(label);
panel.add(textArea);

代码示例来源:origin: cytoscape/application

area.setAlignmentX(Component.LEFT_ALIGNMENT);
internalPanel.add(area);

代码示例来源:origin: MegaMek/mekhq

private JPanel genNotes(Campaign c, Person p) {
  JPanel panel = new JPanel();
  panel.setOpaque(false);
  panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
  panel.add(genLabel(resourceMap.getString("doctorsNotes.text"))); //$NON-NLS-1$
  
  String notes = p.getExtraData().get(DOCTOR_NOTES, ""); //$NON-NLS-1$
  notesArea = new JTextArea(notes);
  notesArea.setEditable(true);
  notesArea.setAlignmentX(Component.LEFT_ALIGNMENT);
  notesArea.setFont(handwritingFont);
  notesArea.setLineWrap(true);
  notesArea.setWrapStyleWord(true);
  JPanel notesPanel = new JPanel();
  notesPanel.setLayout(new BoxLayout(notesPanel, BoxLayout.X_AXIS));
  notesPanel.setOpaque(false);
  notesPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
  notesPanel.add(Box.createHorizontalStrut(30));
  notesPanel.add(notesArea);
  
  panel.add(notesPanel);
  
  return panel;
}

代码示例来源:origin: omegat-org/omegat

descriptionTextArea.setText(OStrings.getString("PREFS_SECURE_STORE_DESCRIPTION")); // NOI18N
descriptionTextArea.setWrapStyleWord(true);
descriptionTextArea.setAlignmentX(0.0F);
descriptionTextArea.setDragEnabled(false);
descriptionTextArea.setFocusable(false);

代码示例来源:origin: omegat-org/omegat

jTextArea1.setText(OStrings.getString("ISSUE_PROVIDERS_SELECTOR_MESSAGE")); // NOI18N
jTextArea1.setWrapStyleWord(true);
jTextArea1.setAlignmentX(0.0F);
jTextArea1.setFocusable(false);
jTextArea1.setOpaque(false);

代码示例来源:origin: omegat-org/omegat

descriptionTextArea.setLineWrap(true);
descriptionTextArea.setWrapStyleWord(true);
descriptionTextArea.setAlignmentX(0.0F);
descriptionTextArea.setOpaque(false);
descriptionPanel.add(descriptionTextArea, java.awt.BorderLayout.CENTER);

代码示例来源:origin: omegat-org/omegat

descriptionTextArea.setText(OStrings.getString("KEYSTROKE_EDITOR_MESSAGE")); // NOI18N
descriptionTextArea.setWrapStyleWord(true);
descriptionTextArea.setAlignmentX(0.0F);
descriptionTextArea.setFocusable(false);
descriptionTextArea.setOpaque(false);

代码示例来源:origin: org.codehaus.izpack/izpack-panel

area.setAlignmentX(LEFT_ALIGNMENT);
area.setCaretPosition(0);
area.setEditable(false);

代码示例来源:origin: omegat-org/omegat

messageTextArea.setText(OStrings.getString("PASSWORD_SET_MESSAGE")); // NOI18N
messageTextArea.setWrapStyleWord(true);
messageTextArea.setAlignmentX(0.0F);
messageTextArea.setDragEnabled(false);
messageTextArea.setFocusable(false);
errorTextArea.setLineWrap(true);
errorTextArea.setWrapStyleWord(true);
errorTextArea.setAlignmentX(0.0F);
errorTextArea.setOpaque(false);
add(errorTextArea);

代码示例来源:origin: uk.org.mygrid.taverna.scufl.scufl-ui-components/workflow-input-panel

public Input(Port port) {
    this.port = port;
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
    
    JLabel title = new JLabel("<html><b>" +port.getName() + "</b> " +
        port.getMetadata().getFirstMIMEType() + "</html>");
    title.setAlignmentX(Component.LEFT_ALIGNMENT);
    add(title);
    
    String description = port.getMetadata().getDescription();
    if (! description.equals("")) {
      JTextArea descriptionArea = new JTextArea(description);
      descriptionArea.setEditable(false);
      descriptionArea.setLineWrap(true);
      descriptionArea.setOpaque(false);
      descriptionArea.setWrapStyleWord(true);
      descriptionArea.setAlignmentX(Component.LEFT_ALIGNMENT);
      descriptionArea.setFont(Font.getFont("Dialog"));
      add(descriptionArea);
    }
  }
}

代码示例来源:origin: omegat-org/omegat

messageTextArea.setText(OStrings.getString("TAAS_API_KEY_NOT_FOUND")); // NOI18N
messageTextArea.setWrapStyleWord(true);
messageTextArea.setAlignmentX(0.0F);
messageTextArea.setDragEnabled(false);
messageTextArea.setFocusable(false);

代码示例来源:origin: tulskiy/musique

stubs.setAlignmentX(0);
side.add(stubs);

代码示例来源:origin: omegat-org/omegat

hintTextArea.setText(OStrings.getString("GUI_SEGMENTATION_NOTE")); // NOI18N
hintTextArea.setWrapStyleWord(true);
hintTextArea.setAlignmentX(0.0F);
hintTextArea.setAlignmentY(0.0F);
hintTextArea.setDragEnabled(false);

代码示例来源:origin: chungkwong/MathOCR

public LogicalInspector(){
  del=addButton("DELETE");
  modify=addButton("MODIFY");
  bar.addSeparator();
  type.setAlignmentX(0);
  bar.add(type);
  area.setAlignmentX(0);
  area.setLineWrap(true);
  bar.add(area);
  noStart.setAlignmentX(0);
  bar.add(noStart);
  noEnd.setAlignmentX(0);
  bar.add(noEnd);
  additional.setAlignmentX(0);
  JLabel lab=new JLabel(ENVIRONMENT.getTranslation("ADDITIONAL_INFO"));
  lab.setAlignmentX(0);
  bar.add(lab);
  additional.setAlignmentX(0);
  bar.add(additional);
  bar.addSeparator();
  next=addButton("NEXT");
  add(new JScrollPane(bar),BorderLayout.EAST);
}
private final JButton addButton(String com){

代码示例来源:origin: omegat-org/omegat

descriptionTextArea.setText(OStrings.getString("GUI_TAGVALIDATION_DESCRIPTION")); // NOI18N
descriptionTextArea.setWrapStyleWord(true);
descriptionTextArea.setAlignmentX(0.0F);
descriptionTextArea.setDragEnabled(false);
descriptionTextArea.setFocusable(false);
looseTagOrderWarningTextArea.setText(OStrings.getString("TV_OPTION_LOOSE_TAG_WARNING")); // NOI18N
looseTagOrderWarningTextArea.setWrapStyleWord(true);
looseTagOrderWarningTextArea.setAlignmentX(0.0F);
looseTagOrderWarningTextArea.setOpaque(false);
jPanel4.add(looseTagOrderWarningTextArea);
customPatternWarningTextArea.setLineWrap(true);
customPatternWarningTextArea.setWrapStyleWord(true);
customPatternWarningTextArea.setAlignmentX(0.0F);
customPatternWarningTextArea.setOpaque(false);
jPanel2.add(customPatternWarningTextArea, java.awt.BorderLayout.SOUTH);
removePatternWarningTextArea.setLineWrap(true);
removePatternWarningTextArea.setWrapStyleWord(true);
removePatternWarningTextArea.setAlignmentX(0.0F);
removePatternWarningTextArea.setOpaque(false);
jPanel1.add(removePatternWarningTextArea, java.awt.BorderLayout.SOUTH);

代码示例来源:origin: org.codehaus.izpack/izpack-panel

area.setAlignmentX(LEFT_ALIGNMENT);
area.setCaretPosition(0);
area.setEditable(false);

代码示例来源:origin: omegat-org/omegat

jTextArea1.setText(OStrings.getString("EXTERNALFINDER_SUBEDITOR_URL_MESSAGE")); // NOI18N
jTextArea1.setWrapStyleWord(true);
jTextArea1.setAlignmentX(0.0F);
jTextArea1.setFocusable(false);
jTextArea1.setOpaque(false);
jTextArea2.setText(OStrings.getString("EXTERNALFINDER_SUBEDITOR_COMMAND_MESSAGE")); // NOI18N
jTextArea2.setWrapStyleWord(true);
jTextArea2.setAlignmentX(0.0F);
jTextArea2.setFocusable(false);
jTextArea2.setOpaque(false);

代码示例来源:origin: omegat-org/omegat

description.setText(OStrings.getString("FILTERSCUSTOMIZER_DESCRIPTION")); // NOI18N
description.setWrapStyleWord(true);
description.setAlignmentX(0.0F);
description.setAlignmentY(0.0F);
description.setDragEnabled(false);

代码示例来源:origin: sarahtattersall/PIPE

/**
 * Initialize with an (x,y) location
 * @param x coordinate
 * @param y coordinate 
 */
private void initialize(int x, int y) {
  originalX = x;
  originalY = y;
  noteText.setAlignmentX(Component.CENTER_ALIGNMENT);
  noteText.setAlignmentY(Component.CENTER_ALIGNMENT);
  noteText.setOpaque(false);
  noteText.setEditable(false);
  noteText.setEnabled(false);
  noteText.setLineWrap(true);
  noteText.setWrapStyleWord(true);
  // Set minimum size the preferred size for an empty string:
  noteText.setText("");
  noteText.setFont(
      new Font(GUIConstants.ANNOTATION_DEFAULT_FONT, Font.PLAIN, GUIConstants.ANNOTATION_DEFAULT_FONT_SIZE));
  noteText.setSize(noteText.getPreferredSize().width, noteText.getPreferredSize().height);
  noteText.setMinimumSize(noteText.getPreferredSize());
  noteText.setHighlighter(new DefaultHighlighter());
  noteText.setDisabledTextColor(GUIConstants.NOTE_DISABLED_COLOUR);
  noteText.setForeground(GUIConstants.NOTE_EDITING_COLOUR);
  add(noteText);
  setLocation(x - GUIConstants.RESERVED_BORDER / 2, y - GUIConstants.RESERVED_BORDER / 2);
}

相关文章

JTextArea类方法